Embedded TCP/IP stack
4.7.0
|
fnet_return_t fnet_inet_pton | ( | fnet_address_family_t | family, |
const fnet_char_t * | str, | ||
void * | addr, | ||
fnet_size_t | addr_len | ||
) |
Converts IPv4 and IPv6 addresses from text to binary form.
family | The address family (AF_INET or AF_INET6). |
str | Null-terminated character string that contains the text representation of the IP address to convert to numeric binary form. |
addr | Pointer to a buffer in which to store the numeric binary representation of the IP address str . |
addr_len | Length of the addr buffer. |
This function converts the character string src
into a network address structure in the addr_family
address family, then copies the network address structure to the addr
buffer.