Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Move bpfattach()/bpfdetach() calls into ether_ifattach()...
details: https://anonhg.NetBSD.org/src/rev/d7e48fa6cc08
branches: trunk
changeset: 499254:d7e48fa6cc08
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Nov 15 01:02:11 2000 +0000
description:
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
diffstat:
sys/arch/alpha/a12/if_ade.c | 6 +-----
sys/arch/amiga/dev/if_ed.c | 6 +-----
sys/arch/amiga/dev/if_es.c | 6 +-----
sys/arch/amiga/dev/if_qn.c | 6 +-----
sys/arch/arc/dev/if_sn.c | 5 +----
sys/arch/arm32/podulebus/if_ea.c | 9 +--------
sys/arch/arm32/podulebus/if_eb.c | 9 +--------
sys/arch/arm32/podulebus/if_ie.c | 7 +------
sys/arch/arm32/rc7500/if_es.c | 6 +-----
sys/arch/mac68k/dev/if_mc.c | 5 +----
sys/arch/mac68k/dev/if_sn.c | 6 ++----
sys/arch/macppc/dev/am79c950.c | 6 +-----
sys/arch/macppc/dev/if_bm.c | 6 +-----
sys/arch/macppc/dev/if_gm.c | 6 +-----
sys/arch/newsmips/apbus/if_sn.c | 5 +----
sys/arch/next68k/dev/mb8795.c | 6 +-----
sys/arch/pc532/dev/lpt.c | 5 +----
sys/arch/sgimips/dev/if_mec.c | 8 +-------
sys/arch/sun3/dev/if_ie.c | 5 +----
sys/arch/vax/vsa/if_ln.c | 5 +----
sys/dev/bi/if_ni.c | 6 +-----
sys/dev/ic/awi.c | 8 +-------
sys/dev/ic/dp8390.c | 8 +-------
sys/dev/ic/elink3.c | 9 +--------
sys/dev/ic/elinkxl.c | 10 +---------
sys/dev/ic/hme.c | 6 +-----
sys/dev/ic/i82557.c | 9 +--------
sys/dev/ic/i82586.c | 8 ++------
sys/dev/ic/lance.c | 6 +-----
sys/dev/ic/lemac.c | 6 +-----
sys/dev/ic/mb86960.c | 9 +--------
sys/dev/ic/rtl81x9.c | 9 +--------
sys/dev/ic/seeq8005.c | 10 ++--------
sys/dev/ic/sgec.c | 5 +----
sys/dev/ic/smc83c170.c | 6 +-----
sys/dev/ic/smc91cxx.c | 9 +--------
sys/dev/ic/tulip.c | 9 +--------
sys/dev/isa/cs89x0.c | 6 +-----
sys/dev/isa/if_eg.c | 6 +-----
sys/dev/isa/if_el.c | 8 +-------
sys/dev/isa/if_iy.c | 6 +-----
sys/dev/ofw/ofnet.c | 5 +----
sys/dev/pci/if_de.c | 6 +-----
sys/dev/pci/if_sip.c | 6 +-----
sys/dev/pci/if_ti.c | 7 +------
sys/dev/pci/if_tl.c | 6 +-----
sys/dev/pci/if_vr.c | 7 +------
sys/dev/pcmcia/if_cnw.c | 10 ++--------
sys/dev/pcmcia/if_ray.c | 9 ++-------
sys/dev/pcmcia/if_wi.c | 9 +--------
sys/dev/pcmcia/if_xi.c | 10 ++--------
sys/dev/qbus/if_de.c | 6 ++----
sys/dev/qbus/if_qe.c | 5 +----
sys/dev/sbus/be.c | 6 +-----
sys/dev/sbus/qe.c | 7 +------
sys/dev/scsipi/if_se.c | 6 +-----
sys/dev/usb/if_aue.c | 10 +---------
sys/dev/usb/if_cue.c | 10 +---------
sys/dev/usb/if_kue.c | 10 +---------
sys/net/if_ethersubr.c | 14 +++++++++++++-
sys/net/if_vlan.c | 9 +--------
61 files changed, 80 insertions(+), 360 deletions(-)
diffs (truncated from 1448 to 300 lines):
diff -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/alpha/a12/if_ade.c
--- a/sys/arch/alpha/a12/if_ade.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/alpha/a12/if_ade.c Wed Nov 15 01:02:11 2000 +0000
@@ -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_ETHER_IFATTACH(sc);
#endif
#endif /* __bsdi__ */
-
-#if NBPFILTER > 0
- TULIP_BPF_ATTACH(sc);
-#endif
}
static void
diff -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/amiga/dev/if_ed.c
--- a/sys/arch/amiga/dev/if_ed.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/amiga/dev/if_ed.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
/* 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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/amiga/dev/if_es.c
--- a/sys/arch/amiga/dev/if_es.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/amiga/dev/if_es.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
/* 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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/amiga/dev/if_qn.c
--- a/sys/arch/amiga/dev/if_qn.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/amiga/dev/if_qn.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/arc/dev/if_sn.c
--- a/sys/arch/arc/dev/if_sn.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/arc/dev/if_sn.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/arm32/podulebus/if_ea.c
--- a/sys/arch/arm32/podulebus/if_ea.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/arm32/podulebus/if_ea.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/arm32/podulebus/if_eb.c
--- a/sys/arch/arm32/podulebus/if_eb.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/arm32/podulebus/if_eb.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/arm32/podulebus/if_ie.c
--- a/sys/arch/arm32/podulebus/if_ie.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/arm32/podulebus/if_ie.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/arm32/rc7500/if_es.c
--- a/sys/arch/arm32/rc7500/if_es.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/arm32/rc7500/if_es.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
/* 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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/mac68k/dev/if_mc.c
--- a/sys/arch/mac68k/dev/if_mc.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/mac68k/dev/if_mc.c Wed Nov 15 01:02:11 2000 +0000
@@ -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@localhost>
@@ -176,9 +176,6 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/mac68k/dev/if_sn.c
--- a/sys/arch/mac68k/dev/if_sn.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/mac68k/dev/if_sn.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/macppc/dev/am79c950.c
--- a/sys/arch/macppc/dev/am79c950.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/macppc/dev/am79c950.c Wed Nov 15 01:02:11 2000 +0000
@@ -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@localhost>
@@ -178,10 +178,6 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/macppc/dev/if_bm.c
--- a/sys/arch/macppc/dev/if_bm.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/macppc/dev/if_bm.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/macppc/dev/if_gm.c
--- a/sys/arch/macppc/dev/if_gm.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/macppc/dev/if_gm.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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 -r 68599211e6a2 -r d7e48fa6cc08 sys/arch/newsmips/apbus/if_sn.c
--- a/sys/arch/newsmips/apbus/if_sn.c Wed Nov 15 00:49:31 2000 +0000
+++ b/sys/arch/newsmips/apbus/if_sn.c Wed Nov 15 01:02:11 2000 +0000
@@ -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 @@
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));
Home |
Main Index |
Thread Index |
Old Index