6 #ifndef NETLINK_QUEUE_MSG_H_
7 #define NETLINK_QUEUE_MSG_H_
9 #include <netlink/netlink.h>
17 struct nfnl_queue_msg;
19 extern struct nl_object_ops queue_msg_obj_ops;
22 extern struct nfnl_queue_msg * nfnl_queue_msg_alloc(
void);
23 extern int nfnlmsg_queue_msg_parse(
struct nlmsghdr *,
24 struct nfnl_queue_msg **);
26 extern void nfnl_queue_msg_get(
struct nfnl_queue_msg *);
27 extern void nfnl_queue_msg_put(
struct nfnl_queue_msg *);
29 extern void nfnl_queue_msg_set_group(
struct nfnl_queue_msg *, uint16_t);
30 extern int nfnl_queue_msg_test_group(
const struct nfnl_queue_msg *);
31 extern uint16_t nfnl_queue_msg_get_group(
const struct nfnl_queue_msg *);
33 extern void nfnl_queue_msg_set_family(
struct nfnl_queue_msg *, uint8_t);
34 extern int nfnl_queue_msg_test_family(
const struct nfnl_queue_msg *);
35 extern uint8_t nfnl_queue_msg_get_family(
const struct nfnl_queue_msg *);
37 extern void nfnl_queue_msg_set_packetid(
struct nfnl_queue_msg *, uint32_t);
38 extern int nfnl_queue_msg_test_packetid(
const struct nfnl_queue_msg *);
39 extern uint32_t nfnl_queue_msg_get_packetid(
const struct nfnl_queue_msg *);
41 extern void nfnl_queue_msg_set_hwproto(
struct nfnl_queue_msg *, uint16_t);
42 extern int nfnl_queue_msg_test_hwproto(
const struct nfnl_queue_msg *);
43 extern uint16_t nfnl_queue_msg_get_hwproto(
const struct nfnl_queue_msg *);
45 extern void nfnl_queue_msg_set_hook(
struct nfnl_queue_msg *, uint8_t);
46 extern int nfnl_queue_msg_test_hook(
const struct nfnl_queue_msg *);
47 extern uint8_t nfnl_queue_msg_get_hook(
const struct nfnl_queue_msg *);
49 extern void nfnl_queue_msg_set_mark(
struct nfnl_queue_msg *, uint32_t);
50 extern int nfnl_queue_msg_test_mark(
const struct nfnl_queue_msg *);
51 extern uint32_t nfnl_queue_msg_get_mark(
const struct nfnl_queue_msg *);
53 extern void nfnl_queue_msg_set_timestamp(
struct nfnl_queue_msg *,
55 extern int nfnl_queue_msg_test_timestamp(
const struct nfnl_queue_msg *);
56 extern const struct timeval * nfnl_queue_msg_get_timestamp(
const struct nfnl_queue_msg *);
58 extern void nfnl_queue_msg_set_indev(
struct nfnl_queue_msg *, uint32_t);
59 extern int nfnl_queue_msg_test_indev(
const struct nfnl_queue_msg *);
60 extern uint32_t nfnl_queue_msg_get_indev(
const struct nfnl_queue_msg *);
62 extern void nfnl_queue_msg_set_outdev(
struct nfnl_queue_msg *, uint32_t);
63 extern int nfnl_queue_msg_test_outdev(
const struct nfnl_queue_msg *);
64 extern uint32_t nfnl_queue_msg_get_outdev(
const struct nfnl_queue_msg *);
66 extern void nfnl_queue_msg_set_physindev(
struct nfnl_queue_msg *, uint32_t);
67 extern int nfnl_queue_msg_test_physindev(
const struct nfnl_queue_msg *);
68 extern uint32_t nfnl_queue_msg_get_physindev(
const struct nfnl_queue_msg *);
70 extern void nfnl_queue_msg_set_physoutdev(
struct nfnl_queue_msg *, uint32_t);
71 extern int nfnl_queue_msg_test_physoutdev(
const struct nfnl_queue_msg *);
72 extern uint32_t nfnl_queue_msg_get_physoutdev(
const struct nfnl_queue_msg *);
74 extern void nfnl_queue_msg_set_hwaddr(
struct nfnl_queue_msg *, uint8_t *,
int);
75 extern int nfnl_queue_msg_test_hwaddr(
const struct nfnl_queue_msg *);
76 extern const uint8_t * nfnl_queue_msg_get_hwaddr(
const struct nfnl_queue_msg *,
int *);
78 extern int nfnl_queue_msg_set_payload(
struct nfnl_queue_msg *, uint8_t *,
int);
79 extern int nfnl_queue_msg_test_payload(
const struct nfnl_queue_msg *);
80 extern const void * nfnl_queue_msg_get_payload(
const struct nfnl_queue_msg *,
int *);
82 extern void nfnl_queue_msg_set_verdict(
struct nfnl_queue_msg *,
84 extern int nfnl_queue_msg_test_verdict(
const struct nfnl_queue_msg *);
85 extern unsigned int nfnl_queue_msg_get_verdict(
const struct nfnl_queue_msg *);
87 extern struct nl_msg * nfnl_queue_msg_build_verdict(
const struct nfnl_queue_msg *);
88 extern int nfnl_queue_msg_send_verdict(
struct nl_sock *,
89 const struct nfnl_queue_msg *);
91 extern struct nl_msg * nfnl_queue_msg_build_verdict_batch(
const struct nfnl_queue_msg *msg);
92 extern int nfnl_queue_msg_send_verdict_batch(
struct nl_sock *,
93 const struct nfnl_queue_msg *);
94 extern int nfnl_queue_msg_send_verdict_payload(
struct nl_sock *,
95 const struct nfnl_queue_msg *,
96 const void *,
unsigned );