]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
First round of netstat(1) cleanup.
authorru <ru@FreeBSD.org>
Fri, 15 Jun 2001 18:25:38 +0000 (18:25 +0000)
committerru <ru@FreeBSD.org>
Fri, 15 Jun 2001 18:25:38 +0000 (18:25 +0000)
commit67653866aa83c06cbc92828ae2988bbeea1e776d
treea04fcb8310e27cf5329ae9bf3e13bed1885f12a1
parentb24972e849b812765e15dee9436299aa45c7a0de
First round of netstat(1) cleanup.

Removed the ambiguity in -s, -f, -p and -i flags handling.
Basically, there are four displays (except others):

1.  PCB display.
2.  Protocol statistics display. (-s)
3.  Interface statistics display. (-i)
4.  Per-interface protocol statistics display. (-i -s)

All of the above except 3) can be limited to a particular
protocol family (-f) or a single protocol (-p).

Some examples:

1.  netstat -f inet    -- show PCBs of all INET protocols
2.  netstat -p udp     -- show PCB of UDP protocol only (NEW!)
3.  netstat -s         -- show protocol statistics for all families
4.  netstat -s -f inet -- show INET protocols statistics
5.  netstat -s -p icmp -- show ICMP protocol statistics

This is a work in progress.  Manpage has been fixed slightly,
but is still incomplete.
usr.bin/netstat/if.c
usr.bin/netstat/main.c
usr.bin/netstat/netstat.1
usr.bin/netstat/netstat.h