3 Small replacement for netstat
4 -----------------------------
6 This program implements some basic functionality subset of normal netstat -
7 it can display the routing table and protocol statistics.
9 Large part of the code dealing with retrieving the routing table via sysctl(3)
10 was taken from code examples written by Richard Stevens to accompany his
16 ns [-rsi] [-p proto] [-w wait]
20 -r print routing table (default)
21 -s print protocol statistics
22 -i print interface statistics
23 -p proto display only statistics related to this
24 protocol, where 'proto' is one of:
29 - bdg - bridging stats, if 'ns' was compiled with
30 bridging support (flag BRIDGING in Makefile)
31 -w wait continuous display, repeat every 'wait' seconds.
36 * 'ns' doesn't resolve IP addresses to names
37 * well, real netstat provides _much_ more information... but this one needs
38 to be small, right? :-)