diff options
author | 2008-09-16 15:48:12 +0000 | |
---|---|---|
committer | 2008-09-16 15:48:12 +0000 | |
commit | 0aaca726f5ae3302a995ca78e3d0d5be46398199 (patch) | |
tree | 54ac7ef880829b8ce87e544405e51736a3538d07 /usr.bin/netstat/main.c | |
parent | fix whitespace/tab typos (diff) | |
download | wireguard-openbsd-0aaca726f5ae3302a995ca78e3d0d5be46398199.tar.xz wireguard-openbsd-0aaca726f5ae3302a995ca78e3d0d5be46398199.zip |
netstat statistics for pflow(4) via pseudo family
ok cluadio@ henning@
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r-- | usr.bin/netstat/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index d3737f7e813..0d960476fd7 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.75 2008/05/08 07:18:47 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.76 2008/09/16 15:48:13 gollo Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -111,6 +111,7 @@ struct protox { { -1, NULL, carp_stats, NULL, "carp" }, { -1, NULL, pfsync_stats, NULL, "pfsync" }, { -1, NULL, pim_stats, NULL, "pim" }, + { -1, NULL, pflow_stats, NULL, "pflow" }, { -1, NULL, NULL, NULL, NULL } }; @@ -189,6 +190,8 @@ main(int argc, char *argv[]) af = AF_APPLETALK; else if (strcmp(optarg, "mpls") == 0) af = AF_MPLS; + else if (strcmp(optarg, "pflow") == 0) + af = PF_PFLOW; else if (strcmp(optarg, "mask") == 0) af = 0xff; else { @@ -410,6 +413,10 @@ main(int argc, char *argv[]) } endprotoent(); } + if (af == PF_PFLOW || af == AF_UNSPEC) { + tp = name2protox("pflow"); + printproto(tp, tp->pr_name); + } if (af == AF_INET6 || af == AF_UNSPEC) for (tp = ip6protox; tp->pr_name; tp++) printproto(tp, tp->pr_name); |