opnsense-src/usr.bin/netstat
Kyle Evans f3a097d031 netstat: switch to using the sysctl-exported stats for live stats
Now that we export the relevant stats via the net.route.stats sysctl,
switch to using that to avoid having to dig around in mem(4) for live
kernel statistics.  Based on callers of kresolve_list(), this is the
last live path using mem(4) that could be functional today.

Tested both with `netstat -rs` and `netstat -rs -M`.

Note that this will not be able to extract stats from a running kernel
that predates 3360a15898 / 1500026, but this can be worked around by
specifying `-M /dev/mem` explicitly in the interim to fallback to
libkvm against /dev/mem.

Reviewed by:	glebius, markj, zlei
Differential Revision:	https://reviews.freebsd.org/D47231
2024-10-24 11:54:21 -05:00
..
bpf.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
common.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
common.h usr.bin: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
inet.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
inet6.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
ipsec.c usr.bin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
main.c netstat: switch to using the sysctl-exported stats for live stats 2024-10-24 11:54:21 -05:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mbuf.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
mroute.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
mroute6.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
netgraph.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
netisr.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
netstat.1 netstat.1: Clarify -d argument 2024-07-29 14:07:11 -06:00
netstat.h netstat: Add version information to libxo output 2024-09-06 12:34:31 -06:00
nhgrp.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
nhops.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
nlist_symbols pflow: netstat statistics 2024-01-16 09:45:53 +01:00
pfkey.c usr.bin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
route.c netstat: switch to using the sysctl-exported stats for live stats 2024-10-24 11:54:21 -05:00
route_netlink.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
sctp.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00
unix.c netstat(1): Complete libxo transition 2024-10-13 02:21:46 +08:00