summaryrefslogtreecommitdiff
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2011-03-15 13:10:32 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2011-03-15 13:10:32 +0000
commit14140ba333d1f37745c00caf55b042a7d8182ef4 (patch)
treec9c057a8cde79c9aabefdb92105501928f3fb307 /usr.bin/netstat/main.c
parent7df9027b84c46b50471d8d278e77424d5f90ce79 (diff)
Add a -B flag to netstat which displays buffer sizes for TCP sockets.
With feedback from bluhm@ ok bluhm@ sthen@
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 5f3fd0059e5..c1e65e4988a 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.87 2010/10/30 23:06:05 bluhm Exp $ */
+/* $OpenBSD: main.c,v 1.88 2011/03/15 13:10:31 jsing Exp $ */
/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */
/*
@@ -169,7 +169,8 @@ main(int argc, char *argv[])
af = AF_UNSPEC;
- while ((ch = getopt(argc, argv, "Aabc:dFf:gI:ilM:mN:np:P:qrsT:tuvW:w:")) != -1)
+ while ((ch = getopt(argc, argv,
+ "AaBbc:dFf:gI:ilM:mN:np:P:qrsT:tuvW:w:")) != -1)
switch (ch) {
case 'A':
Aflag = 1;
@@ -177,6 +178,9 @@ main(int argc, char *argv[])
case 'a':
aflag = 1;
break;
+ case 'B':
+ Bflag = 1;
+ break;
case 'b':
bflag = 1;
break;
@@ -527,7 +531,7 @@ static void
usage(void)
{
(void)fprintf(stderr,
- "usage: %s [-Aan] [-f address_family] [-M core] [-N system]\n"
+ "usage: %s [-AaBn] [-f address_family] [-M core] [-N system]\n"
" %s [-bdFgilmnqrstu] [-f address_family] [-M core] [-N system]\n"
" [-T tableid]\n"
" %s [-bdn] [-c count] [-I interface] [-M core] [-N system] [-w wait]\n"