1d675d5a3a
netstat uses sysctlbyname to get counter data from the kernel. sysctlbyname fails with ENOMEM if actual counter data in the kernel is larger than a passed buffer. netstat just skips showing counters of a category if sysctlbyname fails, so if we added new counters of the category to the kernel, nestat shows nothing for the category. Fortunately sysctlbyname fills data as much as possible even if a passed buffer is short. So we can allow netstat to show the filled data anyway if sysctlbyname fails with ENOMEM. Note that this backcompat mechanism works only if new counters are appended, and doesn't work if new counters are inserted into the middle or counters are moved. |
||
---|---|---|
.. | ||
atalk.c | ||
bpf.c | ||
fast_ipsec.c | ||
if.c | ||
inet6.c | ||
inet.c | ||
main.c | ||
Makefile | ||
mbuf.c | ||
mroute6.c | ||
mroute.c | ||
netstat_hostops.c | ||
netstat_rumpops.c | ||
netstat.1 | ||
netstat.h | ||
pfkey.c | ||
pfsync.c | ||
route.c | ||
unix.c | ||
vtw.c | ||
vtw.h |