libnl: /data/src/libnl/include/netlink/netfilter/queue_msg.h Source File

libnl 3.12.0

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