bpf.h (9235) | bpf.h (10624) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.h 8.1 (Berkeley) 6/10/93 39 * | 1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.h 8.1 (Berkeley) 6/10/93 39 * |
40 * $Id: bpf.h,v 1.4 1995/05/30 08:07:52 rgrimes Exp $ | 40 * $Id: bpf.h,v 1.5 1995/06/15 18:10:59 pst Exp $ |
41 */ 42 43#ifndef _NET_BPF_H_ 44#define _NET_BPF_H_ 45 46/* 47 * Alignment macros. BPF_WORDALIGN rounds up to the next 48 * even multiple of BPF_ALIGNMENT. --- 185 unchanged lines hidden (view full) --- 234/* 235 * Macros for insn array initializers. 236 */ 237#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } 238#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } 239 240#ifdef KERNEL 241int bpf_validate __P((struct bpf_insn *, int)); | 41 */ 42 43#ifndef _NET_BPF_H_ 44#define _NET_BPF_H_ 45 46/* 47 * Alignment macros. BPF_WORDALIGN rounds up to the next 48 * even multiple of BPF_ALIGNMENT. --- 185 unchanged lines hidden (view full) --- 234/* 235 * Macros for insn array initializers. 236 */ 237#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } 238#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } 239 240#ifdef KERNEL 241int bpf_validate __P((struct bpf_insn *, int)); |
242int bpfopen __P((dev_t, int)); 243int bpfclose __P((dev_t, int)); 244int bpfread __P((dev_t, struct uio *)); 245int bpfwrite __P((dev_t, struct uio *)); 246int bpfioctl __P((dev_t, int, caddr_t, int)); | 242int bpfopen __P((dev_t, int, int, struct proc *)); 243int bpfclose __P((dev_t, int, int, struct proc *)); 244int bpfread __P((dev_t, struct uio *, int)); 245int bpfwrite __P((dev_t, struct uio *, int)); 246int bpfioctl __P((dev_t, int, caddr_t, int, struct proc *)); |
247int bpf_select __P((dev_t, int, struct proc *)); 248void bpf_tap __P((caddr_t, u_char *, u_int)); 249void bpf_mtap __P((caddr_t, struct mbuf *)); 250void bpfattach __P((caddr_t *, struct ifnet *, u_int, u_int)); 251void bpfilterattach __P((int)); 252u_int bpf_filter __P((struct bpf_insn *, u_char *, u_int, u_int)); 253#endif 254 255/* 256 * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). 257 */ 258#define BPF_MEMWORDS 16 259 260#endif | 247int bpf_select __P((dev_t, int, struct proc *)); 248void bpf_tap __P((caddr_t, u_char *, u_int)); 249void bpf_mtap __P((caddr_t, struct mbuf *)); 250void bpfattach __P((caddr_t *, struct ifnet *, u_int, u_int)); 251void bpfilterattach __P((int)); 252u_int bpf_filter __P((struct bpf_insn *, u_char *, u_int, u_int)); 253#endif 254 255/* 256 * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). 257 */ 258#define BPF_MEMWORDS 16 259 260#endif |