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