diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-06-16 16:03:33 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-06-16 16:03:33 +0000 |
commit | 2ce4d4184fc68627dc8f0d6128252441d1e6cb5e (patch) | |
tree | 9de65f836a032fa899b11c352a6e8460d452e9cc | |
parent | 8d6ce0c8ae36ad4cb09841969fba84da465b2631 (diff) |
add -P to docs and usage/synopsis; ok markus jmc
-rw-r--r-- | usr.bin/netstat/main.c | 24 | ||||
-rw-r--r-- | usr.bin/netstat/netstat.1 | 18 |
2 files changed, 27 insertions, 15 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 32041ee9f53..6f024a1a734 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.59 2005/06/15 10:53:23 markus Exp $ */ +/* $OpenBSD: main.c,v 1.60 2005/06/16 16:03:32 jaredy Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -40,7 +40,7 @@ char copyright[] = #if 0 static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94"; #else -static char *rcsid = "$OpenBSD: main.c,v 1.59 2005/06/15 10:53:23 markus Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.60 2005/06/16 16:03:32 jaredy Exp $"; #endif #endif /* not lint */ @@ -622,16 +622,14 @@ static void usage(void) { (void)fprintf(stderr, -"usage: %s [-Aan] [-f address_family] [-M core] [-N system]\n", __progname); - (void)fprintf(stderr, -" %s [-bdgilmnqrstu] [-f address_family] [-M core] [-N system]\n", __progname); - (void)fprintf(stderr, -" %s [-bdn] [-I interface] [-M core] [-N system] [-w wait]\n", __progname); - (void)fprintf(stderr, -" %s [-s] [-M core] [-N system] [-p protocol]\n", __progname); - (void)fprintf(stderr, -" %s [-a] [-f address_family] [-i | -I interface]\n", __progname); - (void)fprintf(stderr, -" %s [-W interface]\n", __progname); + "usage: %s [-Aan] [-f address_family] [-M core] [-N system]\n" + " %s [-bdgilmnqrstu] [-f address_family] [-M core] [-N system]\n" + " %s [-bdn] [-I interface] [-M core] [-N system] [-w wait]\n" + " %s [-M core] [-N system] -P pcbaddr\n" + " %s [-s] [-M core] [-N system] [-p protocol]\n" + " %s [-a] [-f address_family] [-i | -I interface]\n" + " %s [-W interface]\n", + __progname, __progname, __progname, __progname, + __progname, __progname, __progname); exit(1); } diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index 2219709778c..0e4d7aa8dc7 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: netstat.1,v 1.44 2005/06/08 04:47:04 henning Exp $ +.\" $OpenBSD: netstat.1,v 1.45 2005/06/16 16:03:32 jaredy Exp $ .\" $NetBSD: netstat.1,v 1.11 1995/10/03 21:42:43 thorpej Exp $ .\" .\" Copyright (c) 1983, 1990, 1992, 1993 @@ -54,6 +54,10 @@ .Op Fl N Ar system .Op Fl w Ar wait .Nm netstat +.Op Fl M Ar core +.Op Fl N Ar system +.Fl P Ar pcbaddr +.Nm netstat .Op Fl s .Op Fl M Ar core .Op Fl N Ar system @@ -93,7 +97,9 @@ The options are as follows: .It Fl A With the default display, show the address of any protocol control blocks associated with sockets; used -for debugging. +for debugging, e.g. with the +.Fl P +flag. .It Fl a With the default display, show the state of all sockets; normally sockets used by @@ -203,6 +209,14 @@ Show network addresses as numbers (normally interprets addresses and attempts to display them symbolically). This option may be used with any of the display formats. +.It Fl P Ar pcbaddr +Display the contents of the protocol control block (PCB) located at +the kernel virtual address +.Ar pcbaddr . +PCB addresses can be obtained using the +.Fl A +flag. +This option can currently only be used to display TCP control blocks. .It Fl p Ar protocol Restrict the output to .Ar protocol , |