summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-03-17 23:57:12 +0000
committerdlg <dlg@openbsd.org>2019-03-17 23:57:12 +0000
commit56026a8309f35ad72b2a9a237ca3422e4d65c17a (patch)
tree279b1b980c9d34d7993d7045efdf8e08f26a9413
parentSince an isoc endpoint never halts, move to remaining error handling (diff)
downloadwireguard-openbsd-56026a8309f35ad72b2a9a237ca3422e4d65c17a.tar.xz
wireguard-openbsd-56026a8309f35ad72b2a9a237ca3422e4d65c17a.zip
extend BIOCSFILDROP so it can be configured to not capture packets.
this just provides the macros for the different values for BIOCGFILDROP and BIOCSFILDROP, the implementation behing them is coming. ok sthen@ mikeb@ claudio@ visa@
-rw-r--r--sys/net/bpf.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index 604bdcbab55..967d061f898 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.h,v 1.65 2018/02/03 13:37:37 mpi Exp $ */
+/* $OpenBSD: bpf.h,v 1.66 2019/03/17 23:57:12 dlg Exp $ */
/* $NetBSD: bpf.h,v 1.15 1996/12/13 07:57:33 mikel Exp $ */
/*
@@ -126,6 +126,13 @@ struct bpf_version {
#define BPF_DIRECTION_IN 1
#define BPF_DIRECTION_OUT (1<<1)
+/*
+ * Values for BIOCGFILDROP/BIOCSFILDROP
+ */
+#define BPF_FILDROP_PASS 0 /* capture, pass */
+#define BPF_FILDROP_CAPTURE 1 /* capture, drop */
+#define BPF_FILDROP_DROP 2 /* no capture, drop */
+
struct bpf_timeval {
u_int32_t tv_sec;
u_int32_t tv_usec;