diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 01:17:51 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:01:07 -0400 |
commit | fd6832220974809141b3981e380b78690bba8911 (patch) | |
tree | 60fcf8bb0912b3b2eb91836540fdbb83265ef8e4 /net | |
parent | e4883014f48f8c17c17a2526cb5cb6e17c5f94e7 (diff) |
[IPV4]: inet_addr_type() annotations
argument and inferred net-endian variables in callers annotated.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/arp.c | 4 | ||||
-rw-r--r-- | net/ipv4/fib_frontend.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_options.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_addrtype.c | 2 | ||||
-rw-r--r-- | net/ipv6/af_inet6.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index db72339c21e1..2a29a5ebc978 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -234,7 +234,7 @@ static u32 arp_hash(const void *pkey, const struct net_device *dev) | |||
234 | 234 | ||
235 | static int arp_constructor(struct neighbour *neigh) | 235 | static int arp_constructor(struct neighbour *neigh) |
236 | { | 236 | { |
237 | u32 addr = *(u32*)neigh->primary_key; | 237 | __be32 addr = *(__be32*)neigh->primary_key; |
238 | struct net_device *dev = neigh->dev; | 238 | struct net_device *dev = neigh->dev; |
239 | struct in_device *in_dev; | 239 | struct in_device *in_dev; |
240 | struct neigh_parms *parms; | 240 | struct neigh_parms *parms; |
@@ -470,7 +470,7 @@ static int arp_set_predefined(int addr_hint, unsigned char * haddr, u32 paddr, s | |||
470 | int arp_find(unsigned char *haddr, struct sk_buff *skb) | 470 | int arp_find(unsigned char *haddr, struct sk_buff *skb) |
471 | { | 471 | { |
472 | struct net_device *dev = skb->dev; | 472 | struct net_device *dev = skb->dev; |
473 | u32 paddr; | 473 | __be32 paddr; |
474 | struct neighbour *n; | 474 | struct neighbour *n; |
475 | 475 | ||
476 | if (!skb->dst) { | 476 | if (!skb->dst) { |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index c0bd2f122da2..34dc640478a0 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -146,7 +146,7 @@ out: | |||
146 | return dev; | 146 | return dev; |
147 | } | 147 | } |
148 | 148 | ||
149 | unsigned inet_addr_type(u32 addr) | 149 | unsigned inet_addr_type(__be32 addr) |
150 | { | 150 | { |
151 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; | 151 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; |
152 | struct fib_result res; | 152 | struct fib_result res; |
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 87f25486fd64..3245bec23f4d 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -148,7 +148,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb) | |||
148 | dopt->ts_needtime = 0; | 148 | dopt->ts_needtime = 0; |
149 | 149 | ||
150 | if (soffset + 8 <= optlen) { | 150 | if (soffset + 8 <= optlen) { |
151 | __u32 addr; | 151 | __be32 addr; |
152 | 152 | ||
153 | memcpy(&addr, sptr+soffset-1, 4); | 153 | memcpy(&addr, sptr+soffset-1, 4); |
154 | if (inet_addr_type(addr) != RTN_LOCAL) { | 154 | if (inet_addr_type(addr) != RTN_LOCAL) { |
@@ -396,7 +396,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb) | |||
396 | } | 396 | } |
397 | opt->ts = optptr - iph; | 397 | opt->ts = optptr - iph; |
398 | { | 398 | { |
399 | u32 addr; | 399 | __be32 addr; |
400 | memcpy(&addr, &optptr[optptr[2]-1], 4); | 400 | memcpy(&addr, &optptr[optptr[2]-1], 4); |
401 | if (inet_addr_type(addr) == RTN_UNICAST) | 401 | if (inet_addr_type(addr) == RTN_UNICAST) |
402 | break; | 402 | break; |
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c index 893dae210b04..7b60eb74788b 100644 --- a/net/ipv4/netfilter/ipt_addrtype.c +++ b/net/ipv4/netfilter/ipt_addrtype.c | |||
@@ -22,7 +22,7 @@ MODULE_LICENSE("GPL"); | |||
22 | MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); | 22 | MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); |
23 | MODULE_DESCRIPTION("iptables addrtype match"); | 23 | MODULE_DESCRIPTION("iptables addrtype match"); |
24 | 24 | ||
25 | static inline int match_type(u_int32_t addr, u_int16_t mask) | 25 | static inline int match_type(__be32 addr, u_int16_t mask) |
26 | { | 26 | { |
27 | return !!(mask & (1 << inet_addr_type(addr))); | 27 | return !!(mask & (1 << inet_addr_type(addr))); |
28 | } | 28 | } |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index bf6e8aff19d4..e94eccb99707 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -246,7 +246,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
246 | struct sock *sk = sock->sk; | 246 | struct sock *sk = sock->sk; |
247 | struct inet_sock *inet = inet_sk(sk); | 247 | struct inet_sock *inet = inet_sk(sk); |
248 | struct ipv6_pinfo *np = inet6_sk(sk); | 248 | struct ipv6_pinfo *np = inet6_sk(sk); |
249 | __u32 v4addr = 0; | 249 | __be32 v4addr = 0; |
250 | unsigned short snum; | 250 | unsigned short snum; |
251 | int addr_type = 0; | 251 | int addr_type = 0; |
252 | int err = 0; | 252 | int err = 0; |