summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-02-13 17:30:37 +0000
committerwollman <wollman@FreeBSD.org>1996-02-13 17:30:37 +0000
commit379b9b388fc8788659993af038bb322bfbcea8b2 (patch)
tree0853393f80e81ab72567bd7838b4c2b218a67558 /usr.bin/netstat
parent45f8e7f5c1b5de36c0bce4e71f98e7bb5fa9236f (diff)
downloadFreeBSD-src-379b9b388fc8788659993af038bb322bfbcea8b2.zip
FreeBSD-src-379b9b388fc8788659993af038bb322bfbcea8b2.tar.gz
XNS sort-of-support is no more.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/Makefile4
-rw-r--r--usr.bin/netstat/if.c6
-rw-r--r--usr.bin/netstat/main.c14
3 files changed, 20 insertions, 4 deletions
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index 2f73360..45fa21e 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -1,8 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 6/12/93
PROG= netstat
-SRCS= if.c inet.c main.c mbuf.c mroute.c ipx.c ns.c route.c \
- unix.c # iso.c tp_astring.c
+SRCS= if.c inet.c main.c mbuf.c mroute.c ipx.c route.c \
+ unix.c # iso.c ns.c tp_astring.c
CFLAGS+=-I/sys # -g
#.PATH: ${.CURDIR}/../../sys/netiso
BINGRP= kmem
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index e1a6ba9..4abe863 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -45,8 +45,10 @@ static char sccsid[] = "@(#)if.c 8.3 (Berkeley) 4/28/95";
#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>
@@ -79,7 +81,9 @@ intpr(interval, ifnetaddr)
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
@@ -182,6 +186,7 @@ intpr(interval, ifnetaddr)
ipx_phost((struct sockaddr *)sipx));
}
break;
+#ifdef NS
case AF_NS:
{
struct sockaddr_ns *sns =
@@ -197,6 +202,7 @@ intpr(interval, ifnetaddr)
ns_phost((struct sockaddr *)sns));
}
break;
+#endif
case AF_LINK:
{
struct sockaddr_dl *sdl =
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index c136305..fb05caa 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -169,6 +169,7 @@ struct protox ipxprotox[] = {
0, 0 }
};
+#ifdef NS
struct protox nsprotox[] = {
{ N_IDP, N_IDPSTAT, 1, nsprotopr,
idp_stats, "idp" },
@@ -179,6 +180,7 @@ struct protox nsprotox[] = {
{ -1, -1, 0, 0,
0, 0 }
};
+#endif
#ifdef ISO
struct protox isoprotox[] = {
@@ -195,7 +197,10 @@ struct protox isoprotox[] = {
};
#endif
-struct protox *protoprotox[] = { protox, ipxprotox, nsprotox,
+struct protox *protoprotox[] = { protox, ipxprotox,
+#ifdef NS
+ nsprotox,
+#endif
#ifdef ISO
isoprotox,
#endif
@@ -244,9 +249,12 @@ main(argc, argv)
dflag = 1;
break;
case 'f':
+#ifdef NS
if (strcmp(optarg, "ns") == 0)
af = AF_NS;
- else if (strcmp(optarg, "ipx") == 0)
+ else
+#endif
+ if (strcmp(optarg, "ipx") == 0)
af = AF_IPX;
else if (strcmp(optarg, "inet") == 0)
af = AF_INET;
@@ -424,9 +432,11 @@ main(argc, argv)
if (af == AF_IPX || af == AF_UNSPEC)
for (tp = ipxprotox; tp->pr_name; tp++)
printproto(tp, tp->pr_name);
+#ifdef NS
if (af == AF_NS || af == AF_UNSPEC)
for (tp = nsprotox; tp->pr_name; tp++)
printproto(tp, tp->pr_name);
+#endif
#ifdef ISO
if (af == AF_ISO || af == AF_UNSPEC)
for (tp = isoprotox; tp->pr_name; tp++)
OpenPOWER on IntegriCloud