diff options
Diffstat (limited to 'usr.bin/netstat/inet.c')
-rw-r--r-- | usr.bin/netstat/inet.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 8bbac52bf9d..ceae24934d1 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.152 2016/11/11 15:01:43 bluhm Exp $ */ +/* $OpenBSD: inet.c,v 1.153 2016/12/22 11:04:44 rzalamena Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -49,7 +49,6 @@ #include <netinet/icmp_var.h> #include <netinet/igmp_var.h> #include <netinet/ip_var.h> -#include <netinet/pim_var.h> #include <netinet/tcp.h> #include <netinet/tcp_seq.h> #define TCPSTATES @@ -771,44 +770,6 @@ igmp_stats(char *name) #undef py } -/* - * Dump PIM statistics structure. - */ -void -pim_stats(char *name) -{ - struct pimstat pimstat; - int mib[] = { CTL_NET, PF_INET, IPPROTO_PIM, PIMCTL_STATS }; - size_t len = sizeof(pimstat); - - if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), - &pimstat, &len, NULL, 0) == -1) { - if (errno != ENOPROTOOPT) - warn("%s", name); - return; - } - - printf("%s:\n", name); -#define p(f, m) if (pimstat.f || sflag <= 1) \ - printf(m, pimstat.f, plural(pimstat.f)) -#define py(f, m) if (pimstat.f || sflag <= 1) \ - printf(m, pimstat.f, pimstat.f != 1 ? "ies" : "y") - - p(pims_rcv_total_msgs, "\t%llu message%s received\n"); - p(pims_rcv_total_bytes, "\t%llu byte%s received\n"); - p(pims_rcv_tooshort, "\t%llu message%s received with too few bytes\n"); - p(pims_rcv_badsum, "\t%llu message%s received with bad checksum\n"); - p(pims_rcv_badversion, "\t%llu message%s received with bad version\n"); - p(pims_rcv_registers_msgs, "\t%llu data register message%s received\n"); - p(pims_rcv_registers_bytes, "\t%llu data register byte%s received\n"); - p(pims_rcv_registers_wrongiif, "\t%llu data register message%s received on wrong iif\n"); - p(pims_rcv_badregisters, "\t%llu bad register%s received\n"); - p(pims_snd_registers_msgs, "\t%llu data register message%s sent\n"); - p(pims_snd_registers_bytes, "\t%llu data register byte%s sent\n"); -#undef p -#undef py -} - struct rpcnams { struct rpcnams *next; in_port_t port; |