freebsd-skq/usr.bin/netstat
Gleb Smirnoff 84c1edcbad Rewrite netstat/if.c to use getifaddrs(3) and getifmaddrs(3) instead of
libkvm digging in kernel memory. This is possible since r231506 made
getifaddrs(3) to supply if_data for each ifaddr.

  The pros of this change is that now netstat(1) doesn't know about kernel
struct ifnet and struct ifaddr. And these structs are about to change
significantly in head soon. New netstat binary will work well with 10.0
and any future kernel.

  The cons is that now it isn't possible to obtain interface statistics
from a vmcore.

  Functions intpr() and sidewaysintpr() were rewritten from scratch.

  The output of netstat(1) has underwent the following changes:

1) The MTU is not printed for protocol addresses, since it has no notion.
   Dash is printed instead. If there would be a strong desire to return
   previous output, it is doable.
2) Output interface queue drops are not printed. Currently this data isn't
   available to userland via any API. We plan to drop 'struct ifqueue' from
   'struct ifnet' very soon, so old kvm(3) access to queue drops is soon
   to be broken, too. The plan is that drivers would handle their queues
   theirselves and a new field in if_data would be updated in case of drops.
3) In-kernel reference count for multicast addresses isn't printed. I doubt
   that anyone used it. Anyway, netstat(1) is sysadmin tool, not kernel
   debugger.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-15 09:55:07 +00:00
..
atalk.c Revert r228650, and work around the clang false positive with printf 2011-12-17 22:32:00 +00:00
bpf.c
if.c Rewrite netstat/if.c to use getifaddrs(3) and getifmaddrs(3) instead of 2013-10-15 09:55:07 +00:00
inet6.c - Use getnameinfo(3) instead of gethostbyaddr(3) or inet_ntop(3). 2013-08-17 17:23:42 +00:00
inet.c Migrate struct carpstats to PCPU counters. 2013-07-09 10:02:51 +00:00
ipsec.c Remove the large part of struct ipsecstat. Only few fields of this 2013-07-23 14:14:24 +00:00
ipx.c Spelling fixes for usr.bin/ 2011-12-30 11:02:40 +00:00
main.c Rewrite netstat/if.c to use getifaddrs(3) and getifmaddrs(3) instead of 2013-10-15 09:55:07 +00:00
Makefile Allow netstat to be build if INET is not defined in the kernel. 2012-07-16 06:43:04 +00:00
mbuf.c Remove obtained, but never used data. 2013-10-15 09:21:05 +00:00
mroute6.c
mroute.c Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPU 2013-07-09 09:50:15 +00:00
netgraph.c In ng_socket(4) expose less kernel internals to userland. This commit 2012-01-23 15:39:45 +00:00
netisr.c WARNS=6 compliance 2013-02-19 13:17:16 +00:00
netstat.1 Add -F fibnum option to specify an FIB number for -r flag. 2013-07-12 17:11:30 +00:00
netstat.h Rewrite netstat/if.c to use getifaddrs(3) and getifmaddrs(3) instead of 2013-10-15 09:55:07 +00:00
pfkey.c Migrate structs ahstat, espstat, ipcompstat, ipipstat, pfkeystat, 2013-07-09 10:08:13 +00:00
route.c Rewrite netstat/if.c to use getifaddrs(3) and getifmaddrs(3) instead of 2013-10-15 09:55:07 +00:00
sctp.c WARNS=6 compliance 2013-02-19 13:17:16 +00:00
unix.c WARNS=6 compliance 2013-02-19 13:17:16 +00:00