Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().

This commit is contained in:
thorpej 2000-11-15 01:02:11 +00:00
parent 960800cbb8
commit b84f740be0
61 changed files with 80 additions and 360 deletions

View File

@ -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 * NOTE: this version of if_de was modified for bounce buffers prior
@ -4498,10 +4498,6 @@ tulip_attach(
TULIP_ETHER_IFATTACH(sc); TULIP_ETHER_IFATTACH(sc);
#endif #endif
#endif /* __bsdi__ */ #endif /* __bsdi__ */
#if NBPFILTER > 0
TULIP_BPF_ATTACH(sc);
#endif
} }
static void static void

View File

@ -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 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -271,10 +271,6 @@ ed_zbus_attach(parent, self, aux)
/* Print additional info when attached. */ /* Print additional info when attached. */
printf(": address %s\n", ether_sprintf(myaddr)); 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_intr = edintr;
sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_arg = sc;
sc->sc_isr.isr_ipl = 2; sc->sc_isr.isr_ipl = 2;

View File

@ -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 * Copyright (c) 1995 Michael L. Hitch
@ -198,10 +198,6 @@ esattach(parent, self, aux)
/* Print additional info when attached. */ /* Print additional info when attached. */
printf(": address %s\n", ether_sprintf(myaddr)); 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_intr = esintr;
sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_arg = sc;
sc->sc_isr.isr_ipl = 2; sc->sc_isr.isr_ipl = 2;

View File

@ -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 * Copyright (c) 1995 Mika Kortelainen
@ -257,10 +257,6 @@ qnattach(parent, self, aux)
printf(": hardware address %s\n", ether_sprintf(myaddr)); printf(": hardware address %s\n", ether_sprintf(myaddr));
#endif #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_intr = qnintr;
sc->sc_isr.isr_arg = sc; sc->sc_isr.isr_arg = sc;
sc->sc_isr.isr_ipl = 2; sc->sc_isr.isr_ipl = 2;

View File

@ -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 $ */ /* $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; ifp->if_watchdog = snwatchdog;
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); ether_ifattach(ifp, myaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);

View File

@ -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 * Copyright (c) 1995 Mark Brinicombe
@ -364,13 +364,6 @@ eaattach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); 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 */ /* Should test the RAM */
ea_ramtest(sc); ea_ramtest(sc);

View File

@ -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 * Copyright (c) 1995 Mark Brinicombe
@ -371,13 +371,6 @@ ebattach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); 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 */ /* Should test the RAM */
eb_ramtest(sc); eb_ramtest(sc);

View File

@ -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. * Copyright (c) 1995 Melvin Tang-Richardson.
@ -468,11 +468,6 @@ void ieattach ( struct device *parent, struct device *self, void *aux )
ether_sprintf(hwaddr), ether_sprintf(hwaddr),
((NRXBUF*IE_RXBUF_SIZE)+(NTXBUF*IE_TXBUF_SIZE))/1024 ); ((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_func = ieintr;
sc->sc_ih.ih_arg = sc; sc->sc_ih.ih_arg = sc;
sc->sc_ih.ih_level = IPL_NET; sc->sc_ih.ih_level = IPL_NET;

View File

@ -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. * Copyright (c) 1996, Danny C Tsen.
@ -220,10 +220,6 @@ esattach(parent, self, aux)
/* Print additional info when attached. */ /* Print additional info when attached. */
printf(": address %s\n", ether_sprintf(myaddr)); 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_func = esintr;
sc->sc_ih.ih_arg = sc; sc->sc_ih.ih_arg = sc;
sc->sc_ih.ih_level = IPL_NET; sc->sc_ih.ih_level = IPL_NET;

View File

@ -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 <khym@bga.com> * Copyright (c) 1997 David Huang <khym@bga.com>
@ -176,9 +176,6 @@ mcsetup(sc, lladdr)
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
ifp->if_watchdog = mcwatchdog; ifp->if_watchdog = mcwatchdog;
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, lladdr); ether_ifattach(ifp, lladdr);

View File

@ -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 * National Semiconductor DP8393X SONIC Driver
@ -254,9 +254,7 @@ snsetup(sc, lladdr)
ifp->if_flags = ifp->if_flags =
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
ifp->if_watchdog = snwatchdog; ifp->if_watchdog = snwatchdog;
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, lladdr); ether_ifattach(ifp, lladdr);

