Start()
Starts the DNS client.
Stop()
Stops the DNS client.
GetDefaultConfig() const
Gets the current default query config being used by DNS client.
SetDefaultConfig()
Sets the default query config.
ResetDefaultConfig()
Resets the default config to the config used when the OpenThread stack starts. When OpenThread stack starts, the default DNS query config is determined from a set of OT config options such as `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_IP6_ADDRESS`, `_DEFAULT_SERVER_PORT`, or `_DEFAULT_RESPONSE_TIMEOUT` etc. (see `config/dns_client.h` for all related config options).
ResolveAddress()
Sends an address resolution DNS query for AAAA (IPv6) record for a given host name. The @p aConfig can be nullptr. In this case the default config (from `GetDefaultConfig()`) will be used as the config for this query. In a non-nullptr @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
ResolveIp4Address()
Sends an address resolution DNS query for A (IPv4) record for a given host name. When a successful response is received, the addresses are returned from @p aCallback as NAT64 IPv6 translated versions of the IPv4 addresses from the query response. The @p aConfig can be nullptr. In this case the default config (from `GetDefaultConfig()`) will be used as the config for this query. In a non-nullptr @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
Browse()
Sends a browse (service instance enumeration) DNS query for a given service name. The @p aConfig can be nullptr. In this case the default config (from `GetDefaultConfig()`) will be used as the config for this query. In a non-nullptr @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
ResolveService()
Starts a DNS service instance resolution for a given service instance. The @p aConfig can be `nullptr`. In this case the default config (from `GetDefaultConfig()`) will be used as the config for this query. In a non-`nullptr` @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
ResolveServiceAndHostAddress()
Starts a DNS service instance resolution for a given service instance, with a potential follow-up host name resolution (if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query). The @p aConfig can be `nullptr`. In this case the default config (from `GetDefaultConfig()`) will be used as the config for this query. In a non-`nullptr` @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
StartQuery()
AllocateQuery()
FreeQuery()
UpdateQuery()
FindMainQuery()
SendQuery()
FinalizeQuery()
FinalizeQuery()
GetQueryTypeAndCallback()
AppendNameFromQuery()
FindQueryById()
HandleUdpReceive()
ProcessResponse()
ParseResponse()
CanFinalizeQuery()
SaveQueryResponse()
PopulateResponse()
PrepareResponseAndFinalize()
HandleTimer()
ReplaceWithIp4Query()
Resolve()
CheckAndUpdateServiceMode() const
RecordServerAsLimitedToSingleQuestion()
RecordServerAsCapableOfMultiQuestions()
ReplaceWithSeparateSrvTxtQueries()
ResolveHostAddressIfNeeded()
UpdateDefaultConfigAddress()
ResolveService()
Starts a DNS service instance resolution for a given service instance. The @p aConfig can be `nullptr`. In this case the default config (from `GetDefaultConfig()`) will be used as the config for this query. In a non-`nullptr` @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.