10 #define NETLINK_LOG_H_
12 #include <netlink/netlink.h>
22 extern struct nl_object_ops log_obj_ops;
24 enum nfnl_log_copy_mode {
31 NFNL_LOG_FLAG_SEQ = 0x1,
32 NFNL_LOG_FLAG_SEQ_GLOBAL = 0x2,
33 NFNL_LOG_FLAG_CONNTRACK = 0x4,
37 extern struct nfnl_log * nfnl_log_alloc(
void);
38 extern int nfnlmsg_log_parse(
struct nlmsghdr *,
41 extern void nfnl_log_get(
struct nfnl_log *);
42 extern void nfnl_log_put(
struct nfnl_log *);
45 extern void nfnl_log_set_group(
struct nfnl_log *, uint16_t);
46 extern int nfnl_log_test_group(
const struct nfnl_log *);
47 extern uint16_t nfnl_log_get_group(
const struct nfnl_log *);
49 extern void nfnl_log_set_copy_mode(
struct nfnl_log *,
50 enum nfnl_log_copy_mode);
51 extern int nfnl_log_test_copy_mode(
const struct nfnl_log *);
52 extern enum nfnl_log_copy_mode nfnl_log_get_copy_mode(
const struct nfnl_log *);
54 extern char * nfnl_log_copy_mode2str(
enum nfnl_log_copy_mode,
56 extern int nfnl_log_str2copy_mode(
const char *);
58 extern void nfnl_log_set_copy_range(
struct nfnl_log *, uint32_t);
59 extern int nfnl_log_test_copy_range(
const struct nfnl_log *);
60 extern uint32_t nfnl_log_get_copy_range(
const struct nfnl_log *);
62 extern void nfnl_log_set_flush_timeout(
struct nfnl_log *, uint32_t);
63 extern int nfnl_log_test_flush_timeout(
const struct nfnl_log *);
64 extern uint32_t nfnl_log_get_flush_timeout(
const struct nfnl_log *);
66 extern void nfnl_log_set_alloc_size(
struct nfnl_log *, uint32_t);
67 extern int nfnl_log_test_alloc_size(
const struct nfnl_log *);
68 extern uint32_t nfnl_log_get_alloc_size(
const struct nfnl_log *);
70 extern void nfnl_log_set_queue_threshold(
struct nfnl_log *, uint32_t);
71 extern int nfnl_log_test_queue_threshold(
const struct nfnl_log *);
72 extern uint32_t nfnl_log_get_queue_threshold(
const struct nfnl_log *);
74 extern void nfnl_log_set_flags(
struct nfnl_log *,
unsigned int);
75 extern void nfnl_log_unset_flags(
struct nfnl_log *,
unsigned int);
76 extern unsigned int nfnl_log_get_flags(
const struct nfnl_log *);
78 extern char * nfnl_log_flags2str(
unsigned int,
char *,
size_t);
79 extern unsigned int nfnl_log_str2flags(
const char *);
81 extern int nfnl_log_build_pf_bind(uint8_t,
struct nl_msg **);
82 extern int nfnl_log_pf_bind(
struct nl_sock *, uint8_t);
84 extern int nfnl_log_build_pf_unbind(uint8_t,
struct nl_msg **);
85 extern int nfnl_log_pf_unbind(
struct nl_sock *, uint8_t);
87 extern int nfnl_log_build_create_request(
const struct nfnl_log *,
89 extern int nfnl_log_create(
struct nl_sock *,
const struct nfnl_log *);
91 extern int nfnl_log_build_change_request(
const struct nfnl_log *,
93 extern int nfnl_log_change(
struct nl_sock *,
const struct nfnl_log *);
95 extern int nfnl_log_build_delete_request(
const struct nfnl_log *,
97 extern int nfnl_log_delete(
struct nl_sock *,
const struct nfnl_log *);