aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/netstat/if.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-06-15 18:25:38 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-06-15 18:25:38 +0000
commitcf5e44f88ed75edec74a53fa31053cf73977f48e (patch)
treea04fcb8310e27cf5329ae9bf3e13bed1885f12a1 /usr.bin/netstat/if.c
parent6bd894ed2fb0ce55707898ae385c32323424c60e (diff)
downloadsrc-cf5e44f88ed75edec74a53fa31053cf73977f48e.tar.gz
src-cf5e44f88ed75edec74a53fa31053cf73977f48e.zip
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.
Notes
Notes: svn path=/head/; revision=78284
Diffstat (limited to 'usr.bin/netstat/if.c')
-rw-r--r--usr.bin/netstat/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 150d2f0d2116..500ced1ae992 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -202,7 +202,7 @@ intpr(int interval, u_long ifnetaddr, void (*pfunc)(char *))
if (kread(ifnetaddr, (char *)&ifnet, sizeof ifnet))
return;
- if ((!sflag || iflag) && !pflag) {
+ if (!pfunc) {
printf("%-5.5s %-5.5s %-13.13s %-15.15s %8.8s %5.5s",
"Name", "Mtu", "Network", "Address", "Ipkts", "Ierrs");
if (bflag)