4 #include <linux/filter.h>
13 extern void bpf_dump_op_table(void);
14 extern void bpf_dump_all(struct sock_fprog
*bpf
);
15 extern int __bpf_validate(const struct sock_fprog
*bpf
);
16 extern uint32_t bpf_run_filter(const struct sock_fprog
*bpf
, uint8_t *packet
,
18 extern void bpf_attach_to_sock(int sock
, struct sock_fprog
*bpf
);
19 extern void bpf_detach_from_sock(int sock
);
20 extern int enable_kernel_bpf_jit_compiler(void);
21 extern void bpf_parse_rules(char *rulefile
, struct sock_fprog
*bpf
, uint32_t link_type
);
22 #if defined(HAVE_TCPDUMP_LIKE_FILTER) && defined(NEED_TCPDUMP_LIKE_FILTER)
23 extern void bpf_try_compile(const char *rulefile
, struct sock_fprog
*bpf
,
26 static inline void bpf_try_compile(const char *rulefile
,
27 struct sock_fprog
*bpf __maybe_unused
,
28 uint32_t link_type __maybe_unused
)
30 panic("No libpcap support, cannot compile filter: %s\n", rulefile
);
33 static inline void bpf_release(struct sock_fprog
*bpf
)