2 * netlink/netfilter/queue_msg.h Netfilter Queue Messages
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
9 * Copyright (c) 2007, 2008 Patrick McHardy <kaber@trash.net>
12 #ifndef NETLINK_QUEUE_MSG_H_
13 #define NETLINK_QUEUE_MSG_H_
15 #include <netlink/netlink.h>
23 struct nfnl_queue_msg;
25 extern struct nl_object_ops queue_msg_obj_ops;
28 extern struct nfnl_queue_msg * nfnl_queue_msg_alloc(void);
29 extern int nfnlmsg_queue_msg_parse(struct nlmsghdr *,
30 struct nfnl_queue_msg **);
32 extern void nfnl_queue_msg_get(struct nfnl_queue_msg *);
33 extern void nfnl_queue_msg_put(struct nfnl_queue_msg *);
35 extern void nfnl_queue_msg_set_group(struct nfnl_queue_msg *, uint16_t);
36 extern int nfnl_queue_msg_test_group(const struct nfnl_queue_msg *);
37 extern uint16_t nfnl_queue_msg_get_group(const struct nfnl_queue_msg *);
39 extern void nfnl_queue_msg_set_family(struct nfnl_queue_msg *, uint8_t);
40 extern int nfnl_queue_msg_test_family(const struct nfnl_queue_msg *);
41 extern uint8_t nfnl_queue_msg_get_family(const struct nfnl_queue_msg *);
43 extern void nfnl_queue_msg_set_packetid(struct nfnl_queue_msg *, uint32_t);
44 extern int nfnl_queue_msg_test_packetid(const struct nfnl_queue_msg *);
45 extern uint32_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *);
47 extern void nfnl_queue_msg_set_hwproto(struct nfnl_queue_msg *, uint16_t);
48 extern int nfnl_queue_msg_test_hwproto(const struct nfnl_queue_msg *);
49 extern uint16_t nfnl_queue_msg_get_hwproto(const struct nfnl_queue_msg *);
51 extern void nfnl_queue_msg_set_hook(struct nfnl_queue_msg *, uint8_t);
52 extern int nfnl_queue_msg_test_hook(const struct nfnl_queue_msg *);
53 extern uint8_t nfnl_queue_msg_get_hook(const struct nfnl_queue_msg *);
55 extern void nfnl_queue_msg_set_mark(struct nfnl_queue_msg *, uint32_t);
56 extern int nfnl_queue_msg_test_mark(const struct nfnl_queue_msg *);
57 extern uint32_t nfnl_queue_msg_get_mark(const struct nfnl_queue_msg *);
59 extern void nfnl_queue_msg_set_timestamp(struct nfnl_queue_msg *,
61 extern int nfnl_queue_msg_test_timestamp(const struct nfnl_queue_msg *);
62 extern const struct timeval * nfnl_queue_msg_get_timestamp(const struct nfnl_queue_msg *);
64 extern void nfnl_queue_msg_set_indev(struct nfnl_queue_msg *, uint32_t);
65 extern int nfnl_queue_msg_test_indev(const struct nfnl_queue_msg *);
66 extern uint32_t nfnl_queue_msg_get_indev(const struct nfnl_queue_msg *);
68 extern void nfnl_queue_msg_set_outdev(struct nfnl_queue_msg *, uint32_t);
69 extern int nfnl_queue_msg_test_outdev(const struct nfnl_queue_msg *);
70 extern uint32_t nfnl_queue_msg_get_outdev(const struct nfnl_queue_msg *);
72 extern void nfnl_queue_msg_set_physindev(struct nfnl_queue_msg *, uint32_t);
73 extern int nfnl_queue_msg_test_physindev(const struct nfnl_queue_msg *);
74 extern uint32_t nfnl_queue_msg_get_physindev(const struct nfnl_queue_msg *);
76 extern void nfnl_queue_msg_set_physoutdev(struct nfnl_queue_msg *, uint32_t);
77 extern int nfnl_queue_msg_test_physoutdev(const struct nfnl_queue_msg *);
78 extern uint32_t nfnl_queue_msg_get_physoutdev(const struct nfnl_queue_msg *);
80 extern void nfnl_queue_msg_set_hwaddr(struct nfnl_queue_msg *, uint8_t *, int);
81 extern int nfnl_queue_msg_test_hwaddr(const struct nfnl_queue_msg *);
82 extern const uint8_t * nfnl_queue_msg_get_hwaddr(const struct nfnl_queue_msg *, int *);
84 extern int nfnl_queue_msg_set_payload(struct nfnl_queue_msg *, uint8_t *, int);
85 extern int nfnl_queue_msg_test_payload(const struct nfnl_queue_msg *);
86 extern const void * nfnl_queue_msg_get_payload(const struct nfnl_queue_msg *, int *);
88 extern void nfnl_queue_msg_set_verdict(struct nfnl_queue_msg *,
90 extern int nfnl_queue_msg_test_verdict(const struct nfnl_queue_msg *);
91 extern unsigned int nfnl_queue_msg_get_verdict(const struct nfnl_queue_msg *);
93 extern struct nl_msg * nfnl_queue_msg_build_verdict(const struct nfnl_queue_msg *);
94 extern int nfnl_queue_msg_send_verdict(struct nl_sock *,
95 const struct nfnl_queue_msg *);
96 extern int nfnl_queue_msg_send_verdict_payload(struct nl_sock *,
97 const struct nfnl_queue_msg *,
98 const void *, unsigned );