View File

@ -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 <khym@bga.com> * Copyright (c) 1997 David Huang <khym@bga.com>
@ -178,10 +178,6 @@ mcsetup(sc, lladdr)
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
ifp->if_watchdog = mcwatchdog; ifp->if_watchdog = mcwatchdog;
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
/* initialize ifmedia structures */ /* initialize ifmedia structures */
ifmedia_init(&sc->sc_media, 0, mc_mediachange, mc_mediastatus); ifmedia_init(&sc->sc_media, 0, mc_mediachange, mc_mediastatus);
ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL); ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL);

View File

@ -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. * Copyright (C) 1998, 1999, 2000 Tsubai Masanari. All rights reserved.
@ -269,10 +269,6 @@ bmac_attach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); ether_ifattach(ifp, sc->sc_enaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }
/* /*

View File

@ -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. * Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@ -246,10 +246,6 @@ gmac_attach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, laddr); ether_ifattach(ifp, laddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }
u_int u_int

View File

@ -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 * National Semiconductor DP8393X SONIC Driver
@ -233,9 +233,6 @@ snsetup(sc, lladdr)
ifp->if_flags = ifp->if_flags =
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
ifp->if_watchdog = snwatchdog; ifp->if_watchdog = snwatchdog;
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, lladdr); ether_ifattach(ifp, lladdr);

View File

@ -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 * Copyright (c) 1998 Darrin B. Jewell
* All rights reserved. * All rights reserved.
@ -174,10 +174,6 @@ mb8795_config(sc)
*/ */
ifp->if_mtu -= 16; 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); sc->sc_sh = shutdownhook_establish(mb8795_shutdown, sc);
if (sc->sc_sh == NULL) if (sc->sc_sh == NULL)
panic("mb8795_config: can't establish shutdownhook"); panic("mb8795_config: can't establish shutdownhook");

View File

@ -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. * Copyright (c) 1994 Matthias Pfaller.
@ -543,9 +543,6 @@ plipattach(sc, unit)
ether_ifattach(ifp, myaddr); ether_ifattach(ifp, myaddr);
ifp->if_mtu = PLIPMTU; 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_ifsoftint = intr_establish(SOFTINT, plipsoftint, sc,
sc->sc_dev.dv_xname, IPL_NET, IPL_ZERO, 0); sc->sc_dev.dv_xname, IPL_NET, IPL_ZERO, 0);
} }

View File

@ -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 * Copyright (c) 2000 Soren S. Jorvang
@ -198,12 +198,6 @@ return; /* XXX */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); 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 int

View File

