diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
commit | 24436414aab60dc84348ec54f23b324b4ae862a3 (patch) | |
tree | ee35283622a78eeac5656cb5661954771faf6520 /sys/dev/isa/if_ie.c | |
parent | d1265a1a72755bd0209950654a6df47287781241 (diff) |
allow bpf(4) to ignore packets based on their direction (inbound or
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
Diffstat (limited to 'sys/dev/isa/if_ie.c')
-rw-r--r-- | sys/dev/isa/if_ie.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index b91288d13dc..834ccca6789 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.31 2005/07/31 03:52:19 pascoe Exp $ */ +/* $OpenBSD: if_ie.c,v 1.32 2006/03/25 22:41:44 djm Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -1195,7 +1195,8 @@ iexmit(sc) if (sc->sc_arpcom.ac_if.if_bpf) bpf_tap(sc->sc_arpcom.ac_if.if_bpf, sc->xmit_cbuffs[sc->xctail], - sc->xmit_buffs[sc->xctail]->ie_xmit_flags); + sc->xmit_buffs[sc->xctail]->ie_xmit_flags, + BPF_DIRECTION_OUT); #endif sc->xmit_buffs[sc->xctail]->ie_xmit_flags |= IE_XMIT_LAST; @@ -1395,7 +1396,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); + sizeof(eh), m, BPF_DIRECTION_IN); /* * A signal passed up from the filtering code indicating that @@ -1488,7 +1489,7 @@ iestart(ifp) #if NBPFILTER > 0 /* Tap off here if there is a BPF listener. */ if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m0); + bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); #endif #ifdef IEDEBUG |