1 #ifndef _NFNETLINK_LOG_H
2 #define _NFNETLINK_LOG_H
4 /* This file describes the netlink messages (i.e. 'protocol packets'),
5 * and not any kind of function definitions. It is shared between kernel and
6 * userspace. Don't put kernel specific stuff in here */
9 #define aligned_be64 u_int64_t __attribute__((aligned(8)))
12 #include <linux/types.h>
13 #include <linux/netfilter/nfnetlink.h>
15 enum nfulnl_msg_types {
16 NFULNL_MSG_PACKET, /* packet from kernel to userspace */
17 NFULNL_MSG_CONFIG, /* connect to a particular queue */
22 struct nfulnl_msg_packet_hdr {
23 __be16 hw_protocol; /* hw protocol (network order) */
24 u_int8_t hook; /* netfilter hook */
28 struct nfulnl_msg_packet_hw {
34 struct nfulnl_msg_packet_timestamp {
39 enum nfulnl_attr_type {
42 NFULA_MARK, /* u_int32_t nfmark */
43 NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */
44 NFULA_IFINDEX_INDEV, /* u_int32_t ifindex */
45 NFULA_IFINDEX_OUTDEV, /* u_int32_t ifindex */
46 NFULA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */
47 NFULA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */
48 NFULA_HWADDR, /* nfulnl_msg_packet_hw */
49 NFULA_PAYLOAD, /* opaque data payload */
50 NFULA_PREFIX, /* string prefix */
51 NFULA_UID, /* user id of socket */
52 NFULA_SEQ, /* instance-local sequence number */
53 NFULA_SEQ_GLOBAL, /* global sequence number */
57 #define NFULA_MAX (__NFULA_MAX - 1)
59 enum nfulnl_msg_config_cmds {
62 NFULNL_CFG_CMD_UNBIND,
63 NFULNL_CFG_CMD_PF_BIND,
64 NFULNL_CFG_CMD_PF_UNBIND,
67 struct nfulnl_msg_config_cmd {
68 u_int8_t command; /* nfulnl_msg_config_cmds */
69 } __attribute__ ((packed));
71 struct nfulnl_msg_config_mode {
75 } __attribute__ ((packed));
77 enum nfulnl_attr_config {
79 NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */
80 NFULA_CFG_MODE, /* nfulnl_msg_config_mode */
81 NFULA_CFG_NLBUFSIZ, /* u_int32_t buffer size */
82 NFULA_CFG_TIMEOUT, /* u_int32_t in 1/100 s */
83 NFULA_CFG_QTHRESH, /* u_int32_t */
84 NFULA_CFG_FLAGS, /* u_int16_t */
87 #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
89 #define NFULNL_COPY_NONE 0x00
90 #define NFULNL_COPY_META 0x01
91 #define NFULNL_COPY_PACKET 0x02
93 #define NFULNL_CFG_F_SEQ 0x0001
94 #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002
96 #endif /* _NFNETLINK_LOG_H */