arpstat
VNET_PCPUSTAT_DECLARE(struct arpstat, arpstat);
VNET_PCPUSTAT_ADD(struct arpstat, arpstat, name, (val))
VNET_PCPUSTAT_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */
VNET_PCPUSTAT_SYSINIT(arpstat);
VNET_PCPUSTAT_SYSUNINIT(arpstat);
SYSCTL_VNET_PCPUSTAT(_net_link_ether_arp, OID_AUTO, stats, struct arpstat,
arpstat, "ARP statistics (struct arpstat, net/if_arp.h)");
dropped = arpstat.dropped;
if (sysctlbyname("net.link.ether.arp.stats", &arpstat, &len,
printf("dropped after %ld\n", arpstat.dropped);
if (arpstat.dropped != dropped) {
"before %ld after %ld\n", dropped, arpstat.dropped);
dropped = arpstat.dropped;
if (sysctlbyname("net.link.ether.arp.stats", &arpstat, &len,
if (arpstat.dropped != (dropped + 1)) {
" %ld after %ld\n", dropped, arpstat.dropped);
struct arpstat arpstat;
size_t len = sizeof(arpstat);
if (sysctlbyname("net.link.ether.arp.stats", &arpstat, &len,
struct arpstat arpstat;
if (fetch_stats("net.link.ether.arp.stats", off, &arpstat,
sizeof(arpstat), kread_counters) != 0)
#define p(f, m) if (arpstat.f || sflag <= 1) \
xo_emit("\t" m, (uintmax_t)arpstat.f, plural(arpstat.f))
#define p2(f, m) if (arpstat.f || sflag <= 1) \
xo_emit("\t" m, (uintmax_t)arpstat.f, pluralies(arpstat.f))