diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2014-07-09 09:30:50 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2014-07-09 09:30:50 +0000 |
commit | f254be81afb848372994ebd35f0ea34a274acbc8 (patch) | |
tree | bf3c15ba2e1cb64cd763ce82c78c59fbb01d7377 /sys/arch/sparc | |
parent | 07edae74825f47a40c1c4573651c84db9a7865ed (diff) |
bpf code surgery / shuffling / simplification.
the various bpf_mtap_* are very similiar, they differ in what (and to some
extent how) they prepend something, and what copy function they pass to
bpf_catchpacket.
use an internal _bpf_mtap as "backend" for bpf_mtap and friends.
extend bpf_mtap_hdr so that it covers all common cases:
if dlen is 0, nothing gets prepended.
copy function can be given, if NULL the default bpf_mcopy is used.
adjust the existing bpf_mtap_hdr users to pass a NULL ptr for the copy fn.
re-implement bpf_mtap_af as simple wrapper for bpf_mtap_hdr.
re-implement bpf_mtap_ether using bpf_map_hdr
re-implement bpf_mtap_pflog as trivial bpf_mtap_hdr wrapper
ok bluhm benno
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/if_ie.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index 45785daf00b..df4def1033d 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.45 2013/11/28 22:18:52 deraadt Exp $ */ +/* $OpenBSD: if_ie.c,v 1.46 2014/07/09 09:30:49 henning Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -1335,7 +1335,7 @@ ie_readframe(sc, num) if (bpf_gets_it) { /* Pass it up. */ bpf_mtap_hdr(sc->sc_arpcom.ac_if.if_bpf, (caddr_t)&eh, - sizeof(eh), m, BPF_DIRECTION_IN); + sizeof(eh), m, BPF_DIRECTION_IN, NULL); } /* * A signal passed up from the filtering code indicating that the |