nn::socket::InetNtoP Function

Syntax

const char * InetNtoP(
     int af,
     const void * src,
     char * dst,
     unsigned len
);

Arguments

Name Description
in af Specifies the address family of the host address to be converted.AF_INET
in src Specifies a pointer to a structure holding a host address in numeric format. When using AF_INET, specify a pointer to an InAddr structure.
in dst Specifies a pointer to the buffer that gets the string in standard text format. When using AF_INET, the standard text format is dot-decimal notation.
in len Specifies the size in bytes of the buffer specified in dst. When using AF_INET, prepare a buffer sized to the maximum length of an IPv4 host address in dot-decimal notation (INET_ADDRSTRLEN).

Return Values

On success, returns a pointer to the string resulting from conversion. The string instance is the buffer specified in dst. On failure, returns NULL.

Description

Converts a host address given in numeric format to a string representing the address in standard text format.

Can be used even if Initialize has not been called.

See Also


Revision History

2010/06/14
Initial version.

CONFIDENTIAL