summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_cx.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/i386/isa/if_cx.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/i386/isa/if_cx.c')
-rw-r--r--sys/i386/isa/if_cx.c12
1 files changed, 3 insertions, 9 deletions
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 <net/if.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <i386/isa/isa_device.h>
#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;
OpenPOWER on IntegriCloud