diff --git a/sys/arch/alpha/a12/if_ade.c b/sys/arch/alpha/a12/if_ade.c index 2a00ebc606ba..882c9c0532a0 100644 --- a/sys/arch/alpha/a12/if_ade.c +++ b/sys/arch/alpha/a12/if_ade.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ade.c,v 1.6 2000/06/29 09:02:51 mrg Exp $ */ +/* $NetBSD: if_ade.c,v 1.7 2000/11/15 01:02:11 thorpej Exp $ */ /* * NOTE: this version of if_de was modified for bounce buffers prior @@ -4498,10 +4498,6 @@ tulip_attach( TULIP_ETHER_IFATTACH(sc); #endif #endif /* __bsdi__ */ - -#if NBPFILTER > 0 - TULIP_BPF_ATTACH(sc); -#endif } static void diff --git a/sys/arch/amiga/dev/if_ed.c b/sys/arch/amiga/dev/if_ed.c index 9c6ab4559744..b0974d322035 100644 --- a/sys/arch/amiga/dev/if_ed.c +++ b/sys/arch/amiga/dev/if_ed.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ed.c,v 1.34 2000/10/01 23:32:39 thorpej Exp $ */ +/* $NetBSD: if_ed.c,v 1.35 2000/11/15 01:02:11 thorpej Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -271,10 +271,6 @@ ed_zbus_attach(parent, self, aux) /* Print additional info when attached. */ printf(": address %s\n", ether_sprintf(myaddr)); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_isr.isr_intr = edintr; sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_ipl = 2; diff --git a/sys/arch/amiga/dev/if_es.c b/sys/arch/amiga/dev/if_es.c index 1e4ea29555e9..5c86cfc844f5 100644 --- a/sys/arch/amiga/dev/if_es.c +++ b/sys/arch/amiga/dev/if_es.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_es.c,v 1.25 2000/10/01 23:32:39 thorpej Exp $ */ +/* $NetBSD: if_es.c,v 1.26 2000/11/15 01:02:12 thorpej Exp $ */ /* * Copyright (c) 1995 Michael L. Hitch @@ -198,10 +198,6 @@ esattach(parent, self, aux) /* Print additional info when attached. */ printf(": address %s\n", ether_sprintf(myaddr)); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_isr.isr_intr = esintr; sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_ipl = 2; diff --git a/sys/arch/amiga/dev/if_qn.c b/sys/arch/amiga/dev/if_qn.c index 34c78076ac23..8ebe5ac7d352 100644 --- a/sys/arch/amiga/dev/if_qn.c +++ b/sys/arch/amiga/dev/if_qn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_qn.c,v 1.19 2000/10/01 23:32:39 thorpej Exp $ */ +/* $NetBSD: if_qn.c,v 1.20 2000/11/15 01:02:12 thorpej Exp $ */ /* * Copyright (c) 1995 Mika Kortelainen @@ -257,10 +257,6 @@ qnattach(parent, self, aux) printf(": hardware address %s\n", ether_sprintf(myaddr)); #endif -#if NBPFILTER > 0 - bpfattach(&sc->sc_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_isr.isr_intr = qnintr; sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_ipl = 2; diff --git a/sys/arch/arc/dev/if_sn.c b/sys/arch/arc/dev/if_sn.c index 074b3f79d033..467fdde625b0 100644 --- a/sys/arch/arc/dev/if_sn.c +++ b/sys/arch/arc/dev/if_sn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sn.c,v 1.21 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: if_sn.c,v 1.22 2000/11/15 01:02:12 thorpej Exp $ */ /* $OpenBSD: if_sn.c,v 1.12 1999/05/13 15:44:48 jason Exp $ */ /* @@ -342,9 +342,6 @@ printf("mapped to offset 0x%x size 0x%x\n", SONICBUF - pp, p - SONICBUF); ifp->if_watchdog = snwatchdog; if_attach(ifp); ether_ifattach(ifp, myaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); diff --git a/sys/arch/arm32/podulebus/if_ea.c b/sys/arch/arm32/podulebus/if_ea.c index 43b8f523547e..c517722e07f2 100644 --- a/sys/arch/arm32/podulebus/if_ea.c +++ b/sys/arch/arm32/podulebus/if_ea.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ea.c,v 1.23 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: if_ea.c,v 1.24 2000/11/15 01:02:12 thorpej Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe @@ -364,13 +364,6 @@ eaattach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, myaddr); - /* Finally, attach to bpf filter if it is present. */ - -#if NBPFILTER > 0 -/* dprintf(("Attaching to BPF...\n"));*/ - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - /* Should test the RAM */ ea_ramtest(sc); diff --git a/sys/arch/arm32/podulebus/if_eb.c b/sys/arch/arm32/podulebus/if_eb.c index 7a1ceaaeecbf..c8bb1b66786c 100644 --- a/sys/arch/arm32/podulebus/if_eb.c +++ b/sys/arch/arm32/podulebus/if_eb.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eb.c,v 1.25 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: if_eb.c,v 1.26 2000/11/15 01:02:12 thorpej Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe @@ -371,13 +371,6 @@ ebattach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, myaddr); - /* Finally, attach to bpf filter if it is present. */ - -#if NBPFILTER > 0 -/* dprintf(("Attaching to BPF...\n"));*/ - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - /* Should test the RAM */ eb_ramtest(sc); diff --git a/sys/arch/arm32/podulebus/if_ie.c b/sys/arch/arm32/podulebus/if_ie.c index c0d2812c01e8..2a5b58538eeb 100644 --- a/sys/arch/arm32/podulebus/if_ie.c +++ b/sys/arch/arm32/podulebus/if_ie.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie.c,v 1.27 1999/11/30 17:02:39 tron Exp $ */ +/* $NetBSD: if_ie.c,v 1.28 2000/11/15 01:02:12 thorpej Exp $ */ /* * Copyright (c) 1995 Melvin Tang-Richardson. @@ -468,11 +468,6 @@ void ieattach ( struct device *parent, struct device *self, void *aux ) ether_sprintf(hwaddr), ((NRXBUF*IE_RXBUF_SIZE)+(NTXBUF*IE_TXBUF_SIZE))/1024 ); -#if NBPFILTER > 0 - printf ( " BPF" ); - bpfattach ( &ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_ih.ih_func = ieintr; sc->sc_ih.ih_arg = sc; sc->sc_ih.ih_level = IPL_NET; diff --git a/sys/arch/arm32/rc7500/if_es.c b/sys/arch/arm32/rc7500/if_es.c index 5465093880c3..6a7626297fdb 100644 --- a/sys/arch/arm32/rc7500/if_es.c +++ b/sys/arch/arm32/rc7500/if_es.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_es.c,v 1.17 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: if_es.c,v 1.18 2000/11/15 01:02:12 thorpej Exp $ */ /* * Copyright (c) 1996, Danny C Tsen. @@ -220,10 +220,6 @@ esattach(parent, self, aux) /* Print additional info when attached. */ printf(": address %s\n", ether_sprintf(myaddr)); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_ih.ih_func = esintr; sc->sc_ih.ih_arg = sc; sc->sc_ih.ih_level = IPL_NET; diff --git a/sys/arch/mac68k/dev/if_mc.c b/sys/arch/mac68k/dev/if_mc.c index a0d3404b680f..c693835dae59 100644 --- a/sys/arch/mac68k/dev/if_mc.c +++ b/sys/arch/mac68k/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_mc.c,v 1.17 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: if_mc.c,v 1.18 2000/11/15 01:02:12 thorpej Exp $ */ /*- * Copyright (c) 1997 David Huang @@ -176,9 +176,6 @@ mcsetup(sc, lladdr) IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; ifp->if_watchdog = mcwatchdog; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif if_attach(ifp); ether_ifattach(ifp, lladdr); diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c index e59fedf6ecbe..60f487a7bea5 100644 --- a/sys/arch/mac68k/dev/if_sn.c +++ b/sys/arch/mac68k/dev/if_sn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sn.c,v 1.27 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: if_sn.c,v 1.28 2000/11/15 01:02:13 thorpej Exp $ */ /* * National Semiconductor DP8393X SONIC Driver @@ -254,9 +254,7 @@ snsetup(sc, lladdr) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; ifp->if_watchdog = snwatchdog; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif + if_attach(ifp); ether_ifattach(ifp, lladdr); diff --git a/sys/arch/macppc/dev/am79c950.c b/sys/arch/macppc/dev/am79c950.c index 79eba3d7b45b..3ba1aaa61ee6 100644 --- a/sys/arch/macppc/dev/am79c950.c +++ b/sys/arch/macppc/dev/am79c950.c @@ -1,4 +1,4 @@ -/* $NetBSD: am79c950.c,v 1.9 2000/10/01 23:32:40 thorpej Exp $ */ +/* $NetBSD: am79c950.c,v 1.10 2000/11/15 01:02:13 thorpej Exp $ */ /*- * Copyright (c) 1997 David Huang @@ -178,10 +178,6 @@ mcsetup(sc, lladdr) IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; ifp->if_watchdog = mcwatchdog; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - /* initialize ifmedia structures */ ifmedia_init(&sc->sc_media, 0, mc_mediachange, mc_mediastatus); ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL); diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 6ae9424c945a..9c583b95fba2 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bm.c,v 1.14 2000/11/01 20:21:58 tsubai Exp $ */ +/* $NetBSD: if_bm.c,v 1.15 2000/11/15 01:02:13 thorpej Exp $ */ /*- * Copyright (C) 1998, 1999, 2000 Tsubai Masanari. All rights reserved. @@ -269,10 +269,6 @@ bmac_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } /* diff --git a/sys/arch/macppc/dev/if_gm.c b/sys/arch/macppc/dev/if_gm.c index 51a3d42ba2cd..abfd25f0f79d 100644 --- a/sys/arch/macppc/dev/if_gm.c +++ b/sys/arch/macppc/dev/if_gm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gm.c,v 1.8 2000/06/29 08:10:45 mrg Exp $ */ +/* $NetBSD: if_gm.c,v 1.9 2000/11/15 01:02:13 thorpej Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -246,10 +246,6 @@ gmac_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, laddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } u_int diff --git a/sys/arch/newsmips/apbus/if_sn.c b/sys/arch/newsmips/apbus/if_sn.c index 9403cb59b843..76c10aad82ca 100644 --- a/sys/arch/newsmips/apbus/if_sn.c +++ b/sys/arch/newsmips/apbus/if_sn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sn.c,v 1.6 2000/10/12 03:13:47 onoe Exp $ */ +/* $NetBSD: if_sn.c,v 1.7 2000/11/15 01:02:13 thorpej Exp $ */ /* * National Semiconductor DP8393X SONIC Driver @@ -233,9 +233,6 @@ snsetup(sc, lladdr) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; ifp->if_watchdog = snwatchdog; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif if_attach(ifp); ether_ifattach(ifp, lladdr); diff --git a/sys/arch/next68k/dev/mb8795.c b/sys/arch/next68k/dev/mb8795.c index 2d486da5c33d..e3fc018ff0c8 100644 --- a/sys/arch/next68k/dev/mb8795.c +++ b/sys/arch/next68k/dev/mb8795.c @@ -1,4 +1,4 @@ -/* $NetBSD: mb8795.c,v 1.18 2000/08/09 02:26:26 tv Exp $ */ +/* $NetBSD: mb8795.c,v 1.19 2000/11/15 01:02:13 thorpej Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell * All rights reserved. @@ -174,10 +174,6 @@ mb8795_config(sc) */ ifp->if_mtu -= 16; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_sh = shutdownhook_establish(mb8795_shutdown, sc); if (sc->sc_sh == NULL) panic("mb8795_config: can't establish shutdownhook"); diff --git a/sys/arch/pc532/dev/lpt.c b/sys/arch/pc532/dev/lpt.c index 67b68bd87d45..e0fec2975235 100644 --- a/sys/arch/pc532/dev/lpt.c +++ b/sys/arch/pc532/dev/lpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpt.c,v 1.31 2000/03/23 06:42:33 thorpej Exp $ */ +/* $NetBSD: lpt.c,v 1.32 2000/11/15 01:02:13 thorpej Exp $ */ /* * Copyright (c) 1994 Matthias Pfaller. @@ -543,9 +543,6 @@ plipattach(sc, unit) ether_ifattach(ifp, myaddr); ifp->if_mtu = PLIPMTU; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif sc->sc_ifsoftint = intr_establish(SOFTINT, plipsoftint, sc, sc->sc_dev.dv_xname, IPL_NET, IPL_ZERO, 0); } diff --git a/sys/arch/sgimips/dev/if_mec.c b/sys/arch/sgimips/dev/if_mec.c index a371f7654061..d5ef44af9253 100644 --- a/sys/arch/sgimips/dev/if_mec.c +++ b/sys/arch/sgimips/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_mec.c,v 1.3 2000/07/03 12:50:09 soren Exp $ */ +/* $NetBSD: if_mec.c,v 1.4 2000/11/15 01:02:14 thorpej Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -198,12 +198,6 @@ return; /* XXX */ if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); - -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, - ifp, DLT_EN10MB, sizeof (struct ether_header)); -#endif - } int diff --git a/sys/arch/sun3/dev/if_ie.c b/sys/arch/sun3/dev/if_ie.c index b28a0e76081a..e742d8a3b299 100644 --- a/sys/arch/sun3/dev/if_ie.c +++ b/sys/arch/sun3/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie.c,v 1.34 2000/10/01 23:32:41 thorpej Exp $ */ +/* $NetBSD: if_ie.c,v 1.35 2000/11/15 01:02:14 thorpej Exp $ */ /*- * Copyright (c) 1993, 1994, 1995 Charles M. Hannum. @@ -367,9 +367,6 @@ ie_attach(sc) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp, sc->sc_addr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } /* diff --git a/sys/arch/vax/vsa/if_ln.c b/sys/arch/vax/vsa/if_ln.c index ef318681fa81..57bebeea7c04 100644 --- a/sys/arch/vax/vsa/if_ln.c +++ b/sys/arch/vax/vsa/if_ln.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ln.c,v 1.15 2000/10/01 23:32:41 thorpej Exp $ */ +/* $NetBSD: if_ln.c,v 1.16 2000/11/15 01:02:14 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -344,9 +344,6 @@ lnattach(parent, self, aux) rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); #endif -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif /* * Register this device as boot device if we booted from it. diff --git a/sys/dev/bi/if_ni.c b/sys/dev/bi/if_ni.c index 3fb4d3affbde..03145e17bb96 100644 --- a/sys/dev/bi/if_ni.c +++ b/sys/dev/bi/if_ni.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ni.c,v 1.6 2000/10/01 23:32:41 thorpej Exp $ */ +/* $NetBSD: if_ni.c,v 1.7 2000/11/15 01:02:14 thorpej Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -475,10 +475,6 @@ retry: WAITREG(NI_PCR, PCR_OWN); if (shutdownhook_establish(ni_shutdown, sc) == 0) printf("%s: WARNING: unable to establish shutdown hook\n", sc->sc_dev.dv_xname); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } /* diff --git a/sys/dev/ic/awi.c b/sys/dev/ic/awi.c index aa395f0dbef5..467679429ba1 100644 --- a/sys/dev/ic/awi.c +++ b/sys/dev/ic/awi.c @@ -1,4 +1,4 @@ -/* $NetBSD: awi.c,v 1.26 2000/07/21 04:48:55 onoe Exp $ */ +/* $NetBSD: awi.c,v 1.27 2000/11/15 01:02:15 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -325,9 +325,6 @@ awi_attach(sc) #endif #else ether_ifattach(ifp, sc->sc_mib_addr.aMAC_Address); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #endif #ifdef IFM_IEEE80211 @@ -378,9 +375,6 @@ awi_detach(sc) } if (sc->sc_wep_ctx != NULL) free(sc->sc_wep_ctx, M_DEVBUF); -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif #ifdef IFM_IEEE80211 ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY); #endif diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c index d1f9a116bdc3..6957049b210b 100644 --- a/sys/dev/ic/dp8390.c +++ b/sys/dev/ic/dp8390.c @@ -1,4 +1,4 @@ -/* $NetBSD: dp8390.c,v 1.39 2000/10/17 16:14:42 bouyer Exp $ */ +/* $NetBSD: dp8390.c,v 1.40 2000/11/15 01:02:16 thorpej Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -152,9 +152,6 @@ dp8390_config(sc, media, nmedia, defmedia) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, @@ -1334,9 +1331,6 @@ dp8390_detach(sc, flags) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 143b74db0a1a..0eaf863d3159 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $NetBSD: elink3.c,v 1.84 2000/10/01 23:32:41 thorpej Exp $ */ +/* $NetBSD: elink3.c,v 1.85 2000/11/15 01:02:16 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -512,10 +512,6 @@ epconfig(sc, chipset, enaddr) GO_WINDOW(1); /* Window 1 is operating window */ -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -2173,9 +2169,6 @@ ep_detach(self, flags) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/elinkxl.c b/sys/dev/ic/elinkxl.c index a28061642dcc..452365ae3406 100644 --- a/sys/dev/ic/elinkxl.c +++ b/sys/dev/ic/elinkxl.c @@ -1,4 +1,4 @@ -/* $NetBSD: elinkxl.c,v 1.44 2000/11/14 18:21:01 thorpej Exp $ */ +/* $NetBSD: elinkxl.c,v 1.45 2000/11/15 01:02:16 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -451,11 +451,6 @@ ex_config(sc) /* TODO: set queues to 0 */ -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -1526,9 +1521,6 @@ ex_detach(sc) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index ca536db81987..b8da34fd94ef 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $NetBSD: hme.c,v 1.17 2000/10/20 06:08:02 mrg Exp $ */ +/* $NetBSD: hme.c,v 1.18 2000/11/15 01:02:16 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -306,10 +306,6 @@ hme_config(sc) if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_sh = shutdownhook_establish(hme_shutdown, sc); if (sc->sc_sh == NULL) panic("hme_config: can't establish shutdownhook"); diff --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c index 234036dba4a9..47e6678b34e8 100644 --- a/sys/dev/ic/i82557.c +++ b/sys/dev/ic/i82557.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82557.c,v 1.40 2000/10/11 16:57:46 thorpej Exp $ */ +/* $NetBSD: i82557.c,v 1.41 2000/11/15 01:02:16 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -345,10 +345,6 @@ fxp_attach(sc) */ if_attach(ifp); ether_ifattach(ifp, enaddr); -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -1927,9 +1923,6 @@ fxp_detach(sc) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/i82586.c b/sys/dev/ic/i82586.c index d309d3dd9945..a4f0da3a333a 100644 --- a/sys/dev/ic/i82586.c +++ b/sys/dev/ic/i82586.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82586.c,v 1.31 2000/11/04 19:48:38 scw Exp $ */ +/* $NetBSD: i82586.c,v 1.32 2000/11/15 01:02:16 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -147,7 +147,7 @@ Mode of operation: #include -__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.31 2000/11/04 19:48:38 scw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.32 2000/11/15 01:02:16 thorpej Exp $"); #include #include @@ -278,10 +278,6 @@ i82586_attach(sc, name, etheraddr, media, nmedia, defmedia) ether_ifattach(ifp, etheraddr); printf(" address %s, type %s\n", ether_sprintf(etheraddr), name); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } diff --git a/sys/dev/ic/lance.c b/sys/dev/ic/lance.c index d8515ff7ed4d..f6ad7be42fa2 100644 --- a/sys/dev/ic/lance.c +++ b/sys/dev/ic/lance.c @@ -1,4 +1,4 @@ -/* $NetBSD: lance.c,v 1.15 2000/11/03 06:21:32 tsutsui Exp $ */ +/* $NetBSD: lance.c,v 1.16 2000/11/15 01:02:16 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -278,10 +278,6 @@ lance_config(sc) if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_sh = shutdownhook_establish(lance_shutdown, sc); if (sc->sc_sh == NULL) panic("lance_config: can't establish shutdownhook"); diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c index 91a889edde20..a6be034af10d 100644 --- a/sys/dev/ic/lemac.c +++ b/sys/dev/ic/lemac.c @@ -1,4 +1,4 @@ -/* $NetBSD: lemac.c,v 1.16 2000/10/01 23:32:42 thorpej Exp $ */ +/* $NetBSD: lemac.c,v 1.17 2000/11/15 01:02:17 thorpej Exp $ */ /*- * Copyright (c) 1994, 1995, 1997 Matt Thomas @@ -1037,10 +1037,6 @@ lemac_ifattach( if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dv.dv_xname, RND_TYPE_NET, 0); diff --git a/sys/dev/ic/mb86960.c b/sys/dev/ic/mb86960.c index 0fae7bf369a7..0983b0a00945 100644 --- a/sys/dev/ic/mb86960.c +++ b/sys/dev/ic/mb86960.c @@ -1,4 +1,4 @@ -/* $NetBSD: mb86960.c,v 1.42 2000/10/01 23:32:42 thorpej Exp $ */ +/* $NetBSD: mb86960.c,v 1.43 2000/11/15 01:02:17 thorpej Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -265,10 +265,6 @@ mb86960_config(sc, media, nmedia, defmedia) if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - /* If BPF is in the kernel, call the attach for it. */ - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -1838,9 +1834,6 @@ mb86960_detach(sc) #if NRND > 0 /* Unhook the entropy source. */ rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 3e5ca3a9a3c8..06a324385370 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9.c,v 1.17 2000/11/14 18:21:02 thorpej Exp $ */ +/* $NetBSD: rtl81x9.c,v 1.18 2000/11/15 01:02:17 thorpej Exp $ */ /* * Copyright (c) 1997, 1998 @@ -761,10 +761,6 @@ rtk_attach(sc) if_attach(ifp); ether_ifattach(ifp, eaddr); -#if NBPFILTER > 0 - bpfattach(&sc->ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* * Make sure the interface is shutdown during reboot. */ @@ -872,9 +868,6 @@ rtk_detach(sc) /* Delete all remaining media. */ ifmedia_delete_instance(&sc->mii.mii_media, IFM_INST_ANY); -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/seeq8005.c b/sys/dev/ic/seeq8005.c index 50a2d443ee60..a40e4c1149b1 100644 --- a/sys/dev/ic/seeq8005.c +++ b/sys/dev/ic/seeq8005.c @@ -1,4 +1,4 @@ -/* $NetBSD: seeq8005.c,v 1.5 2000/11/03 00:25:36 bjh21 Exp $ */ +/* $NetBSD: seeq8005.c,v 1.6 2000/11/15 01:02:17 thorpej Exp $ */ /* * Copyright (c) 2000 Ben Harris @@ -58,7 +58,7 @@ #include #include -__RCSID("$NetBSD: seeq8005.c,v 1.5 2000/11/03 00:25:36 bjh21 Exp $"); +__RCSID("$NetBSD: seeq8005.c,v 1.6 2000/11/15 01:02:17 thorpej Exp $"); #include #include @@ -234,12 +234,6 @@ seeq8005_attach(struct seeq8005_softc *sc, const u_int8_t *myaddr) if_attach(ifp); ether_ifattach(ifp, myaddr); - /* Finally, attach to bpf filter if it is present. */ - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - printf("\n"); /* Test the RAM */ diff --git a/sys/dev/ic/sgec.c b/sys/dev/ic/sgec.c index 41c0b4e2c698..44e47afd60a4 100644 --- a/sys/dev/ic/sgec.c +++ b/sys/dev/ic/sgec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sgec.c,v 1.9 2000/11/14 18:21:02 thorpej Exp $ */ +/* $NetBSD: sgec.c,v 1.10 2000/11/15 01:02:17 thorpej Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -213,9 +213,6 @@ sgec_attach(sc) if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif printf("\n%s: hardware address %s\n", sc->sc_dev.dv_xname, ether_sprintf(sc->sc_enaddr)); return; diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index 1bd9c670d1ac..e94fbc0656f7 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc83c170.c,v 1.38 2000/11/14 18:21:02 thorpej Exp $ */ +/* $NetBSD: smc83c170.c,v 1.39 2000/11/15 01:02:17 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -268,10 +268,6 @@ epic_attach(sc) */ if_attach(ifp); ether_ifattach(ifp, enaddr); -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* * Make sure the interface is shutdown during reboot. diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index 0ae733e6cfda..bd1a6d8f1371 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc91cxx.c,v 1.30 2000/10/01 23:32:43 thorpej Exp $ */ +/* $NetBSD: smc91cxx.c,v 1.31 2000/11/15 01:02:17 thorpej Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -336,10 +336,6 @@ smc91cxx_attach(sc, myea) break; } -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -1341,9 +1337,6 @@ smc91cxx_detach(self, flags) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/ic/tulip.c b/sys/dev/ic/tulip.c index e34c60102d2f..1d85eab4bb8d 100644 --- a/sys/dev/ic/tulip.c +++ b/sys/dev/ic/tulip.c @@ -1,4 +1,4 @@ -/* $NetBSD: tulip.c,v 1.80 2000/10/15 19:56:31 thorpej Exp $ */ +/* $NetBSD: tulip.c,v 1.81 2000/11/15 01:02:17 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -514,10 +514,6 @@ tlp_attach(sc, enaddr) */ if_attach(ifp); ether_ifattach(ifp, enaddr); -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->sc_rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -634,9 +630,6 @@ tlp_detach(sc) #if NRND > 0 rnd_detach_source(&sc->sc_rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/isa/cs89x0.c b/sys/dev/isa/cs89x0.c index 7a231447abc6..86ede6b1dc9d 100644 --- a/sys/dev/isa/cs89x0.c +++ b/sys/dev/isa/cs89x0.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs89x0.c,v 1.15 2000/10/01 23:32:43 thorpej Exp $ */ +/* $NetBSD: cs89x0.c,v 1.16 2000/11/15 01:02:17 thorpej Exp $ */ /* * Copyright 1997 @@ -491,10 +491,6 @@ cs_attach(sc, enaddr, media, nmedia, defmedia) if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index d57fc9349f31..ed3e284d1507 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eg.c,v 1.50 2000/10/01 23:32:43 thorpej Exp $ */ +/* $NetBSD: if_eg.c,v 1.51 2000/11/15 01:02:18 thorpej Exp $ */ /* * Copyright (c) 1993 Dean Huxley @@ -485,10 +485,6 @@ egattach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, myaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, IPL_NET, egintr, sc); diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index a5672c4641fa..bea7310de962 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_el.c,v 1.61 2000/10/01 23:32:43 thorpej Exp $ */ +/* $NetBSD: if_el.c,v 1.62 2000/11/15 01:02:18 thorpej Exp $ */ /* * Copyright (c) 1994, Matthew E. Kimmel. Permission is hereby granted @@ -242,12 +242,6 @@ elattach(parent, self, aux) /* Print out some information for the user. */ printf("%s: address %s\n", self->dv_xname, ether_sprintf(myaddr)); - /* Finally, attach to bpf filter if it is present. */ -#if NBPFILTER > 0 - DPRINTF(("Attaching to BPF...\n")); - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, IPL_NET, elintr, sc); diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index 5cab30d92f5a..66566af0f934 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_iy.c,v 1.43 2000/10/01 23:32:43 thorpej Exp $ */ +/* $NetBSD: if_iy.c,v 1.44 2000/11/15 01:02:18 thorpej Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -365,10 +365,6 @@ iyattach(parent, self, aux) printf("%s: EEPROM irq setting %d ignored\n", sc->sc_dev.dv_xname, eirq); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, IPL_NET, iyintr, sc); diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c index 09663eed14d0..f27330f345e7 100644 --- a/sys/dev/ofw/ofnet.c +++ b/sys/dev/ofw/ofnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofnet.c,v 1.19 2000/05/16 05:45:52 thorpej Exp $ */ +/* $NetBSD: ofnet.c,v 1.20 2000/11/15 01:02:18 thorpej Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -166,9 +166,6 @@ ofnet_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, myaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #ifdef __BROKEN_DK_ESTABLISH dk_establish(0, self); /* XXX */ #endif diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index c297fe18a5cf..35b2755172bf 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_de.c,v 1.94 2000/11/14 18:42:55 thorpej Exp $ */ +/* $NetBSD: if_de.c,v 1.95 2000/11/15 01:02:14 thorpej Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -5154,10 +5154,6 @@ tulip_attach( #endif #endif /* __bsdi__ */ -#if NBPFILTER > 0 - TULIP_BPF_ATTACH(sc); -#endif - #if defined(__NetBSD__) && NRND > 0 rnd_attach_source(&sc->tulip_rndsource, sc->tulip_dev.dv_xname, RND_TYPE_NET, 0); diff --git a/sys/dev/pci/if_sip.c b/sys/dev/pci/if_sip.c index ff60e34abd28..457f02a46867 100644 --- a/sys/dev/pci/if_sip.c +++ b/sys/dev/pci/if_sip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sip.c,v 1.19 2000/10/28 08:36:57 tsutsui Exp $ */ +/* $NetBSD: if_sip.c,v 1.20 2000/11/15 01:02:15 thorpej Exp $ */ /*- * Copyright (c) 1999 Network Computer, Inc. @@ -588,10 +588,6 @@ sip_attach(parent, self, aux) */ if_attach(ifp); ether_ifattach(ifp, enaddr); -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* * Make sure the interface is shutdown during reboot. diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index c35664f20d58..1773486c6911 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ti.c,v 1.13 2000/11/14 18:42:57 thorpej Exp $ */ +/* $NetBSD: if_ti.c,v 1.14 2000/11/15 01:02:15 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1827,11 +1827,6 @@ static void ti_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, eaddr); -#if NBPFILTER > 0 - bpfattach(&sc->ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - return; fail2: pci_intr_disestablish(pc, sc->sc_ih); diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 5c81aa861396..59952fcd6dc1 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tl.c,v 1.36 2000/10/01 23:32:44 thorpej Exp $ */ +/* $NetBSD: if_tl.c,v 1.37 2000/11/15 01:02:15 thorpej Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. All rights reserved. @@ -445,10 +445,6 @@ tl_pci_attach(parent, self, aux) ifp->if_timer = 0; if_attach(ifp); ether_ifattach(&(sc)->tl_if, (sc)->tl_enaddr); -#if NBPFILTER > 0 - bpfattach(&sc->tl_bpf, &sc->tl_if, DLT_EN10MB, - sizeof(struct ether_header)); -#endif } static void diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 94d2168fb471..f2a85803b10c 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_vr.c,v 1.40 2000/10/15 20:03:44 thorpej Exp $ */ +/* $NetBSD: if_vr.c,v 1.41 2000/11/15 01:02:15 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -1649,11 +1649,6 @@ vr_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, sc->vr_enaddr); -#if NBPFILTER > 0 - bpfattach(&sc->vr_ec.ec_if.if_bpf, - ifp, DLT_EN10MB, sizeof (struct ether_header)); -#endif - sc->vr_ats = shutdownhook_establish(vr_shutdown, sc); if (sc->vr_ats == NULL) printf("%s: warning: couldn't establish shutdown hook\n", diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index 27e9259567c2..4f09d661dbf9 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cnw.c,v 1.15 2000/10/16 10:26:41 itojun Exp $ */ +/* $NetBSD: if_cnw.c,v 1.16 2000/11/15 01:02:18 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -591,10 +591,7 @@ cnw_attach(parent, self, aux) /* Attach the interface */ if_attach(ifp); ether_ifattach(ifp, macaddr); -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif + sc->sc_resource |= CNW_RES_NET; ifp->if_baudrate = IF_Mbps(1); @@ -1232,9 +1229,6 @@ cnw_detach(self, flags) cnw_disable(sc); if ((sc->sc_resource & CNW_RES_NET) != 0) { -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif ether_ifdetach(ifp); if_detach(ifp); } diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index eaac423af1ea..47461ea015d5 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ray.c,v 1.22 2000/10/01 23:32:44 thorpej Exp $ */ +/* $NetBSD: if_ray.c,v 1.23 2000/11/15 01:02:18 thorpej Exp $ */ /* * Copyright (c) 2000 Christian E. Hopps * All rights reserved. @@ -630,9 +630,6 @@ ray_attach(parent, self, aux) else ifmedia_set(&sc->sc_media, IFM_INFRA); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif /* disable the card */ pcmcia_function_disable(sc->sc_pf); @@ -718,9 +715,7 @@ ray_detach(self, flags) } ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY); -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif + ether_ifdetach(ifp); if_detach(ifp); powerhook_disestablish(sc->sc_pwrhook); diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c index 97abb6987b69..62045697c2df 100644 --- a/sys/dev/pcmcia/if_wi.c +++ b/sys/dev/pcmcia/if_wi.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_wi.c,v 1.42 2000/11/02 18:55:46 thorpej Exp $ */ +/* $NetBSD: if_wi.c,v 1.43 2000/11/15 01:02:18 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -462,10 +462,6 @@ wi_attach(parent, self, aux) ifp->if_baudrate = IF_Mbps(2); -#if NBPFILTER > 0 - bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); @@ -1769,9 +1765,6 @@ wi_detach(self, flags) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); if_detach(ifp); diff --git a/sys/dev/pcmcia/if_xi.c b/sys/dev/pcmcia/if_xi.c index 600bc35baa2d..fb7c11aa8ff7 100644 --- a/sys/dev/pcmcia/if_xi.c +++ b/sys/dev/pcmcia/if_xi.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_xi.c,v 1.5 2000/10/01 23:32:44 thorpej Exp $ */ +/* $NetBSD: if_xi.c,v 1.6 2000/11/15 01:02:18 thorpej Exp $ */ /* OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp */ /* @@ -497,10 +497,6 @@ xi_pcmcia_attach(parent, self, aux) ether_ifattach(ifp, sc->sc_enaddr); psc->sc_resource |= XI_RES_MI; -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif /* NBPFILTER > 0 */ - /* * Reset and initialize the card again for DINGO (as found in Linux * driver). Without this Dingo will get a watchdog timeout the first @@ -565,9 +561,7 @@ xi_pcmcia_detach(self, flags) mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY); ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY); -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif + ether_ifdetach(ifp); if_detach(ifp); psc->sc_resource &= ~XI_RES_MI; diff --git a/sys/dev/qbus/if_de.c b/sys/dev/qbus/if_de.c index 0c14626e45e9..4208da68974e 100644 --- a/sys/dev/qbus/if_de.c +++ b/sys/dev/qbus/if_de.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_de.c,v 1.6 2000/10/01 23:32:44 thorpej Exp $ */ +/* $NetBSD: if_de.c,v 1.7 2000/11/15 01:02:19 thorpej Exp $ */ /* * Copyright (c) 1982, 1986, 1989 Regents of the University of California. @@ -291,9 +291,7 @@ deattach(struct device *parent, struct device *self, void *aux) ifp->if_start = destart; if_attach(ifp); ether_ifattach(ifp, myaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif + sc->sc_sh = shutdownhook_establish(deshutdown, sc); return; diff --git a/sys/dev/qbus/if_qe.c b/sys/dev/qbus/if_qe.c index 2ba4269c804c..984405cd1900 100644 --- a/sys/dev/qbus/if_qe.c +++ b/sys/dev/qbus/if_qe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_qe.c,v 1.43 2000/10/01 23:32:44 thorpej Exp $ */ +/* $NetBSD: if_qe.c,v 1.44 2000/11/15 01:02:19 thorpej Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -366,9 +366,6 @@ qeattach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp, enaddr); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif return; /* diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index e6c3a8302951..800aa8c244b6 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $NetBSD: be.c,v 1.21 2000/07/09 20:57:41 pk Exp $ */ +/* $NetBSD: be.c,v 1.22 2000/11/15 01:02:19 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -474,10 +474,6 @@ beattach(parent, self, aux) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp, sc->sc_enaddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index f788a3b23e08..b8b063cb29dc 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $NetBSD: qe.c,v 1.11 2000/07/09 20:57:43 pk Exp $ */ +/* $NetBSD: qe.c,v 1.12 2000/11/15 01:02:19 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -329,11 +329,6 @@ qeattach(parent, self, aux) ether_ifattach(ifp, sc->sc_enaddr); printf(" address %s\n", ether_sprintf(sc->sc_enaddr)); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif } /* diff --git a/sys/dev/scsipi/if_se.c b/sys/dev/scsipi/if_se.c index 7dbb112e12df..d9b52546ff8c 100644 --- a/sys/dev/scsipi/if_se.c +++ b/sys/dev/scsipi/if_se.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_se.c,v 1.31 2000/10/01 23:32:45 thorpej Exp $ */ +/* $NetBSD: if_se.c,v 1.32 2000/11/15 01:02:19 thorpej Exp $ */ /* * Copyright (c) 1997 Ian W. Dall @@ -358,10 +358,6 @@ seattach(parent, self, aux) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp, myaddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index cf1928e1d6bb..5bfdac77c325 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_aue.c,v 1.47 2000/10/24 14:53:59 augustss Exp $ */ +/* $NetBSD: if_aue.c,v 1.48 2000/11/15 01:02:19 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. @@ -902,11 +902,6 @@ USB_ATTACH(aue) /* Attach the interface. */ if_attach(ifp); Ether_ifattach(ifp, eaddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->aue_dev), RND_TYPE_NET, 0); @@ -952,9 +947,6 @@ USB_DETACH(aue) #endif mii_detach(&sc->aue_mii, MII_PHY_ANY, MII_OFFSET_ANY); ifmedia_delete_instance(&sc->aue_mii.mii_media, IFM_INST_ANY); -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif ether_ifdetach(ifp); #endif /* __NetBSD__ */ diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 47c7597cf132..ff9a2d7df00f 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cue.c,v 1.25 2000/10/24 14:53:59 augustss Exp $ */ +/* $NetBSD: if_cue.c,v 1.26 2000/11/15 01:02:19 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. @@ -704,11 +704,6 @@ USB_ATTACH(cue) /* Attach the interface. */ if_attach(ifp); Ether_ifattach(ifp, eaddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->cue_dev), RND_TYPE_NET, 0); @@ -751,9 +746,6 @@ USB_DETACH(cue) #if defined(__NetBSD__) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); #endif /* __NetBSD__ */ diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 853ddbfc3cf3..6a926ecaeddd 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_kue.c,v 1.31 2000/10/24 14:53:59 augustss Exp $ */ +/* $NetBSD: if_kue.c,v 1.32 2000/11/15 01:02:19 thorpej Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. @@ -666,11 +666,6 @@ USB_ATTACH(kue) /* Attach the interface. */ if_attach(ifp); Ether_ifattach(ifp, sc->kue_desc.kue_macaddr); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif #if NRND > 0 rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->kue_dev), RND_TYPE_NET, 0); @@ -711,9 +706,6 @@ USB_DETACH(kue) #if defined(__NetBSD__) #if NRND > 0 rnd_detach_source(&sc->rnd_source); -#endif -#if NBPFILTER > 0 - bpfdetach(ifp); #endif ether_ifdetach(ifp); #endif /* __NetBSD__ */ diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index b594de8a9fce..3d96e4a8b5bd 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.68 2000/10/15 19:49:55 matt Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.69 2000/11/15 01:02:15 thorpej Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -72,6 +72,7 @@ #include "opt_ns.h" #include "opt_gateway.h" #include "vlan.h" +#include "bpfilter.h" #include #include @@ -93,6 +94,10 @@ #include #include +#if NBPFILTER > 0 +#include +#endif + #include #if NVLAN > 0 #include @@ -808,6 +813,9 @@ ether_ifattach(struct ifnet *ifp, const u_int8_t *lla) } LIST_INIT(&((struct ethercom *)ifp)->ec_multiaddrs); ifp->if_broadcastaddr = etherbroadcastaddr; +#if NBPFILTER > 0 + bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); +#endif } void @@ -818,6 +826,10 @@ ether_ifdetach(struct ifnet *ifp) struct ether_multi *enm; int s; +#if NBPFILTER > 0 + bpfdetach(ifp); +#endif + #if NVLAN > 0 if (ec->ec_nvlans) vlan_ifdetach(ifp); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 8782e1f457e9..85705459499d 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_vlan.c,v 1.21 2000/11/12 19:39:42 bouyer Exp $ */ +/* $NetBSD: if_vlan.c,v 1.22 2000/11/15 01:02:15 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -303,10 +303,6 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p) */ ether_ifattach(ifp, LLADDR(p->if_sadl)); ifp->if_hdrlen = sizeof(struct ether_vlan_header); /* XXX? */ -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif break; } @@ -366,9 +362,6 @@ vlan_unconfig(struct ifnet *ifp) } } -#if NBPFILTER > 0 - bpfdetach(ifp); -#endif ether_ifdetach(ifp); break; }