aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
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 7f7db8d57934..c2222ee74d66 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)
365 a->s6_addr32[2] | a->s6_addr32[3] ) == 0); 365 a->s6_addr32[2] | a->s6_addr32[3] ) == 0);
366} 366}
367 367
368static inline int ipv6_addr_loopback(const struct in6_addr *a)
369{
370 return ((a->s6_addr32[0] | a->s6_addr32[1] |
371 a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0);
372}
373
368static inline int ipv6_addr_v4mapped(const struct in6_addr *a) 374static inline int ipv6_addr_v4mapped(const struct in6_addr *a)
369{ 375{
370 return ((a->s6_addr32[0] | a->s6_addr32[1] | 376 return ((a->s6_addr32[0] | a->s6_addr32[1] |