summaryrefslogtreecommitdiff
path: root/package/libnetfilter_conntrack/patches/patch-include_libnetfilter_conntrack_libnetfilter_conntrack_h
blob: b8d557cb7600f24a89aabcb62621c25f565b5127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
--- libnetfilter_conntrack-1.0.4.orig/include/libnetfilter_conntrack/libnetfilter_conntrack.h	2013-08-06 15:22:55.000000000 +0200
+++ libnetfilter_conntrack-1.0.4/include/libnetfilter_conntrack/libnetfilter_conntrack.h	2014-04-10 14:29:23.000000000 +0200
@@ -10,6 +10,7 @@
 #ifndef _LIBNETFILTER_CONNTRACK_H_
 #define _LIBNETFILTER_CONNTRACK_H_
 
+#include <stdint.h>
 #include <netinet/in.h>
 #include <libnfnetlink/linux_nfnetlink.h>
 #include <libnfnetlink/libnfnetlink.h>
@@ -37,9 +38,9 @@ struct nfct_handle;
 /*
  * [Open|close] a conntrack handler
  */
-extern struct nfct_handle *nfct_open(u_int8_t, unsigned);
+extern struct nfct_handle *nfct_open(uint8_t, unsigned);
 extern struct nfct_handle *nfct_open_nfnl(struct nfnl_handle *nfnlh,
-					  u_int8_t subsys_id,
+					  uint8_t subsys_id,
 					  unsigned int subscriptions);
 extern int nfct_close(struct nfct_handle *cth);
 
@@ -160,31 +161,31 @@ enum nf_conntrack_attr_grp {
 };
 
 struct nfct_attr_grp_ipv4 {
-	u_int32_t src, dst;
+	uint32_t src, dst;
 };
 
 struct nfct_attr_grp_ipv6 {
-	u_int32_t src[4], dst[4];
+	uint32_t src[4], dst[4];
 };
 
 struct nfct_attr_grp_port {
-	u_int16_t sport, dport;
+	uint16_t sport, dport;
 };
 
 struct nfct_attr_grp_icmp {
-	u_int16_t id;
-	u_int8_t code, type;
+	uint16_t id;
+	uint8_t code, type;
 };
 
 struct nfct_attr_grp_ctrs {
-	u_int64_t packets;
-	u_int64_t bytes;
+	uint64_t packets;
+	uint64_t bytes;
 };
 
 union nfct_attr_grp_addr {
-	u_int32_t ip;
-	u_int32_t ip6[4];
-	u_int32_t addr[4];
+	uint32_t ip;
+	uint32_t ip6[4];
+	uint32_t addr[4];
 };
 
 /* message type */
