|const char * inet_ntop||(|
|const void * src,|
|char * dst,|
This function supports both IPv4 and IPv6. Refer to [RFC 2553]. Converts an IP address from the binary format to the standard text presentation format.
- address family of the IP address specified by src. This is either AF_INET (IPv4) or AF_INET6 (IPv6).
- Points to the IP address in binary format.
- Points to a buffer where the function will store the resulting text string.
- Size (in bytes) of the buffer pointed to by dst. For IPv6 addresses, the buffer must be at least 46-bytes (i.e. INET6_ADDRSTRLEN). For IPv4 addresses, the buffer must be at least 16-bytes (i.e. INET_ADDRSTRLEN).
- Failed. Call tfGetSocketError() for the specific error code.
- != NULL
- Pointer to the converted IP address in standard text presentation format.
If inet_ntop fails, the error code can be retrieved with tfGetSocketError() which will return one of the following:
- af was set to an invalid value for address family; valid values are AF_INET and AF_INET6.
- The size of the result buffer (i.e. size) is inadequate.