Converts IPv4 and IPv6 addresses from text to binary form.
- Parameters
-
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. |
- Returns
- This function returns:
- FNET_OK if no error occurs.
- FNET_ERR if the string in the
str
parameter does not contain a legitimate Internet address.
- See also
- fnet_inet_ntop()
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.
- Note
- fnet_inet_pton() extends the fnet_inet_aton() function to support multiple address families.
fnet_inet_aton() is now considered to be deprecated.