bpf_jitter.h (199498) | bpf_jitter.h (199603) |
---|---|
1/*- 2 * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) 3 * Copyright (C) 2005-2009 Jung-uk Kim <jkim@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/*- 2 * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) 3 * Copyright (C) 2005-2009 Jung-uk Kim <jkim@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/net/bpf_jitter.h 199498 2009-11-18 23:40:19Z jkim $ | 31 * $FreeBSD: head/sys/net/bpf_jitter.h 199603 2009-11-20 18:49:20Z jkim $ |
32 */ 33 34#ifndef _NET_BPF_JITTER_H_ 35#define _NET_BPF_JITTER_H_ 36 37#ifdef _KERNEL 38MALLOC_DECLARE(M_BPFJIT); 39#endif --- 9 unchanged lines hidden (view full) --- 49 */ 50typedef u_int (*bpf_filter_func)(u_char *, u_int, u_int); 51 52/* Structure describing a native filtering program created by the jitter. */ 53typedef struct bpf_jit_filter { 54 /* The native filtering binary, in the form of a bpf_filter_func. */ 55 bpf_filter_func func; 56 size_t size; | 32 */ 33 34#ifndef _NET_BPF_JITTER_H_ 35#define _NET_BPF_JITTER_H_ 36 37#ifdef _KERNEL 38MALLOC_DECLARE(M_BPFJIT); 39#endif --- 9 unchanged lines hidden (view full) --- 49 */ 50typedef u_int (*bpf_filter_func)(u_char *, u_int, u_int); 51 52/* Structure describing a native filtering program created by the jitter. */ 53typedef struct bpf_jit_filter { 54 /* The native filtering binary, in the form of a bpf_filter_func. */ 55 bpf_filter_func func; 56 size_t size; |
57 int mem[BPF_MEMWORDS]; /* Scratch memory */ | |
58} bpf_jit_filter; 59 60/* 61 * BPF jitter, builds a machine function from a BPF program. 62 * 63 * param fp The BPF pseudo-assembly filter that will be translated 64 * into native code. 65 * param nins Number of instructions of the input filter. --- 19 unchanged lines hidden --- | 57} bpf_jit_filter; 58 59/* 60 * BPF jitter, builds a machine function from a BPF program. 61 * 62 * param fp The BPF pseudo-assembly filter that will be translated 63 * into native code. 64 * param nins Number of instructions of the input filter. --- 19 unchanged lines hidden --- |