diff options
author | Mike Smith <msmith@FreeBSD.org> | 1999-04-28 01:18:13 +0000 |
---|---|---|
committer | Mike Smith <msmith@FreeBSD.org> | 1999-04-28 01:18:13 +0000 |
commit | f8dc47162aff5e77e9de6d3bf3f12b340fec7426 (patch) | |
tree | f8515b040e8da2268ab1a81556d91791e8409998 /sys/net/bpf.c | |
parent | 5206bca10a37e28de61458411f2a06b938eb6820 (diff) | |
download | src-test2-f8dc47162aff5e77e9de6d3bf3f12b340fec7426.tar.gz src-test2-f8dc47162aff5e77e9de6d3bf3f12b340fec7426.zip |
Notes
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index a49ac6d8ad24..0c37a7a02172 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,13 +37,11 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.46 1998/12/07 21:58:36 archie Exp $ + * $Id: bpf.c,v 1.47 1999/01/27 22:42:13 dillon Exp $ */ #include "bpfilter.h" -#if NBPFILTER > 0 - #ifndef __GNUC__ #define inline #else @@ -86,6 +84,7 @@ #include <sys/devfsext.h> #endif /*DEVFS*/ +#if NBPFILTER > 0 /* * Older BSDs don't have kernel malloc. @@ -1309,4 +1308,44 @@ bpf_drvinit(unused) SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bpf_drvinit,NULL) +#else /* !BPFILTER */ +/* + * NOP stubs to allow bpf-using drivers to load and function. + * + * A 'better' implementation would allow the core bpf functionality + * to be loaded at runtime. + */ + +void +bpf_tap(ifp, pkt, pktlen) + struct ifnet *ifp; + register u_char *pkt; + register u_int pktlen; +{ +} + +void +bpf_mtap(ifp, m) + struct ifnet *ifp; + struct mbuf *m; +{ +} + +void +bpfattach(ifp, dlt, hdrlen) + struct ifnet *ifp; + u_int dlt, hdrlen; +{ +} + +u_int +bpf_filter(pc, p, wirelen, buflen) + register struct bpf_insn *pc; + register u_char *p; + u_int wirelen; + register u_int buflen; +{ + return -1; /* "no filter" behaviour */ +} + #endif |