NetBSD/usr.bin/netstat
ozaki-r 1d675d5a3a netstat: strengthen against kernel changes
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.
2020-08-28 07:23:48 +00:00
..
Makefile remove unused 2020-04-03 16:41:59 +00:00
atalk.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
bpf.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
fast_ipsec.c
if.c Update for per-cpu interface statistics. 2020-02-02 03:41:12 +00:00
inet.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
inet6.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
main.c Avoid common symbol definitions. 2020-04-23 00:24:50 +00:00
mbuf.c
mroute.c sprintf() -> snprintf(), and adjust a buffer size to avoid any 2019-10-06 00:27:50 +00:00
mroute6.c
netstat.1 netstat.1: add various xrefs present in the body to "See Also" 2020-07-21 04:58:43 +00:00
netstat.h Avoid common symbol definitions. 2020-04-23 00:24:50 +00:00
netstat_hostops.c remove unused 2020-04-03 16:41:59 +00:00
netstat_rumpops.c remove unused 2020-04-03 16:41:59 +00:00
pfkey.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
pfsync.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
route.c Update sysctl key in netstat(1) 2020-05-27 05:59:16 +00:00
unix.c
vtw.c
vtw.h