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
..
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 netstat: Add indirection of symbols to remove clash with sanitizers 2019-08-18 04:14:40 +00:00
if.c Update for per-cpu interface statistics. 2020-02-02 03:41:12 +00:00
inet6.c netstat: strengthen against kernel changes 2020-08-28 07:23:48 +00:00
inet.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
Makefile remove unused 2020-04-03 16:41:59 +00:00
mbuf.c Limit maximum owner name to appease gcc 2019-06-25 14:52:55 +00:00
mroute6.c
mroute.c sprintf() -> snprintf(), and adjust a buffer size to avoid any 2019-10-06 00:27: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
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
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 use _KMEMUSER for <sys/file.h> 2017-01-13 04:22:51 +00:00
vtw.c Remove now unused tcpip.h includes. Some were already unused before. 2018-05-03 07:13:48 +00:00
vtw.h