aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ppbus
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-12-29 13:59:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-12-29 13:59:50 +0000
commit0dea849ae93133a4a02f0d5fd58340d3df92668b (patch)
tree5677cbe8565b075c609dc8ea0a6087d8251a7bca /sys/dev/ppbus
parent240589a9fec34f1cd809cc429f2c56147a0383bd (diff)
downloadsrc-0dea849ae93133a4a02f0d5fd58340d3df92668b.tar.gz
src-0dea849ae93133a4a02f0d5fd58340d3df92668b.zip
Various bpf(4) related fixes to catch places up to the new bpf(4)
semantics. - Stop testing bpf pointers for NULL. In some cases use bpf_peers_present() and then call the function directly inside the conditional block instead of the macro. - For places where the entire conditional block is the macro, remove the test and make the macro unconditional. - Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of the old semantics. Reviewed by: csjp (older version)
Notes
Notes: svn path=/head/; revision=165632
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r--sys/dev/ppbus/if_plip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index 2af0fd1efe5f..df59f1bda7d2 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -455,7 +455,7 @@ static void
lptap(struct ifnet *ifp, struct mbuf *m)
{
u_int32_t af = AF_INET;
- BPF_MTAP2(ifp, &af, sizeof(af), m);
+ bpf_mtap2(ifp, &af, sizeof(af), m);
}
static void
@@ -514,7 +514,7 @@ lp_intr (void *arg)
sc->sc_ifp->if_ibytes += len;
top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, sc->sc_ifp, 0);
if (top) {
- if (sc->sc_ifp->if_bpf)
+ if (bpf_peers_present(sc->sc_ifp->if_bpf))
lptap(sc->sc_ifp, top);
netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */
}
@@ -559,7 +559,7 @@ lp_intr (void *arg)
sc->sc_ifp->if_ibytes += len;
top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, sc->sc_ifp, 0);
if (top) {
- if (sc->sc_ifp->if_bpf)
+ if (bpf_peers_present(sc->sc_ifp->if_bpf))
lptap(sc->sc_ifp, top);
netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */
}
@@ -694,7 +694,7 @@ lpoutput (struct ifnet *ifp, struct mbuf *m,
} else {
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
- if (ifp->if_bpf)
+ if (bpf_peers_present(ifp->if_bpf))
lptap(ifp, m);
}
@@ -739,7 +739,7 @@ lpoutput (struct ifnet *ifp, struct mbuf *m,
} else {
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
- if (ifp->if_bpf)
+ if (bpf_peers_present(ifp->if_bpf))
lptap(ifp, m);
}