Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net no longer need to carry local version of inet_ntoa, ...



details:   https://anonhg.NetBSD.org/src/rev/30ae55980d02
branches:  trunk
changeset: 509667:30ae55980d02
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu May 10 01:04:08 2001 +0000

description:
no longer need to carry local version of inet_ntoa, we have it in libkern.

diffstat:

 sys/net/if_gre.c |  29 +++++------------------------
 1 files changed, 5 insertions(+), 24 deletions(-)

diffs (62 lines):

diff -r 18aee073b32d -r 30ae55980d02 sys/net/if_gre.c
--- a/sys/net/if_gre.c  Thu May 10 01:03:03 2001 +0000
+++ b/sys/net/if_gre.c  Thu May 10 01:04:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gre.c,v 1.18 2001/04/12 17:53:48 thorpej Exp $ */
+/*     $NetBSD: if_gre.c,v 1.19 2001/05/10 01:04:08 itojun Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -116,9 +116,6 @@
     IF_CLONE_INITIALIZER("gre", gre_clone_create, gre_clone_destroy);
 
 void gre_compute_route(struct gre_softc *sc);
-#ifdef DIAGNOSTIC
-void gre_inet_ntoa(struct in_addr in);
-#endif
 
 void   greattach __P((int));
 
@@ -534,8 +531,8 @@
        }
 
 #ifdef DIAGNOSTIC
-       printf("%s: searching a route to ", sc->sc_if.if_xname);
-       gre_inet_ntoa(((struct sockaddr_in *)&ro->ro_dst)->sin_addr);
+       printf("%s: searching a route to %s", sc->sc_if.if_xname,
+           inet_ntoa(((struct sockaddr_in *)&ro->ro_dst)->sin_addr));
 #endif
 
        rtalloc(ro);
@@ -548,8 +545,8 @@
                ((struct sockaddr_in *)&ro->ro_dst)->sin_addr = sc->g_dst;
 
 #ifdef DIAGNOSTIC
-       printf(", choosing %s with gateway ",ro->ro_rt->rt_ifp->if_xname);
-       gre_inet_ntoa(((struct sockaddr_in *)(ro->ro_rt->rt_gateway))->sin_addr);
+       printf(", choosing %s with gateway %s", ro->ro_rt->rt_ifp->if_xname,
+           inet_ntoa(((struct sockaddr_in *)(ro->ro_rt->rt_gateway))->sin_addr));
        printf("\n");
 #endif
 }
@@ -583,20 +580,4 @@
                sum += (sum >> 16);
                return (~sum);
 }
-
-
-/* while testing ... */
-#ifdef DIAGNOSTIC
-void
-gre_inet_ntoa(struct in_addr in)
-{
-       char *p;
-
-       p = (char *)&in;
-#define UC(b)   (((int)b)&0xff)
-       printf("%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
-}
-
 #endif
-#endif
-



Home | Main Index | Thread Index | Old Index