source: lib/bpf-jit/bpf-jit.h @ dab599b

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since dab599b was d48008d, checked in by Perry Lorier <perry@…>, 12 years ago

Add JITting of BPF bytecode using LLVM

  • Property mode set to 100644
File size: 362 bytes
RevLine 
[d48008d]1#include <pcap.h>
2#include <pcap-bpf.h>
3#ifdef __cplusplus
4extern "C" {
5#endif
6typedef unsigned int (*bpf_run_t)(unsigned char *packet, unsigned int length);
7
8typedef struct bpf_jit_t {
9        bpf_run_t bpf_run;
10} bpf_jit_t;
11
12bpf_jit_t *compile_program(struct bpf_insn insns[], int plen);
13void destroy_program(struct bpf_jit_t *bpf_jit);
14
15#ifdef __cplusplus
16}
17#endif
18
Note: See TracBrowser for help on using the repository browser.