ELF loader support for auxvec base platform string
[deliverable/linux.git] / include / linux / netfilter / nfnetlink_queue.h
CommitLineData
7af4cc3f
HW
1#ifndef _NFNETLINK_QUEUE_H
2#define _NFNETLINK_QUEUE_H
3
0ba2c6e8 4#include <linux/types.h>
7af4cc3f
HW
5#include <linux/netfilter/nfnetlink.h>
6
7enum nfqnl_msg_types {
8 NFQNL_MSG_PACKET, /* packet from kernel to userspace */
9 NFQNL_MSG_VERDICT, /* verdict from userspace to kernel */
10 NFQNL_MSG_CONFIG, /* connect to a particular queue */
11
12 NFQNL_MSG_MAX
13};
14
15struct nfqnl_msg_packet_hdr {
98a4a861
AV
16 __be32 packet_id; /* unique ID of packet in queue */
17 __be16 hw_protocol; /* hw protocol (network order) */
7af4cc3f
HW
18 u_int8_t hook; /* netfilter hook */
19} __attribute__ ((packed));
20
21struct nfqnl_msg_packet_hw {
98a4a861 22 __be16 hw_addrlen;
7af4cc3f
HW
23 u_int16_t _pad;
24 u_int8_t hw_addr[8];
53e26658 25};
7af4cc3f
HW
26
27struct nfqnl_msg_packet_timestamp {
98a4a861
AV
28 aligned_be64 sec;
29 aligned_be64 usec;
53e26658 30};
7af4cc3f
HW
31
32enum nfqnl_attr_type {
33 NFQA_UNSPEC,
34 NFQA_PACKET_HDR,
35 NFQA_VERDICT_HDR, /* nfqnl_msg_verdict_hrd */
36 NFQA_MARK, /* u_int32_t nfmark */
37 NFQA_TIMESTAMP, /* nfqnl_msg_packet_timestamp */
38 NFQA_IFINDEX_INDEV, /* u_int32_t ifindex */
39 NFQA_IFINDEX_OUTDEV, /* u_int32_t ifindex */
fbcd923c
HW
40 NFQA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */
41 NFQA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */
7af4cc3f
HW
42 NFQA_HWADDR, /* nfqnl_msg_packet_hw */
43 NFQA_PAYLOAD, /* opaque data payload */
44
45 __NFQA_MAX
46};
47#define NFQA_MAX (__NFQA_MAX - 1)
48
49struct nfqnl_msg_verdict_hdr {
98a4a861
AV
50 __be32 verdict;
51 __be32 id;
53e26658 52};
7af4cc3f
HW
53
54
55enum nfqnl_msg_config_cmds {
56 NFQNL_CFG_CMD_NONE,
57 NFQNL_CFG_CMD_BIND,
58 NFQNL_CFG_CMD_UNBIND,
59 NFQNL_CFG_CMD_PF_BIND,
60 NFQNL_CFG_CMD_PF_UNBIND,
61};
62
63struct nfqnl_msg_config_cmd {
64 u_int8_t command; /* nfqnl_msg_config_cmds */
65 u_int8_t _pad;
98a4a861 66 __be16 pf; /* AF_xxx for PF_[UN]BIND */
53e26658 67};
7af4cc3f
HW
68
69enum nfqnl_config_mode {
70 NFQNL_COPY_NONE,
71 NFQNL_COPY_META,
72 NFQNL_COPY_PACKET,
73};
74
75struct nfqnl_msg_config_params {
98a4a861 76 __be32 copy_range;
7af4cc3f
HW
77 u_int8_t copy_mode; /* enum nfqnl_config_mode */
78} __attribute__ ((packed));
79
80
81enum nfqnl_attr_config {
82 NFQA_CFG_UNSPEC,
83 NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */
84 NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */
829e17a1 85 NFQA_CFG_QUEUE_MAXLEN, /* u_int32_t */
7af4cc3f
HW
86 __NFQA_CFG_MAX
87};
838ab636 88#define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
7af4cc3f
HW
89
90#endif /* _NFNETLINK_QUEUE_H */
This page took 0.519947 seconds and 5 git commands to generate.