Embedded TCP/IP stack
4.7.0
|
fnet_char_t* fnet_inet_ntop | ( | fnet_address_family_t | family, |
const void * | addr, | ||
fnet_char_t * | str, | ||
fnet_size_t | str_len | ||
) |
Converts IPv4 or IPv6 address from binary to text form.
family | The address family (AF_INET or AF_INET6). |
addr | Pointer to the IP address in network-byte order. |
str | Pointer to a buffer in which to store the NULL-terminated string representation of the IP address. For an IPv4 address, the str buffer must be at least 16 bytes long (FNET_IP4_ADDR_STR_SIZE).For an IPv6 address, the str buffer must be at least 46 bytes long (FNET_IP6_ADDR_STR_SIZE). |
str_len | Length of the str buffer. |
str
), if no error occurs,This function converts the network address structure, specified by the addr
parameter, in the addr_family
address family into a character string. The resulting string is copied to the buffer pointed to by str
.