summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2021-02-20 04:35:41 +0000
committerdlg <dlg@openbsd.org>2021-02-20 04:35:41 +0000
commitb4e8a93817193379bfa047db06a860854710763f (patch)
treef6e73b016d889acfd87a73625d8df0036191fcda
parentsync (diff)
downloadwireguard-openbsd-b4e8a93817193379bfa047db06a860854710763f.tar.xz
wireguard-openbsd-b4e8a93817193379bfa047db06a860854710763f.zip
give interfaces an if_bpf_mtap handler.
the network stack is now responsible for calling bpf for packets that the interface receives, and we so far got away with using bpf_mtap_ether for everything. this doesn't work if layer 3 input goes through the same functions, so letting drivers specify the appropriate bpf mtap function means they will be able to cope.
-rw-r--r--sys/net/if_var.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 2de907c7a7f..26c08284f0d 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_var.h,v 1.112 2020/07/29 12:09:31 mvs Exp $ */
+/* $OpenBSD: if_var.h,v 1.113 2021/02/20 04:35:41 dlg Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -161,6 +161,7 @@ struct ifnet { /* and the entries */
/* procedure handles */
void (*if_input)(struct ifnet *, struct mbuf *);
+ int (*if_bpf_mtap)(caddr_t, const struct mbuf *, u_int);
int (*if_output)(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *); /* output routine (enqueue) */
/* link level output function */