summaryrefslogtreecommitdiff
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2018-06-26 06:47:57 +0000
committermsaitoh <msaitoh@NetBSD.org>2018-06-26 06:47:57 +0000
commit8517c9d1f5b46eebb8224188099dd233efe22261 (patch)
treecc36b5bafcfc26a1e947884214939062d2b81937 /usr.bin/fstat
parent075bc71cb4598816329e34cbc1fbdf4f3fcaa414 (diff)
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif.
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/fstat/misc.c b/usr.bin/fstat/misc.c
index dcee48ef9a6..f3621c62009 100644
--- a/usr.bin/fstat/misc.c
+++ b/usr.bin/fstat/misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.18 2018/06/04 01:42:49 nat Exp $ */
+/* $NetBSD: misc.c,v 1.19 2018/06/26 06:48:03 msaitoh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: misc.c,v 1.18 2018/06/04 01:42:49 nat Exp $");
+__RCSID("$NetBSD: misc.c,v 1.19 2018/06/26 06:48:03 msaitoh Exp $");
#include <stdbool.h>
#include <sys/param.h>
@@ -142,8 +142,8 @@ p_bpf(struct file *f)
(void)printf(", promisc");
if (bpf.bd_immediate)
(void)printf(", immed");
- if (bpf.bd_seesent)
- (void)printf(", seesent");
+ if (bpf.bd_direction)
+ (void)printf(", direction");
if (bpf.bd_jitcode != NULL)
(void)printf(", jit");
if (bpf.bd_async)