From d612df1de637eabac588385f0ef90f8d91a297de Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 25 Sep 1999 12:06:01 +0000 Subject: 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. --- sys/i386/isa/if_cx.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sys/i386/isa/if_cx.c') diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c index e29fb51..0983f1b 100644 --- a/sys/i386/isa/if_cx.c +++ b/sys/i386/isa/if_cx.c @@ -15,11 +15,13 @@ * all derivative works or modified versions. * * Version 1.9, Wed Oct 4 18:58:15 MSK 1995 + * + * $FreeBSD$ + * */ #undef DEBUG #include "cx.h" -#include "bpf.h" #include "sppp.h" #if NSPPP <= 0 #error The device 'cx' requires sppp. @@ -36,9 +38,7 @@ #include -#if NBPF > 0 #include -#endif #include #define watchdog_func_t void(*)(struct ifnet *) @@ -275,10 +275,8 @@ cxattach (struct isa_device *id) sppp_attach (c->ifp); if_attach (c->ifp); sp = (struct sppp*) c->ifp; -#if NBPF > 0 /* If BPF is in the kernel, call the attach for it. */ bpfattach (c->ifp, DLT_PPP, PPP_HEADER_LEN); -#endif } } @@ -472,10 +470,8 @@ cxput (cx_chan_t *c, char b) return; } m_copydata (m, 0, len, buf); -#if NBPF > 0 if (c->ifp->if_bpf) bpf_mtap (c->ifp, m); -#endif m_freem (m); /* Start transmitter. */ @@ -796,14 +792,12 @@ cxinput (cx_chan_t *c, void *buf, unsigned len) printmbuf (m); #endif -#if NBPF > 0 /* * Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ if (c->ifp->if_bpf) bpf_tap (c->ifp, buf, len); -#endif /* Count the received bytes to the subchannel, not the master. */ c->master->if_ibytes -= len + 3; -- cgit v1.1