SOC_InetNtoP

C Specification

#include <nitroWiFi/soc.h>
#define SOC_INET_ADDRSTRLEN    16
const char* SOC_InetNtoP ( int af, const void* src, char* dst, unsigned len );

Arguments

af Address family (must be SOC_PF_INET)
src Pointer to buffer that stores IPv4 address.
dst Pointer to buffer that stores the result as text string. (Example: ddd.ddd.ddd.ddd)
len dst buffer size. len should be large enough to keep the text string. (With SOC_PF_INET, it should be INET_ADDRSTRLEN bytes)

Return Values

If conversion is successful, returns a pointer to the buffer that stores the text string. If conversion is unsuccessful, returns NULL.

Description

This function converts IP addresses from binary addresses to dot-decimal notation character strings.

See Also

SOC_InetAtoN, SOC_InetNtoA, SOC_InetPtoN

Revision History

09/13/2005 Initial version.