diff options
author | Steinar H. Gunderson <sesse@google.com> | 2010-12-20 11:33:31 +0100 |
---|---|---|
committer | Steinar H. Gunderson <sesse@google.com> | 2011-01-05 13:55:40 +0100 |
commit | 64b6c43379dba176659bc1313b6bb488ac94cfd6 (patch) | |
tree | 0144bb9ce62e5ca658adb1fc39d83ecf88a18595 /libc/include/netinet | |
parent | 72a23d056099e7aff56d4509f3e6c9284a42363a (diff) | |
download | bionic-64b6c43379dba176659bc1313b6bb488ac94cfd6.zip bionic-64b6c43379dba176659bc1313b6bb488ac94cfd6.tar.gz bionic-64b6c43379dba176659bc1313b6bb488ac94cfd6.tar.bz2 |
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.
Change-Id: I2656423764569d07b92b8eb8fe6dcad6eba5b0bb
Diffstat (limited to 'libc/include/netinet')
-rw-r--r-- | libc/include/netinet/in6.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/include/netinet/in6.h b/libc/include/netinet/in6.h index c7a6374..580a510 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) |