diff options
author | bms <bms@FreeBSD.org> | 2007-02-21 13:41:51 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2007-02-21 13:41:51 +0000 |
commit | 37b367b5c82c622bab5e7eb62e33bf7a72b20b9c (patch) | |
tree | 51d741bde1c3e9f7974752b2fa6d744907e528f8 /usr.bin/netstat | |
parent | e0f499d1d4431d2e6df14594352d3b4828252d6f (diff) | |
download | FreeBSD-src-37b367b5c82c622bab5e7eb62e33bf7a72b20b9c.zip FreeBSD-src-37b367b5c82c622bab5e7eb62e33bf7a72b20b9c.tar.gz |
Change wording of warnings when there is no ip_mroute.ko module
loaded into the system.
Change wording of comments to reflect the fact we should unconditionally
use KVM if the -M option is used to specify a core file.
Add comments to document the fact that IPv6 multicast forwarding
information display still relies on KVM for gathering information.
Diffstat (limited to 'usr.bin/netstat')
-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 c32c755..728fa9d 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 1182434..d23ba97 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; } |