From f2b133839414cc17ec766c3e27f03fcee58a694d Mon Sep 17 00:00:00 2001 From: fenner Date: Mon, 18 Jan 1999 02:09:15 +0000 Subject: Don't use ip_mrtproto to determine whether multicast routing is in the kernel; this was left over from the earlier protocol-dependent kernel multicast routing code. Learn how to handle the malloc'd multicast routing table (instead of expecting it to be in mbufs) --- usr.bin/netstat/main.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'usr.bin/netstat/main.c') diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index fd0c5bd..6680d07 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -42,7 +42,7 @@ char const copyright[] = static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #endif static const char rcsid[] = - "$Id: main.c,v 1.21 1998/08/05 13:54:07 phk Exp $"; + "$Id: main.c,v 1.22 1998/08/08 08:13:04 phk Exp $"; #endif /* not lint */ #include @@ -105,23 +105,21 @@ static struct nlist nl[] = { { "_nfile" }, #define N_FILE 18 { "_file" }, -#define N_MRTPROTO 19 - { "_ip_mrtproto" }, -#define N_MRTSTAT 20 +#define N_MRTSTAT 19 { "_mrtstat" }, -#define N_MFCTABLE 21 +#define N_MFCTABLE 20 { "_mfctable" }, -#define N_VIFTABLE 22 +#define N_VIFTABLE 21 { "_viftable" }, -#define N_IPX 23 +#define N_IPX 22 { "_ipxpcb"}, -#define N_IPXSTAT 24 +#define N_IPXSTAT 23 { "_ipxstat"}, -#define N_SPXSTAT 25 +#define N_SPXSTAT 24 { "_spx_istat"}, -#define N_DDPSTAT 26 +#define N_DDPSTAT 25 { "_ddpstat"}, -#define N_DDPCB 27 +#define N_DDPCB 26 { "_ddpcb"}, { "" }, }; @@ -390,11 +388,9 @@ main(argc, argv) if (gflag) { kread(0, 0, 0); if (sflag) - mrt_stats(nl[N_MRTPROTO].n_value, - nl[N_MRTSTAT].n_value); + mrt_stats(nl[N_MRTSTAT].n_value); else - mroutepr(nl[N_MRTPROTO].n_value, - nl[N_MFCTABLE].n_value, + mroutepr(nl[N_MFCTABLE].n_value, nl[N_VIFTABLE].n_value); exit(0); } -- cgit v1.1