pub unsafe extern "C" fn otDnsBrowseResponseGetServiceInstance(
aResponse: *const otDnsBrowseResponse,
aIndex: u16,
aLabelBuffer: *mut c_char,
aLabelBufferSize: u8,
) -> otError
Expand description
Gets a service instance associated with a DNS browse (service instance enumeration) response.
MUST only be used from otDnsBrowseCallback
.
The response may include multiple service instance records. @p aIndex can be used to iterate through the list. Index
zero gives the first record. When we reach end of the list, OT_ERROR_NOT_FOUND
is returned.
Note that this function gets the service instance label and not the full service instance name which is of the form
<Instance>.<Service>.<Domain>
.
@param[in] aResponse A pointer to the response. @param[in] aIndex The service instance record index to retrieve. @param[out] aLabelBuffer A buffer to char array to output the service instance label (MUST NOT be NULL). @param[in] aLabelBufferSize The size of @p aLabelBuffer.
@retval OT_ERROR_NONE The service instance was read successfully. @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer. @retval OT_ERROR_NOT_FOUND No service instance record in @p aResponse at @p aIndex. @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse.