Date: Wed, 14 Feb 1996 01:28:49 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Cc: wollman@lcs.mit.edu Subject: Never-ending `make release' story... Message-ID: <199602140028.BAA13708@uriah.heep.sax.de>
next in thread | raw e-mail | index | archive | help
Sigh, netstat hasn't been updated to the disabled NS code, as it seems. I needed the following patch to ``make rerelease''. Maybe i've been killing too much, and some of the below should have been #ifdef'ed. Index: netstat/if.c =================================================================== RCS file: /home/cvs/src/usr.bin/netstat/if.c,v retrieving revision 1.10 diff -u -r1.10 if.c --- if.c 1996/02/13 17:30:31 1.10 +++ if.c 1996/02/14 00:22:20 @@ -45,10 +45,6 @@ #include <netinet/in_var.h> #include <netipx/ipx.h> #include <netipx/ipx_if.h> -#ifdef NS -#include <netns/ns.h> -#include <netns/ns_if.h> -#endif #ifdef ISO #include <netiso/iso.h> #include <netiso/iso_var.h> @@ -81,9 +77,6 @@ struct ifaddr ifa; struct in_ifaddr in; struct ipx_ifaddr ipx; -#ifdef NS - struct ns_ifaddr ns; -#endif #ifdef ISO struct iso_ifaddr iso; #endif Index: netstat/netstat.h =================================================================== RCS file: /home/cvs/src/usr.bin/netstat/netstat.h,v retrieving revision 1.4 diff -u -r1.4 netstat.h --- netstat.h 1996/01/15 02:18:34 1.4 +++ netstat.h 1996/02/14 00:22:02 @@ -83,7 +83,6 @@ void rt_stats __P((u_long)); char *ipx_pnet __P((struct sockaddr *)); char *ipx_phost __P((struct sockaddr *)); -char *ns_phost __P((struct sockaddr *)); void upHex __P((char *)); char *routename __P((u_long)); Index: netstat/route.c =================================================================== RCS file: /home/cvs/src/usr.bin/netstat/route.c,v retrieving revision 1.11 diff -u -r1.11 route.c --- route.c 1996/01/15 02:18:35 1.11 +++ route.c 1996/02/14 00:21:41 @@ -54,8 +54,6 @@ #include <netipx/ipx.h> -#include <netns/ns.h> - #include <sys/sysctl.h> #include <netdb.h> @@ -407,10 +405,6 @@ break; } - case AF_NS: - cp = ns_print(sa); - break; - case AF_LINK: { register struct sockaddr_dl *sdl = (struct sockaddr_dl *)sa; @@ -791,74 +785,6 @@ p = ipx_print((struct sockaddr *)&work); if (strncmp("*.", p, 2) == 0) p += 2; - return(p); -} - -short ns_nullh[] = {0,0,0}; -short ns_bh[] = {-1,-1,-1}; - -char * -ns_print(sa) - register struct sockaddr *sa; -{ - register struct sockaddr_ns *sns = (struct sockaddr_ns*)sa; - struct ns_addr work; - union { union ns_net net_e; u_long long_e; } net; - u_short port; - static char mybuf[50], cport[10], chost[25]; - char *host = ""; - register char *p; register u_char *q; - - work = sns->sns_addr; - port = ntohs(work.x_port); - work.x_port = 0; - net.net_e = work.x_net; - if (ns_nullhost(work) && net.long_e == 0) { - if (port ) { - sprintf(mybuf, "*.%xH", port); - upHex(mybuf); - } else - sprintf(mybuf, "*.*"); - return (mybuf); - } - - if (bcmp(ns_bh, work.x_host.c_host, 6) == 0) { - host = "any"; - } else if (bcmp(ns_nullh, work.x_host.c_host, 6) == 0) { - host = "*"; - } else { - q = work.x_host.c_host; - sprintf(chost, "%02x%02x%02x%02x%02x%02xH", - q[0], q[1], q[2], q[3], q[4], q[5]); - for (p = chost; *p == '0' && p < chost + 12; p++) - continue; - host = p; - } - if (port) - sprintf(cport, ".%xH", htons(port)); - else - *cport = 0; - - sprintf(mybuf,"%xH.%s%s", ntohl(net.long_e), host, cport); - upHex(mybuf); - return(mybuf); -} - -char * -ns_phost(sa) - struct sockaddr *sa; -{ - register struct sockaddr_ns *sns = (struct sockaddr_ns *)sa; - struct sockaddr_ns work; - static union ns_net ns_zeronet; - char *p; - - work = *sns; - work.sns_addr.x_port = 0; - work.sns_addr.x_net = ns_zeronet; - - p = ns_print((struct sockaddr *)&work); - if (strncmp("0H.", p, 3) == 0) p += 3; return(p); } -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602140028.BAA13708>