2002-04-22 17:42:48

by Nivedita Singhvi

[permalink] [raw]
Subject: Re: novice coding in /linux/net/ipv4/util.c

in_ntoa() should be obsolete. The current policy seems to
be to have everybody use NIPQUAD directly..

They seem to have axed the reentrant in_ntoa2()
between 2.3.99 and 2.4.0:

--- linux-2.3.99/net/ipv4/utils.c Wed Jun 9 14:45:37 1999
+++ linux-2.4.0/net/ipv4/utils.c Tue Oct 10 10:33:52 2000
@@ -6,7 +6,7 @@
* Various kernel-resident INET utility functions; mainly
* for format conversion and debugging output.
*
- * Version: $Id: utils.c,v 1.7 1999/06/09 10:11:05 davem Exp $
+ * Version: $Id: utils.c,v 1.8 2000/10/03 07:29:01 anton Exp $
*
* Author: Fred N. van Kempen, <[email protected]>
*
@@ -57,12 +57,6 @@
return(buff);
}

-char *in_ntoa2(__u32 in, char *buff)
-{
- sprintf(buff, "%d.%d.%d.%d", NIPQUAD(in));
- return buff;
-}
-
/*
* Convert an ASCII string to binary IP.
*/