From 439f92aab0fb2e7109b9bb3663f33fce779a0495 Mon Sep 17 00:00:00 2001 From: Thomas Nikolajsen Date: Fri, 11 Jul 2008 23:09:18 +0000 Subject: [PATCH] Update netstat help: - sync usage() with netstat.1 - describe that -W shows MPLS label operations - add description of protocol families and carp(4) - add cross references to inet6(4) and carp(4) --- usr.bin/netstat/main.c | 6 +++--- usr.bin/netstat/netstat.1 | 45 +++++++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index a4598e40ca..8737217e09 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1988, 1993 Regents of the University of California. All rights reserved. * @(#)main.c 8.4 (Berkeley) 3/1/94 * $FreeBSD: src/usr.bin/netstat/main.c,v 1.34.2.12 2001/09/17 15:17:46 ru Exp $ - * $DragonFly: src/usr.bin/netstat/main.c,v 1.15 2008/07/09 09:29:17 thomas Exp $ + * $DragonFly: src/usr.bin/netstat/main.c,v 1.16 2008/07/11 23:09:18 thomas Exp $ */ #include @@ -748,9 +748,9 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSW] [-c cpu] [-f protocol_family | -p protocol]\n" +"usage: netstat [-AaLnPSW] [-c cpu] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdnt] [-f address_family]\n" +" netstat -i | -I interface [-aBbdnt] [-f address_family]\n" " [-M core] [-N system]", " netstat -w wait [-I interface] [-d] [-M core] [-N system]", " netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]", diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index 2681560403..13be40dd39 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -31,9 +31,9 @@ .\" .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD: src/usr.bin/netstat/netstat.1,v 1.22.2.13 2003/05/03 22:10:02 keramida Exp $ -.\" $DragonFly: src/usr.bin/netstat/netstat.1,v 1.8 2008/07/09 09:29:17 thomas Exp $ +.\" $DragonFly: src/usr.bin/netstat/netstat.1,v 1.9 2008/07/11 23:09:18 thomas Exp $ .\" -.Dd September 7, 2001 +.Dd July 12, 2008 .Dt NETSTAT 1 .Os .Sh NAME @@ -223,6 +223,7 @@ or .Fl l is also present, show the path MTU +and MPLS label operations for each route. .It Xo .Bk -words @@ -271,36 +272,37 @@ Some options have the general meaning: On SMP systems the route table is replicated. This option allows the route table for a specific cpu to be accessed and exists primarily for debugging purposes. -.It Fl f Ar address_family , Fl p Ar protocol +.It Fl f Ar address_family , Fl f Ar protocol_family , Fl p Ar protocol Limit display to those records of the specified -.Ar address_family +.Ar address_family , +.Ar protocol_family or a single .Ar protocol . -The following address families and protocols are recognized: +The following address families, protocol families and protocols are recognized: .Pp .Bl -tag -width ".Cm netgraph , ng Pq Dv AF_NETGRAPH" -compact .It Em Family .Em Protocols -.It Cm inet Pq Dv AF_INET -.Cm divert , icmp , igmp , ip , ipsec , pim , tcp , udp -.It Cm inet6 Pq Dv AF_INET6 -.Cm icmp6 , ip6 , ipsec6 , rip6 , tcp , udp -.It Cm pfkey Pq Dv PF_KEY +.It Cm inet Pq Dv AF_INET PF_INET +.Cm carp , divert , icmp , igmp , ip , ipsec , pim , tcp , udp +.It Cm inet6 Pq Dv AF_INET6 PF_INET6 +.Cm carp , icmp6 , ip6 , ipsec6 , rip6 , tcp , udp +.It Cm pfkey Pq Dv AF_KEY PF_KEY .Cm pfkey -.It Cm atalk Pq Dv AF_APPLETALK +.It Cm atalk Pq Dv AF_APPLETALK PF_APPLETALK .Cm ddp -.It Cm netgraph , ng Pq Dv AF_NETGRAPH +.It Cm netgraph , ng Pq Dv AF_NETGRAPH PF_NETGRAPH .Cm ctrl , data -.It Cm ipx Pq Dv AF_IPX +.It Cm ipx Pq Dv AF_IPX PF_IPX .Cm ipx , spx -.\".It Cm ns Pq Dv AF_NS +.\".It Cm ns Pq Dv AF_NS PF_NS .\".Cm idp , ns_err , spp -.\".It Cm iso Pq Dv AF_ISO +.\".It Cm iso Pq Dv AF_ISO PF_ISO .\".Cm clnp , cltp , esis , tp -.It Cm unix Pq Dv AF_UNIX -.It Cm link Pq Dv AF_LINK -.It Cm mpls Pq Dv AF_MPLS +.It Cm unix Pq Dv AF_UNIX PF_UNIX +.It Cm link Pq Dv AF_LINK PF_LINK +.It Cm mpls Pq Dv AF_MPLS PF_MPLS .El .Pp The program will complain if @@ -328,8 +330,9 @@ and display them symbolically. Display additional protocol-specific information. For TCP the current transmit window, unacked sequence space, and RTT is displayed. .It Fl W -In certain displays, avoid truncating addresses even if this causes -some fields to overflow. +Wide display. +In certain displays, add columns and avoid truncating +addresses even if this causes some fields to overflow. .El .Pp The default display, for active sockets, shows the local @@ -433,7 +436,9 @@ option. .Xr nfsstat 1 , .Xr ps 1 , .Xr sockstat 1 , +.Xr carp 4 , .Xr inet 4 , +.Xr inet6 4 , .Xr route 4 , .Xr unix 4 , .Xr hosts 5 , -- 2.11.4.GIT