summaryrefslogtreecommitdiffstats
path: root/libc/include
diff options
context:
space:
mode:
authorSteinar H. Gunderson <sesse@google.com>2010-12-20 11:33:31 +0100
committerSteinar H. Gunderson <sesse@google.com>2011-01-14 21:40:57 +0100
commitf4dca7be3b7bc181f1534be187428c5a52cb8c6a (patch)
tree57af0fbd576aa45931a61df95ddef3d6b3003968 /libc/include
parenta798b9f0e171643b0bc7bbf79f14cb018689f715 (diff)
downloadbionic-f4dca7be3b7bc181f1534be187428c5a52cb8c6a.zip
bionic-f4dca7be3b7bc181f1534be187428c5a52cb8c6a.tar.gz
bionic-f4dca7be3b7bc181f1534be187428c5a52cb8c6a.tar.bz2
Backport (simple cherry-pick) 64b6c43379dba176659bc1313b6bb488ac94cfd6
to gingerbread. Add a new #define IN6_IS_ADDR_ULA, for testing for Universal Local IPv6 Unicast addresses (ULAs). These replace the old site-local IPv6 addresses.
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/netinet/in6.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/include/netinet/in6.h b/libc/include/netinet/in6.h
index 2f5fee1..efd5c0a 100644
--- a/libc/include/netinet/in6.h
+++ b/libc/include/netinet/in6.h
@@ -60,6 +60,10 @@
#define IN6_IS_ADDR_SITELOCAL(a) \
(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+/* RFC 4193. */
+#define IN6_IS_ADDR_ULA(a) \
+ (((a)->s6_addr[0] & 0xfe) == 0xfc)
+
#define IN6_IS_ADDR_MULTICAST(a) \
(((__const uint8_t *) (a))[0] == 0xff)