summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-06-08 00:20:42 +0000
committerjulian <julian@FreeBSD.org>1996-06-08 00:20:42 +0000
commit989c61cbbb3c500504ffb558fb497e4b70ff59b1 (patch)
tree45ed63a14729366d63c6bb7dcff00c650f3bcd8e /usr.bin/netstat/main.c
parent996a2d831474ffd06649ca53d5c694a5e78ace35 (diff)
downloadFreeBSD-src-989c61cbbb3c500504ffb558fb497e4b70ff59b1.zip
FreeBSD-src-989c61cbbb3c500504ffb558fb497e4b70ff59b1.tar.gz
patches to allow netstat to monitor appletalk sockets openned using the
/sys/netatalk protocol stack more cleanups and fixes are likely
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index dea574c..0a6294c 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -133,6 +133,10 @@ struct nlist nl[] = {
{ "_spx_istat"},
#define N_IPXERR 34
{ "_ipx_errstat"},
+#define N_DDPSTAT 35
+ { "_ddpstat"},
+#define N_DDPCB 36
+ { "_ddpcb"},
{ "" },
};
@@ -158,6 +162,13 @@ struct protox {
0, 0 }
};
+struct protox atalkprotox[] = {
+ { N_DDPCB, N_DDPSTAT, 1, atalkprotopr,
+ ddp_stats, "ddp" },
+ { -1, -1, 0, 0,
+ 0, 0 }
+};
+
struct protox ipxprotox[] = {
{ N_IPX, N_IPXSTAT, 1, ipxprotopr,
ipx_stats, "ipx" },
@@ -197,7 +208,7 @@ struct protox isoprotox[] = {
};
#endif
-struct protox *protoprotox[] = { protox, ipxprotox,
+struct protox *protoprotox[] = { protox, ipxprotox, atalkprotox,
#ifdef NS
nsprotox,
#endif
@@ -259,6 +270,8 @@ main(argc, argv)
af = AF_INET;
else if (strcmp(optarg, "unix") == 0)
af = AF_UNIX;
+ else if (strcmp(optarg, "atalk") == 0)
+ af = AF_APPLETALK;
#ifdef ISO
else if (strcmp(optarg, "iso") == 0)
af = AF_ISO;
@@ -431,6 +444,9 @@ main(argc, argv)
if (af == AF_IPX || af == AF_UNSPEC)
for (tp = ipxprotox; tp->pr_name; tp++)
printproto(tp, tp->pr_name);
+ if (af == AF_APPLETALK || af == AF_UNSPEC)
+ for (tp = atalkprotox; 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++)
OpenPOWER on IntegriCloud