summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorpyr <pyr@openbsd.org>2007-03-23 10:59:38 +0000
committerpyr <pyr@openbsd.org>2007-03-23 10:59:38 +0000
commiteef7d7d6a1808199ef38e903aa3b65661004ff4f (patch)
tree853a8b3b7c81f28982d991cebf8aa77b956b4529 /usr.bin/netstat/main.c
parentDocument temporary files. (diff)
downloadwireguard-openbsd-eef7d7d6a1808199ef38e903aa3b65661004ff4f.tar.xz
wireguard-openbsd-eef7d7d6a1808199ef38e903aa3b65661004ff4f.zip
Add a new flag -F to netstat restricting route display in conjuction
with -r to routes in the same address family as the destination. ok henning@, claudio@
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index aa0b3c92ccc..7cabddfd857 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.63 2006/08/29 21:51:13 claudio Exp $ */
+/* $OpenBSD: main.c,v 1.64 2007/03/23 10:59:38 pyr 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.63 2006/08/29 21:51:13 claudio Exp $";
+static char *rcsid = "$OpenBSD: main.c,v 1.64 2007/03/23 10:59:38 pyr Exp $";
#endif
#endif /* not lint */
@@ -267,7 +267,7 @@ main(int argc, char *argv[])
af = AF_UNSPEC;
- while ((ch = getopt(argc, argv, "Aabdf:gI:ilM:mN:np:P:qrstuvW:w:")) != -1)
+ while ((ch = getopt(argc, argv, "AabdFf:gI:ilM:mN:np:P:qrstuvW:w:")) != -1)
switch (ch) {
case 'A':
Aflag = 1;
@@ -281,6 +281,9 @@ main(int argc, char *argv[])
case 'd':
dflag = 1;
break;
+ case 'F':
+ Fflag = 1;
+ break;
case 'f':
if (strcmp(optarg, "inet") == 0)
af = AF_INET;