diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2018-06-26 06:47:57 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2018-06-26 06:47:57 +0000 |
| commit | 8517c9d1f5b46eebb8224188099dd233efe22261 (patch) | |
| tree | cc36b5bafcfc26a1e947884214939062d2b81937 /usr.bin/fstat | |
| parent | 075bc71cb4598816329e34cbc1fbdf4f3fcaa414 (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.c | 8 |
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) |
