pub unsafe extern "C" fn otDnsServiceResponseGetHostAddress(
    aResponse: *const otDnsServiceResponse,
    aHostName: *const c_char,
    aIndex: u16,
    aAddress: *mut otIp6Address,
    aTtl: *mut u32
) -> otError
Expand description

Gets the host IPv6 address from a DNS service instance resolution response.

MUST only be used from otDnsServiceCallback.

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, OT_ERROR_NOT_FOUND is returned.

@param[in] aResponse A pointer to the response. @param[in] aHostName The host name to get the address (MUST NOT be NULL). @param[in] aIndex The address record index to retrieve. @param[out] aAddress A pointer to a IPv6 address to output the address (MUST NOT be NULL). @param[out] aTtl A pointer to an uint32_t to output TTL for the address. It can be NULL if caller does not want to get the TTL.

@retval OT_ERROR_NONE The address was read successfully. @retval OT_ERROR_NOT_FOUND No address record for @p aHostname in @p aResponse at @p aIndex. @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.