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
This commit is contained in:
parent
72a23d0560
commit
64b6c43379
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user