www.beck-ipc.com

@CHIP-RTOS C Library - 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 binary IP address in network byte order to be converted to ASCII text.

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

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

-1:   Failure, which could be due to invalid address family value af, inadequate buffer size specified by max, or NULL pointer for either src or dst parameters.

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

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV0.90V1.00

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


End of document