aboutsummaryrefslogtreecommitdiff
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-28 01:19:40 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-28 01:19:40 -0700
commit1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9 (patch)
treefe3dc41cbb47ae12b7c3faf6a88b097349e50d5a /include/net/ipv6.h
parente35c3269edba151e1c703d87068a28ce2cd65bb0 (diff)
parentd420895efb259a78dda50f95289571faa6e10e41 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl4965-base.c
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 7f7db8d5793..c2222ee74d6 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -365,6 +365,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a)
a->s6_addr32[2] | a->s6_addr32[3] ) == 0);
}
+static inline int ipv6_addr_loopback(const struct in6_addr *a)
+{
+ return ((a->s6_addr32[0] | a->s6_addr32[1] |
+ a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0);
+}
+
static inline int ipv6_addr_v4mapped(const struct in6_addr *a)
{
return ((a->s6_addr32[0] | a->s6_addr32[1] |