diff options
| author | Max Laier <mlaier@FreeBSD.org> | 2005-09-27 18:10:43 +0000 |
|---|---|---|
| committer | Max Laier <mlaier@FreeBSD.org> | 2005-09-27 18:10:43 +0000 |
| commit | b6de9e91bd2c47efaeec72a08642f8fd99cc7b20 (patch) | |
| tree | 06d50385e76f077f148ab914f1e6e424fbea50a1 /usr.bin/netstat | |
| parent | 458d22f30259508abcc97d1331ad091d5e70c523 (diff) | |
Notes
Diffstat (limited to 'usr.bin/netstat')
| -rw-r--r-- | usr.bin/netstat/if.c | 43 | ||||
| -rw-r--r-- | usr.bin/netstat/main.c | 4 | ||||
| -rw-r--r-- | usr.bin/netstat/netstat.1 | 4 | ||||
| -rw-r--r-- | usr.bin/netstat/netstat.h | 2 |
4 files changed, 2 insertions, 51 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index fcedce76ac0f..87bd6e755bd8 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include <net/if_var.h> #include <net/if_dl.h> #include <net/if_types.h> -#include <net/bridge.h> #include <net/ethernet.h> #include <net/pfvar.h> #include <net/if_pfsync.h> @@ -79,50 +78,8 @@ static void catchalarm (int); #ifdef INET6 static char ntop_buf[INET6_ADDRSTRLEN]; /* for inet_ntop() */ -static int bdg_done; #endif -/* print bridge statistics */ -void -bdg_stats(u_long dummy __unused, const char *name, int af1 __unused) -{ - int i; - size_t slen ; - struct bdg_stats s ; - int mib[4] ; - - slen = sizeof(s); - - mib[0] = CTL_NET ; - mib[1] = PF_LINK ; - mib[2] = IFT_ETHER ; - mib[3] = PF_BDG ; - if (sysctl(mib,4, &s,&slen,NULL,0)==-1) - return ; /* no bridging */ -#ifdef INET6 - if (bdg_done != 0) - return; - else - bdg_done = 1; -#endif - printf("-- Bridging statistics (%s) --\n", name) ; - printf( -"Name In Out Forward Drop Bcast Mcast Local Unknown\n"); - for (i = 0 ; i < 16 ; i++) { - if (s.s[i].name[0]) - printf("%-6s %9ld%9ld%9ld%9ld%9ld%9ld%9ld%9ld\n", - s.s[i].name, - s.s[i].p_in[(int)BDG_IN], - s.s[i].p_in[(int)BDG_OUT], - s.s[i].p_in[(int)BDG_FORWARD], - s.s[i].p_in[(int)BDG_DROP], - s.s[i].p_in[(int)BDG_BCAST], - s.s[i].p_in[(int)BDG_MCAST], - s.s[i].p_in[(int)BDG_LOCAL], - s.s[i].p_in[(int)BDG_UNKNOWN] ); - } -} - /* * Dump pfsync statistics structure. */ diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index cf7082fdc182..ef8a7b9a6fd3 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -171,8 +171,6 @@ struct protox { { -1, N_IPSECSTAT, 1, NULL, ipsec_stats, NULL, "ipsec", 0}, #endif - { -1, -1, 1, NULL, - bdg_stats, NULL, "bdg", 1 /* bridging... */ }, { -1, -1, 1, protopr, pim_stats, NULL, "pim", IPPROTO_PIM }, { -1, N_CARPSTAT, 1, 0, @@ -203,8 +201,6 @@ struct protox ip6protox[] = { #endif { -1, -1, 1, NULL, rip6_stats, NULL, "rip6", 0 }, - { -1, -1, 1, NULL, - bdg_stats, NULL, "bdg", 1 /* bridging... */ }, { -1, -1, 0, NULL, NULL, NULL, NULL, 0 } }; diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index ef2a4b3758f8..0dac06f9397b 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -294,9 +294,9 @@ The following address families and protocols are recognized: .It Em Family .Em Protocols .It Cm inet Pq Dv AF_INET -.Cm bdg , divert , icmp , igmp , ip , ipsec , pim, tcp , udp +.Cm divert , icmp , igmp , ip , ipsec , pim, tcp , udp .It Cm inet6 Pq Dv AF_INET6 -.Cm bdg , icmp6 , ip6 , ipsec6 , rip6 , tcp , udp +.Cm icmp6 , ip6 , ipsec6 , rip6 , tcp , udp .It Cm pfkey Pq Dv PF_KEY .Cm pfkey .It Cm atalk Pq Dv AF_APPLETALK diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index a2c36873434d..c69d5f7c4343 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -99,8 +99,6 @@ void inet6print(struct in6_addr *, int, const char *, int); void pfkey_stats(u_long, const char *, int); #endif -void bdg_stats(u_long, const char *, int); - void mbpr(u_long, u_long, u_long, u_long, u_long, u_long, u_long, u_long, u_long, u_long, u_long); |
