diff options
| author | Bruce M Simpson <bms@FreeBSD.org> | 2007-02-21 13:41:51 +0000 |
|---|---|---|
| committer | Bruce M Simpson <bms@FreeBSD.org> | 2007-02-21 13:41:51 +0000 |
| commit | ab8e5cbf16612c38235d4f32f0d72f5b11041d22 (patch) | |
| tree | 51d741bde1c3e9f7974752b2fa6d744907e528f8 /usr.bin | |
| parent | 0754972c5c72adff156ec736d2f4ebc57776e1ae (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/netstat/mroute.c | 19 | ||||
| -rw-r--r-- | usr.bin/netstat/mroute6.c | 11 |
2 files changed, 19 insertions, 11 deletions
diff --git a/usr.bin/netstat/mroute.c b/usr.bin/netstat/mroute.c index c32c755548ce..728fa9d8bd7d 100644 --- a/usr.bin/netstat/mroute.c +++ b/usr.bin/netstat/mroute.c @@ -86,24 +86,28 @@ mroutepr(u_long mfcaddr, u_long vifaddr) len = sizeof(mfctable); if (sysctlbyname("net.inet.ip.mfctable", mfctable, &len, NULL, 0) < 0) { warn("sysctl: net.inet.ip.mfctable"); - /* Compatability with older kernels - candidate for removal */ if (mfcaddr == 0) { - printf("No IPv4 multicast routing compiled into this system.\n"); + printf("No IPv4 multicast forwarding configured in " + "the running system.\n"); return; } - + /* + * XXX: Try KVM if the module is neither compiled nor loaded. + * The correct behaviour would be to always use KVM if + * the -M option is specified to netstat(1). + */ kread(mfcaddr, (char *)mfctable, sizeof(mfctable)); } len = sizeof(viftable); if (sysctlbyname("net.inet.ip.viftable", viftable, &len, NULL, 0) < 0) { warn("sysctl: net.inet.ip.viftable"); - /* Compatability with older kernels - candidate for removal */ if (vifaddr == 0) { - printf("No IPv4 multicast routing compiled into this system.\n"); + printf("No IPv4 multicast forwarding configured in " + "the running system.\n"); return; } - + /* XXX KVM */ kread(vifaddr, (char *)viftable, sizeof(viftable)); } @@ -275,7 +279,8 @@ mrt_stats(u_long mstaddr) warn("sysctl: net.inet.ip.mrtstat"); /* Compatability with older kernels - candidate for removal */ if (mstaddr == 0) { - printf("No IPv4 multicast routing compiled into this system.\n"); + printf("No IPv4 multicast forwarding configured in " + "the running system.\n"); return; } diff --git a/usr.bin/netstat/mroute6.c b/usr.bin/netstat/mroute6.c index 118243449cd0..d23ba97c5244 100644 --- a/usr.bin/netstat/mroute6.c +++ b/usr.bin/netstat/mroute6.c @@ -109,9 +109,10 @@ mroute6pr(u_long mfcaddr, u_long mifaddr) mifi_t maxmif = 0; long int waitings; + /* XXX: sysctl not yet implemented for mif6table. */ if (mfcaddr == 0 || mifaddr == 0) { - printf("No IPv6 multicast routing compiled into this" - " system.\n"); + printf("No IPv6 multicast forwarding configured in the " + "running system.\n"); return; } @@ -147,6 +148,7 @@ mroute6pr(u_long mfcaddr, u_long mifaddr) if (!banner_printed) printf("\nIPv6 Multicast Interface Table is empty\n"); + /* XXX: sysctl not yet implemented for mf6ctable. */ kread(mfcaddr, (char *)&mf6ctable, sizeof(mf6ctable)); banner_printed = 0; for (i = 0; i < MF6CTBLSIZ; ++i) { @@ -200,9 +202,10 @@ mrt6_stats(u_long mstaddr) { struct mrt6stat mrtstat; + /* XXX: sysctl not yet implemented for mrt6stat. */ if (mstaddr == 0) { - printf("No IPv6 multicast routing compiled into this" - " system.\n"); + printf("No IPv6 multicast forwarding configured in the " + "running system.\n"); return; } |
