NetASCII_IPv6_to_Str
Convert an IPv6 address into an IPv6 colon-decimal notation ASCII string.
Files
net_ascii.h/net_ascii.c
Prototype
void NetASCII_IPv6_to_Str(NET_IPv6_ADDR *p_addr_ip, CPU_CHAR *p_addr_ip_ascii, CPU_BOOLEAN hex_lower_case, CPU_BOOLEAN lead_zeros, NET_ERR *p_err);
Arguments
p_addr_ip
Pointer to IPv6 address.
p_addr_ip_ascii
Pointer to a memory buffer of size greater than or equal to NET_ASCII_LEN_MAX_ADDR_IPv6
bytes to receive the IPv6 address string.
hex_lower_case
Select if IPv6 address hexadecimal ASCII representation will be in lower or in upper case.
lead_zeros
Select formatting the IPv6 address string with leading zeros (‘0’) prior to the first non-zero digit in each IPv6 address hexadecimal section of 2 bytes.
DEF_NO
Do not prepend leading zeros to each IPv6 address 16 bits sections.
DEF_YES
Prepend leading zeros to each IPv6 address 16 bits sections.
p_err
Pointer to variable that will receive the return error code from this function:
NET_ASCII_ERR_NONE
NET_ERR_FAULT_NULL_PTR
NET_ASCII_ERR_INVALID_CHAR_LEN
Returned Value
None.
Required Configuration
Available only if IPv6 is enabled, see IPv6 Layer Configuration
Notes / Warnings
IPv6 addresses are formed of 128 bits. They are represented as a sequence of 8 series of 16 bits, each represented in a hexadecimal notation and divided by a common. Example : FE80:1111:1111:1111:1111:1111:1111:1111.
Please refer to RFC 4291 for more details on IPv6 addressing.