Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ben Hutchings and committed by
David S. Miller
7ff30c43 bcb949b8

+28 -28
+7 -7
include/linux/netfilter_arp/arp_tables.h
··· 52 52 struct in_addr smsk, tmsk; 53 53 54 54 /* Device hw address length, src+target device addresses */ 55 - u_int8_t arhln, arhln_mask; 55 + __u8 arhln, arhln_mask; 56 56 struct arpt_devaddr_info src_devaddr; 57 57 struct arpt_devaddr_info tgt_devaddr; 58 58 ··· 71 71 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; 72 72 73 73 /* Flags word */ 74 - u_int8_t flags; 74 + __u8 flags; 75 75 /* Inverse flags */ 76 - u_int16_t invflags; 76 + __u16 invflags; 77 77 }; 78 78 79 79 /* Values for "flag" field in struct arpt_ip (general arp structure). ··· 102 102 struct arpt_arp arp; 103 103 104 104 /* Size of arpt_entry + matches */ 105 - u_int16_t target_offset; 105 + __u16 target_offset; 106 106 /* Size of arpt_entry + matches + target */ 107 - u_int16_t next_offset; 107 + __u16 next_offset; 108 108 109 109 /* Back pointer */ 110 110 unsigned int comefrom; ··· 260 260 261 261 struct compat_arpt_entry { 262 262 struct arpt_arp arp; 263 - u_int16_t target_offset; 264 - u_int16_t next_offset; 263 + __u16 target_offset; 264 + __u16 next_offset; 265 265 compat_uint_t comefrom; 266 266 struct compat_xt_counters counters; 267 267 unsigned char elems[0];
+10 -10
include/linux/netfilter_ipv4/ip_tables.h
··· 81 81 unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; 82 82 83 83 /* Protocol, 0 = ANY */ 84 - u_int16_t proto; 84 + __u16 proto; 85 85 86 86 /* Flags word */ 87 - u_int8_t flags; 87 + __u8 flags; 88 88 /* Inverse flags */ 89 - u_int8_t invflags; 89 + __u8 invflags; 90 90 }; 91 91 92 92 /* Values for "flag" field in struct ipt_ip (general ip structure). */ ··· 114 114 unsigned int nfcache; 115 115 116 116 /* Size of ipt_entry + matches */ 117 - u_int16_t target_offset; 117 + __u16 target_offset; 118 118 /* Size of ipt_entry + matches + target */ 119 - u_int16_t next_offset; 119 + __u16 next_offset; 120 120 121 121 /* Back pointer */ 122 122 unsigned int comefrom; ··· 149 149 150 150 /* ICMP matching stuff */ 151 151 struct ipt_icmp { 152 - u_int8_t type; /* type to match */ 153 - u_int8_t code[2]; /* range of code */ 154 - u_int8_t invflags; /* Inverse flags */ 152 + __u8 type; /* type to match */ 153 + __u8 code[2]; /* range of code */ 154 + __u8 invflags; /* Inverse flags */ 155 155 }; 156 156 157 157 /* Values for "inv" field for struct ipt_icmp. */ ··· 288 288 struct compat_ipt_entry { 289 289 struct ipt_ip ip; 290 290 compat_uint_t nfcache; 291 - u_int16_t target_offset; 292 - u_int16_t next_offset; 291 + __u16 target_offset; 292 + __u16 next_offset; 293 293 compat_uint_t comefrom; 294 294 struct compat_xt_counters counters; 295 295 unsigned char elems[0];
+11 -11
include/linux/netfilter_ipv6/ip6_tables.h
··· 81 81 * MH do not match any packets. 82 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 85 /* TOS to match iff flags & IP6T_F_TOS */ 86 - u_int8_t tos; 86 + __u8 tos; 87 87 88 88 /* Flags word */ 89 - u_int8_t flags; 89 + __u8 flags; 90 90 /* Inverse flags */ 91 - u_int8_t invflags; 91 + __u8 invflags; 92 92 }; 93 93 94 94 /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ ··· 118 118 unsigned int nfcache; 119 119 120 120 /* Size of ipt_entry + matches */ 121 - u_int16_t target_offset; 121 + __u16 target_offset; 122 122 /* Size of ipt_entry + matches + target */ 123 - u_int16_t next_offset; 123 + __u16 next_offset; 124 124 125 125 /* Back pointer */ 126 126 unsigned int comefrom; ··· 186 186 187 187 /* ICMP matching stuff */ 188 188 struct ip6t_icmp { 189 - u_int8_t type; /* type to match */ 190 - u_int8_t code[2]; /* range of code */ 191 - u_int8_t invflags; /* Inverse flags */ 189 + __u8 type; /* type to match */ 190 + __u8 code[2]; /* range of code */ 191 + __u8 invflags; /* Inverse flags */ 192 192 }; 193 193 194 194 /* Values for "inv" field for struct ipt_icmp. */ ··· 298 298 struct compat_ip6t_entry { 299 299 struct ip6t_ip6 ipv6; 300 300 compat_uint_t nfcache; 301 - u_int16_t target_offset; 302 - u_int16_t next_offset; 301 + __u16 target_offset; 302 + __u16 next_offset; 303 303 compat_uint_t comefrom; 304 304 struct compat_xt_counters counters; 305 305 unsigned char elems[0];