This function is deprecated for AF_INET6 in favor of theinet_pton6_zone Subroutine .
Library (libc.a)
Item | Description |
---|---|
af | Specifies the family of the address. This can be AF_INET or AF_INET6. |
src | Points to the string being passed in. |
dst | Points to a buffer where the function stores the numeric address. The address is returned in network byte order. |
If successful, one is returned. If unsuccessful, zero is returned if the input is not a valid IPv4 dotted-decimal string or a valid IPv6 address string; or a negative one with the errno global variable set to EAFNOSUPPORT if the af parameter is unknown. The calling application must ensure that the buffer referred to by the dst parameter is large enough to hold the numeric address (4 bytes for AF_INET or 16 bytes for AF_INET6).
If the af parameter is AF_INET, the function accepts a string in the standard IPv4 dotted-decimal form.
ddd.ddd.ddd.ddd
If the af parameter is AF_INET6, then the function accepts a string in one of the standard IPv6 text forms defined in the addressing architecture specification.