diff options
author | julian <julian@FreeBSD.org> | 1995-10-26 20:31:59 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-10-26 20:31:59 +0000 |
commit | 90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc (patch) | |
tree | d823a4d0efac391c6dfad3ac2e27c0e984cea732 /usr.bin/netstat/main.c | |
parent | 627b063e661d2c0187cf625f83db54c6aca0a0c1 (diff) | |
download | FreeBSD-src-90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc.zip FreeBSD-src-90ae06d6ac1d2da3758389a70a20c91f3e9fd1dc.tar.gz |
Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by: Mike Mitchell, supervisor@alb.asctmd.com
This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..
Mikes been using it for a year or so
but on 2.0
more changes and stuff will be merged in from other developers now that this is in.
Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r-- | usr.bin/netstat/main.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index c8f2a98..47e6943 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -125,6 +125,14 @@ struct nlist nl[] = { { "_mfctable" }, #define N_VIFTABLE 30 { "_viftable" }, +#define N_IPX 31 + { "_ipxpcb"}, +#define N_IPXSTAT 32 + { "_ipxstat"}, +#define N_SPXSTAT 33 + { "_spx_istat"}, +#define N_IPXERR 34 + { "_ipx_errstat"}, "", }; @@ -150,6 +158,17 @@ struct protox { 0, 0 } }; +struct protox ipxprotox[] = { + { N_IPX, N_IPXSTAT, 1, ipxprotopr, + ipx_stats, "ipx" }, + { N_IPX, N_SPXSTAT, 1, ipxprotopr, + spx_stats, "spx" }, + { -1, N_IPXERR, 1, 0, + ipxerr_stats, "ipx_err" }, + { -1, -1, 0, 0, + 0, 0 } +}; + struct protox nsprotox[] = { { N_IDP, N_IDPSTAT, 1, nsprotopr, idp_stats, "idp" }, @@ -174,7 +193,7 @@ struct protox isoprotox[] = { 0, 0 } }; -struct protox *protoprotox[] = { protox, nsprotox, isoprotox, NULL }; +struct protox *protoprotox[] = { protox, ipxprotox, nsprotox, isoprotox, NULL }; static void printproto __P((struct protox *, char *)); static void usage __P((void)); @@ -221,6 +240,8 @@ main(argc, argv) case 'f': if (strcmp(optarg, "ns") == 0) af = AF_NS; + else if (strcmp(optarg, "ipx") == 0) + af = AF_IPX; else if (strcmp(optarg, "inet") == 0) af = AF_INET; else if (strcmp(optarg, "unix") == 0) @@ -384,6 +405,9 @@ main(argc, argv) } endprotoent(); } + if (af == AF_IPX || af == AF_UNSPEC) + for (tp = ipxprotox; tp->pr_name; tp++) + printproto(tp, tp->pr_name); if (af == AF_NS || af == AF_UNSPEC) for (tp = nsprotox; tp->pr_name; tp++) printproto(tp, tp->pr_name); |