@CHIP-RTOS C Library - TCP/IP API
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).
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 getHostByName( const char far *domainName,
unsigned char nAddresses,
struct in_addr far *addresses );
- Domain name of the host (e.g. "www.beck-ipc.com")
- Maximum number of IP addresses that the function is to return
- 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.
- Number of addresses actually stored in the given array or negative
- DNS queries consume a relative large part of your task's stack.
- This library function invokes a RTOS software interrupt.
Refer to the RTOS API function
for more details.
Supported since or modified in @CHIP-RTOS version
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document