diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-09-28 19:05:22 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-09-28 19:05:22 +0000 |
commit | 0beb907ba7317a50fdcc5c5f6a0f05280dcfc3c2 (patch) | |
tree | e4909fbdd34263e4844e31d151f591336d51f6a0 | |
parent | 186c8f6391d391337988bf0d7b6fe018374ed8a6 (diff) | |
download | FreeBSD-src-0beb907ba7317a50fdcc5c5f6a0f05280dcfc3c2.zip FreeBSD-src-0beb907ba7317a50fdcc5c5f6a0f05280dcfc3c2.tar.gz |
Convert most BPF_TAP users to BPF_MTAP.
MFC after: 2 weeks
-rw-r--r-- | sys/dev/ce/if_ce.c | 7 | ||||
-rw-r--r-- | sys/dev/cp/if_cp.c | 2 | ||||
-rw-r--r-- | sys/dev/ctau/if_ct.c | 2 | ||||
-rw-r--r-- | sys/dev/cx/if_cx.c | 2 | ||||
-rw-r--r-- | sys/dev/ie/if_ie.c | 9 |
5 files changed, 6 insertions, 16 deletions
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c index 36c4ba4..d0dd0c7 100644 --- a/sys/dev/ce/if_ce.c +++ b/sys/dev/ce/if_ce.c @@ -1133,12 +1133,7 @@ static void ce_receive (ce_chan_t *c, unsigned char *data, int len) m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ -#if __FreeBSD_version >= 500000 - BPF_TAP (d->ifp, data, len); -#else - if (d->ifp->if_bpf) - bpf_tap (d->ifp, data, len); -#endif + BPF_MTAP(d->ifp, m); IF_ENQUEUE(&d->rqueue, m); #endif } diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index ca6aaf4..4e70838 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -902,7 +902,7 @@ static void cp_receive (cp_chan_t *c, unsigned char *data, int len) m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index 5cf20dd..397c3ac 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -1120,7 +1120,7 @@ static void ct_receive (ct_chan_t *c, char *data, int len) m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index eecab5f..360e1f6 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -1318,7 +1318,7 @@ static void cx_receive (cx_chan_t *c, char *data, int len) m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - BPF_TAP (d->ifp, data, len); + BPF_MTAP(d->ifp, m); IF_ENQUEUE (&d->queue, m); #endif } diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index eceac6c..72e2559 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -949,6 +949,8 @@ iestart_locked(struct ifnet *ifp) if (!m) break; + BPF_MTAP(ifp, m); + buffer = sc->xmit_cbuffs[sc->xmit_count]; len = 0; @@ -961,13 +963,6 @@ iestart_locked(struct ifnet *ifp) m_freem(m0); len = max(len, ETHER_MIN_LEN); - /* - * See if bpf is listening on this interface, let it see the - * packet before we commit it to the wire. - */ - BPF_TAP(sc->ifp, - (void *)sc->xmit_cbuffs[sc->xmit_count], len); - sc->xmit_buffs[sc->xmit_count]->ie_xmit_flags = IE_XMIT_LAST|len; sc->xmit_buffs[sc->xmit_count]->ie_xmit_next = 0xffff; |