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 */
8 #include <linux/netfilter/nfnetlink.h>
10 enum nfulnl_msg_types {
11 NFULNL_MSG_PACKET, /* packet from kernel to userspace */
12 NFULNL_MSG_CONFIG, /* connect to a particular queue */
17 struct nfulnl_msg_packet_hdr {
18 u_int16_t hw_protocol; /* hw protocol (network order) */
19 u_int8_t hook; /* netfilter hook */
21 } __attribute__ ((packed));
23 struct nfulnl_msg_packet_hw {
27 } __attribute__ ((packed));
29 struct nfulnl_msg_packet_timestamp {
32 } __attribute__ ((packed));
34 #define NFULNL_PREFIXLEN 30 /* just like old log target */
36 enum nfulnl_attr_type {
39 NFULA_MARK, /* u_int32_t nfmark */
40 NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */
41 NFULA_IFINDEX_INDEV, /* u_int32_t ifindex */
42 NFULA_IFINDEX_OUTDEV, /* u_int32_t ifindex */
43 NFULA_HWADDR, /* nfulnl_msg_packet_hw */
44 NFULA_PAYLOAD, /* opaque data payload */
45 NFULA_PREFIX, /* string prefix */
46 NFULA_UID, /* user id of socket */
50 #define NFULA_MAX (__NFULA_MAX - 1)
52 enum nfulnl_msg_config_cmds {
55 NFULNL_CFG_CMD_UNBIND,
56 NFULNL_CFG_CMD_PF_BIND,
57 NFULNL_CFG_CMD_PF_UNBIND,
60 struct nfulnl_msg_config_cmd {
61 u_int8_t command; /* nfulnl_msg_config_cmds */
62 } __attribute__ ((packed));
64 struct nfulnl_msg_config_mode {
68 } __attribute__ ((packed));
70 enum nfulnl_attr_config {
72 NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */
73 NFULA_CFG_MODE, /* nfulnl_msg_config_mode */
74 NFULA_CFG_NLBUFSIZ, /* u_int32_t buffer size */
75 NFULA_CFG_TIMEOUT, /* u_int32_t in 1/100 s */
76 NFULA_CFG_QTHRESH, /* u_int32_t */
79 #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
81 #define NFULNL_COPY_NONE 0x00
82 #define NFULNL_COPY_META 0x01
83 #define NFULNL_COPY_PACKET 0x02
85 #endif /* _NFNETLINK_LOG_H */