diff options
author | glebius <glebius@FreeBSD.org> | 2015-02-19 19:36:54 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-02-19 19:36:54 +0000 |
commit | bfb8a573120c248d08d110e0844f163a066bd5d7 (patch) | |
tree | 5c1e4f79d7731c97ec4786958683a066c3ac5c47 /usr.bin/netstat | |
parent | 6c07c5b094bd89019872b7fd37d3f43d83041a53 (diff) | |
download | FreeBSD-src-bfb8a573120c248d08d110e0844f163a066bd5d7.zip FreeBSD-src-bfb8a573120c248d08d110e0844f163a066bd5d7.tar.gz |
Burn bridges to FreeBSD 7.x IGMP stats.
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index c22e49f..b4bd312 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1093,47 +1093,6 @@ icmp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) } } -#ifndef BURN_BRIDGES -/* - * Dump IGMP statistics structure (pre 8.x kernel). - */ -static void -igmp_stats_live_old(const char *name) -{ - struct oigmpstat oigmpstat, zerostat; - size_t len = sizeof(oigmpstat); - - if (zflag) - memset(&zerostat, 0, len); - if (sysctlbyname("net.inet.igmp.stats", &oigmpstat, &len, - zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { - warn("sysctl: net.inet.igmp.stats"); - return; - } - - printf("%s:\n", name); - -#define p(f, m) if (oigmpstat.f || sflag <= 1) \ - printf(m, oigmpstat.f, plural(oigmpstat.f)) -#define py(f, m) if (oigmpstat.f || sflag <= 1) \ - printf(m, oigmpstat.f, oigmpstat.f != 1 ? "ies" : "y") - p(igps_rcv_total, "\t%u message%s received\n"); - p(igps_rcv_tooshort, "\t%u message%s received with too few bytes\n"); - p(igps_rcv_badsum, "\t%u message%s received with bad checksum\n"); - py(igps_rcv_queries, "\t%u membership quer%s received\n"); - py(igps_rcv_badqueries, - "\t%u membership quer%s received with invalid field(s)\n"); - p(igps_rcv_reports, "\t%u membership report%s received\n"); - p(igps_rcv_badreports, - "\t%u membership report%s received with invalid field(s)\n"); - p(igps_rcv_ourreports, -"\t%u membership report%s received for groups to which we belong\n"); - p(igps_snd_reports, "\t%u membership report%s sent\n"); -#undef p -#undef py -} -#endif /* !BURN_BRIDGES */ - /* * Dump IGMP statistics structure. */ @@ -1143,27 +1102,6 @@ igmp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) struct igmpstat igmpstat, zerostat; size_t len; -#ifndef BURN_BRIDGES - if (live) { - /* - * Detect if we are being run against a pre-IGMPv3 kernel. - * We cannot do this for a core file as the legacy - * struct igmpstat has no size field, nor does it - * export it in any readily-available symbols. - */ - len = 0; - if (sysctlbyname("net.inet.igmp.stats", NULL, &len, NULL, - 0) < 0) { - warn("sysctl: net.inet.igmp.stats"); - return; - } - if (len < sizeof(igmpstat)) { - igmp_stats_live_old(name); - return; - } - } -#endif /* !BURN_BRIDGES */ - len = sizeof(igmpstat); if (live) { if (zflag) |