From 14140ba333d1f37745c00caf55b042a7d8182ef4 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Tue, 15 Mar 2011 13:10:32 +0000 Subject: Add a -B flag to netstat which displays buffer sizes for TCP sockets. With feedback from bluhm@ ok bluhm@ sthen@ --- usr.bin/netstat/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr.bin/netstat/main.c') 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" -- cgit v1.2.3