1.1.24.18 inet_pton
C
int inet_pton(int af, const char *s, void *a0)
Description
Convert IPv4 and IPv6 addresses from text to binary form.
Parameters
Parameters | Description |
---|---|
af | Address family, either AF_INET or AF_INET6 . |
s | Pointer to input IP address string. |
a0 | Pointer to output binary form IP address. |
Returns
-1 - Error,
errno
is set.0 - No valid IP address string found.
1 - Success.
Remarks
errno | Description |
---|---|
EAFNOSUPPORT | af was not a valid address family. |