aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ar/if_ar.c9
-rw-r--r--sys/dev/ar/if_ar_isa.c9
-rw-r--r--sys/dev/cs/if_cs.c9
-rw-r--r--sys/dev/de/if_de.c9
-rw-r--r--sys/dev/ed/if_ed.c15
-rw-r--r--sys/dev/ep/if_ep.c9
-rw-r--r--sys/dev/ex/if_ex.c9
-rw-r--r--sys/dev/fe/if_fe.c9
-rw-r--r--sys/dev/fxp/if_fxp.c12
-rw-r--r--sys/dev/ie/if_ie.c31
-rw-r--r--sys/dev/iicbus/if_ic.c10
-rw-r--r--sys/dev/lnc/if_lnc.c9
-rw-r--r--sys/dev/lnc/if_lncvar.h4
-rw-r--r--sys/dev/pccard/if_xe.c9
-rw-r--r--sys/dev/pdq/pdq_ifsubr.c9
-rw-r--r--sys/dev/ppbus/if_plip.c15
-rw-r--r--sys/dev/sr/if_sr.c9
-rw-r--r--sys/dev/sr/if_sr_isa.c9
-rw-r--r--sys/dev/vx/if_vx.c9
-rw-r--r--sys/dev/wl/if_wl.c9
-rw-r--r--sys/dev/xe/if_xe.c9
21 files changed, 0 insertions, 222 deletions
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 342cba495952..8a62e3cea827 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -49,7 +49,6 @@
*/
#include "ar.h"
-#include "bpf.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -61,9 +60,7 @@
#include <net/if.h>
#include <net/if_sppp.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -357,9 +354,7 @@ arattach(struct isa_device *id)
sppp_attach((struct ifnet *)&sc->ifsppp);
if_attach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_PPP, PPP_HEADER_LEN);
-#endif
}
ARC_SET_OFF(hc->iobase);
@@ -537,10 +532,8 @@ top_arstart:
txdata += AR_BUF_SIZ;
i++;
-#if NBPF > 0
if(ifp->if_bpf)
bpf_mtap(ifp, mtx);
-#endif
m_freem(mtx);
++sc->ifsppp.pp_if.if_opackets;
@@ -1299,10 +1292,8 @@ ar_get_packets(struct ar_softc *sc)
}
}
ar_copy_rxbuf(m, sc, len);
-#if NBPF > 0
if(sc->ifsppp.pp_if.if_bpf)
bpf_mtap(&sc->ifsppp.pp_if, m);
-#endif
sppp_input(&sc->ifsppp.pp_if, m);
sc->ifsppp.pp_if.if_ipackets++;
diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c
index 342cba495952..8a62e3cea827 100644
--- a/sys/dev/ar/if_ar_isa.c
+++ b/sys/dev/ar/if_ar_isa.c
@@ -49,7 +49,6 @@
*/
#include "ar.h"
-#include "bpf.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -61,9 +60,7 @@
#include <net/if.h>
#include <net/if_sppp.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -357,9 +354,7 @@ arattach(struct isa_device *id)
sppp_attach((struct ifnet *)&sc->ifsppp);
if_attach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_PPP, PPP_HEADER_LEN);
-#endif
}
ARC_SET_OFF(hc->iobase);
@@ -537,10 +532,8 @@ top_arstart:
txdata += AR_BUF_SIZ;
i++;
-#if NBPF > 0
if(ifp->if_bpf)
bpf_mtap(ifp, mtx);
-#endif
m_freem(mtx);
++sc->ifsppp.pp_if.if_opackets;
@@ -1299,10 +1292,8 @@ ar_get_packets(struct ar_softc *sc)
}
}
ar_copy_rxbuf(m, sc, len);
-#if NBPF > 0
if(sc->ifsppp.pp_if.if_bpf)
bpf_mtap(&sc->ifsppp.pp_if, m);
-#endif
sppp_input(&sc->ifsppp.pp_if, m);
sc->ifsppp.pp_if.if_ipackets++;
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index 0f11d1468e7f..29f91b99cd2f 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -35,7 +35,6 @@
/* #define CS_DEBUG */
#include "cs.h"
-#include "bpf.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,9 +51,7 @@
#include <net/if_media.h>
#include <net/ethernet.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
@@ -621,9 +618,7 @@ cs_attach(struct cs_softc *sc, int unit, int flags)
printf(CS_NAME"%d: ethernet address %6D\n",
ifp->if_unit, sc->arpcom.ac_enaddr, ":");
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof (struct ether_header));
-#endif
return 1;
}
@@ -778,10 +773,8 @@ cs_get_packet(struct cs_softc *sc)
eh = mtod(m, struct ether_header *);
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m);
-#endif
#ifdef CS_DEBUG
for (i=0;i<length;i++)
@@ -951,11 +944,9 @@ cs_start(struct ifnet *ifp)
cs_write_mbufs(sc, m);
-#if NBPF > 0
if (ifp->if_bpf) {
bpf_mtap(ifp, m);
}
-#endif
m_freem(m);
}
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 60884ec2d0e1..5883f882b09f 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -60,10 +60,7 @@
#include <net/netisr.h>
#endif
-#include "bpf.h"
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#ifdef INET
#include <netinet/in.h>
@@ -3473,14 +3470,12 @@ tulip_rx_intr(
#endif /* TULIP_BUS_DMA */
eh = *mtod(ms, struct ether_header *);
-#if NBPF > 0
if (sc->tulip_if.if_bpf != NULL) {
if (me == ms)
bpf_tap(&sc->tulip_if, mtod(ms, caddr_t), total_len);
else
bpf_mtap(&sc->tulip_if, ms);
}
-#endif
sc->tulip_flags |= TULIP_RXACT;
#ifdef BRIDGE /* see code in if_ed.c */
@@ -3737,10 +3732,8 @@ tulip_tx_intr(
TULIP_TXMAP_POSTSYNC(sc, map);
sc->tulip_txmaps[sc->tulip_txmaps_free++] = map;
#endif /* TULIP_BUS_DMA */
-#if NBPF > 0
if (sc->tulip_if.if_bpf != NULL)
bpf_mtap(&sc->tulip_if, m);
-#endif
m_freem(m);
#if defined(TULIP_DEBUG)
} else {
@@ -4901,9 +4894,7 @@ tulip_attach(
ifp->if_snd.ifq_maxlen = ifqmaxlen;
ether_ifattach(&(sc)->tulip_if);
-#if NBPF > 0
bpfattach(&sc->tulip_if, DLT_EN10MB, sizeof(struct ether_header));
-#endif
}
#if defined(TULIP_BUS_DMA)
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 95160ee5cfcb..97d04d30ae07 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -42,7 +42,6 @@
#include <i386/isa/if_ed.c> /* PCCARD version */
#else
-#include "bpf.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -66,9 +65,7 @@
#include <net/if_dl.h>
#include <net/if_mib.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include "opt_bdg.h"
#ifdef BRIDGE
#include <net/bridge.h>
@@ -1858,9 +1855,7 @@ ed_attach(sc, unit, flags)
/*
* If BPF is in the kernel, call the attach for it
*/
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
return (0);
}
@@ -2337,11 +2332,9 @@ outloop:
/*
* Tap off here if there is a bpf listener.
*/
-#if NBPF > 0
if (ifp->if_bpf) {
bpf_mtap(ifp, m0);
}
-#endif
m_freem(m0);
@@ -2773,13 +2766,10 @@ ed_ioctl(ifp, command, data)
}
}
-#if NBPF > 0
-
/*
* Promiscuous flag may have changed, so reprogram the RCR.
*/
ed_setrcr(sc);
-#endif
/*
* An unfortunate hack to provide the (required) software
@@ -2904,13 +2894,11 @@ ed_get_packet(sc, buf, len, multicast)
struct ifnet *ifp ;
int need_more = 1 ; /* in case not bpf */
-#if NBPF > 0
if (sc->arpcom.ac_if.if_bpf) {
need_more = 0 ;
ed_ring_copy(sc, buf, (char *)eh, len);
bpf_mtap(&sc->arpcom.ac_if, m);
} else
-#endif
ed_ring_copy(sc, buf, (char *)eh, 14);
ifp = bridge_in(m);
if (ifp == BDG_DROP) {
@@ -2935,15 +2923,12 @@ ed_get_packet(sc, buf, len, multicast)
*/
ed_ring_copy(sc, buf, (char *)eh, len);
-#if NBPF > 0
-
/*
* Check if there's a BPF listener on this interface. If so, hand off
* the raw packet to bpf.
*/
if (sc->arpcom.ac_if.if_bpf)
bpf_mtap(&sc->arpcom.ac_if, m);
-#endif
/*
* If we are in promiscuous mode, we have to check whether
* this packet is really for us.
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 45cdf3ec5af6..4ee050dbe68a 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -59,7 +59,6 @@
#include "ep.h"
#if NEP > 0
-#include "bpf.h"
#include "opt_inet.h"
#include "opt_ipx.h"
@@ -82,9 +81,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#if defined(__FreeBSD__)
#include <machine/clock.h>
@@ -686,11 +683,9 @@ ep_attach(sc)
ep_fset(F_RX_FIRST);
sc->top = sc->mcur = 0;
-#if NBPF > 0
if (!attached) {
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
}
-#endif
return 0;
}
@@ -923,11 +918,9 @@ startagain:
while (pad--)
outb(BASE + EP_W1_TX_PIO_WR_1, 0); /* Padding */
-#if NBPF > 0
if (ifp->if_bpf) {
bpf_mtap(ifp, top);
}
-#endif
ifp->if_timer = 2;
ifp->if_opackets++;
@@ -1189,7 +1182,6 @@ read_again:
top->m_pkthdr.rcvif = &sc->arpcom.ac_if;
top->m_pkthdr.len = sc->cur_len;
-#if NBPF > 0
if (ifp->if_bpf) {
bpf_mtap(ifp, top);
@@ -1218,7 +1210,6 @@ read_again:
return;
}
}
-#endif
eh = mtod(top, struct ether_header *);
m_adj(top, sizeof(struct ether_header));
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c
index bd8103e8bb7c..df5d3e6e1c9e 100644
--- a/sys/dev/ex/if_ex.c
+++ b/sys/dev/ex/if_ex.c
@@ -37,7 +37,6 @@
#include "ex.h"
#if NEX > 0
-#include "bpf.h"
#include "opt_inet.h"
#include "opt_ipx.h"
@@ -54,9 +53,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
@@ -283,9 +280,7 @@ int ex_attach(struct isa_device *dev)
/*
* If BPF is in the kernel, call the attach for it
*/
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
DODEBUG(Start_End, printf("ex_attach%d: finish\n", unit););
sc->arpcom.ac_if.if_snd.ifq_maxlen = ifqmaxlen;
return(1);
@@ -509,10 +504,8 @@ void ex_start(struct ifnet *ifp)
sc->tx_last = dest;
sc->tx_tail = next;
-#if NBPF > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp, opkt);
-#endif
ifp->if_timer = 2;
ifp->if_opackets++;
m_freem(opkt);
@@ -716,7 +709,6 @@ void ex_rx_intr(int unit)
} /* QQQ */
}
#endif
-#if NBPF > 0
if (ifp->if_bpf != NULL) {
bpf_mtap(ifp, ipkt);
@@ -733,7 +725,6 @@ void ex_rx_intr(int unit)
goto rx_another;
}
}
-#endif
m_adj(ipkt, sizeof(struct ether_header));
ether_input(ifp, eh, ipkt);
ifp->if_ipackets++;
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index 56e4544d456f..771c4a14ae93 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -70,7 +70,6 @@
*/
#include "fe.h"
-#include "bpf.h"
#include "opt_fe.h"
#include "opt_inet.h"
#include "opt_ipx.h"
@@ -91,9 +90,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#ifdef BRIDGE
#include <net/bridge.h>
@@ -2773,10 +2770,8 @@ fe_attach ( struct isa_device * dev )
sc->sc_unit);
}
-#if NBPF > 0
/* If BPF is in the kernel, call the attach for it. */
bpfattach(&sc->sc_if, DLT_EN10MB, sizeof(struct ether_header));
-#endif
return 1;
}
@@ -3142,12 +3137,10 @@ fe_start ( struct ifnet *ifp )
* and only if it is in "receive everything"
* mode.)
*/
-#if NBPF > 0
if ( sc->sc_if.if_bpf
&& !( sc->sc_if.if_flags & IFF_PROMISC ) ) {
bpf_mtap( &sc->sc_if, m );
}
-#endif
m_freem( m );
}
@@ -3774,7 +3767,6 @@ fe_get_packet ( struct fe_softc * sc, u_short len )
#define ETHER_ADDR_IS_MULTICAST(A) (*(char *)(A) & 1)
-#if NBPF > 0
/*
* Check if there's a BPF listener on this interface.
* If it is, hand off the raw packet to bpf.
@@ -3782,7 +3774,6 @@ fe_get_packet ( struct fe_softc * sc, u_short len )
if ( sc->sc_if.if_bpf ) {
bpf_mtap( &sc->sc_if, m );
}
-#endif
#ifdef BRIDGE
if (do_bridge) {
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index d2438e318cbc..668e2c31811b 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -34,8 +34,6 @@
* Intel EtherExpress Pro/100B PCI Fast Ethernet driver
*/
-#include "bpf.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -52,9 +50,7 @@
#include <netns/ns_if.h>
#endif
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#if defined(__NetBSD__)
@@ -419,10 +415,8 @@ fxp_attach(parent, self, aux)
*/
ifp->if_snd.ifq_maxlen = FXP_NTXCB - 1;
ether_ifattach(ifp, enaddr);
-#if NBPF > 0
bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
-#endif
/*
* Add shutdown hook so that DMA is disabled prior to reboot. Not
@@ -603,9 +597,7 @@ fxp_attach(device_t dev)
*/
ifp->if_snd.ifq_maxlen = FXP_NTXCB - 1;
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
splx(s);
return 0;
@@ -993,13 +985,11 @@ tbdinit:
sc->tx_queued++;
-#if NBPF > 0
/*
* Pass packet to bpf if there is a listener.
*/
if (ifp->if_bpf)
bpf_mtap(FXP_BPFTAP_ARG(ifp), mb_head);
-#endif
}
/*
@@ -1102,12 +1092,10 @@ rcvloop:
m->m_pkthdr.len = m->m_len =
total_len ;
eh = mtod(m, struct ether_header *);
-#if NBPF > 0
if (ifp->if_bpf)
bpf_tap(FXP_BPFTAP_ARG(ifp),
mtod(m, caddr_t),
total_len);
-#endif /* NBPF > 0 */
#ifdef BRIDGE
if (do_bridge) {
struct ifnet *bdg_ifp ;
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 83142b44bde7..811b3031272a 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -130,8 +130,6 @@ iomem and and with 0xffff.
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include "bpf.h"
-
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -143,9 +141,7 @@ iomem and and with 0xffff.
#include <i386/isa/if_iee16.h>
#include <i386/isa/elink.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#ifdef DEBUG
#define IED_RINT 0x01
@@ -836,9 +832,7 @@ ieattach(struct isa_device *dvp)
EVENTHANDLER_REGISTER(shutdown_post_sync, ee16_shutdown,
ie, SHUTDOWN_PRI_DEFAULT);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
if_attach(ifp);
ether_ifattach(ifp);
@@ -1095,10 +1089,8 @@ check_eh(struct ie_softc * ie, struct ether_header * eh, int *to_bpf)
* Receiving all multicasts, but no unicasts except those
* destined for us.
*/
-#if NBPF > 0
/* BPF gets this packet if anybody cares */
*to_bpf = (ie->arpcom.ac_if.if_bpf != 0);
-#endif
if (eh->ether_dhost[0] & 1) {
return (1);
}
@@ -1111,17 +1103,13 @@ check_eh(struct ie_softc * ie, struct ether_header * eh, int *to_bpf)
* Receiving all packets. These need to be passed on to
* BPF.
*/
-#if NBPF > 0
*to_bpf = (ie->arpcom.ac_if.if_bpf != 0);
-#endif
/* If for us, accept and hand up to BPF */
if (ether_equal(eh->ether_dhost, ie->arpcom.ac_enaddr))
return (1);
-#if NBPF > 0
if (*to_bpf)
*to_bpf = 2; /* we don't need to see it */
-#endif
/*
* Not a multicast, so BPF wants to see it but we don't.
@@ -1136,10 +1124,8 @@ check_eh(struct ie_softc * ie, struct ether_header * eh, int *to_bpf)
for (i = 0; i < ie->mcast_count; i++) {
if (ether_equal(eh->ether_dhost,
(u_char *)&ie->mcast_addrs[i])) {
-#if NBPF > 0
if (*to_bpf)
*to_bpf = 1;
-#endif
return (1);
}
}
@@ -1150,9 +1136,7 @@ check_eh(struct ie_softc * ie, struct ether_header * eh, int *to_bpf)
* Acting as a multicast router, and BPF running at the same
* time. Whew! (Hope this is a fast machine...)
*/
-#if NBPF > 0
*to_bpf = (ie->arpcom.ac_if.if_bpf != 0);
-#endif
/* We want to see multicasts. */
if (eh->ether_dhost[0] & 1)
return (1);
@@ -1162,10 +1146,8 @@ check_eh(struct ie_softc * ie, struct ether_header * eh, int *to_bpf)
return (1);
/* Anything else goes to BPF but nothing else. */
-#if NBPF > 0
if (*to_bpf)
*to_bpf = 2;
-#endif
return (1);
default:
@@ -1177,9 +1159,7 @@ check_eh(struct ie_softc * ie, struct ether_header * eh, int *to_bpf)
* for the multicast filter), but it will do in this case,
* and we want to get out of here as quickly as possible.
*/
-#if NBPF > 0
*to_bpf = (ie->arpcom.ac_if.if_bpf != 0);
-#endif
return (1);
}
return (0);
@@ -1414,11 +1394,8 @@ ie_readframe(int unit, struct ie_softc *ie, int num/* frame number to read */)
struct mbuf *m = 0;
struct ether_header eh;
-#if NBPF > 0
int bpf_gets_it = 0;
-#endif
-
bcopy((v_caddr_t) (ie->rframes[num]), &rfd,
sizeof(struct ie_recv_frame_desc));
@@ -1433,11 +1410,7 @@ ie_readframe(int unit, struct ie_softc *ie, int num/* frame number to read */)
ie->rfhead = (ie->rfhead + 1) % ie->nframes;
if (rfd.ie_fd_status & IE_FD_OK) {
-#if NBPF > 0
if (ieget(unit, ie, &m, &eh, &bpf_gets_it)) {
-#else
- if (ieget(unit, ie, &m, &eh, (int *)0)) {
-#endif
ie->arpcom.ac_if.if_ierrors++; /* this counts as an
* error */
return;
@@ -1460,7 +1433,6 @@ ie_readframe(int unit, struct ie_softc *ie, int num/* frame number to read */)
m_freem(last_not_for_us);
last_not_for_us = 0;
}
-#if NBPF > 0
/*
* Check for a BPF filter; if so, hand it up. Note that we have to
* stick an extra mbuf up front, because bpf_mtap expects to have
@@ -1488,7 +1460,6 @@ ie_readframe(int unit, struct ie_softc *ie, int num/* frame number to read */)
last_not_for_us = m;
return;
}
-#endif /* NBPF > 0 */
/*
* In here there used to be code to check destination addresses upon
* receipt of a packet. We have deleted that code, and replaced it
@@ -1572,7 +1543,6 @@ iestart(struct ifnet *ifp)
m_freem(m0);
len = max(len, ETHER_MIN_LEN);
-#if NBPF > 0
/*
* See if bpf is listening on this interface, let it see the
* packet before we commit it to the wire.
@@ -1580,7 +1550,6 @@ iestart(struct ifnet *ifp)
if (ie->arpcom.ac_if.if_bpf)
bpf_tap(&ie->arpcom.ac_if,
(void *)ie->xmit_cbuffs[ie->xmit_count], len);
-#endif
ie->xmit_buffs[ie->xmit_count]->ie_xmit_flags =
IE_XMIT_LAST|len;
diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c
index a9649ea357c5..97dc5ea9b1d9 100644
--- a/sys/dev/iicbus/if_ic.c
+++ b/sys/dev/iicbus/if_ic.c
@@ -59,11 +59,7 @@
#include <netinet/ip.h>
#include <netinet/if_ether.h>
-#include "bpf.h"
-
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <dev/iicbus/iiconf.h>
#include <dev/iicbus/iicbus.h>
@@ -151,9 +147,7 @@ icattach(device_t dev)
if_attach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_NULL, ICHDRLEN);
-#endif
return (0);
}
@@ -322,10 +316,8 @@ icintr (device_t dev, int event, char *ptr)
sc->ic_if.if_ipackets ++;
sc->ic_if.if_ibytes += len;
-#if NBPF > 0
if (sc->ic_if.if_bpf)
bpf_tap(&sc->ic_if, sc->ic_ifbuf, len + ICHDRLEN);
-#endif
top = m_devget(sc->ic_ifbuf + ICHDRLEN, len, 0, &sc->ic_if, 0);
@@ -417,7 +409,6 @@ icoutput(struct ifnet *ifp, struct mbuf *m,
} while ((mm = mm->m_next));
-#if NBPF > 0
if (ifp->if_bpf) {
struct mbuf m0, *n = m;
@@ -435,7 +426,6 @@ icoutput(struct ifnet *ifp, struct mbuf *m,
bpf_mtap(ifp, n);
}
-#endif
sc->ic_sending = 1;
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index 6345dffd1131..1c14f8e4084b 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -64,7 +64,6 @@
#include "lnc.h"
#if NLNC > 0
-#include "bpf.h"
#include "opt_inet.h"
/* Some defines that should really be in generic locations */
@@ -88,9 +87,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include "opt_bdg.h"
#ifdef BRIDGE
@@ -614,10 +611,8 @@ lnc_rint(struct lnc_softc *sc)
eh = (struct ether_header *) head->m_data;
-#if NBPF > 0
if (sc->arpcom.ac_if.if_bpf)
bpf_mtap(&sc->arpcom.ac_if, head);
-#endif
#ifdef BRIDGE
if (do_bridge) {
struct ifnet *bdg_ifp ;
@@ -1299,9 +1294,7 @@ lnc_attach_sc(struct lnc_softc *sc, int unit)
printf("%s", ic_ident[sc->nic.ic]);
printf(" address %6D\n", sc->arpcom.ac_enaddr, ":");
-#if NBPF > 0
bpfattach(&sc->arpcom.ac_if, DLT_EN10MB, sizeof(struct ether_header));
-#endif
return (1);
}
@@ -1824,10 +1817,8 @@ lnc_start(struct ifnet *ifp)
ifp->if_timer = 2;
-#if NBPF > 0
if (sc->arpcom.ac_if.if_bpf)
bpf_mtap(&sc->arpcom.ac_if, head);
-#endif
if (sc->nic.mem_mode != DMA_MBUF)
m_freem(head);
diff --git a/sys/dev/lnc/if_lncvar.h b/sys/dev/lnc/if_lncvar.h
index f3d37f44654c..cda83648663c 100644
--- a/sys/dev/lnc/if_lncvar.h
+++ b/sys/dev/lnc/if_lncvar.h
@@ -39,11 +39,7 @@
* Initialize multicast address hashing registers to accept
* all multicasts (only used when in promiscuous mode)
*/
-#if NBPF > 0
#define MULTI_INIT_ADDR 0xff
-#else
-#define MULTI_INIT_ADDR 0
-#endif
#define NORMAL 0
diff --git a/sys/dev/pccard/if_xe.c b/sys/dev/pccard/if_xe.c
index f0be0d489a14..0cf808325125 100644
--- a/sys/dev/pccard/if_xe.c
+++ b/sys/dev/pccard/if_xe.c
@@ -106,7 +106,6 @@
#include "xe.h"
#include "card.h"
#include "apm.h"
-#include "bpf.h"
#if NXE > 0
@@ -131,9 +130,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_mib.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif /* NBPF > 0 */
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
@@ -808,13 +805,11 @@ xe_attach (struct isa_device *dev) {
if_attach(scp->ifp);
ether_ifattach(scp->ifp);
-#if NBPF > 0
/* If BPF is in the kernel, call the attach for it */
#if XE_DEBUG > 1
printf("xe%d: BPF listener attached\n", scp->unit);
#endif
bpfattach(scp->ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
/* Done */
return 1;
@@ -944,7 +939,6 @@ xe_start(struct ifnet *ifp) {
return;
}
-#if NBPF > 0
/* Tap off here if there is a bpf listener */
if (ifp->if_bpf) {
#if XE_DEBUG > 1
@@ -952,7 +946,6 @@ xe_start(struct ifnet *ifp) {
#endif
bpf_mtap(ifp, mbp);
}
-#endif /* NBPF > 0 */
ifp->if_timer = 5; /* In case we don't hear from the card again */
scp->tx_queued++;
@@ -1266,7 +1259,6 @@ xe_card_intr(struct pccard_devinfo *devi) {
else
insw(scp->dev->id_iobase+XE_EDP, ehp, len >> 1);
-#if NBPF > 0
/*
* Check if there's a BPF listener on this interface. If so, hand
* off the raw packet to bpf.
@@ -1289,7 +1281,6 @@ xe_card_intr(struct pccard_devinfo *devi) {
mbp = NULL;
}
}
-#endif /* NBPF > 0 */
if (mbp != NULL) {
mbp->m_pkthdr.len = mbp->m_len = len - ETHER_HDR_LEN;
diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c
index 545d66ccf3f6..74498780a191 100644
--- a/sys/dev/pdq/pdq_ifsubr.c
+++ b/sys/dev/pdq/pdq_ifsubr.c
@@ -45,10 +45,7 @@
#include <net/if.h>
#include <net/if_dl.h>
-#include "bpf.h"
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#if defined(__FreeBSD__)
#ifdef INET
@@ -186,14 +183,12 @@ pdq_os_receive_pdu(
struct fddi_header *fh = mtod(m, struct fddi_header *);
sc->sc_if.if_ipackets++;
-#if NBPF > 0
if (sc->sc_bpf != NULL)
PDQ_BPF_MTAP(sc, m);
if ((fh->fddi_fc & (FDDIFC_L|FDDIFC_F)) != FDDIFC_LLC_ASYNC) {
m_freem(m);
return;
}
-#endif
m->m_data += sizeof(struct fddi_header);
m->m_len -= sizeof(struct fddi_header);
@@ -222,10 +217,8 @@ pdq_os_transmit_done(
struct mbuf *m)
{
pdq_softc_t *sc = (pdq_softc_t *) pdq->pdq_os_ctx;
-#if NBPF > 0
if (sc->sc_bpf != NULL)
PDQ_BPF_MTAP(sc, m);
-#endif
m_freem(m);
sc->sc_if.if_opackets++;
}
@@ -384,7 +377,5 @@ pdq_ifattach(
if_attach(ifp);
fddi_ifattach(ifp);
-#if NBPF > 0
PDQ_BPFATTACH(sc, DLT_FDDI, sizeof(struct fddi_header));
-#endif
}
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index e82f49f23858..f2085e4c6bdd 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);
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index 6d56ab42712f..6be7958b0324 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -53,7 +53,6 @@
#else
#define NFR 0
#endif
-#include "bpf.h"
#include "sppp.h"
#if NSPPP <= 0
@@ -71,9 +70,7 @@
#include <net/if.h>
#include <net/if_sppp.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/md_var.h>
@@ -848,9 +845,7 @@ srattach(struct sr_hardc *hc)
if_attach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_PPP, PPP_HEADER_LEN);
-#endif
}
if (hc->mempages)
@@ -1119,10 +1114,8 @@ top_srstart:
sc->unit, mtx, len);
#endif
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, mtx);
-#endif
/*
* We can perform a straight copy because the tranmit
@@ -2462,10 +2455,8 @@ sr_get_packets(struct sr_softc *sc)
*/
sr_copy_rxbuf(m, sc, len); /* copy from DPRAM */
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m);
-#endif
#if BUGGY > 3
{
diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c
index 6d56ab42712f..6be7958b0324 100644
--- a/sys/dev/sr/if_sr_isa.c
+++ b/sys/dev/sr/if_sr_isa.c
@@ -53,7 +53,6 @@
#else
#define NFR 0
#endif
-#include "bpf.h"
#include "sppp.h"
#if NSPPP <= 0
@@ -71,9 +70,7 @@
#include <net/if.h>
#include <net/if_sppp.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/md_var.h>
@@ -848,9 +845,7 @@ srattach(struct sr_hardc *hc)
if_attach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_PPP, PPP_HEADER_LEN);
-#endif
}
if (hc->mempages)
@@ -1119,10 +1114,8 @@ top_srstart:
sc->unit, mtx, len);
#endif
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, mtx);
-#endif
/*
* We can perform a straight copy because the tranmit
@@ -2462,10 +2455,8 @@ sr_get_packets(struct sr_softc *sc)
*/
sr_copy_rxbuf(m, sc, len); /* copy from DPRAM */
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m);
-#endif
#if BUGGY > 3
{
diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c
index a67cff8f4e61..5e188a7f88bf 100644
--- a/sys/dev/vx/if_vx.c
+++ b/sys/dev/vx/if_vx.c
@@ -62,7 +62,6 @@
#define NVX 4
#endif
-#include "bpf.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -76,9 +75,7 @@
#include <net/ethernet.h>
#include <net/if_arp.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
@@ -216,9 +213,7 @@ vxattach(sc)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
sc->tx_start_thresh = 20; /* probably a good starting point. */
@@ -496,11 +491,9 @@ startagain:
outw(BASE + VX_COMMAND, SET_TX_START_THRESH |
((len / 4 + sc->tx_start_thresh) >> 2));
-#if NBPF > 0
if (sc->arpcom.ac_if.if_bpf) {
bpf_mtap(&sc->arpcom.ac_if, m0);
}
-#endif
/*
* Do the output at splhigh() so that an interrupt from another device
@@ -745,7 +738,6 @@ again:
/* We assume the header fit entirely in one mbuf. */
eh = mtod(m, struct ether_header *);
-#if NBPF > 0
/*
* Check if there's a BPF listener on this interface.
* If so, hand off the raw packet to BPF.
@@ -753,7 +745,6 @@ again:
if (sc->arpcom.ac_if.if_bpf) {
bpf_mtap(&sc->arpcom.ac_if, m);
}
-#endif
/*
* XXX: Some cards seem to be in promiscous mode all the time.
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index 2f6b6b754469..6111b8dfd437 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -190,7 +190,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "wl.h"
#include "opt_wavelan.h"
-#include "bpf.h"
#include "opt_inet.h"
#include <sys/param.h>
@@ -215,9 +214,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <netinet/if_ether.h>
#endif
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
@@ -511,9 +508,7 @@ wlattach(struct isa_device *id)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
bcopy(&sc->wl_addr[0], sc->wl_ac.ac_enaddr, WAVELAN_ADDR_SIZE);
printf("%s%d: address %6D, NWID 0x%02x%02x", ifp->if_name, ifp->if_unit,
@@ -896,12 +891,10 @@ wlstart(struct ifnet *ifp)
ifp = &(sc->wl_if);
IF_DEQUEUE(&ifp->if_snd, m);
if (m != (struct mbuf *)0) {
-#if NBPF > 0
/* let BPF see it before we commit it */
if (ifp->if_bpf) {
bpf_mtap(ifp, m);
}
-#endif
sc->tbusy++;
/* set the watchdog timer so that if the board
* fails to interrupt we will restart
@@ -1081,7 +1074,6 @@ wlread(int unit, u_short fd_p)
m->m_pkthdr.len = clen;
-#if NBPF > 0
/*
* Check if there's a BPF listener on this interface. If so, hand off
* the raw packet to bpf.
@@ -1099,7 +1091,6 @@ wlread(int unit, u_short fd_p)
bpf_mtap(ifp, &m0);
}
-#endif
/*
* If hw is in promiscuous mode (note that I said hardware, not if
* IFF_PROMISC is set in ifnet flags), then if this is a unicast
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c
index f0be0d489a14..0cf808325125 100644
--- a/sys/dev/xe/if_xe.c
+++ b/sys/dev/xe/if_xe.c
@@ -106,7 +106,6 @@
#include "xe.h"
#include "card.h"
#include "apm.h"
-#include "bpf.h"
#if NXE > 0
@@ -131,9 +130,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_mib.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif /* NBPF > 0 */
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
@@ -808,13 +805,11 @@ xe_attach (struct isa_device *dev) {
if_attach(scp->ifp);
ether_ifattach(scp->ifp);
-#if NBPF > 0
/* If BPF is in the kernel, call the attach for it */
#if XE_DEBUG > 1
printf("xe%d: BPF listener attached\n", scp->unit);
#endif
bpfattach(scp->ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
/* Done */
return 1;
@@ -944,7 +939,6 @@ xe_start(struct ifnet *ifp) {
return;
}
-#if NBPF > 0
/* Tap off here if there is a bpf listener */
if (ifp->if_bpf) {
#if XE_DEBUG > 1
@@ -952,7 +946,6 @@ xe_start(struct ifnet *ifp) {
#endif
bpf_mtap(ifp, mbp);
}
-#endif /* NBPF > 0 */
ifp->if_timer = 5; /* In case we don't hear from the card again */
scp->tx_queued++;
@@ -1266,7 +1259,6 @@ xe_card_intr(struct pccard_devinfo *devi) {
else
insw(scp->dev->id_iobase+XE_EDP, ehp, len >> 1);
-#if NBPF > 0
/*
* Check if there's a BPF listener on this interface. If so, hand
* off the raw packet to bpf.
@@ -1289,7 +1281,6 @@ xe_card_intr(struct pccard_devinfo *devi) {
mbp = NULL;
}
}
-#endif /* NBPF > 0 */
if (mbp != NULL) {
mbp->m_pkthdr.len = mbp->m_len = len - ETHER_HDR_LEN;