udpstat
VNET_PCPUSTAT_DEFINE(struct udpstat, udpstat); /* from udp_var.h */
VNET_PCPUSTAT_SYSINIT(udpstat);
SYSCTL_VNET_PCPUSTAT(_net_inet_udp, UDPCTL_STATS, stats, struct udpstat,
udpstat, "UDP statistics (struct udpstat, netinet/udp_var.h)");
VNET_PCPUSTAT_SYSUNINIT(udpstat);
counter_u64_add(VNET(udpstat)[statnum], 1);
VNET_PCPUSTAT_DECLARE(struct udpstat, udpstat);
VNET_PCPUSTAT_ADD(struct udpstat, udpstat, name, (val)); \
offsetof(struct udpstat, name) / sizeof(uint64_t)); \
struct udpstat udpstat;
if (fetch_stats("net.inet.udp.stats", off, &udpstat,
sizeof(udpstat), kread_counters) != 0)
#define p(f, m) if (udpstat.f || sflag <= 1) \
xo_emit("\t" m, (uintmax_t)udpstat.f, plural(udpstat.f))
#define p1a(f, m) if (udpstat.f || sflag <= 1) \
xo_emit("\t" m, (uintmax_t)udpstat.f)
noportbmcast = udpstat.udps_noportmcast + udpstat.udps_noportbcast;
delivered = udpstat.udps_ipackets -
udpstat.udps_hdrops -
udpstat.udps_badlen -
udpstat.udps_badsum -
udpstat.udps_noport -
udpstat.udps_fullsock;
struct udpstat u;