4 #include <linux/filter.h>
12 extern void bpf_dump_op_table(void);
13 extern void bpf_dump_all(struct sock_fprog
*bpf
);
14 extern int __bpf_validate(const struct sock_fprog
*bpf
);
15 extern uint32_t bpf_run_filter(const struct sock_fprog
*bpf
, uint8_t *packet
,
17 extern void bpf_attach_to_sock(int sock
, struct sock_fprog
*bpf
);
18 extern void bpf_detach_from_sock(int sock
);
19 extern int enable_kernel_bpf_jit_compiler(void);
20 extern void bpf_parse_rules(char *rulefile
, struct sock_fprog
*bpf
, uint32_t link_type
);
21 #ifdef __WITH_TCPDUMP_LIKE_FILTER
22 extern void bpf_try_compile(const char *rulefile
, struct sock_fprog
*bpf
,
25 static inline void bpf_try_compile(const char *rulefile
,
26 struct sock_fprog
*bpf __maybe_unused
,
27 uint32_t link_type __maybe_unused
)
29 panic("Cannot open file %s!\n", rulefile
);
32 static inline void bpf_release(struct sock_fprog
*bpf
)