ipstat
VNET_PCPUSTAT_DEFINE(struct ipstat, ipstat);
VNET_PCPUSTAT_SYSINIT(ipstat);
SYSCTL_VNET_PCPUSTAT(_net_inet_ip, IPCTL_STATS, stats, struct ipstat, ipstat,
VNET_PCPUSTAT_SYSUNINIT(ipstat);
counter_u64_add(VNET(ipstat)[statnum], 1);
counter_u64_add(VNET(ipstat)[statnum], -1);
VNET_PCPUSTAT_DECLARE(struct ipstat, ipstat);
VNET_PCPUSTAT_ADD(struct ipstat, ipstat, name, (val)); \
offsetof(struct ipstat, name) / sizeof(uint64_t)); \
offsetof(struct ipstat, name) / sizeof(uint64_t)); \
get_ipstat(struct ipstat *stat)
struct ipstat old, new;
struct ipstat old, new;
struct ipstat old, new;
struct ipstat ipstat;
if (fetch_stats("net.inet.ip.stats", off, &ipstat,
sizeof(ipstat), kread_counters) != 0)
#define p(f, m) if (ipstat.f || sflag <= 1) \
xo_emit(m, (uintmax_t )ipstat.f, plural(ipstat.f))
#define p1a(f, m) if (ipstat.f || sflag <= 1) \
xo_emit(m, (uintmax_t )ipstat.f)
if (ipstat.ips_forward || sflag <= 1)
struct ipstat i;