www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - TCP/IP API


inet_ntop

Convert an IP address from binary to standard text.

int inet_ntop( int af,
               const void far * source_ptr,
               char far * dest_ptr,int max);

Parameters

af

Address family, AF_INET (for IPv4) or AF_INET6 (for IPv6)

src

Input Parameter:   Pointer to the IP address in binary to be converted.

dst

Output Parameter:   Storage provided by the caller which will receive the converted IP address text.   This text will be a null terminated string.

max

Size in bytes, of the provided buffer at dst.   This string buffer should provide 16 bytes for AF_INET and 46 Bytes for AF_INET6.

Return Value

1:   Success, the dst buffer contains the converted IP address string.

0:   Input at src was not a valid IP address of indicated type (IPv4 or IPv6).

-1: The af parameter was set to an invalid address family.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    n/an/an/aV0.90

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document