1 From 614d8b6cfb969c6102ef320de22b1eb199efce2a Mon Sep 17 00:00:00 2001
2 From: Felix Janda <felix.janda@posteo.de>
3 Date: Sat, 16 May 2015 13:37:53 +0200
4 Subject: include: Sync with current kernel headers
6 Signed-off-by: Felix Janda <felix.janda@posteo.de>
7 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
9 include/libnetfilter_log/linux_nfnetlink_log.h | 51 +++++++++++++-------------
10 1 file changed, 25 insertions(+), 26 deletions(-)
12 diff --git a/include/libnetfilter_log/linux_nfnetlink_log.h b/include/libnetfilter_log/linux_nfnetlink_log.h
13 index 4c802c8..9f38277 100644
14 --- a/include/libnetfilter_log/linux_nfnetlink_log.h
15 +++ b/include/libnetfilter_log/linux_nfnetlink_log.h
16 @@ -20,33 +20,31 @@ enum nfulnl_msg_types {
19 struct nfulnl_msg_packet_hdr {
20 - u_int16_t hw_protocol; /* hw protocol (network order) */
21 - u_int8_t hook; /* netfilter hook */
23 -} __attribute__ ((packed));
24 + __be16 hw_protocol; /* hw protocol (network order) */
25 + __u8 hook; /* netfilter hook */
29 struct nfulnl_msg_packet_hw {
30 - u_int16_t hw_addrlen;
32 - u_int8_t hw_addr[8];
33 -} __attribute__ ((packed));
39 struct nfulnl_msg_packet_timestamp {
42 -} __attribute__ ((packed));
44 -#define NFULNL_PREFIXLEN 30 /* just like old log target */
46 + __aligned_be64 usec;
49 enum nfulnl_attr_type {
52 - NFULA_MARK, /* u_int32_t nfmark */
53 + NFULA_MARK, /* __u32 nfmark */
54 NFULA_TIMESTAMP, /* nfulnl_msg_packet_timestamp */
55 - NFULA_IFINDEX_INDEV, /* u_int32_t ifindex */
56 - NFULA_IFINDEX_OUTDEV, /* u_int32_t ifindex */
57 - NFULA_IFINDEX_PHYSINDEV, /* u_int32_t ifindex */
58 - NFULA_IFINDEX_PHYSOUTDEV, /* u_int32_t ifindex */
59 + NFULA_IFINDEX_INDEV, /* __u32 ifindex */
60 + NFULA_IFINDEX_OUTDEV, /* __u32 ifindex */
61 + NFULA_IFINDEX_PHYSINDEV, /* __u32 ifindex */
62 + NFULA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */
63 NFULA_HWADDR, /* nfulnl_msg_packet_hw */
64 NFULA_PAYLOAD, /* opaque data payload */
65 NFULA_PREFIX, /* string prefix */
66 @@ -71,23 +69,23 @@ enum nfulnl_msg_config_cmds {
69 struct nfulnl_msg_config_cmd {
70 - u_int8_t command; /* nfulnl_msg_config_cmds */
71 + __u8 command; /* nfulnl_msg_config_cmds */
72 } __attribute__ ((packed));
74 struct nfulnl_msg_config_mode {
75 - u_int32_t copy_range;
81 } __attribute__ ((packed));
83 enum nfulnl_attr_config {
85 NFULA_CFG_CMD, /* nfulnl_msg_config_cmd */
86 NFULA_CFG_MODE, /* nfulnl_msg_config_mode */
87 - NFULA_CFG_NLBUFSIZ, /* u_int32_t buffer size */
88 - NFULA_CFG_TIMEOUT, /* u_int32_t in 1/100 s */
89 - NFULA_CFG_QTHRESH, /* u_int32_t */
90 - NFULA_CFG_FLAGS, /* u_int16_t */
91 + NFULA_CFG_NLBUFSIZ, /* __u32 buffer size */
92 + NFULA_CFG_TIMEOUT, /* __u32 in 1/100 s */
93 + NFULA_CFG_QTHRESH, /* __u32 */
94 + NFULA_CFG_FLAGS, /* __u16 */
97 #define NFULA_CFG_MAX (__NFULA_CFG_MAX -1)
98 @@ -95,6 +93,7 @@ enum nfulnl_attr_config {
99 #define NFULNL_COPY_NONE 0x00
100 #define NFULNL_COPY_META 0x01
101 #define NFULNL_COPY_PACKET 0x02
102 +/* 0xff is reserved, don't use it for new copy modes. */
104 #define NFULNL_CFG_F_SEQ 0x0001
105 #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002