@ -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. * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@ -367,9 +367,6 @@ ie_attach(sc)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_addr); ether_ifattach(ifp, sc->sc_addr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }
/* /*

View File

@ -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. * 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_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
#endif #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. * Register this device as boot device if we booted from it.

View File

@ -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. * 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) if (shutdownhook_establish(ni_shutdown, sc) == 0)
printf("%s: WARNING: unable to establish shutdown hook\n", printf("%s: WARNING: unable to establish shutdown hook\n",
sc->sc_dev.dv_xname); sc->sc_dev.dv_xname);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }
/* /*

View File

@ -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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -325,9 +325,6 @@ awi_attach(sc)
#endif #endif
#else #else
ether_ifattach(ifp, sc->sc_mib_addr.aMAC_Address); 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 #endif
#ifdef IFM_IEEE80211 #ifdef IFM_IEEE80211
@ -378,9 +375,6 @@ awi_detach(sc)
} }
if (sc->sc_wep_ctx != NULL) if (sc->sc_wep_ctx != NULL)
free(sc->sc_wep_ctx, M_DEVBUF); free(sc->sc_wep_ctx, M_DEVBUF);
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
#ifdef IFM_IEEE80211 #ifdef IFM_IEEE80211
ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY); ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY);
#endif #endif

View File

@ -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 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -152,9 +152,6 @@ dp8390_config(sc, media, nmedia, defmedia)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); ether_ifattach(ifp, sc->sc_enaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
@ -1334,9 +1331,6 @@ dp8390_detach(sc, flags)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -512,10 +512,6 @@ epconfig(sc, chipset, enaddr)
GO_WINDOW(1); /* Window 1 is operating window */ 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 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -2173,9 +2169,6 @@ ep_detach(self, flags)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -451,11 +451,6 @@ ex_config(sc)
/* TODO: set queues to 0 */ /* 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 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -1526,9 +1521,6 @@ ex_detach(sc)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -306,10 +306,6 @@ hme_config(sc)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); 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); sc->sc_sh = shutdownhook_establish(hme_shutdown, sc);
if (sc->sc_sh == NULL) if (sc->sc_sh == NULL)
panic("hme_config: can't establish shutdownhook"); panic("hme_config: can't establish shutdownhook");

View File

@ -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. * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@ -345,10 +345,6 @@ fxp_attach(sc)
*/ */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, enaddr); 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 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -1927,9 +1923,6 @@ fxp_detach(sc)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -147,7 +147,7 @@ Mode of operation:
#include <sys/param.h> #include <sys/param.h>
__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 <sys/systm.h> #include <sys/systm.h>
#include <sys/mbuf.h> #include <sys/mbuf.h>
@ -278,10 +278,6 @@ i82586_attach(sc, name, etheraddr, media, nmedia, defmedia)
ether_ifattach(ifp, etheraddr); ether_ifattach(ifp, etheraddr);
printf(" address %s, type %s\n", ether_sprintf(etheraddr), name); 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
} }

View File

@ -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. * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -278,10 +278,6 @@ lance_config(sc)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); 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); sc->sc_sh = shutdownhook_establish(lance_shutdown, sc);
if (sc->sc_sh == NULL) if (sc->sc_sh == NULL)
panic("lance_config: can't establish shutdownhook"); panic("lance_config: can't establish shutdownhook");

View File

@ -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 <matt@3am-software.com> * Copyright (c) 1994, 1995, 1997 Matt Thomas <matt@3am-software.com>
@ -1037,10 +1037,6 @@ lemac_ifattach(
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); ether_ifattach(ifp, sc->sc_enaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dv.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dv.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);

View File

@ -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 * All Rights Reserved, Copyright (C) Fujitsu Limited 1995
@ -265,10 +265,6 @@ mb86960_config(sc, media, nmedia, defmedia)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); 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 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -1838,9 +1834,6 @@ mb86960_detach(sc)
#if NRND > 0 #if NRND > 0
/* Unhook the entropy source. */ /* Unhook the entropy source. */
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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 * Copyright (c) 1997, 1998
@ -761,10 +761,6 @@ rtk_attach(sc)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, eaddr); 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. * Make sure the interface is shutdown during reboot.
*/ */
@ -872,9 +868,6 @@ rtk_detach(sc)
/* Delete all remaining media. */ /* Delete all remaining media. */
ifmedia_delete_instance(&sc->mii.mii_media, IFM_INST_ANY); ifmedia_delete_instance(&sc->mii.mii_media, IFM_INST_ANY);
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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 * Copyright (c) 2000 Ben Harris
@ -58,7 +58,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
__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 <sys/systm.h> #include <sys/systm.h>
#include <sys/endian.h> #include <sys/endian.h>
@ -234,12 +234,6 @@ seeq8005_attach(struct seeq8005_softc *sc, const u_int8_t *myaddr)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); 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"); printf("\n");
/* Test the RAM */ /* Test the RAM */

