www.beck-ipc.com

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


getHostByName

This function can be used to find the IPv4 addresses of a remote host associated to its domain name via the Domain Name Service (DNS).

short getHostByName( const char far *domainName,

unsigned char nAddresses,
struct in_addr far *addresses );

Parameters

domainName

Domain name of the host (e.g. "www.beck-ipc.com")

nAddresses

Maximum number of IP addresses that the function is to return

addresses

Pointer to an array of type struct in_addr where the function is to store the found IP addresses; must be large enough to hold the number of IP addresses stated in nAddresses.

Return Value

Number of addresses actually stored in the given array or negative error code

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to the RTOS API function DNS_GET_HOST_BY_NAME for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    n/an/an/aV1.05

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.04

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


End of document