1 #ifndef _NFNETLINK_QUEUE_H
2 #define _NFNETLINK_QUEUE_H
4 #include <linux/netfilter/nfnetlink.h>
7 NFQNL_MSG_PACKET, /* packet from kernel to userspace */
8 NFQNL_MSG_VERDICT, /* verdict from userspace to kernel */
9 NFQNL_MSG_CONFIG, /* connect to a particular queue */
14 struct nfqnl_msg_packet_hdr {
15 u_int32_t packet_id; /* unique ID of packet in queue */
16 u_int16_t hw_protocol; /* hw protocol (network order) */
17 u_int8_t hook; /* netfilter hook */
18 } __attribute__ ((packed));
20 struct nfqnl_msg_packet_hw {
24 } __attribute__ ((packed));
26 struct nfqnl_msg_packet_timestamp {
29 } __attribute__ ((packed));
31 enum nfqnl_attr_type {
34 NFQA_VERDICT_HDR, /* nfqnl_msg_verdict_hrd */
35 NFQA_MARK, /* u_int32_t nfmark */
36 NFQA_TIMESTAMP, /* nfqnl_msg_packet_timestamp */
37 NFQA_IFINDEX_INDEV, /* u_int32_t ifindex */
38 NFQA_IFINDEX_OUTDEV, /* u_int32_t ifindex */
39 NFQA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */
40 NFQA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */
41 NFQA_HWADDR, /* nfqnl_msg_packet_hw */
42 NFQA_PAYLOAD, /* opaque data payload */
46 #define NFQA_MAX (__NFQA_MAX - 1)
48 struct nfqnl_msg_verdict_hdr {
51 } __attribute__ ((packed));
54 enum nfqnl_msg_config_cmds {
58 NFQNL_CFG_CMD_PF_BIND,
59 NFQNL_CFG_CMD_PF_UNBIND,
62 struct nfqnl_msg_config_cmd {
63 u_int8_t command; /* nfqnl_msg_config_cmds */
65 u_int16_t pf; /* AF_xxx for PF_[UN]BIND */
66 } __attribute__ ((packed));
68 enum nfqnl_config_mode {
74 struct nfqnl_msg_config_params {
76 u_int8_t copy_mode; /* enum nfqnl_config_mode */
77 } __attribute__ ((packed));
80 enum nfqnl_attr_config {
82 NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */
83 NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */
86 #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
88 #endif /* _NFNETLINK_QUEUE_H */