Function openthread_sys::otDnsGetNextTxtEntry
source ยท pub unsafe extern "C" fn otDnsGetNextTxtEntry(
aIterator: *mut otDnsTxtEntryIterator,
aEntry: *mut otDnsTxtEntry,
) -> otError
Expand description
Parses the TXT data from an iterator and gets the next TXT record entry (key/value pair).
The @p aIterator MUST be initialized using otDnsInitTxtEntryIterator()
before calling this function and the TXT
data buffer used to initialize the iterator MUST persist and remain unchanged. Otherwise the behavior of this
function is undefined.
If the parsed key string length is smaller than or equal to OT_DNS_TXT_KEY_ITER_MAX_LENGTH
the key string is
returned in mKey
in @p aEntry. But if the key is longer, then mKey
is set to NULL and the entire encoded TXT
entry string is returned in mValue
and mValueLength
.
@param[in] aIterator A pointer to the iterator (MUST NOT be NULL).
@param[out] aEntry A pointer to a otDnsTxtEntry
structure to output the parsed/read entry (MUST NOT be NULL).
@retval OT_ERROR_NONE The next entry was parsed successfully. @p aEntry is updated. @retval OT_ERROR_NOT_FOUND No more entries in the TXT data. @retval OT_ERROR_PARSE The TXT data from @p aIterator is not well-formed.