summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-03-04 21:32:26 +0000
committerdlg <dlg@openbsd.org>2019-03-04 21:32:26 +0000
commit21ff97ba4bfe1f2355c0c8879f82f4a8605499b9 (patch)
treedefd54f5ed13cbd52a3be8eb80b59fc49433e800 /usr.bin/netstat/main.c
parentexpose the interface queue drops in the interface view (diff)
downloadwireguard-openbsd-21ff97ba4bfe1f2355c0c8879f82f4a8605499b9.tar.xz
wireguard-openbsd-21ff97ba4bfe1f2355c0c8879f82f4a8605499b9.zip
when showing interface stats, combine the queue drops with errors as fails
if you want to see errors or queue drops on their own, use -e or -d respectively. ok claudio@ deraadt@
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 17c889768a2..ebe83fe66d2 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.113 2018/08/13 14:36:54 mpi Exp $ */
+/* $OpenBSD: main.c,v 1.114 2019/03/04 21:32:26 dlg Exp $ */
/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */
/*
@@ -129,7 +129,7 @@ main(int argc, char *argv[])
tableid = getrtable();
while ((ch = getopt(argc, argv,
- "AaBbc:dFf:ghI:iLlM:mN:np:P:qrsT:tuvW:w:")) != -1)
+ "AaBbc:deFf:ghI:iLlM:mN:np:P:qrsT:tuvW:w:")) != -1)
switch (ch) {
case 'A':
Aflag = 1;
@@ -149,7 +149,10 @@ main(int argc, char *argv[])
errx(1, "count is %s", errstr);
break;
case 'd':
- dflag = 1;
+ dflag = IF_SHOW_DROP;
+ break;
+ case 'e':
+ dflag = IF_SHOW_ERRS;
break;
case 'F':
Fflag = 1;