summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/if_plip.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-09-25 12:06:01 +0000
committerphk <phk@FreeBSD.org>1999-09-25 12:06:01 +0000
commitd612df1de637eabac588385f0ef90f8d91a297de (patch)
tree98ecfb3ce51180cb27c6f26afbbda3e06f598865 /sys/dev/ppbus/if_plip.c
parent5f4944fbfdbe191d7f3f19a522957a406819ad3b (diff)
downloadFreeBSD-src-d612df1de637eabac588385f0ef90f8d91a297de.zip
FreeBSD-src-d612df1de637eabac588385f0ef90f8d91a297de.tar.gz
Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
Diffstat (limited to 'sys/dev/ppbus/if_plip.c')
-rw-r--r--sys/dev/ppbus/if_plip.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index e82f49f..f2085e4 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -93,10 +93,7 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
-#include "bpf.h"
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <dev/ppbus/ppbconf.h>
@@ -256,9 +253,7 @@ lpattach (struct ppb_device *dev)
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
if_attach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_NULL, sizeof(u_int32_t));
-#endif
return (1);
}
@@ -446,7 +441,6 @@ clpinbyte (int spin, struct ppb_device *dev)
return (ctrecvl[cl] | ctrecvh[c]);
}
-#if NBPF > 0
static void
lptap(struct ifnet *ifp, struct mbuf *m)
{
@@ -464,7 +458,6 @@ lptap(struct ifnet *ifp, struct mbuf *m)
m0.m_data = (char *)&af;
bpf_mtap(ifp, &m0);
}
-#endif
static void
lpintr (int unit)
@@ -525,10 +518,8 @@ lpintr (int unit)
sc->sc_if.if_ibytes += len;
top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, &sc->sc_if, 0);
if (top) {
-#if NBPF > 0
if (sc->sc_if.if_bpf)
lptap(&sc->sc_if, top);
-#endif
IF_ENQUEUE(&ipintrq, top);
schednetisr(NETISR_IP);
}
@@ -578,10 +569,8 @@ lpintr (int unit)
sc->sc_if.if_ibytes += len;
top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, &sc->sc_if, 0);
if (top) {
-#if NBPF > 0
if (sc->sc_if.if_bpf)
lptap(&sc->sc_if, top);
-#endif
IF_ENQUEUE(&ipintrq, top);
schednetisr(NETISR_IP);
}
@@ -715,10 +704,8 @@ lpoutput (struct ifnet *ifp, struct mbuf *m,
} else {
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
-#if NBPF > 0
if (ifp->if_bpf)
lptap(ifp, m);
-#endif
}
m_freem(m);
@@ -762,10 +749,8 @@ lpoutput (struct ifnet *ifp, struct mbuf *m,
} else {
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
-#if NBPF > 0
if (ifp->if_bpf)
lptap(ifp, m);
-#endif
}
m_freem(m);
OpenPOWER on IntegriCloud