5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches

Functions

wiced_result_t wiced_hostname_lookup (const char *hostname, wiced_ip_address_t *address, uint32_t timeout_ms, wiced_interface_t interface)
 
wiced_result_t wiced_hostname_lookup_list (const char *hostname, wiced_resolved_ip_address_list *addr_list, wiced_dns_lookup_address_type_t type, uint32_t timeout_ms, wiced_interface_t interface)
 

Detailed Description

Functions for DNS (Domain Name System) lookups

Function Documentation

◆ wiced_hostname_lookup()

wiced_result_t wiced_hostname_lookup ( const char * hostname,
wiced_ip_address_t * address,
uint32_t timeout_ms,
wiced_interface_t interface )

Looks up a hostname via DNS

Sends a DNS query to find an IP address for a given hostname string.

Note
: hostname is permitted to be in dotted quad form
: The returned IP may be IPv4 or IPv6( IPv4 will take precedence when both IPv4 and IPv6 addresses are found )
Parameters
[in]hostname: A null-terminated string containing the hostname to be looked-up
[out]address: A pointer to an IP address that will receive the resolved address
[in]timeout_ms: Timeout value in milliseconds
[in]interface: Network interface to use for the look-up (see wiced_constants.h).
Returns
wiced_result_t

◆ wiced_hostname_lookup_list()

wiced_result_t wiced_hostname_lookup_list ( const char * hostname,
wiced_resolved_ip_address_list * addr_list,
wiced_dns_lookup_address_type_t type,
uint32_t timeout_ms,
wiced_interface_t interface )

Looks up a hostname via DNS

Sends a DNS query to find one or more IP addresses for a given hostname string. Application specifies how many addresses it expects using 'count' field of wiced_resolved_ip_address_list. Library may change 'count' based on how many different IP-addresses it actually received as DNS response.

Note
: hostname is permitted to be in dotted quad form
Parameters
[in]hostname: A null-terminated string containing the hostname to be looked-up
[out]addr_list: A pointer to an Resolved IP address list structure that will receive one or more resolved addresses.
[in]type: Specifies the type of IP addresses which should be returned in the list
[in]timeout_ms: Timeout value in milliseconds
[in]interface: Network interface to use for the look-up (see wiced_constants.h).
Returns
wiced_result_t