diff options
Diffstat (limited to 'sys')
62 files changed, 79 insertions, 311 deletions
diff --git a/sys/arch/amiga/dev/if_ae.c b/sys/arch/amiga/dev/if_ae.c index 56c63033133..633455ceac8 100644 --- a/sys/arch/amiga/dev/if_ae.c +++ b/sys/arch/amiga/dev/if_ae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ae.c,v 1.12 1999/05/13 15:44:47 jason Exp $ */ +/* $OpenBSD: if_ae.c,v 1.13 2001/02/20 19:39:30 mickey Exp $ */ /* $NetBSD: if_ae.c,v 1.14 1997/03/18 18:44:53 veego Exp $ */ /* @@ -246,10 +246,6 @@ aeattach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_isr.isr_intr = aeintr; sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_ipl = 2; diff --git a/sys/arch/amiga/dev/if_ed.c b/sys/arch/amiga/dev/if_ed.c index b3f0dfffdda..beb3f2fe37f 100644 --- a/sys/arch/amiga/dev/if_ed.c +++ b/sys/arch/amiga/dev/if_ed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ed.c,v 1.12 1999/05/13 15:44:48 jason Exp $ */ +/* $OpenBSD: if_ed.c,v 1.13 2001/02/20 19:39:29 mickey Exp $ */ /* $NetBSD: if_ed.c,v 1.26 1997/03/17 17:51:42 is Exp $ */ /* @@ -276,10 +276,6 @@ ed_zbus_attach(parent, self, aux) /* Print additional info when attached. */ printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); -#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 ca82e91e13d..b1afabb0ba6 100644 --- a/sys/arch/amiga/dev/if_es.c +++ b/sys/arch/amiga/dev/if_es.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_es.c,v 1.11 1999/05/13 15:44:48 jason Exp $ */ +/* $OpenBSD: if_es.c,v 1.12 2001/02/20 19:39:29 mickey Exp $ */ /* $NetBSD: if_es.c,v 1.16 1996/12/23 09:10:17 veego Exp $ */ /* @@ -199,10 +199,6 @@ esattach(parent, self, aux) /* Print additional info when attached. */ printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); -#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 6db5632a5e0..fbcb066283c 100644 --- a/sys/arch/amiga/dev/if_qn.c +++ b/sys/arch/amiga/dev/if_qn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_qn.c,v 1.12 1999/05/13 15:44:48 jason Exp $ */ +/* $OpenBSD: if_qn.c,v 1.13 2001/02/20 19:39:30 mickey Exp $ */ /* $NetBSD: if_qn.c,v 1.10 1996/12/23 09:10:19 veego Exp $ */ /* @@ -262,10 +262,6 @@ qnattach(parent, self, aux) printf(": hardware address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); #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/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c index d72c57eb0de..d412299da32 100644 --- a/sys/arch/mac68k/dev/if_ae.c +++ b/sys/arch/mac68k/dev/if_ae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ae.c,v 1.14 1999/05/13 15:44:49 jason Exp $ */ +/* $OpenBSD: if_ae.c,v 1.15 2001/02/20 19:39:31 mickey Exp $ */ /* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */ /* @@ -172,10 +172,6 @@ printf(": failed to clear shared memory - check configuration\n"); printf("type %s, %dKB memory\n", sc->type_str, sc->mem_size / 1024); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - return 0; } diff --git a/sys/arch/mac68k/dev/if_mc.c b/sys/arch/mac68k/dev/if_mc.c index f504b184873..e9b95dd5101 100644 --- a/sys/arch/mac68k/dev/if_mc.c +++ b/sys/arch/mac68k/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mc.c,v 1.2 1999/05/13 15:44:49 jason Exp $ */ +/* $OpenBSD: if_mc.c,v 1.3 2001/02/20 19:39:31 mickey Exp $ */ /* $NetBSD: if_mc.c,v 1.4 1998/01/12 19:22:09 thorpej Exp $ */ /*- @@ -173,10 +173,6 @@ mcsetup(sc, lladdr) ifp->if_flags = 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); diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c index ba6609b0340..649512bde69 100644 --- a/sys/arch/mac68k/dev/if_sn.c +++ b/sys/arch/mac68k/dev/if_sn.c @@ -258,9 +258,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); diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c index 9affbebd089..fb020f7cd3a 100644 --- a/sys/arch/mvme68k/dev/if_ie.c +++ b/sys/arch/mvme68k/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.11 2000/01/06 03:21:42 smurph Exp $ */ +/* $OpenBSD: if_ie.c,v 1.12 2001/02/20 19:39:31 mickey Exp $ */ /*- * Copyright (c) 1999 Steve Murphree, Jr. @@ -464,10 +464,6 @@ ieattach(parent, self, aux) printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_bustype = ca->ca_bustype; sc->sc_ih.ih_fn = ieintr; diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c index c3c1d4bf0a9..392cceea122 100644 --- a/sys/arch/mvme88k/dev/if_ie.c +++ b/sys/arch/mvme88k/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.7 2000/03/03 00:54:53 todd Exp $ */ +/* $OpenBSD: if_ie.c,v 1.8 2001/02/20 19:39:32 mickey Exp $ */ /*- * Copyright (c) 1998 Steve Murphree, Jr. @@ -461,10 +461,6 @@ ieattach(parent, self, aux) printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - sc->sc_bustype = ca->ca_bustype; sc->sc_ih.ih_fn = ieintr; diff --git a/sys/arch/mvme88k/dev/if_ve.c b/sys/arch/mvme88k/dev/if_ve.c index 570ae98a6f1..7ad19ce5073 100644 --- a/sys/arch/mvme88k/dev/if_ve.c +++ b/sys/arch/mvme88k/dev/if_ve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ve.c,v 1.3 2001/02/12 08:16:23 smurph Exp $ */ +/* $OpenBSD: if_ve.c,v 1.4 2001/02/20 19:39:32 mickey Exp $ */ /*- * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1982, 1992, 1993 @@ -380,10 +380,6 @@ struct vam7990_softc *sc; if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - if (sc->sc_memsize > 262144) sc->sc_memsize = 262144; diff --git a/sys/arch/powerpc/mac/if_bm.c b/sys/arch/powerpc/mac/if_bm.c index 18d183be4a0..1ddb8e54161 100644 --- a/sys/arch/powerpc/mac/if_bm.c +++ b/sys/arch/powerpc/mac/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.5 2000/03/31 05:33:36 rahnds Exp $ */ +/* $OpenBSD: if_bm.c,v 1.6 2001/02/20 19:39:33 mickey Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -250,10 +250,6 @@ bmac_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } /* diff --git a/sys/arch/powerpc/mac/if_gm.c b/sys/arch/powerpc/mac/if_gm.c index 6d6547e0431..602befc0e21 100644 --- a/sys/arch/powerpc/mac/if_gm.c +++ b/sys/arch/powerpc/mac/if_gm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gm.c,v 1.10 2000/10/26 21:00:55 deraadt Exp $ */ +/* $OpenBSD: if_gm.c,v 1.11 2001/02/20 19:39:33 mickey Exp $ */ /* $NetBSD: if_gm.c,v 1.2 2000/03/04 11:17:00 tsubai Exp $ */ /*- @@ -344,10 +344,6 @@ gmac_attach(parent, self, aux) #else /* !__NetBSD__ */ ether_ifattach(ifp); #endif /* !__NetBSD__ */ - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } u_int diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index 62669c2c549..56291a12cee 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.24 2001/01/30 07:17:07 jason Exp $ */ +/* $OpenBSD: be.c,v 1.25 2001/02/20 19:39:33 mickey Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -226,11 +226,6 @@ beattach(parent, self, aux) printf(" pri %d: rev %x address %s\n", pri, sc->sc_rev, ether_sprintf(sc->sc_arpcom.ac_enaddr)); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - bp = ca->ca_ra.ra_bp; if (bp != NULL && strcmp(bp->name, "be") == 0 && sc->sc_dev.dv_unit == bp->val[1]) diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index 27e0cd810d6..5e81d2be22a 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.30 2001/01/30 07:19:52 jason Exp $ */ +/* $OpenBSD: hme.c,v 1.31 2001/02/20 19:39:34 mickey Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -250,10 +250,6 @@ hmeattach(parent, self, aux) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } /* diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index b29891f30e7..b166443f10d 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.12 1999/09/06 07:13:06 art Exp $ */ +/* $OpenBSD: if_ie.c,v 1.13 2001/02/20 19:39:33 mickey Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -680,10 +680,6 @@ ieattach(parent, self, aux) ether_sprintf(sc->sc_arpcom.ac_enaddr), ie_hardware_names[sc->hard_type]); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - switch (ca->ca_bustype) { #if defined(SUN4) case BUS_OBIO: diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c index 33984d790c3..4ee1d55337e 100644 --- a/sys/arch/sparc/dev/qe.c +++ b/sys/arch/sparc/dev/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.14 2001/01/30 07:17:07 jason Exp $ */ +/* $OpenBSD: qe.c,v 1.15 2001/02/20 19:39:34 mickey Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -177,11 +177,6 @@ qeattach(parent, self, aux) printf(" pri %d: rev %x address %s\n", pri, sc->sc_rev, ether_sprintf(sc->sc_arpcom.ac_enaddr)); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - bp = ca->ca_ra.ra_bp; if (bp != NULL && strcmp(bp->name, "qe") == 0 && sc->sc_dev.dv_unit == bp->val[1]) diff --git a/sys/arch/sun3/dev/if_ie.c b/sys/arch/sun3/dev/if_ie.c index d69c0d5c2c1..b4dc881f3af 100644 --- a/sys/arch/sun3/dev/if_ie.c +++ b/sys/arch/sun3/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.12 2000/08/28 21:59:34 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.13 2001/02/20 19:39:34 mickey Exp $ */ /* $NetBSD: if_ie.c,v 1.15 1996/10/30 00:24:33 gwr Exp $ */ /*- @@ -325,9 +325,6 @@ ie_attach(sc) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } /* diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c index 36e90edf0b6..dcdd234f609 100644 --- a/sys/arch/vax/if/if_qe.c +++ b/sys/arch/vax/if/if_qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_qe.c,v 1.11 2000/04/27 03:14:43 bjc Exp $ */ +/* $OpenBSD: if_qe.c,v 1.12 2001/02/20 19:39:35 mickey Exp $ */ /* $NetBSD: if_qe.c,v 1.39 2000/01/24 02:40:29 matt Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -358,10 +358,6 @@ qeattach(parent, self, aux) */ if_attach(ifp); ether_ifattach(ifp); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif return; /* diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c index 254e742d82e..0352be31789 100644 --- a/sys/arch/vax/if/sgec.c +++ b/sys/arch/vax/if/sgec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sgec.c,v 1.1 2000/04/27 03:14:44 bjc Exp $ */ +/* $OpenBSD: sgec.c,v 1.2 2001/02/20 19:39:35 mickey Exp $ */ /* $NetBSD: sgec.c,v 1.1 1999/08/08 11:41:29 ragge Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -205,9 +205,6 @@ sgec_attach(sc) if_attach(ifp); ether_ifattach(ifp); -#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_ac.ac_enaddr)); return; diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c index 7e9e01b71d0..2ad72b6d600 100644 --- a/sys/dev/ic/am7990.c +++ b/sys/dev/ic/am7990.c @@ -1,4 +1,4 @@ -/* $OpenBSD: am7990.c,v 1.19 2000/03/15 14:37:49 deraadt Exp $ */ +/* $OpenBSD: am7990.c,v 1.20 2001/02/20 19:39:36 mickey Exp $ */ /* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */ /*- @@ -153,10 +153,6 @@ am7990_config(sc) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif - if (sc->sc_memsize > 262144) sc->sc_memsize = 262144; diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index 3070470c45a..22bf5997d1c 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.10 2001/01/10 17:50:15 angelos Exp $ */ +/* $OpenBSD: an.c,v 1.11 2001/02/20 19:39:38 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -132,7 +132,7 @@ #define TIMEOUT(handle,func,sc,time) timeout_add(&(handle), (time)) #define UNTIMEOUT(func,sc,handle) timeout_del(&(handle)) #define BPF_MTAP(if,mbuf) bpf_mtap((if)->if_bpf, (mbuf)) -#define BPFATTACH(if_bpf,if,dlt,sz) bpfattach((if_bpf), (if), (dlt), (sz)) +#define BPFATTACH(if_bpf,if,dlt,sz) struct cfdriver an_cd = { NULL, "an", DV_IFNET diff --git a/sys/dev/ic/awi.c b/sys/dev/ic/awi.c index 11551ce322f..ab6a27f7d15 100644 --- a/sys/dev/ic/awi.c +++ b/sys/dev/ic/awi.c @@ -331,9 +331,6 @@ awi_attach(sc) if_attach(ifp); #ifdef __OpenBSD__ ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif #elif defined(__FreeBSD__) ether_ifattach(ifp); #if NBPFILTER > 0 @@ -341,9 +338,6 @@ awi_attach(sc) #endif #elif defined(__NetBSD__) 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 diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 7021e2d2d09..1282bcdbbca 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.23 2001/02/09 05:14:08 art Exp $ */ +/* $OpenBSD: dc.c,v 1.24 2001/02/20 19:39:38 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1714,10 +1714,6 @@ void dc_attach_common(sc) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif shutdownhook_establish(dc_shutdown, sc); fail: diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c index f3e717fb121..e66847ca392 100644 --- a/sys/dev/ic/dp8390.c +++ b/sys/dev/ic/dp8390.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dp8390.c,v 1.8 2000/05/29 17:08:51 fgsch Exp $ */ +/* $OpenBSD: dp8390.c,v 1.9 2001/02/20 19:39:37 mickey Exp $ */ /* $NetBSD: dp8390.c,v 1.13 1998/07/05 06:49:11 jonathan Exp $ */ /* @@ -143,10 +143,6 @@ dp8390_config(sc, media, nmedia, defmedia) /* Attach the interface. */ if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* Print additional info when attached. */ printf("%s: address %s\n", sc->sc_dev.dv_xname, diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index cde33457cc4..718203de636 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.46 2000/11/09 18:06:38 mickey Exp $ */ +/* $OpenBSD: elink3.c,v 1.47 2001/02/20 19:39:36 mickey Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -438,11 +438,6 @@ epconfig(sc, chipset, enaddr) GO_WINDOW(1); /* Window 1 is operating window */ -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - sc->tx_start_thresh = 20; /* probably a good starting point. */ ep_reset_cmd(sc, EP_COMMAND, RX_RESET); diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index ea2c4074b5b..e6f3e4a125b 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.10 2000/10/16 17:08:07 aaron Exp $ */ +/* $OpenBSD: fxp.c,v 1.11 2001/02/20 19:39:38 mickey Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -403,10 +403,6 @@ fxp_attach_common(sc, enaddr, intrstr) */ ifp->if_snd.ifq_maxlen = FXP_NTXCB - 1; ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* * Add shutdown hook so that DMA is disabled prior to reboot. Not diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index 0272b15385d..ef3d1bb1e37 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82596.c,v 1.3 2001/01/12 22:56:03 mickey Exp $ */ +/* $OpenBSD: i82596.c,v 1.4 2001/02/20 19:39:37 mickey Exp $ */ /* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */ /*- @@ -347,10 +347,6 @@ i82596_attach(sc, name, etheraddr, media, nmedia, defmedia) printf(" %s v%d.%d, address %s\n", name, sc->sc_vers / 10, sc->sc_vers % 10, ether_sprintf(etheraddr)); - -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif } diff --git a/sys/dev/ic/rln.c b/sys/dev/ic/rln.c index 7582c4789a2..376983970c7 100644 --- a/sys/dev/ic/rln.c +++ b/sys/dev/ic/rln.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rln.c,v 1.8 2000/12/13 15:58:39 mickey Exp $ */ +/* $OpenBSD: rln.c,v 1.9 2001/02/20 19:39:37 mickey Exp $ */ /* * David Leonard <d@openbsd.org>, 1999. Public Domain. * @@ -145,9 +145,6 @@ rlnconfig(sc) ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof (struct ether_header)); -#endif } /* Bring device up. */ diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index 9891b779737..2ac0a297b3a 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc91cxx.c,v 1.7 2000/02/02 19:09:58 fgsch Exp $ */ +/* $OpenBSD: smc91cxx.c,v 1.8 2001/02/20 19:39:36 mickey Exp $ */ /* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */ /*- @@ -268,11 +268,6 @@ smc91cxx_attach(sc, myea) ifmedia_add(&sc->sc_media, smc91cxx_media[i], 0, NULL); ifmedia_set(&sc->sc_media, IFM_ETHER | (aui ? IFM_10_5 : IFM_10_T)); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_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); #endif diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index d2dad6fd6da..2088477cbda 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.20 2001/02/02 08:35:31 aaron Exp $ */ +/* $OpenBSD: xl.c,v 1.21 2001/02/20 19:39:38 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2634,10 +2634,6 @@ xl_attach(sc) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, - DLT_EN10MB, sizeof(struct ether_header)); -#endif sc->sc_sdhook = shutdownhook_establish(xl_shutdown, sc); } diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index 701f4296ee1..bbfb6d5642c 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ed.c,v 1.41 1999/02/28 03:23:37 jason Exp $ */ +/* $OpenBSD: if_ed.c,v 1.42 2001/02/20 19:39:39 mickey Exp $ */ /* $NetBSD: if_ed.c,v 1.105 1996/10/21 22:40:45 thorpej Exp $ */ /* @@ -518,12 +518,6 @@ ed_pci_attach(parent, self, aux) printf("type unknown (0x%x) ", sc->type); printf("%s", sc->isa16bit ? "(16-bit)" : "(8-bit)"); /* XXX */ -#if NBPFILTER > 0 - if ((sc->spec_flags & ED_REATTACH) == 0) - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - /* Map and establish the interrupt. */ if (pci_intr_map(pc, pa->pa_intrtag, pa->pa_intrpin, pa->pa_intrline, &ih)) { @@ -1715,12 +1709,6 @@ edattach(parent, self, aux) printf("\n"); -#if NBPFILTER > 0 - if ((sc->spec_flags & ED_REATTACH) == 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, edintr, sc, sc->sc_dev.dv_xname); sc->sc_sh = shutdownhook_establish((void (*)(void *))edstop, sc); diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c index 9e25f87b05d..fa76958d17c 100644 --- a/sys/dev/isa/if_ef_isapnp.c +++ b/sys/dev/isa/if_ef_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ef_isapnp.c,v 1.9 2000/11/11 23:49:20 mickey Exp $ */ +/* $OpenBSD: if_ef_isapnp.c,v 1.10 2001/02/20 19:39:41 mickey Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -235,11 +235,6 @@ ef_isapnp_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - sc->sc_tx_start_thresh = 20; efcompletecmd(sc, EP_COMMAND, RX_RESET); diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index cdf954728b7..e830fed97eb 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_eg.c,v 1.16 2000/06/05 20:56:20 niklas Exp $ */ +/* $OpenBSD: if_eg.c,v 1.17 2001/02/20 19:39:39 mickey Exp $ */ /* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */ /* @@ -451,10 +451,6 @@ egattach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#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, sc->sc_dev.dv_xname); } diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index fa80836748c..317d045e8f9 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_el.c,v 1.12 1999/02/28 03:23:37 jason Exp $ */ +/* $OpenBSD: if_el.c,v 1.13 2001/02/20 19:39:40 mickey Exp $ */ /* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */ /* @@ -200,12 +200,6 @@ elattach(parent, self, aux) /* Print out some information for the user. */ printf(": address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr)); - /* 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, sc->sc_dev.dv_xname); diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c index b2fc9a70174..7b12438e32b 100644 --- a/sys/dev/isa/if_ex.c +++ b/sys/dev/isa/if_ex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ex.c,v 1.5 1999/04/19 07:10:06 fgsch Exp $ */ +/* $OpenBSD: if_ex.c,v 1.6 2001/02/20 19:39:40 mickey Exp $ */ /* * Copyright (c) 1997, Donald A. Schmidt * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) @@ -309,14 +309,6 @@ ex_attach(parent, self, aux) default: printf("???\n"); } - /* - * If BPF is in the kernel, call the attach for it - */ -#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, exintr, sc, self->dv_xname); ex_init(sc); diff --git a/sys/dev/isa/if_fe.c b/sys/dev/isa/if_fe.c index 277607a02f4..892983c055b 100644 --- a/sys/dev/isa/if_fe.c +++ b/sys/dev/isa/if_fe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fe.c,v 1.12 1999/02/28 03:23:38 jason Exp $ */ +/* $OpenBSD: if_fe.c,v 1.13 2001/02/20 19:39:40 mickey Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -1121,11 +1121,6 @@ feattach(parent, self, aux) } #endif -#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 - sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, IPL_NET, feintr, sc, sc->sc_dev.dv_xname); } diff --git a/sys/dev/isa/if_hp.c b/sys/dev/isa/if_hp.c index f231063509d..1b44642d988 100644 --- a/sys/dev/isa/if_hp.c +++ b/sys/dev/isa/if_hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hp.c,v 1.5 1999/02/28 03:23:38 jason Exp $ */ +/* $OpenBSD: if_hp.c,v 1.6 2001/02/20 19:39:41 mickey Exp $ */ /* $NetBSD: if_hp.c,v 1.21 1995/12/24 02:31:31 mycroft Exp $ */ /* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */ @@ -412,11 +412,6 @@ hpattach(dvp) ifp->if_reset = hpreset; ifp->if_watchdog = 0; if_attach(ifp); - -#if NBPFILTER > 0 - bpfattach(&ns->ns_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif } /* * Initialization of interface; set up initialization block diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index 498abccba35..51310480477 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.19 2001/02/03 05:09:48 mickey Exp $ */ +/* $OpenBSD: if_ie.c,v 1.20 2001/02/20 19:39:41 mickey Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -803,11 +803,6 @@ ieattach(parent, self, aux) ether_sprintf(sc->sc_arpcom.ac_enaddr), ie_hardware_names[sc->hard_type], sc->hard_vers + 1); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.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, ieintr, sc, sc->sc_dev.dv_xname); } diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index fb38d14315c..8382dca98bf 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iy.c,v 1.5 2001/02/03 05:16:42 mickey Exp $ */ +/* $OpenBSD: if_iy.c,v 1.6 2001/02/20 19:39:41 mickey Exp $ */ /* $NetBSD: if_iy.c,v 1.4 1996/05/12 23:52:53 mycroft Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -305,10 +305,6 @@ iyattach(parent, self, aux) printf(": address %s, chip rev. %d, %d kB SRAM\n", ether_sprintf(sc->sc_arpcom.ac_enaddr), sc->hard_vers, sc->sram/1024); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif timeout_set(&sc->sc_tmo, iymbuffill, sc); sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c index 8efc624d665..17c811d1fca 100644 --- a/sys/dev/ofw/ofnet.c +++ b/sys/dev/ofw/ofnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofnet.c,v 1.3 1999/10/28 04:25:25 rahnds Exp $ */ +/* $OpenBSD: ofnet.c,v 1.4 2001/02/20 19:39:42 mickey Exp $ */ /* $NetBSD: ofnet.c,v 1.4 1996/10/16 19:33:21 ws Exp $ */ /* @@ -165,11 +165,6 @@ printf("\nethernet dev: path %s\n", path); if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&of->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif - dk_establish(0, self); /* XXX */ } diff --git a/sys/dev/pci/if_devar.h b/sys/dev/pci/if_devar.h index 0f13e025335..1bc0bd48bfc 100644 --- a/sys/dev/pci/if_devar.h +++ b/sys/dev/pci/if_devar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_devar.h,v 1.10 2001/02/03 06:10:18 mickey Exp $ */ +/* $OpenBSD: if_devar.h,v 1.11 2001/02/20 19:39:42 mickey Exp $ */ /* $NetBSD: if_devar.h,v 1.13 1997/06/08 18:46:36 thorpej Exp $ */ /*- @@ -952,6 +952,11 @@ extern struct cfdriver de_cd; #define tulip_xname tulip_if.if_xname #endif +#if NBPFILTER > 0 +#define TULIP_BPF_MTAP(sc, m) bpf_mtap((sc)->tulip_if.if_bpf, m) +#define TULIP_BPF_TAP(sc, p, l) bpf_tap((sc)->tulip_if.if_bpf, p, l) +#define TULIP_BPF_ATTACH(sc) +#endif #define TULIP_RAISESPL() splnet() #define TULIP_RAISESOFTSPL() splsoftnet() #define TULIP_RESTORESPL(s) splx(s) diff --git a/sys/dev/pci/if_rl.c b/sys/dev/pci/if_rl.c index 7b0bb6a1007..773bb4cb27e 100644 --- a/sys/dev/pci/if_rl.c +++ b/sys/dev/pci/if_rl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rl.c,v 1.25 2001/02/20 19:10:14 jason Exp $ */ +/* $OpenBSD: if_rl.c,v 1.26 2001/02/20 19:39:43 mickey Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1409,11 +1409,6 @@ rl_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, - DLT_EN10MB, sizeof(struct ether_header)); - -#endif shutdownhook_establish(rl_shutdown, sc); } diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c index c3f7168e35b..1d58c510e84 100644 --- a/sys/dev/pci/if_sf.c +++ b/sys/dev/pci/if_sf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sf.c,v 1.9 2001/02/03 05:59:17 mickey Exp $ */ +/* $OpenBSD: if_sf.c,v 1.10 2001/02/20 19:39:44 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -764,10 +764,6 @@ void sf_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif shutdownhook_establish(sf_shutdown, sc); fail: diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index f565377b23f..c86e4d561a8 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.9 2001/02/20 19:15:19 jason Exp $ */ +/* $OpenBSD: if_sis.c,v 1.10 2001/02/20 19:39:45 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -787,10 +787,6 @@ void sis_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif shutdownhook_establish(sis_shutdown, sc); fail: diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 609e157022d..66a5d54671c 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.9 2000/10/16 17:08:08 aaron Exp $ */ +/* $OpenBSD: if_sk.c,v 1.10 2001/02/20 19:39:45 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -989,10 +989,6 @@ sk_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc_if->arpcom.ac_if.if_bpf, ifp, - DLT_EN10MB, sizeof(struct ether_header)); -#endif return; fail: diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index 7b9e5471954..9a136100a37 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.9 2001/02/03 05:56:14 mickey Exp $ */ +/* $OpenBSD: if_ste.c,v 1.10 2001/02/20 19:39:45 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1011,10 +1011,6 @@ void ste_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif shutdownhook_establish(ste_shutdown, sc); fail: diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index bab8cb7698b..b97bfc3f05d 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ti.c,v 1.14 2000/11/21 03:50:48 jason Exp $ */ +/* $OpenBSD: if_ti.c,v 1.15 2001/02/20 19:39:43 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1720,11 +1720,6 @@ ti_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, - DLT_EN10MB, sizeof(struct ether_header)); -#endif - shutdownhook_establish(ti_shutdown, sc); fail: diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 20c568085c2..5dab7321d90 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.16 2001/02/03 05:52:27 mickey Exp $ */ +/* $OpenBSD: if_tl.c,v 1.17 2001/02/20 19:39:43 mickey Exp $ */ /* * Copyright (c) 1997, 1998 @@ -2655,10 +2655,6 @@ tl_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, - DLT_EN10MB, sizeof(struct ether_header)); -#endif shutdownhook_establish(tl_shutdown, sc); } diff --git a/sys/dev/pci/if_tx.c b/sys/dev/pci/if_tx.c index 3972637b47b..13873d386b6 100644 --- a/sys/dev/pci/if_tx.c +++ b/sys/dev/pci/if_tx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tx.c,v 1.11 2000/10/17 15:47:12 jason Exp $ */ +/* $OpenBSD: if_tx.c,v 1.12 2001/02/20 19:39:43 mickey Exp $ */ /* $FreeBSD: src/sys/pci/if_tx.c,v 1.40 2000/07/13 22:54:34 archie Exp $ */ /*- @@ -338,10 +338,6 @@ epic_openbsd_attach( /* Attach os interface and bpf */ if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->sc_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* Set shutdown routine to stop DMA process */ shutdownhook_establish(epic_openbsd_shutdown, sc); diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index d81fd827c97..11dc48835a5 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.12 2001/02/20 19:12:47 jason Exp $ */ +/* $OpenBSD: if_vr.c,v 1.13 2001/02/20 19:39:44 mickey Exp $ */ /* * Copyright (c) 1997, 1998 @@ -784,10 +784,6 @@ vr_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif shutdownhook_establish(vr_shutdown, sc); fail: diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index f04b87cbc42..a2bdabd5656 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.7 2001/02/03 05:37:18 mickey Exp $ */ +/* $OpenBSD: if_wb.c,v 1.8 2001/02/20 19:39:44 mickey Exp $ */ /* * Copyright (c) 1997, 1998 @@ -930,10 +930,6 @@ wb_attach(parent, self, aux) if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->arpcom.ac_if.if_bpf, ifp, - DLT_EN10MB, sizeof(struct ether_header)); -#endif shutdownhook_establish(wb_shutdown, sc); fail: diff --git a/sys/dev/pci/if_wx.c b/sys/dev/pci/if_wx.c index 3dd4a3d7835..42fd975f658 100644 --- a/sys/dev/pci/if_wx.c +++ b/sys/dev/pci/if_wx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wx.c,v 1.9 2001/01/29 04:33:59 deraadt Exp $ */ +/* $OpenBSD: if_wx.c,v 1.10 2001/02/20 19:39:44 mickey Exp $ */ /* * Copyright (c) 1999, Traakan Software * All rights reserved. @@ -294,12 +294,12 @@ wx_attach(parent, self, aux) ether_ifattach(ifp); #else ether_ifattach(ifp, sc->wx_enaddr); -#endif #if NBPFILTER > 0 bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof (struct ether_header)); #endif +#endif /* * Add shutdown hook so that DMA is disabled prior to reboot. Not * doing do could allow DMA to corrupt kernel memory during the diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index f28fa806d0a..c735a0aa557 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnw.c,v 1.6 2000/04/24 19:43:35 niklas Exp $ */ +/* $OpenBSD: if_cnw.c,v 1.7 2001/02/20 19:39:46 mickey Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -438,10 +438,6 @@ cnw_attach(parent, self, aux) /* Attach the interface */ if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* Disable the card now, and turn it on when the interface goes up */ pcmcia_function_disable(sc->sc_pf); diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index a9ea7fc32a6..fbd8a12cbad 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ray.c,v 1.12 2001/01/22 04:02:34 mickey Exp $ */ +/* $OpenBSD: if_ray.c,v 1.13 2001/02/20 19:39:45 mickey Exp $ */ /* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */ /* @@ -673,9 +673,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); diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c index f4a428bc755..b80fe80c58b 100644 --- a/sys/dev/pcmcia/if_wi.c +++ b/sys/dev/pcmcia/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.22 2001/01/17 04:54:47 aaron Exp $ */ +/* $OpenBSD: if_wi.c,v 1.23 2001/02/20 19:39:46 mickey Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -109,7 +109,7 @@ #include <dev/pcmcia/if_wavelan_ieee.h> #define BPF_MTAP(if,mbuf) bpf_mtap((if)->if_bpf, (mbuf)) -#define BPFATTACH(if_bpf,if,dlt,sz) bpfattach((if_bpf), (if), (dlt), (sz)) +#define BPFATTACH(if_bpf,if,dlt,sz) #define STATIC #define WI_PRT_FMT "%s" #define WI_PRT_ARG(sc) (sc)->sc_dev.dv_xname @@ -133,7 +133,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.22 2001/01/17 04:54:47 aaron Exp $"; + "$OpenBSD: if_wi.c,v 1.23 2001/02/20 19:39:46 mickey Exp $"; #endif /* lint */ #ifdef foo diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index adbeba6504b..b57a0addb80 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.17 2000/10/16 17:08:08 aaron Exp $ */ +/* $OpenBSD: if_xe.c,v 1.18 2001/02/20 19:39:46 mickey Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -420,10 +420,6 @@ xe_pcmcia_attach(parent, self, aux) */ if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&sc->sc_arpcom.ac_if.if_bpf, ifp, DLT_EN10MB, - sizeof(struct ether_header)); -#endif /* NBPFILTER > 0 */ /* * Reset and initialize the card again for DINGO (as found in Linux diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 8977c600c5e..4cc0f27cdc4 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.11 2001/01/28 09:43:41 aaron Exp $ */ +/* $OpenBSD: if_aue.c,v 1.12 2001/02/20 19:39:47 mickey Exp $ */ /* $NetBSD: if_aue.c,v 1.38 2000/04/04 20:16:19 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -934,10 +934,6 @@ USB_ATTACH(aue) 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); diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 9a546f60c66..741573d5eb6 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.6 2001/01/25 03:50:52 todd Exp $ */ +/* $OpenBSD: if_cue.c,v 1.7 2001/02/20 19:39:47 mickey Exp $ */ /* $NetBSD: if_cue.c,v 1.21 2000/04/02 21:25:41 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -732,10 +732,6 @@ USB_ATTACH(cue) 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); diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index bb84e1e525c..4d6bfea9eb7 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.8 2001/01/30 21:07:27 deraadt Exp $ */ +/* $OpenBSD: if_kue.c,v 1.9 2001/02/20 19:39:46 mickey Exp $ */ /* $NetBSD: if_kue.c,v 1.28 2000/04/02 21:25:41 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -690,10 +690,6 @@ USB_ATTACH(kue) 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); diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 6432ea66dcc..9009a79e6ac 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.1 2001/01/28 17:45:18 aaron Exp $ */ +/* $OpenBSD: if_upl.c,v 1.2 2001/02/20 19:39:47 mickey Exp $ */ /* $NetBSD: if_upl.c,v 1.10 2000/12/08 02:24:07 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -344,8 +344,6 @@ USB_ATTACH(upl) #if NBPFILTER > 0 #if defined(__NetBSD__) || defined(__FreeBSD__) bpfattach(ifp, DLT_EN10MB, 0); -#else - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); #endif #endif #if NRND > 0 diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 8c3bbf9aada..662ea4c6498 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.41 2001/02/01 01:32:51 jason Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.42 2001/02/20 19:39:27 mickey Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -77,6 +77,8 @@ You should have received a copy of the license with this software. If you didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. */ +#include "bpfilter.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -104,6 +106,10 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #endif #include <netinet/if_ether.h> +#if NBPFILTER > 0 +#include <net/bpf.h> +#endif + #include "bridge.h" #if NBRIDGE > 0 #include <net/if_bridge.h> @@ -881,6 +887,9 @@ ether_ifattach(ifp) break; } LIST_INIT(&((struct arpcom *)ifp)->ac_multiaddrs); +#if NBPFILTER > 0 + bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); +#endif } void diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 02d01ecd8ed..2147c62541e 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.7 2000/12/02 14:46:34 jason Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.8 2001/02/20 19:39:48 mickey Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology * @@ -169,9 +169,7 @@ vlanattach(void *dummy) ifp->if_snd.ifq_maxlen = ifqmaxlen; if_attach(ifp); ether_ifattach(ifp); -#if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif + /* Now undo some of the damage... */ ifp->if_data.ifi_type = IFT_8021_VLAN; ifp->if_data.ifi_hdrlen = EVL_ENCAPLEN; |