ot::Dns::Client::ServiceResponse::GetServiceInfo() const method
Gets info for a service instance from a DNS service instance resolution response. MUST only be used from `ServiceCallback`. - If no matching SRV record is found, `kErrorNotFound` is returned. - If a matching SRV record is found, @p aServiceInfo is updated and `kErrorNone` is returned. - If no matching TXT record is found, `mTxtDataSize` in @p aServiceInfo is set to zero. - If no matching AAAA record is found, `mHostAddress is set to all zero or unspecified address. - If there are multiple AAAA records for the host name, `mHostAddress` is set to the first one. The other addresses can be retrieved using `GetHostAddress()` method.
Arguments
aServiceInfo
A `ServiceInfo` to output the service instance information
Return value
kErrorNone The service instance info was read. @p aServiceInfo is updated. kErrorNotFound Could not find a matching SRV record. kErrorNoBufs The host name and/or TXT data could not fit in the given buffers. kErrorParse Could not parse the records in the @p aResponse.
ot::Dns::Client::ServiceResponse::GetServiceInfo() const calls 5 functions:
![]()
ot::Dns::Client::ServiceResponse::GetServiceInfo() const
ot::Dns::Client::ServiceResponse::GetServiceInfo() const reads 15 variables and writes 1 variable:
![]()
ot::Dns::Client::ServiceResponse::GetServiceInfo() const