Commit 7ff30c43 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

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: default avatarBen Hutchings <ben@decadent.org.uk>
Acked-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bcb949b8
...@@ -52,7 +52,7 @@ struct arpt_arp { ...@@ -52,7 +52,7 @@ struct arpt_arp {
struct in_addr smsk, tmsk; struct in_addr smsk, tmsk;
/* Device hw address length, src+target device addresses */ /* Device hw address length, src+target device addresses */
u_int8_t arhln, arhln_mask; __u8 arhln, arhln_mask;
struct arpt_devaddr_info src_devaddr; struct arpt_devaddr_info src_devaddr;
struct arpt_devaddr_info tgt_devaddr; struct arpt_devaddr_info tgt_devaddr;
...@@ -71,9 +71,9 @@ struct arpt_arp { ...@@ -71,9 +71,9 @@ struct arpt_arp {
unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
/* Flags word */ /* Flags word */
u_int8_t flags; __u8 flags;
/* Inverse flags */ /* Inverse flags */
u_int16_t invflags; __u16 invflags;
}; };
/* Values for "flag" field in struct arpt_ip (general arp structure). /* Values for "flag" field in struct arpt_ip (general arp structure).
...@@ -102,9 +102,9 @@ struct arpt_entry ...@@ -102,9 +102,9 @@ struct arpt_entry
struct arpt_arp arp; struct arpt_arp arp;
/* Size of arpt_entry + matches */ /* Size of arpt_entry + matches */
u_int16_t target_offset; __u16 target_offset;
/* Size of arpt_entry + matches + target */ /* Size of arpt_entry + matches + target */
u_int16_t next_offset; __u16 next_offset;
/* Back pointer */ /* Back pointer */
unsigned int comefrom; unsigned int comefrom;
...@@ -260,8 +260,8 @@ extern unsigned int arpt_do_table(struct sk_buff *skb, ...@@ -260,8 +260,8 @@ extern unsigned int arpt_do_table(struct sk_buff *skb,
struct compat_arpt_entry { struct compat_arpt_entry {
struct arpt_arp arp; struct arpt_arp arp;
u_int16_t target_offset; __u16 target_offset;
u_int16_t next_offset; __u16 next_offset;
compat_uint_t comefrom; compat_uint_t comefrom;
struct compat_xt_counters counters; struct compat_xt_counters counters;
unsigned char elems[0]; unsigned char elems[0];
......
...@@ -81,12 +81,12 @@ struct ipt_ip { ...@@ -81,12 +81,12 @@ struct ipt_ip {
unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
/* Protocol, 0 = ANY */ /* Protocol, 0 = ANY */
u_int16_t proto; __u16 proto;
/* Flags word */ /* Flags word */
u_int8_t flags; __u8 flags;
/* Inverse flags */ /* Inverse flags */
u_int8_t invflags; __u8 invflags;
}; };
/* Values for "flag" field in struct ipt_ip (general ip structure). */ /* Values for "flag" field in struct ipt_ip (general ip structure). */
...@@ -114,9 +114,9 @@ struct ipt_entry { ...@@ -114,9 +114,9 @@ struct ipt_entry {
unsigned int nfcache; unsigned int nfcache;
/* Size of ipt_entry + matches */ /* Size of ipt_entry + matches */
u_int16_t target_offset; __u16 target_offset;
/* Size of ipt_entry + matches + target */ /* Size of ipt_entry + matches + target */
u_int16_t next_offset; __u16 next_offset;
/* Back pointer */ /* Back pointer */
unsigned int comefrom; unsigned int comefrom;
...@@ -149,9 +149,9 @@ struct ipt_entry { ...@@ -149,9 +149,9 @@ struct ipt_entry {
/* ICMP matching stuff */ /* ICMP matching stuff */
struct ipt_icmp { struct ipt_icmp {
u_int8_t type; /* type to match */ __u8 type; /* type to match */
u_int8_t code[2]; /* range of code */ __u8 code[2]; /* range of code */
u_int8_t invflags; /* Inverse flags */ __u8 invflags; /* Inverse flags */
}; };
/* Values for "inv" field for struct ipt_icmp. */ /* Values for "inv" field for struct ipt_icmp. */
...@@ -288,8 +288,8 @@ extern unsigned int ipt_do_table(struct sk_buff *skb, ...@@ -288,8 +288,8 @@ extern unsigned int ipt_do_table(struct sk_buff *skb,
struct compat_ipt_entry { struct compat_ipt_entry {
struct ipt_ip ip; struct ipt_ip ip;
compat_uint_t nfcache; compat_uint_t nfcache;
u_int16_t target_offset; __u16 target_offset;
u_int16_t next_offset; __u16 next_offset;
compat_uint_t comefrom; compat_uint_t comefrom;
struct compat_xt_counters counters; struct compat_xt_counters counters;
unsigned char elems[0]; unsigned char elems[0];
......
...@@ -81,14 +81,14 @@ struct ip6t_ip6 { ...@@ -81,14 +81,14 @@ struct ip6t_ip6 {
* MH do not match any packets. * MH do not match any packets.
* - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol.
*/ */
u_int16_t proto; __u16 proto;
/* TOS to match iff flags & IP6T_F_TOS */ /* TOS to match iff flags & IP6T_F_TOS */
u_int8_t tos; __u8 tos;
/* Flags word */ /* Flags word */
u_int8_t flags; __u8 flags;
/* Inverse flags */ /* Inverse flags */
u_int8_t invflags; __u8 invflags;
}; };
/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
...@@ -118,9 +118,9 @@ struct ip6t_entry { ...@@ -118,9 +118,9 @@ struct ip6t_entry {
unsigned int nfcache; unsigned int nfcache;
/* Size of ipt_entry + matches */ /* Size of ipt_entry + matches */
u_int16_t target_offset; __u16 target_offset;
/* Size of ipt_entry + matches + target */ /* Size of ipt_entry + matches + target */
u_int16_t next_offset; __u16 next_offset;
/* Back pointer */ /* Back pointer */
unsigned int comefrom; unsigned int comefrom;
...@@ -186,9 +186,9 @@ struct ip6t_error { ...@@ -186,9 +186,9 @@ struct ip6t_error {
/* ICMP matching stuff */ /* ICMP matching stuff */
struct ip6t_icmp { struct ip6t_icmp {
u_int8_t type; /* type to match */ __u8 type; /* type to match */
u_int8_t code[2]; /* range of code */ __u8 code[2]; /* range of code */
u_int8_t invflags; /* Inverse flags */ __u8 invflags; /* Inverse flags */
}; };
/* Values for "inv" field for struct ipt_icmp. */ /* 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, ...@@ -298,8 +298,8 @@ extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
struct compat_ip6t_entry { struct compat_ip6t_entry {
struct ip6t_ip6 ipv6; struct ip6t_ip6 ipv6;
compat_uint_t nfcache; compat_uint_t nfcache;
u_int16_t target_offset; __u16 target_offset;
u_int16_t next_offset; __u16 next_offset;
compat_uint_t comefrom; compat_uint_t comefrom;
struct compat_xt_counters counters; struct compat_xt_counters counters;
unsigned char elems[0]; unsigned char elems[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment