aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-08-24 14:44:57 -0400
committerDavid S. Miller <davem@davemloft.net>2011-08-26 12:02:50 -0400
commit7ff30c43f316f1febcfb6e84d511ab34ea433e7b (patch)
tree597da153649ad5c1f7e0934749d96d3bb9cb3bca
parentbcb949b8847655516ba499ca75cd8529f167e360 (diff)
headers, netfilter: Use kernel type names __u8, __u16, __u32
These types are guaranteed to be defined by <linux/types.h> for both userland and kernel, unlike u_intN_t. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netfilter_arp/arp_tables.h14
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h20
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h22
3 files changed, 28 insertions, 28 deletions
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index adbf4bff87e..e08565d4517 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -52,7 +52,7 @@ struct arpt_arp {
52 struct in_addr smsk, tmsk; 52 struct in_addr smsk, tmsk;
53 53
54 /* Device hw address length, src+target device addresses */ 54 /* Device hw address length, src+target device addresses */
55 u_int8_t arhln, arhln_mask; 55 __u8 arhln, arhln_mask;
56 struct arpt_devaddr_info src_devaddr; 56 struct arpt_devaddr_info src_devaddr;
57 struct arpt_devaddr_info tgt_devaddr; 57 struct arpt_devaddr_info tgt_devaddr;
58 58
@@ -71,9 +71,9 @@ struct arpt_arp {
71 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; 71 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
72 72
73 /* Flags word */ 73 /* Flags word */
74 u_int8_t flags; 74 __u8 flags;
75 /* Inverse flags */ 75 /* Inverse flags */
76 u_int16_t invflags; 76 __u16 invflags;
77}; 77};
78 78
79/* Values for "flag" field in struct arpt_ip (general arp structure). 79/* Values for "flag" field in struct arpt_ip (general arp structure).
@@ -102,9 +102,9 @@ struct arpt_entry
102 struct arpt_arp arp; 102 struct arpt_arp arp;
103 103
104 /* Size of arpt_entry + matches */ 104 /* Size of arpt_entry + matches */
105 u_int16_t target_offset; 105 __u16 target_offset;
106 /* Size of arpt_entry + matches + target */ 106 /* Size of arpt_entry + matches + target */
107 u_int16_t next_offset; 107 __u16 next_offset;
108 108
109 /* Back pointer */ 109 /* Back pointer */
110 unsigned int comefrom; 110 unsigned int comefrom;
@@ -260,8 +260,8 @@ extern unsigned int arpt_do_table(struct sk_buff *skb,
260 260
261struct compat_arpt_entry { 261struct compat_arpt_entry {
262 struct arpt_arp arp; 262 struct arpt_arp arp;
263 u_int16_t target_offset; 263 __u16 target_offset;
264 u_int16_t next_offset; 264 __u16 next_offset;
265 compat_uint_t comefrom; 265 compat_uint_t comefrom;
266 struct compat_xt_counters counters; 266 struct compat_xt_counters counters;
267 unsigned char elems[0]; 267 unsigned char elems[0];
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 64a5d95c58e..db79231914c 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -81,12 +81,12 @@ struct ipt_ip {
81 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; 81 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
82 82
83 /* Protocol, 0 = ANY */ 83 /* Protocol, 0 = ANY */
84 u_int16_t proto; 84 __u16 proto;
85 85
86 /* Flags word */ 86 /* Flags word */
87 u_int8_t flags; 87 __u8 flags;
88 /* Inverse flags */ 88 /* Inverse flags */
89 u_int8_t invflags; 89 __u8 invflags;
90}; 90};
91 91
92/* Values for "flag" field in struct ipt_ip (general ip structure). */ 92/* Values for "flag" field in struct ipt_ip (general ip structure). */
@@ -114,9 +114,9 @@ struct ipt_entry {
114 unsigned int nfcache; 114 unsigned int nfcache;
115 115
116 /* Size of ipt_entry + matches */ 116 /* Size of ipt_entry + matches */
117 u_int16_t target_offset; 117 __u16 target_offset;
118 /* Size of ipt_entry + matches + target */ 118 /* Size of ipt_entry + matches + target */
119 u_int16_t next_offset; 119 __u16 next_offset;
120 120
121 /* Back pointer */ 121 /* Back pointer */
122 unsigned int comefrom; 122 unsigned int comefrom;
@@ -149,9 +149,9 @@ struct ipt_entry {
149 149
150/* ICMP matching stuff */ 150/* ICMP matching stuff */
151struct ipt_icmp { 151struct ipt_icmp {
152 u_int8_t type; /* type to match */ 152 __u8 type; /* type to match */
153 u_int8_t code[2]; /* range of code */ 153 __u8 code[2]; /* range of code */
154 u_int8_t invflags; /* Inverse flags */ 154 __u8 invflags; /* Inverse flags */
155}; 155};
156 156
157/* Values for "inv" field for struct ipt_icmp. */ 157/* Values for "inv" field for struct ipt_icmp. */
@@ -288,8 +288,8 @@ extern unsigned int ipt_do_table(struct sk_buff *skb,
288struct compat_ipt_entry { 288struct compat_ipt_entry {
289 struct ipt_ip ip; 289 struct ipt_ip ip;
290 compat_uint_t nfcache; 290 compat_uint_t nfcache;
291 u_int16_t target_offset; 291 __u16 target_offset;
292 u_int16_t next_offset; 292 __u16 next_offset;
293 compat_uint_t comefrom; 293 compat_uint_t comefrom;
294 struct compat_xt_counters counters; 294 struct compat_xt_counters counters;
295 unsigned char elems[0]; 295 unsigned char elems[0];
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index c9784f7a9c1..f549adccc94 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -81,14 +81,14 @@ struct ip6t_ip6 {
81 * MH do not match any packets. 81 * MH do not match any packets.
82 * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. 82 * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol.
83 */ 83 */
84 u_int16_t proto; 84 __u16 proto;
85 /* TOS to match iff flags & IP6T_F_TOS */ 85 /* TOS to match iff flags & IP6T_F_TOS */
86 u_int8_t tos; 86 __u8 tos;
87 87
88 /* Flags word */ 88 /* Flags word */
89 u_int8_t flags; 89 __u8 flags;
90 /* Inverse flags */ 90 /* Inverse flags */
91 u_int8_t invflags; 91 __u8 invflags;
92}; 92};
93 93
94/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ 94/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
@@ -118,9 +118,9 @@ struct ip6t_entry {
118 unsigned int nfcache; 118 unsigned int nfcache;
119 119
120 /* Size of ipt_entry + matches */ 120 /* Size of ipt_entry + matches */
121 u_int16_t target_offset; 121 __u16 target_offset;
122 /* Size of ipt_entry + matches + target */ 122 /* Size of ipt_entry + matches + target */
123 u_int16_t next_offset; 123 __u16 next_offset;
124 124
125 /* Back pointer */ 125 /* Back pointer */
126 unsigned int comefrom; 126 unsigned int comefrom;
@@ -186,9 +186,9 @@ struct ip6t_error {
186 186
187/* ICMP matching stuff */ 187/* ICMP matching stuff */
188struct ip6t_icmp { 188struct ip6t_icmp {
189 u_int8_t type; /* type to match */ 189 __u8 type; /* type to match */
190 u_int8_t code[2]; /* range of code */ 190 __u8 code[2]; /* range of code */
191 u_int8_t invflags; /* Inverse flags */ 191 __u8 invflags; /* Inverse flags */
192}; 192};
193 193
194/* Values for "inv" field for struct ipt_icmp. */ 194/* Values for "inv" field for struct ipt_icmp. */
@@ -298,8 +298,8 @@ extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
298struct compat_ip6t_entry { 298struct compat_ip6t_entry {
299 struct ip6t_ip6 ipv6; 299 struct ip6t_ip6 ipv6;
300 compat_uint_t nfcache; 300 compat_uint_t nfcache;
301 u_int16_t target_offset; 301 __u16 target_offset;
302 u_int16_t next_offset; 302 __u16 next_offset;
303 compat_uint_t comefrom; 303 compat_uint_t comefrom;
304 struct compat_xt_counters counters; 304 struct compat_xt_counters counters;
305 unsigned char elems[0]; 305 unsigned char elems[0];