From owner-freebsd-current Tue Feb 13 21:23:47 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA08805 for current-outgoing; Tue, 13 Feb 1996 21:23:47 -0800 (PST) Received: from irz201.inf.tu-dresden.de (irz201.inf.tu-dresden.de [141.76.1.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id VAA08751 for ; Tue, 13 Feb 1996 21:23:21 -0800 (PST) Received: from sax.sax.de by irz201.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id GAA08261 for ; Wed, 14 Feb 1996 06:23:19 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id GAA22015; Wed, 14 Feb 1996 06:21:47 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id BAA13708; Wed, 14 Feb 1996 01:28:52 +0100 (MET) From: J Wunsch Message-Id: <199602140028.BAA13708@uriah.heep.sax.de> Subject: Never-ending `make release' story... To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Wed, 14 Feb 1996 01:28:49 +0100 (MET) Cc: wollman@lcs.mit.edu Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-current@FreeBSD.org Precedence: bulk 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 #include #include -#ifdef NS -#include -#include -#endif #ifdef ISO #include #include @@ -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 -#include - #include #include @@ -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. ;-)