summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/mroute.c19
-rw-r--r--usr.bin/netstat/mroute6.c11
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;
}
OpenPOWER on IntegriCloud