1 #ifndef _NFNETLINK_QUEUE_H
2 #define _NFNETLINK_QUEUE_H
4 #include <linux/types.h>
5 #include <linux/netfilter/nfnetlink.h>
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 */
15 struct nfqnl_msg_packet_hdr
{
16 __be32 packet_id
; /* unique ID of packet in queue */
17 __be16 hw_protocol
; /* hw protocol (network order) */
18 u_int8_t hook
; /* netfilter hook */
19 } __attribute__ ((packed
));
21 struct nfqnl_msg_packet_hw
{
27 struct nfqnl_msg_packet_timestamp
{
32 enum nfqnl_attr_type
{
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 */
40 NFQA_IFINDEX_PHYSINDEV
, /* u_int32_t ifindex */
41 NFQA_IFINDEX_PHYSOUTDEV
, /* u_int32_t ifindex */
42 NFQA_HWADDR
, /* nfqnl_msg_packet_hw */
43 NFQA_PAYLOAD
, /* opaque data payload */
47 #define NFQA_MAX (__NFQA_MAX - 1)
49 struct nfqnl_msg_verdict_hdr
{
55 enum nfqnl_msg_config_cmds
{
59 NFQNL_CFG_CMD_PF_BIND
,
60 NFQNL_CFG_CMD_PF_UNBIND
,
63 struct nfqnl_msg_config_cmd
{
64 u_int8_t command
; /* nfqnl_msg_config_cmds */
66 __be16 pf
; /* AF_xxx for PF_[UN]BIND */
69 enum nfqnl_config_mode
{
75 struct nfqnl_msg_config_params
{
77 u_int8_t copy_mode
; /* enum nfqnl_config_mode */
78 } __attribute__ ((packed
));
81 enum nfqnl_attr_config
{
83 NFQA_CFG_CMD
, /* nfqnl_msg_config_cmd */
84 NFQA_CFG_PARAMS
, /* nfqnl_msg_config_params */
85 NFQA_CFG_QUEUE_MAXLEN
, /* u_int32_t */
88 #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
90 #endif /* _NFNETLINK_QUEUE_H */