www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


getHostByName2

This function can be used to find the IPv6 addresses of a remote host associated to its domain name via the Domain Name Service (DNS).
The operating system manages a DNS cache. Thus it is save to call this function each time you want to connect to the respective domain. The function will not issue another request to the name server before the cached address has expired.

short getHostByName2( const char far *domainName,

unsigned char nAddresses,
struct in6_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 in6_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

Comments

DNS queries consume a relative large part of your task's stack.

See Also

RTOS API

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

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.05V1.00

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