diff options
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/if_ar.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_cs.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_cx.c | 12 | ||||
-rw-r--r-- | sys/i386/isa/if_ed.c | 15 | ||||
-rw-r--r-- | sys/i386/isa/if_el.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_ep.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_ex.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_fe.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_ie.c | 31 | ||||
-rw-r--r-- | sys/i386/isa/if_le.c | 11 | ||||
-rw-r--r-- | sys/i386/isa/if_lnc.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_lnc.h | 4 | ||||
-rw-r--r-- | sys/i386/isa/if_rdp.c | 12 | ||||
-rw-r--r-- | sys/i386/isa/if_sr.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_wl.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_ze.c | 13 | ||||
-rw-r--r-- | sys/i386/isa/if_zp.c | 9 |
17 files changed, 3 insertions, 185 deletions
diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c index 342cba4..8a62e3c 100644 --- a/sys/i386/isa/if_ar.c +++ b/sys/i386/isa/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/i386/isa/if_cs.c b/sys/i386/isa/if_cs.c index 0f11d14..29f91b9 100644 --- a/sys/i386/isa/if_cs.c +++ b/sys/i386/isa/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/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; diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index 3dbeb0d..51a4b5c 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -38,7 +38,6 @@ */ #include "ed.h" -#include "bpf.h" #include <sys/param.h> #include <sys/systm.h> @@ -62,9 +61,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> @@ -1715,9 +1712,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 1; } @@ -2173,11 +2168,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); @@ -2615,13 +2608,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 @@ -2746,13 +2736,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) { @@ -2777,15 +2765,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/i386/isa/if_el.c b/sys/i386/isa/if_el.c index 86b796e..7a76f03 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -20,7 +20,6 @@ * - Does not currently support multicasts */ #include "el.h" -#include "bpf.h" #include "opt_inet.h" #include "opt_ipx.h" @@ -37,9 +36,7 @@ #include <netinet/in.h> #include <netinet/if_ether.h> -#if NBPF > 0 #include <net/bpf.h> -#endif #include <machine/clock.h> @@ -203,10 +200,8 @@ el_attach(struct isa_device *idev) sc->arpcom.ac_enaddr, ":"); /* Finally, attach to bpf filter if it is present. */ -#if NBPF > 0 dprintf(("Attaching to BPF...\n")); bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif dprintf(("el_attach() finished.\n")); return(1); @@ -340,10 +335,8 @@ el_start(struct ifnet *ifp) len = max(len,ETHER_MIN_LEN); /* Give the packet to the bpf, if any */ -#if NBPF > 0 if(sc->arpcom.ac_if.if_bpf) bpf_tap(&sc->arpcom.ac_if, sc->el_pktbuf, len); -#endif /* Transfer datagram to board */ dprintf(("el: xfr pkt length=%d...\n",len)); @@ -430,7 +423,6 @@ elread(struct el_softc *sc,caddr_t buf,int len) eh = (struct ether_header *)buf; -#if NBPF > 0 /* * Check if there's a bpf filter listening on this interface. * If so, hand off the raw packet to bpf. @@ -453,7 +445,6 @@ elread(struct el_softc *sc,caddr_t buf,int len) sizeof(eh->ether_dhost)) != 0) return; } -#endif /* * Pull packet off interface. diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index 45cdf3e..4ee050d 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/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/i386/isa/if_ex.c b/sys/i386/isa/if_ex.c index bd8103e..df5d3e6 100644 --- a/sys/i386/isa/if_ex.c +++ b/sys/i386/isa/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/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c index 56e4544..771c4a1 100644 --- a/sys/i386/isa/if_fe.c +++ b/sys/i386/isa/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/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c index 83142b4..811b303 100644 --- a/sys/i386/isa/if_ie.c +++ b/sys/i386/isa/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/i386/isa/if_le.c b/sys/i386/isa/if_le.c index 700cb6d..6206495 100644 --- a/sys/i386/isa/if_le.c +++ b/sys/i386/isa/if_le.c @@ -56,7 +56,6 @@ #include <netinet/in.h> #include <netinet/if_ether.h> -#include "bpf.h" #include <machine/clock.h> @@ -66,9 +65,7 @@ #include <vm/vm.h> #include <vm/pmap.h> -#if NBPF > 0 #include <net/bpf.h> -#endif /* Forward declarations */ typedef struct le_softc le_softc_t; @@ -359,9 +356,7 @@ le_attach( ifp->if_addrlen = 6; ifp->if_hdrlen = 14; -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif if_attach(ifp); ether_ifattach(ifp); @@ -401,7 +396,6 @@ le_input( } MEMCPY(&eh, seg1, sizeof(eh)); -#if NBPF > 0 if (sc->le_if.if_bpf != NULL && seg2 == NULL) { bpf_tap(&sc->le_if, seg1, total_len); /* @@ -423,7 +417,6 @@ le_input( } } } -#endif seg1 += sizeof(eh); total_len -= sizeof(eh); len1 -= sizeof(eh); MGETHDR(m, M_DONTWAIT, MT_DATA); @@ -458,7 +451,6 @@ le_input( MEMCPY(mtod(m, caddr_t), seg1, len1); if (seg2 != NULL) MEMCPY(mtod(m, caddr_t) + len1, seg2, total_len - len1); -#if NBPF > 0 if (sc->le_if.if_bpf != NULL && seg2 != NULL) { bpf_mtap(&sc->le_if, m); /* @@ -483,7 +475,6 @@ le_input( } } } -#endif ether_input(&sc->le_if, &eh, m); } @@ -1077,10 +1068,8 @@ lemac_start( LE_OUTB(sc, LEMAC_REG_TQ, tx_pg); /* tell chip to transmit this packet */ -#if NBPF > 0 if (sc->le_if.if_bpf) bpf_mtap(&sc->le_if, m); -#endif m_freem(m); /* free the mbuf */ } diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c index 6345dff..1c14f8e 100644 --- a/sys/i386/isa/if_lnc.c +++ b/sys/i386/isa/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/i386/isa/if_lnc.h b/sys/i386/isa/if_lnc.h index f3d37f4..cda8364 100644 --- a/sys/i386/isa/if_lnc.h +++ b/sys/i386/isa/if_lnc.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/i386/isa/if_rdp.c b/sys/i386/isa/if_rdp.c index 7d8fa30..10303a3 100644 --- a/sys/i386/isa/if_rdp.c +++ b/sys/i386/isa/if_rdp.c @@ -62,7 +62,6 @@ */ #include "rdp.h" -#include "bpf.h" #include <sys/param.h> #include <sys/systm.h> @@ -89,9 +88,7 @@ #include <netns/ns_if.h> #endif -#if NBPF > 0 #include <net/bpf.h> -#endif #include <machine/clock.h> #include <machine/md_var.h> @@ -629,9 +626,7 @@ rdp_attach(struct isa_device *isa_dev) /* * If BPF is in the kernel, call the attach for it */ -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif return 1; } @@ -814,11 +809,9 @@ outloop: /* * Tap off here if there is a bpf listener. */ -#if NBPF > 0 if (ifp->if_bpf) { bpf_mtap(ifp, m); } -#endif m_freem(m); @@ -862,7 +855,6 @@ rdp_ioctl(struct ifnet *ifp, IOCTL_CMD_T command, caddr_t data) } } -#if NBPF > 0 /* * Promiscuous flag may have changed, propagage this * to the NIC. @@ -872,7 +864,6 @@ rdp_ioctl(struct ifnet *ifp, IOCTL_CMD_T command, caddr_t data) MkHi((ifp->if_flags & IFF_PROMISC)? CMR2_AM_ALL: CMR2_AM_PB)); -#endif break; case SIOCADDMULTI: @@ -1164,8 +1155,6 @@ rdp_get_packet(struct rdp_softc *sc, unsigned len) outb(sc->baseaddr + lpt_control, Ctrl_SelData); WrNib(sc, CMR1, CMR1_RDPAC); -#if NBPF > 0 - /* * Check if there's a BPF listener on this interface. If so, hand off * the raw packet to bpf. @@ -1185,7 +1174,6 @@ rdp_get_packet(struct rdp_softc *sc, unsigned len) return; } } -#endif /* * Remove link layer address. diff --git a/sys/i386/isa/if_sr.c b/sys/i386/isa/if_sr.c index 6d56ab4..6be7958 100644 --- a/sys/i386/isa/if_sr.c +++ b/sys/i386/isa/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/i386/isa/if_wl.c b/sys/i386/isa/if_wl.c index 2f6b6b7..6111b8d 100644 --- a/sys/i386/isa/if_wl.c +++ b/sys/i386/isa/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/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c index d10f103..dd6cf3c8 100644 --- a/sys/i386/isa/if_ze.c +++ b/sys/i386/isa/if_ze.c @@ -64,7 +64,6 @@ static char const zedummy[] = "code to use the includes of card.h and pcic.h"; #include "ze.h" #if NZE > 0 -#include "bpf.h" #include "opt_inet.h" #include "opt_ipx.h" @@ -81,9 +80,7 @@ static char const zedummy[] = "code to use the includes of card.h and pcic.h"; #include <netinet/in.h> #include <netinet/if_ether.h> -#if NBPF > 0 #include <net/bpf.h> -#endif #include <machine/clock.h> #include <machine/md_var.h> @@ -639,9 +636,7 @@ ze_attach(isa_dev) /* * If BPF is in the kernel, call the attach for it */ -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #if NAPM > 0 sc->s_hook.ah_fun = ze_suspend; @@ -860,14 +855,12 @@ ze_init(unit) for (i = 0; i < ETHER_ADDR_LEN; ++i) outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]); -#if NBPF > 0 /* * Initialize multicast address hashing registers to accept * all multicasts (only used when in promiscuous mode) */ for (i = 0; i < 8; ++i) outb(sc->nic_addr + ED_P1_MAR0 + i, 0xff); -#endif /* * Set Current Page pointer to next_packet (initialized above) @@ -1031,11 +1024,9 @@ outloop: /* * If there is BPF support in the configuration, tap off here. */ -#if NBPF > 0 if (ifp->if_bpf) { bpf_mtap(ifp, m0); } -#endif m_freem(m0); @@ -1359,7 +1350,6 @@ ze_ioctl(ifp, command, data) ((ifp->if_flags & IFF_RUNNING) == 0)) ze_init(ifp->if_unit); } -#if NBPF > 0 if (ifp->if_flags & IFF_PROMISC) { /* * Set promiscuous mode on interface. @@ -1378,7 +1368,6 @@ ze_ioctl(ifp, command, data) */ outb(sc->nic_addr + ED_P0_RCR, ED_RCR_AB); } -#endif break; default: @@ -1443,7 +1432,6 @@ ze_get_packet(sc, buf, len) m = ze_ring_to_mbuf(sc, buf, m, len); if (m == NULL) goto bad; -#if NBPF > 0 /* * Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. @@ -1468,7 +1456,6 @@ ze_get_packet(sc, buf, len) return; } } -#endif /* * Fix up data start offset in mbuf to point past ether header diff --git a/sys/i386/isa/if_zp.c b/sys/i386/isa/if_zp.c index 3043517..4de0ea1 100644 --- a/sys/i386/isa/if_zp.c +++ b/sys/i386/isa/if_zp.c @@ -114,7 +114,6 @@ static char const zpdummy[] = "code to use the includes of card.h and pcic.h"; #include "zp.h" -#include "bpf.h" #include "opt_inet.h" #include "opt_ipx.h" @@ -134,9 +133,7 @@ static char const zpdummy[] = "code to use the includes of card.h and pcic.h"; #include <netinet/in.h> #include <netinet/if_ether.h> -#if NBPF > 0 #include <net/bpf.h> -#endif #include <machine/clock.h> #include <machine/md_var.h> @@ -557,9 +554,7 @@ zpattach(isa_dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #if NAPM > 0 sc->s_hook.ah_fun = zp_suspend; sc->s_hook.ah_arg = (void *) isa_dev; @@ -750,11 +745,9 @@ startagain: while (pad--) outb(BASE + EP_W1_TX_PIO_WR_1, 0); /* Padding */ -#if NBPF > 0 if (sc->arpcom.ac_if.if_bpf) { bpf_mtap(&sc->arpcom.ac_if, top); } -#endif m_freem(top); ++sc->arpcom.ac_if.if_opackets; @@ -964,7 +957,6 @@ zpread(sc) outw(BASE + EP_COMMAND, RX_DISCARD_TOP_PACK); while (inw(BASE + EP_STATUS) & S_COMMAND_IN_PROGRESS); ++sc->arpcom.ac_if.if_ipackets; -#if NBPF > 0 if (sc->arpcom.ac_if.if_bpf) { bpf_mtap(&sc->arpcom.ac_if, top); @@ -981,7 +973,6 @@ zpread(sc) return; } } -#endif m_adj(top, sizeof(struct ether_header)); ether_input(&sc->arpcom.ac_if, eh, top); return; |