1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/*
* netlink/netfilter/queue_msg.h Netfilter Queue Messages
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* Copyright (c) 2007, 2008 Patrick McHardy <kaber@trash.net>
*/
#ifndef NETLINK_QUEUE_MSG_H_
#define NETLINK_QUEUE_MSG_H_
#include <netlink/netlink.h>
#ifdef __cplusplus
extern "C" {
#endif
struct nl_sock;
struct nlmsghdr;
struct nfnl_queue_msg;
extern struct nl_object_ops queue_msg_obj_ops;
/* General */
extern struct nfnl_queue_msg * nfnl_queue_msg_alloc(void);
extern int nfnlmsg_queue_msg_parse(struct nlmsghdr *,
struct nfnl_queue_msg **);
extern void nfnl_queue_msg_get(struct nfnl_queue_msg *);
extern void nfnl_queue_msg_put(struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_group(struct nfnl_queue_msg *, uint16_t);
extern int nfnl_queue_msg_test_group(const struct nfnl_queue_msg *);
extern uint16_t nfnl_queue_msg_get_group(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_family(struct nfnl_queue_msg *, uint8_t);
extern int nfnl_queue_msg_test_family(const struct nfnl_queue_msg *);
extern uint8_t nfnl_queue_msg_get_family(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_packetid(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_packetid(const struct nfnl_queue_msg *);
extern uint32_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_hwproto(struct nfnl_queue_msg *, uint16_t);
extern int nfnl_queue_msg_test_hwproto(const struct nfnl_queue_msg *);
extern uint16_t nfnl_queue_msg_get_hwproto(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_hook(struct nfnl_queue_msg *, uint8_t);
extern int nfnl_queue_msg_test_hook(const struct nfnl_queue_msg *);
extern uint8_t nfnl_queue_msg_get_hook(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_mark(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_mark(const struct nfnl_queue_msg *);
extern uint32_t nfnl_queue_msg_get_mark(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_timestamp(struct nfnl_queue_msg *,
struct timeval *);
extern int nfnl_queue_msg_test_timestamp(const struct nfnl_queue_msg *);
extern const struct timeval * nfnl_queue_msg_get_timestamp(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_indev(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_indev(const struct nfnl_queue_msg *);
extern uint32_t nfnl_queue_msg_get_indev(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_outdev(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_outdev(const struct nfnl_queue_msg *);
extern uint32_t nfnl_queue_msg_get_outdev(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_physindev(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_physindev(const struct nfnl_queue_msg *);
extern uint32_t nfnl_queue_msg_get_physindev(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_physoutdev(struct nfnl_queue_msg *, uint32_t);
extern int nfnl_queue_msg_test_physoutdev(const struct nfnl_queue_msg *);
extern uint32_t nfnl_queue_msg_get_physoutdev(const struct nfnl_queue_msg *);
extern void nfnl_queue_msg_set_hwaddr(struct nfnl_queue_msg *, uint8_t *, int);
extern int nfnl_queue_msg_test_hwaddr(const struct nfnl_queue_msg *);
extern const uint8_t * nfnl_queue_msg_get_hwaddr(const struct nfnl_queue_msg *, int *);
extern int nfnl_queue_msg_set_payload(struct nfnl_queue_msg *, uint8_t *, int);
extern int nfnl_queue_msg_test_payload(const struct nfnl_queue_msg *);
extern const void * nfnl_queue_msg_get_payload(const struct nfnl_queue_msg *, int *);
extern void nfnl_queue_msg_set_verdict(struct nfnl_queue_msg *,
unsigned int);
extern int nfnl_queue_msg_test_verdict(const struct nfnl_queue_msg *);
extern unsigned int nfnl_queue_msg_get_verdict(const struct nfnl_queue_msg *);
extern struct nl_msg * nfnl_queue_msg_build_verdict(const struct nfnl_queue_msg *);
extern int nfnl_queue_msg_send_verdict(struct nl_sock *,
const struct nfnl_queue_msg *);
extern int nfnl_queue_msg_send_verdict_payload(struct nl_sock *,
const struct nfnl_queue_msg *,
const void *, unsigned );
#ifdef __cplusplus
}
#endif
#endif
|