6 #ifndef NETLINK_QUEUE_H_
7 #define NETLINK_QUEUE_H_
9 #include <netlink/netlink.h>
19 extern struct nl_object_ops queue_obj_ops;
21 enum nfnl_queue_copy_mode {
24 NFNL_QUEUE_COPY_PACKET,
28 extern struct nl_sock * nfnl_queue_socket_alloc(
void);
30 extern struct nfnl_queue * nfnl_queue_alloc(
void);
32 extern void nfnl_queue_get(
struct nfnl_queue *);
33 extern void nfnl_queue_put(
struct nfnl_queue *);
36 extern void nfnl_queue_set_group(
struct nfnl_queue *, uint16_t);
37 extern int nfnl_queue_test_group(
const struct nfnl_queue *);
38 extern uint16_t nfnl_queue_get_group(
const struct nfnl_queue *);
40 extern void nfnl_queue_set_maxlen(
struct nfnl_queue *, uint32_t);
41 extern int nfnl_queue_test_maxlen(
const struct nfnl_queue *);
42 extern uint32_t nfnl_queue_get_maxlen(
const struct nfnl_queue *);
44 extern void nfnl_queue_set_copy_mode(
struct nfnl_queue *,
45 enum nfnl_queue_copy_mode);
46 extern int nfnl_queue_test_copy_mode(
const struct nfnl_queue *);
47 extern enum nfnl_queue_copy_mode nfnl_queue_get_copy_mode(
const struct nfnl_queue *);
49 extern char * nfnl_queue_copy_mode2str(
enum nfnl_queue_copy_mode,
51 extern int nfnl_queue_str2copy_mode(
const char *);
53 extern void nfnl_queue_set_copy_range(
struct nfnl_queue *,
55 extern int nfnl_queue_test_copy_range(
const struct nfnl_queue *);
56 extern uint32_t nfnl_queue_get_copy_range(
const struct nfnl_queue *);
58 extern int nfnl_queue_build_pf_bind(uint8_t,
struct nl_msg **);
59 extern int nfnl_queue_pf_bind(
struct nl_sock *, uint8_t);
61 extern int nfnl_queue_build_pf_unbind(uint8_t,
struct nl_msg **);
62 extern int nfnl_queue_pf_unbind(
struct nl_sock *, uint8_t);
64 extern int nfnl_queue_build_create_request(
const struct nfnl_queue *,
66 extern int nfnl_queue_create(
struct nl_sock *,
67 const struct nfnl_queue *);
69 extern int nfnl_queue_build_change_request(
const struct nfnl_queue *,
71 extern int nfnl_queue_change(
struct nl_sock *,
72 const struct nfnl_queue *);
74 extern int nfnl_queue_build_delete_request(
const struct nfnl_queue *,
76 extern int nfnl_queue_delete(
struct nl_sock *,
77 const struct nfnl_queue *);