View File

@ -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. * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
* *
@ -213,9 +213,6 @@ sgec_attach(sc)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); 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, printf("\n%s: hardware address %s\n", sc->sc_dev.dv_xname,
ether_sprintf(sc->sc_enaddr)); ether_sprintf(sc->sc_enaddr));
return; return;

View File

@ -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. * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -268,10 +268,6 @@ epic_attach(sc)
*/ */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, enaddr); 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. * Make sure the interface is shutdown during reboot.

View File

@ -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. * Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -336,10 +336,6 @@ smc91cxx_attach(sc, myea)
break; break;
} }
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -1341,9 +1337,6 @@ smc91cxx_detach(self, flags)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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. * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -514,10 +514,6 @@ tlp_attach(sc, enaddr)
*/ */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, enaddr); 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 #if NRND > 0
rnd_attach_source(&sc->sc_rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->sc_rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -634,9 +630,6 @@ tlp_detach(sc)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->sc_rnd_source); rnd_detach_source(&sc->sc_rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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 * Copyright 1997
@ -491,10 +491,6 @@ cs_attach(sc, enaddr, media, nmedia, defmedia)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); ether_ifattach(ifp, sc->sc_enaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);

View File

@ -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 <dean@fsa.ca> * Copyright (c) 1993 Dean Huxley <dean@fsa.ca>
@ -485,10 +485,6 @@ egattach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); 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, sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
IPL_NET, egintr, sc); IPL_NET, egintr, sc);

View File

@ -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 * 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. */ /* Print out some information for the user. */
printf("%s: address %s\n", self->dv_xname, ether_sprintf(myaddr)); 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, sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
IPL_NET, elintr, sc); IPL_NET, elintr, sc);

View File

@ -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 IYDEBUG */
/* #define IYMEMDEBUG */ /* #define IYMEMDEBUG */
@ -365,10 +365,6 @@ iyattach(parent, self, aux)
printf("%s: EEPROM irq setting %d ignored\n", printf("%s: EEPROM irq setting %d ignored\n",
sc->sc_dev.dv_xname, eirq); 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, sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
IPL_NET, iyintr, sc); IPL_NET, iyintr, sc);

View File

@ -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. * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -166,9 +166,6 @@ ofnet_attach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); ether_ifattach(ifp, myaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
#ifdef __BROKEN_DK_ESTABLISH #ifdef __BROKEN_DK_ESTABLISH
dk_establish(0, self); /* XXX */ dk_establish(0, self); /* XXX */
#endif #endif

View File

@ -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) * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -5154,10 +5154,6 @@ tulip_attach(
#endif #endif
#endif /* __bsdi__ */ #endif /* __bsdi__ */
#if NBPFILTER > 0
TULIP_BPF_ATTACH(sc);
#endif
#if defined(__NetBSD__) && NRND > 0 #if defined(__NetBSD__) && NRND > 0
rnd_attach_source(&sc->tulip_rndsource, sc->tulip_dev.dv_xname, rnd_attach_source(&sc->tulip_rndsource, sc->tulip_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);

View File

@ -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. * Copyright (c) 1999 Network Computer, Inc.
@ -588,10 +588,6 @@ sip_attach(parent, self, aux)
*/ */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, enaddr); 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. * Make sure the interface is shutdown during reboot.

View File

@ -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 * Copyright (c) 1997, 1998, 1999
@ -1827,11 +1827,6 @@ static void ti_attach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, eaddr); ether_ifattach(ifp, eaddr);
#if NBPFILTER > 0
bpfattach(&sc->ethercom.ec_if.if_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
#endif
return; return;
fail2: fail2:
pci_intr_disestablish(pc, sc->sc_ih); pci_intr_disestablish(pc, sc->sc_ih);

View File

@ -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. * Copyright (c) 1997 Manuel Bouyer. All rights reserved.
@ -445,10 +445,6 @@ tl_pci_attach(parent, self, aux)
ifp->if_timer = 0; ifp->if_timer = 0;
if_attach(ifp); if_attach(ifp);
ether_ifattach(&(sc)->tl_if, (sc)->tl_enaddr); 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 static void

View File

@ -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. * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -1649,11 +1649,6 @@ vr_attach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->vr_enaddr); 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); sc->vr_ats = shutdownhook_establish(vr_shutdown, sc);
if (sc->vr_ats == NULL) if (sc->vr_ats == NULL)
printf("%s: warning: couldn't establish shutdown hook\n", printf("%s: warning: couldn't establish shutdown hook\n",

View File

@ -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. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -591,10 +591,7 @@ cnw_attach(parent, self, aux)
/* Attach the interface */ /* Attach the interface */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, macaddr); 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; sc->sc_resource |= CNW_RES_NET;
ifp->if_baudrate = IF_Mbps(1); ifp->if_baudrate = IF_Mbps(1);
@ -1232,9 +1229,6 @@ cnw_detach(self, flags)
cnw_disable(sc); cnw_disable(sc);
if ((sc->sc_resource & CNW_RES_NET) != 0) { if ((sc->sc_resource & CNW_RES_NET) != 0) {
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);
} }