@@ -302,19 +303,19 @@ extern void nfct_set_attr(struct nf_conn
 
 extern void nfct_set_attr_u8(struct nf_conntrack *ct,
 			     const enum nf_conntrack_attr type,
-			     u_int8_t value);
+			     uint8_t value);
 
 extern void nfct_set_attr_u16(struct nf_conntrack *ct,
 			      const enum nf_conntrack_attr type,
-			      u_int16_t value);
+			      uint16_t value);
 
 extern void nfct_set_attr_u32(struct nf_conntrack *ct,
 			      const enum nf_conntrack_attr type,
-			      u_int32_t value);
+			      uint32_t value);
 
 extern void nfct_set_attr_u64(struct nf_conntrack *ct,
 			      const enum nf_conntrack_attr type,
-			      u_int64_t value);
+			      uint64_t value);
 
 extern void nfct_set_attr_l(struct nf_conntrack *ct,
 			    const enum nf_conntrack_attr type,
@@ -325,16 +326,16 @@ extern void nfct_set_attr_l(struct nf_co
 extern const void *nfct_get_attr(const struct nf_conntrack *ct,
 				 const enum nf_conntrack_attr type);
 
-extern u_int8_t nfct_get_attr_u8(const struct nf_conntrack *ct,
+extern uint8_t nfct_get_attr_u8(const struct nf_conntrack *ct,
 				 const enum nf_conntrack_attr type);
 
-extern u_int16_t nfct_get_attr_u16(const struct nf_conntrack *ct,
+extern uint16_t nfct_get_attr_u16(const struct nf_conntrack *ct,
 				   const enum nf_conntrack_attr type);
 
-extern u_int32_t nfct_get_attr_u32(const struct nf_conntrack *ct,
+extern uint32_t nfct_get_attr_u32(const struct nf_conntrack *ct,
 				   const enum nf_conntrack_attr type);
 
-extern u_int64_t nfct_get_attr_u64(const struct nf_conntrack *ct,
+extern uint64_t nfct_get_attr_u64(const struct nf_conntrack *ct,
 				   const enum nf_conntrack_attr type);
 
 /* checker */
@@ -477,20 +478,20 @@ extern struct nfct_filter *nfct_filter_c
 extern void nfct_filter_destroy(struct nfct_filter *filter);
 
 struct nfct_filter_proto {
-	u_int16_t proto;
-	u_int16_t state;
+	uint16_t proto;
+	uint16_t state;
 };
 struct nfct_filter_ipv4 {
-	u_int32_t addr;
-	u_int32_t mask;
+	uint32_t addr;
+	uint32_t mask;
 };
 struct nfct_filter_ipv6 {
-	u_int32_t addr[4];
-	u_int32_t mask[4];
+	uint32_t addr[4];
+	uint32_t mask[4];
 };
 
 enum nfct_filter_attr {
-	NFCT_FILTER_L4PROTO = 0,	/* u_int32_t */
+	NFCT_FILTER_L4PROTO = 0,	/* uint32_t */
 	NFCT_FILTER_L4PROTO_STATE,	/* struct nfct_filter_proto */
 	NFCT_FILTER_SRC_IPV4,		/* struct nfct_filter_ipv4 */
 	NFCT_FILTER_DST_IPV4,		/* struct nfct_filter_ipv4 */
@@ -505,7 +506,7 @@ extern void nfct_filter_add_attr(struct
 
 extern void nfct_filter_add_attr_u32(struct nfct_filter *filter,
 				     const enum nfct_filter_attr attr,
-				     const u_int32_t value);
+				     const uint32_t value);
 
 enum nfct_filter_logic {
 	NFCT_FILTER_LOGIC_POSITIVE,
@@ -525,13 +526,13 @@ extern int nfct_filter_detach(int fd);
 struct nfct_filter_dump;
 
 struct nfct_filter_dump_mark {
-	u_int32_t val;
-	u_int32_t mask;
+	uint32_t val;
+	uint32_t mask;
 };
 
 enum nfct_filter_dump_attr {
 	NFCT_FILTER_DUMP_MARK = 0,	/* struct nfct_filter_dump_mark */
-	NFCT_FILTER_DUMP_L3NUM,		/* u_int8_t */
+	NFCT_FILTER_DUMP_L3NUM,		/* uint8_t */
 	NFCT_FILTER_DUMP_MAX
 };
 
@@ -545,7 +546,7 @@ void nfct_filter_dump_set_attr(struct nf
 
 void nfct_filter_dump_set_attr_u8(struct nfct_filter_dump *filter_dump,
 				  const enum nfct_filter_dump_attr type,
-				  u_int8_t data);
+				  uint8_t data);
 
 /* low level API: netlink functions */
 
@@ -553,8 +554,8 @@ extern __attribute__((deprecated)) int
 nfct_build_conntrack(struct nfnl_subsys_handle *ssh,
 				void *req,
 				size_t size,
-				u_int16_t type,
-				u_int16_t flags,
+				uint16_t type,
+				uint16_t flags,
 				const struct nf_conntrack *ct);
 
 extern __attribute__((deprecated))
@@ -640,27 +641,27 @@ extern void nfexp_set_attr(struct nf_exp
 
 extern void nfexp_set_attr_u8(struct nf_expect *exp,
 			      const enum nf_expect_attr type,
-			      u_int8_t value);
+			      uint8_t value);
 
 extern void nfexp_set_attr_u16(struct nf_expect *exp,
 			       const enum nf_expect_attr type,
-			       u_int16_t value);
+			       uint16_t value);
 
 extern void nfexp_set_attr_u32(struct nf_expect *exp,
 			       const enum nf_expect_attr type,
-			       u_int32_t value);
+			       uint32_t value);
 
 /* getter */
 extern const void *nfexp_get_attr(const struct nf_expect *exp,
 				  const enum nf_expect_attr type);
 
-extern u_int8_t nfexp_get_attr_u8(const struct nf_expect *exp,
+extern uint8_t nfexp_get_attr_u8(const struct nf_expect *exp,
 				  const enum nf_expect_attr type);
 
-extern u_int16_t nfexp_get_attr_u16(const struct nf_expect *exp,
+extern uint16_t nfexp_get_attr_u16(const struct nf_expect *exp,
 				    const enum nf_expect_attr type);
 
-extern u_int32_t nfexp_get_attr_u32(const struct nf_expect *exp,
+extern uint32_t nfexp_get_attr_u32(const struct nf_expect *exp,
 				    const enum nf_expect_attr type);
 
 /* checker */
@@ -700,8 +701,8 @@ extern __attribute__((deprecated))
 int nfexp_build_expect(struct nfnl_subsys_handle *ssh,
 			      void *req,
 			      size_t size,
-			      u_int16_t type,
-			      u_int16_t flags,
+			      uint16_t type,
+			      uint16_t flags,
 			      const struct nf_expect *exp);
 
 extern __attribute__((deprecated))