summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net/bpf.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 083f20bf10c..0b2183f51b1 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.7 1997/01/27 23:21:18 deraadt Exp $ */
+/* $OpenBSD: bpf.c,v 1.8 1997/02/12 03:35:11 deraadt Exp $ */
/* $NetBSD: bpf.c,v 1.27 1996/05/07 05:26:02 thorpej Exp $ */
/*
@@ -103,19 +103,6 @@ int bpf_bufsize = BPF_BUFSIZE;
struct bpf_if *bpf_iflist;
struct bpf_d bpf_dtab[NBPFILTER];
-#if BSD >= 199207 || NetBSD0_9 >= 2
-/*
- * bpfilterattach() is called at boot time in new systems. We do
- * nothing here since old systems will not call this.
- */
-/* ARGSUSED */
-void
-bpfilterattach(n)
- int n;
-{
-}
-#endif
-
static int bpf_allocbufs __P((struct bpf_d *));
static int bpf_allocbufs __P((struct bpf_d *));
static void bpf_freed __P((struct bpf_d *));
@@ -318,6 +305,27 @@ bpf_detachd(d)
#define D_MARKFREE(d) ((d)->bd_next = (d))
#define D_MARKUSED(d) ((d)->bd_next = 0)
+#if BSD >= 199207 || NetBSD0_9 >= 2
+/*
+ * bpfilterattach() is called at boot time in new systems. We do
+ * nothing here since old systems will not call this.
+ */
+/* ARGSUSED */
+void
+bpfilterattach(n)
+ int n;
+{
+ int i;
+
+ /*
+ * Mark all the descriptors free if this hasn't been done.
+ */
+ if (!D_ISFREE(&bpf_dtab[0]))
+ for (i = 0; i < NBPFILTER; ++i)
+ D_MARKFREE(&bpf_dtab[i]);
+}
+#endif
+
/*
* Open ethernet device. Returns ENXIO for illegal minor device number,
* EBUSY if file is open by another process.
@@ -1264,7 +1272,6 @@ bpfattach(driverp, ifp, dlt, hdrlen)
u_int dlt, hdrlen;
{
struct bpf_if *bp;
- int i;
#if BSD < 199103
static struct bpf_if bpf_ifs[NBPFILTER];
static int bpfifno;
@@ -1294,13 +1301,6 @@ bpfattach(driverp, ifp, dlt, hdrlen)
*/
bp->bif_hdrlen = BPF_WORDALIGN(hdrlen + SIZEOF_BPF_HDR) - hdrlen;
- /*
- * Mark all the descriptors free if this hasn't been done.
- */
- if (!D_ISFREE(&bpf_dtab[0]))
- for (i = 0; i < NBPFILTER; ++i)
- D_MARKFREE(&bpf_dtab[i]);
-
#if 0
printf("bpf: %s attached\n", ifp->if_xname);
#endif