View File

@ -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 * Copyright (c) 2000 Christian E. Hopps
* All rights reserved. * All rights reserved.
@ -630,9 +630,6 @@ ray_attach(parent, self, aux)
else else
ifmedia_set(&sc->sc_media, IFM_INFRA); 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 */ /* disable the card */
pcmcia_function_disable(sc->sc_pf); pcmcia_function_disable(sc->sc_pf);
@ -718,9 +715,7 @@ ray_detach(self, flags)
} }
ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY); ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY);
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);
powerhook_disestablish(sc->sc_pwrhook); powerhook_disestablish(sc->sc_pwrhook);

View File

@ -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 * Copyright (c) 1997, 1998, 1999
@ -462,10 +462,6 @@ wi_attach(parent, self, aux)
ifp->if_baudrate = IF_Mbps(2); 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 #if NRND > 0
rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -1769,9 +1765,6 @@ wi_detach(self, flags)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);

View File

@ -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 */ /* 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); ether_ifattach(ifp, sc->sc_enaddr);
psc->sc_resource |= XI_RES_MI; 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 * Reset and initialize the card again for DINGO (as found in Linux
* driver). Without this Dingo will get a watchdog timeout the first * 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); mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY); ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
if_detach(ifp); if_detach(ifp);
psc->sc_resource &= ~XI_RES_MI; psc->sc_resource &= ~XI_RES_MI;

View File

@ -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. * 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; ifp->if_start = destart;
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); 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); sc->sc_sh = shutdownhook_establish(deshutdown, sc);
return; return;

View File

@ -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. * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
* *
@ -366,9 +366,6 @@ qeattach(parent, self, aux)
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, enaddr); ether_ifattach(ifp, enaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
return; return;
/* /*

View File

@ -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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -474,10 +474,6 @@ beattach(parent, self, aux)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, sc->sc_enaddr); ether_ifattach(ifp, sc->sc_enaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }

View File

@ -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. * Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -329,11 +329,6 @@ qeattach(parent, self, aux)
ether_ifattach(ifp, sc->sc_enaddr); ether_ifattach(ifp, sc->sc_enaddr);
printf(" address %s\n", ether_sprintf(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
} }
/* /*

View File

@ -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 <ian.dall@dsto.defence.gov.au> * Copyright (c) 1997 Ian W. Dall <ian.dall@dsto.defence.gov.au>
@ -358,10 +358,6 @@ seattach(parent, self, aux)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
ether_ifattach(ifp, myaddr); ether_ifattach(ifp, myaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }

View File

@ -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 * Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@ -902,11 +902,6 @@ USB_ATTACH(aue)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
Ether_ifattach(ifp, eaddr); Ether_ifattach(ifp, eaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->aue_dev), rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->aue_dev),
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -952,9 +947,6 @@ USB_DETACH(aue)
#endif #endif
mii_detach(&sc->aue_mii, MII_PHY_ANY, MII_OFFSET_ANY); mii_detach(&sc->aue_mii, MII_PHY_ANY, MII_OFFSET_ANY);
ifmedia_delete_instance(&sc->aue_mii.mii_media, IFM_INST_ANY); ifmedia_delete_instance(&sc->aue_mii.mii_media, IFM_INST_ANY);
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
#endif /* __NetBSD__ */ #endif /* __NetBSD__ */

