diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2021-02-20 04:35:42 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2021-02-20 04:35:42 +0000 |
commit | 4fa044574046b00d670119ebd772dc69423ed772 (patch) | |
tree | bf693955898c957d223a439926bac39bfa51945f /sys/net/if_var.h | |
parent | bd1b89c57eac994cdc1d888c5b3f80b4bc5b8955 (diff) |
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.
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r-- | sys/net/if_var.h | 3 |
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 */ |