www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


getMailHosts

Use this function to determine the mail host(s) of a domain, i.e. host accepting internet mail for the domain.
The operating system manages a DNS cache. Thus it is save to call this function each time you need the respective mail host. The function will not issue another request to the name server before the cached mail host entry has expired.

short getMailHosts( const char far *domainName,

unsigned char nHosts,
DnsMailHost far *hosts );

Parameters

domainName

Domain name to find mail hosts for (e.g. "beck-ipc.com")

nHosts

Maximum number of host names that the function is to return

hosts

Pointer to an array of type DnsMailHost where domain name and preference value of the mail hosts will be stored; The array must be large enough to hold the number of entries passed in nHosts.

Return Value

Number of mail hosts actually stored 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_MAIL_HOSTS 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