View File

@ -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 * Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@ -704,11 +704,6 @@ USB_ATTACH(cue)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
Ether_ifattach(ifp, eaddr); Ether_ifattach(ifp, eaddr);
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
#endif
#if NRND > 0 #if NRND > 0
rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->cue_dev), rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->cue_dev),
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -751,9 +746,6 @@ USB_DETACH(cue)
#if defined(__NetBSD__) #if defined(__NetBSD__)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
#endif /* __NetBSD__ */ #endif /* __NetBSD__ */

View File

@ -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 * Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@ -666,11 +666,6 @@ USB_ATTACH(kue)
/* Attach the interface. */ /* Attach the interface. */
if_attach(ifp); if_attach(ifp);
Ether_ifattach(ifp, sc->kue_desc.kue_macaddr); 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 #if NRND > 0
rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->kue_dev), rnd_attach_source(&sc->rnd_source, USBDEVNAME(sc->kue_dev),
RND_TYPE_NET, 0); RND_TYPE_NET, 0);
@ -711,9 +706,6 @@ USB_DETACH(kue)
#if defined(__NetBSD__) #if defined(__NetBSD__)
#if NRND > 0 #if NRND > 0
rnd_detach_source(&sc->rnd_source); rnd_detach_source(&sc->rnd_source);
#endif
#if NBPFILTER > 0
bpfdetach(ifp);
#endif #endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
#endif /* __NetBSD__ */ #endif /* __NetBSD__ */

View File

@ -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. * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -72,6 +72,7 @@
#include "opt_ns.h" #include "opt_ns.h"
#include "opt_gateway.h" #include "opt_gateway.h"
#include "vlan.h" #include "vlan.h"
#include "bpfilter.h"
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -93,6 +94,10 @@
#include <net/if_dl.h> #include <net/if_dl.h>
#include <net/if_types.h> #include <net/if_types.h>
#if NBPFILTER > 0
#include <net/bpf.h>
#endif
#include <net/if_ether.h> #include <net/if_ether.h>
#if NVLAN > 0 #if NVLAN > 0
#include <net/if_vlanvar.h> #include <net/if_vlanvar.h>
@ -808,6 +813,9 @@ ether_ifattach(struct ifnet *ifp, const u_int8_t *lla)
} }
LIST_INIT(&((struct ethercom *)ifp)->ec_multiaddrs); LIST_INIT(&((struct ethercom *)ifp)->ec_multiaddrs);
ifp->if_broadcastaddr = etherbroadcastaddr; ifp->if_broadcastaddr = etherbroadcastaddr;
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
} }
void void
@ -818,6 +826,10 @@ ether_ifdetach(struct ifnet *ifp)
struct ether_multi *enm; struct ether_multi *enm;
int s; int s;
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
#if NVLAN > 0 #if NVLAN > 0
if (ec->ec_nvlans) if (ec->ec_nvlans)
vlan_ifdetach(ifp); vlan_ifdetach(ifp);

View File

@ -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. * 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)); ether_ifattach(ifp, LLADDR(p->if_sadl));
ifp->if_hdrlen = sizeof(struct ether_vlan_header); /* XXX? */ 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; break;
} }
@ -366,9 +362,6 @@ vlan_unconfig(struct ifnet *ifp)
} }
} }
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
ether_ifdetach(ifp); ether_ifdetach(ifp);
break; break;
} }