nRF5 SDK for Thread v0.9.0
Data Structures | Macros | Typedefs
DNS

This module includes functions that control DNS communication. More...

Data Structures

struct  otDnsQuery
 

Macros

#define OT_DNS_MAX_HOSTNAME_LENGTH   62
 Maximum allowed hostname length (maximum label size - 1 for compression).
 
#define OT_DNS_DEFAULT_DNS_SERVER_IP   "2001:4860:4860::8888"
 Defines default DNS Server address - Google DNS.
 
#define OT_DNS_DEFAULT_DNS_SERVER_PORT   53
 Defines default DNS Server port.
 

Typedefs

typedef struct otDnsQuery otDnsQuery
 
typedef void(* otDnsResponseHandler )(void *aContext, const char *aHostname, otIp6Address *aAddress, uint32_t aTtl, ThreadError aResult)
 

Detailed Description

This module includes functions that control DNS communication.

Typedef Documentation

typedef struct otDnsQuery otDnsQuery

This structure implements DNS Query parameters.

typedef void(* otDnsResponseHandler)(void *aContext, const char *aHostname, otIp6Address *aAddress, uint32_t aTtl, ThreadError aResult)

This function pointer is called when a DNS response is received.

Parameters
[in]aContextA pointer to application-specific context.
[in]aHostnameIdentifies hostname related with DNS response.
[in]aAddressA pointer to the IPv6 address received in DNS response. May be null.
[in]aTtlSpecifies the maximum time in seconds that the resource record may be cached.
[in]aResultA result of the DNS transaction.
Return values
kThreadError_NoneA response was received successfully and IPv6 address is provided in aAddress.
kThreadError_AbortA DNS transaction was aborted by stack.
kThreadError_ResponseTimeoutNo DNS response has been received within timeout.
kThreadError_NotFoundA response was received but no IPv6 address has been found.
kThreadError_FailedA response was received but status code is different than success.

Documentation feedback | Developer Zone | Subscribe | Updated