Deleted Added
full compact
bpf-ipf.h (302408) bpf-ipf.h (369186)
1/* $FreeBSD: stable/11/contrib/ipfilter/bpf-ipf.h 145519 2005-04-25 18:20:15Z darrenr $ */
1/* $FreeBSD: stable/11/contrib/ipfilter/bpf-ipf.h 369186 2021-01-31 04:32:46Z cy $ */
2
3/*-
4 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from the Stanford/CMU enet packet filter,
8 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
9 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence

--- 405 unchanged lines hidden (view full) ---

415#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
416#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
417
418#if defined(BSD) && (defined(KERNEL) || defined(_KERNEL))
419/*
420 * Systems based on non-BSD kernels don't have ifnet's (or they don't mean
421 * anything if it is in <net/if.h>) and won't work like this.
422 */
2
3/*-
4 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from the Stanford/CMU enet packet filter,
8 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
9 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence

--- 405 unchanged lines hidden (view full) ---

415#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
416#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
417
418#if defined(BSD) && (defined(KERNEL) || defined(_KERNEL))
419/*
420 * Systems based on non-BSD kernels don't have ifnet's (or they don't mean
421 * anything if it is in <net/if.h>) and won't work like this.
422 */
423# if __STDC__
424extern void bpf_tap(struct ifnet *, u_char *, u_int);
425extern void bpf_mtap(struct ifnet *, struct mbuf *);
426extern void bpfattach(struct ifnet *, u_int, u_int);
427extern void bpfilterattach(int);
423extern void bpf_tap(struct ifnet *, u_char *, u_int);
424extern void bpf_mtap(struct ifnet *, struct mbuf *);
425extern void bpfattach(struct ifnet *, u_int, u_int);
426extern void bpfilterattach(int);
428# else
429extern void bpf_tap();
430extern void bpf_mtap();
431extern void bpfattach();
432extern void bpfilterattach();
433# endif /* __STDC__ */
434#endif /* BSD && (_KERNEL || KERNEL) */
427#endif /* BSD && (_KERNEL || KERNEL) */
435#if __STDC__ || defined(__cplusplus)
436extern int bpf_validate(struct bpf_insn *, int);
437extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);
428extern int bpf_validate(struct bpf_insn *, int);
429extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);
438#else
439extern int bpf_validate();
440extern u_int bpf_filter();
441#endif
442
443/*
444 * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
445 */
446#define BPF_MEMWORDS 16
447
448#ifdef __cplusplus
449}
450#endif
451
452#endif
430
431/*
432 * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
433 */
434#define BPF_MEMWORDS 16
435
436#ifdef __cplusplus
437}
438#endif
439
440#endif