ot::Dns::Client::ServiceResponse::GetHostAddress() const method
Gets the host IPv6 address from a DNS service instance resolution response. MUST only be used from `ServiceCallback`. The response can include zero or more IPv6 address records. @p aIndex can be used to iterate through the list of addresses. Index zero gets the first address and so on. When we reach end of the list, this method returns `kErrorNotFound`.
Arguments
aHostName
The host name to get the address (MUST NOT be `nullptr`).
aIndex
The address record index to retrieve.
aAddress
A reference to an IPv6 address to output the address.
aTtl
A reference to a `uint32_t` to output TTL for the address.
Return value
kErrorNone The address was read successfully. kErrorNotFound No address record for @p aHostname at @p aIndex. kErrorParse Could not parse the records.
ot::Dns::Client::ServiceResponse::GetHostAddress() const calls 3 functions:
![]()
ot::Dns::Client::ServiceResponse::GetHostAddress() const
ot::Dns::Client::ServiceResponse::GetHostAddress() const reads 8 variables:
![]()
ot::Dns::Client::ServiceResponse::GetHostAddress() const