summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2011-03-15 13:10:31 +0000
committerjsing <jsing@openbsd.org>2011-03-15 13:10:31 +0000
commit490e8927d06605264f49640b8d879717453c4faf (patch)
tree53f9d67ff824117f487316d2f062152a74810ba6 /usr.bin/netstat/main.c
parentPut daemon between double quotes to make it clear we are talking about (diff)
downloadwireguard-openbsd-490e8927d06605264f49640b8d879717453c4faf.tar.xz
wireguard-openbsd-490e8927d06605264f49640b8d879717453c4faf.zip
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"