NetIPv6_IsAddrSiteLocal
Description
Validate an IPv6 address as a site-local address.
Files
net_ipv6.h/net_ipv6.c
Prototype
CPU_BOOLEAN NetIPv6_IsAddrSiteLocal(NET_IPv6_ADDR *p_addr);
Arguments
p_addr
Pointer to IPv6 address to validate.
Returned Value
DEF_YES
, if IPv6 address is a site-local IPv6 address.DEF_NO
, otherwise.
Required Configuration
None.
Notes / Warnings
An IPv6 Site-Local address is defined as having the following format :
10 bits | 54 bits | 64 bits |
---|---|---|
1111111011 | subnet ID | Interface ID |
In text representation, it corresponds to the following format :
FEC0:AAAA:BBBB:CCCC:DDDD:aaaa.bbbb.cccc.dddd where AAAA.BBBB.CCCC.DDDD is the subnet ID and aaaa.bbbb.cccc.dddd is the interface ID.
Refer to RFC #4291, Section 2.5.7 for more details.