Convert an IPv4 address in host-order into an IPv4 dotted-decimal notation ASCII string.
Files
net_ascii.h/net_ascii.c
Prototype
Code Block |
---|
void NetASCII_IPv4_to_Str(NET_IPv4_ADDR addr_ip,
CPU_CHAR *p_addr_ip_ascii,
CPU_BOOLEAN lead_zeros,
NET_ERR *p_err); |
Arguments
addr_ip
IPv4 address (in host-order).
...
NET_ASCII_ERR_NONE
NET_ERR_FAULT_NULL_PTR
NET_ASCII_ERR_INVALID_CHAR_LEN
Returned Value
None.
Required Configuration
Available only if IPv4 is enabled, see IPv4 Layer Configuration
Notes / Warnings
RFC 1983 states that “dotted-decimal notation... refers [to] IPv4 addresses of the form A.B.C.D; where each letter represents, in decimal, one byte of a four-byte IPv4 address.” In other words, the dotted-decimal notation separates four decimal byte values by the dot, or period, character (‘.’). Each decimal value represents one byte of the IPv4 address starting with the most significant byte in network order.
...