aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:44:54 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:30 -0400
commit48818f822d2b2e16f4bf4d1ed1185e7d2146dc34 (patch)
tree2dbc1c04e79f773b0805aff0da9547e857035ea1 /include
parent9f8552996d969f56039ec88128cf5ad35b12f141 (diff)
[IPV6]: struct in6_addr annotations
in6_addr elements are net-endian Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/in6.h4
-rw-r--r--include/net/ipv6.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/in6.h b/include/linux/in6.h
index d776829b443f..348ecd4a36fe 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -32,8 +32,8 @@ struct in6_addr
32 union 32 union
33 { 33 {
34 __u8 u6_addr8[16]; 34 __u8 u6_addr8[16];
35 __u16 u6_addr16[8]; 35 __be16 u6_addr16[8];
36 __u32 u6_addr32[4]; 36 __be32 u6_addr32[4];
37 } in6_u; 37 } in6_u;
38#define s6_addr in6_u.u6_addr8 38#define s6_addr in6_u.u6_addr8
39#define s6_addr16 in6_u.u6_addr16 39#define s6_addr16 in6_u.u6_addr16
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 72bf47b2a4e0..8223c4410b4b 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -318,8 +318,8 @@ static inline void ipv6_addr_prefix(struct in6_addr *pfx,
318 318
319#ifndef __HAVE_ARCH_ADDR_SET 319#ifndef __HAVE_ARCH_ADDR_SET
320static inline void ipv6_addr_set(struct in6_addr *addr, 320static inline void ipv6_addr_set(struct in6_addr *addr,
321 __u32 w1, __u32 w2, 321 __be32 w1, __be32 w2,
322 __u32 w3, __u32 w4) 322 __be32 w3, __be32 w4)
323{ 323{
324 addr->s6_addr32[0] = w1; 324 addr->s6_addr32[0] = w1;
325 addr->s6_addr32[1] = w2; 325 addr->s6_addr32[1] = w2;
@@ -337,7 +337,7 @@ static inline int ipv6_addr_equal(const struct in6_addr *a1,
337 a1->s6_addr32[3] == a2->s6_addr32[3]); 337 a1->s6_addr32[3] == a2->s6_addr32[3]);
338} 338}
339 339
340static inline int __ipv6_prefix_equal(const u32 *a1, const u32 *a2, 340static inline int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2,
341 unsigned int prefixlen) 341 unsigned int prefixlen)
342{ 342{
343 unsigned pdw, pbi; 343 unsigned pdw, pbi;