summaryrefslogtreecommitdiff
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-01-29 13:26:14 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-01-29 13:26:14 +0000
commit5bb5f2c942a2bd6d39a1129427c56dc9a2221832 (patch)
tree00e231893d9aebebdf154433775a98e9173ed440 /sys/net/bpf.c
parent2d0a97fbde726126bc5f3728de3e153ab82aae5c (diff)
downloadsrc-test2-5bb5f2c942a2bd6d39a1129427c56dc9a2221832.tar.gz
src-test2-5bb5f2c942a2bd6d39a1129427c56dc9a2221832.zip
Notes
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 6487a8257a7f..23956f7a109a 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -40,7 +40,8 @@
* $FreeBSD$
*/
-#include "bpf.h"
+#include "opt_bpf.h"
+#include "opt_netgraph.h"
#ifndef __GNUC__
#define inline
@@ -80,7 +81,7 @@
static MALLOC_DEFINE(M_BPF, "BPF", "BPF data");
-#if NBPF > 0
+#if defined(DEV_BPF) || defined(NETGRAPH_BPF)
/*
* Older BSDs don't have kernel malloc.
@@ -1396,7 +1397,7 @@ bpf_drvinit(unused)
SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bpf_drvinit,NULL)
-#else /* !BPF */
+#else /* !DEV_BPF && !NETGRAPH_BPF */
/*
* NOP stubs to allow bpf-using drivers to load and function.
*
@@ -1442,4 +1443,12 @@ bpf_filter(pc, p, wirelen, buflen)
return -1; /* "no filter" behaviour */
}
-#endif /* !BPF */
+int
+bpf_validate(f, len)
+ const struct bpf_insn *f;
+ int len;
+{
+ return 0; /* false */
+}
+
+#endif /* !DEV_BPF && !NETGRAPH_BPF */