Re: novice coding in /linux/net/ipv4/util.c

From: Nivedita Singhvi (niv@us.ibm.com)
Date: Mon Apr 22 2002 - 12:42:40 EST


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, <waltje@uWalt.NL.Mugnet.ORG>
  *
@@ -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.
  */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:32 EST