Deleted Added
full compact
bpf.h (98540) bpf.h (106927)
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.

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

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 * @(#)bpf.h 1.34 (LBL) 6/16/96
40 *
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.

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

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 * @(#)bpf.h 1.34 (LBL) 6/16/96
40 *
41 * $FreeBSD: head/sys/net/bpf.h 98540 2002-06-21 05:29:40Z fenner $
41 * $FreeBSD: head/sys/net/bpf.h 106927 2002-11-14 23:24:13Z sam $
42 */
43
44#ifndef _NET_BPF_H_
45#define _NET_BPF_H_
46
47/* BSD style release date */
48#define BPF_RELEASE 199606
49

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

335
336/*
337 * Macros for insn array initializers.
338 */
339#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
340#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
341
342#ifdef _KERNEL
42 */
43
44#ifndef _NET_BPF_H_
45#define _NET_BPF_H_
46
47/* BSD style release date */
48#define BPF_RELEASE 199606
49

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

335
336/*
337 * Macros for insn array initializers.
338 */
339#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
340#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
341
342#ifdef _KERNEL
343struct bpf_if;
343int bpf_validate(const struct bpf_insn *, int);
344int bpf_validate(const struct bpf_insn *, int);
344void bpf_tap(struct ifnet *, u_char *, u_int);
345void bpf_mtap(struct ifnet *, struct mbuf *);
345void bpf_tap(struct bpf_if *, u_char *, u_int);
346void bpf_mtap(struct bpf_if *, struct mbuf *);
346void bpfattach(struct ifnet *, u_int, u_int);
347void bpfattach(struct ifnet *, u_int, u_int);
348void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **);
347void bpfdetach(struct ifnet *);
348
349void bpfilterattach(int);
350u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int);
349void bpfdetach(struct ifnet *);
350
351void bpfilterattach(int);
352u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int);
353
354#define BPF_TAP(_ifp,_pkt,_pktlen) do { \
355 if ((_ifp)->if_bpf) \
356 bpf_tap((_ifp)->if_bpf, (_pkt), (_pktlen)); \
357} while (0)
358#define BPF_MTAP(_ifp,_m) do { \
359 if ((_ifp)->if_bpf) \
360 bpf_mtap((_ifp)->if_bpf, (_m)); \
361} while (0)
351#endif
352
353/*
354 * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
355 */
356#define BPF_MEMWORDS 16
357
362#endif
363
364/*
365 * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
366 */
367#define BPF_MEMWORDS 16
368
358#endif
369#endif /* _NET_BPF_H_ */