ot::Dns::Client::ResolveIp4Address() method
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.
Arguments
aHostName
The host name for which to query the address (MUST NOT be `nullptr`).
aCallback
A callback function pointer to report the result of query.
aContext
A pointer to arbitrary context information passed to @p aCallback.
aConfig
The config to use for this query.
Return value
kErrorNone Successfully sent DNS query. kErrorNoBufs Failed to allocate retransmission data. kErrorInvalidArgs The host name is not valid format or NAT64 is not enabled in config. kErrorInvalidState Cannot send query since Thread interface is not up, or there is no NAT64 prefix.
ot::Dns::Client::ResolveIp4Address() calls 1 function:
![]()
ot::Dns::Client::ResolveIp4Address()
ot::Dns::Client::ResolveIp4Address() reads 2 variables and writes 3 variables:
![]()
ot::Dns::Client::ResolveIp4Address()