summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2009-03-19 01:43:03 +0000
committerbms <bms@FreeBSD.org>2009-03-19 01:43:03 +0000
commit76f193cd692e42617fb7f33b9581e7e5a3da58f0 (patch)
treed8c3186aadc92c08ebcc649765a90704c2e1d233 /usr.bin/netstat/main.c
parentbe7293a078080bef32e2a64d792bfdfa0c65dead (diff)
downloadFreeBSD-src-76f193cd692e42617fb7f33b9581e7e5a3da58f0.zip
FreeBSD-src-76f193cd692e42617fb7f33b9581e7e5a3da58f0.tar.gz
Introduce a number of changes to the MROUTING code.
This is purely a forwarding plane cleanup; no control plane code is involved. Summary: * Split IPv4 and IPv6 MROUTING support. The static compile-time kernel option remains the same, however, the modules may now be built for IPv4 and IPv6 separately as ip_mroute_mod and ip6_mroute_mod. * Clean up the IPv4 multicast forwarding code to use BSD queue and hash table constructs. Don't build our own timer abstractions when ratecheck() and timevalclear() etc will do. * Expose the multicast forwarding cache (MFC) and virtual interface table (VIF) as sysctls, to reduce netstat's dependence on libkvm for this information for running kernels. * bandwidth meters however still require libkvm. * Make the MFC hash table size a boot/load-time tunable ULONG, net.inet.ip.mfchashsize (defaults to 256). * Remove unused members from struct vif and struct mfc. * Kill RSVP support, as no current RSVP implementation uses it. These stubs could be moved to raw_ip.c. * Don't share locks or initialization between IPv4 and IPv6. * Don't use a static struct route_in6 in ip6_mroute.c. The v6 code is still using a cached struct route_in6, this is moved to mif6 for the time being. * More cleanup remains to be merged from ip_mroute.c to ip6_mroute.c. v4 path tested using ports/net/mcast-tools. v6 changes are mostly mechanical locking and *have not* been tested. As these changes partially break some kernel ABIs, they will not be MFCed. There is a lot more work to be done here. Reviewed by: Pavlin Radoslavov
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 6eb313a..8b25ff5 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -82,8 +82,8 @@ static struct nlist nl[] = {
{ .n_name = "_rt_tables"},
#define N_MRTSTAT 3
{ .n_name = "_mrtstat" },
-#define N_MFCTABLE 4
- { .n_name = "_mfctable" },
+#define N_MFCHASHTBL 4
+ { .n_name = "_mfchashtbl" },
#define N_VIFTABLE 5
{ .n_name = "_viftable" },
#define N_IPX 6
@@ -182,6 +182,8 @@ static struct nlist nl[] = {
{ .n_name = "_rip6stat" },
#define N_SCTPSTAT 53
{ .n_name = "_sctpstat" },
+#define N_MFCTABLESIZE 54
+ { .n_name = "_mfctablesize" },
{ .n_name = NULL },
};
@@ -550,7 +552,8 @@ main(int argc, char *argv[])
#endif
} else {
if (af == AF_INET || af == AF_UNSPEC)
- mroutepr(nl[N_MFCTABLE].n_value,
+ mroutepr(nl[N_MFCHASHTBL].n_value,
+ nl[N_MFCTABLESIZE].n_value,
nl[N_VIFTABLE].n_value);
#ifdef INET6
if (af == AF_INET6 || af == AF_UNSPEC)
OpenPOWER on IntegriCloud