ot::Dns::TxtEntry::Iterator::GetNextEntry() method
Parses the TXT data from the `Iterator` and gets the next TXT record entry (key/value pair). The `Iterator` instance MUST be initialized using `Init()` before calling this method and the TXT data buffer used to initialize the iterator MUST persist and remain unchanged. If the parsed key string length is smaller than or equal to `kMaxIterKeyLength` the key string is returned in `mKey` in @p aEntry. But if the key is longer, then `mKey` is set to `nullptr` the entire encoded TXT entry is returned in `mValue` and `mValueLength`.
Arguments
aEntry
A reference to a `TxtEntry` to output the parsed/read entry.
Return value
kErrorNone The next entry was parsed successfully. @p aEntry is updated. kErrorNotFound No more entries in TXT data. kErrorParse The TXT data from `Iterator` is not well-formed.
![]()
while ((error = iterator.GetNextEntry(entry)) == kErrorNone)
ot::Dns::TxtEntry::Iterator::GetNextEntry() is called by 1 function and calls 5 functions:
![]()
ot::Dns::TxtEntry::Iterator::GetNextEntry()
ot::Dns::TxtEntry::Iterator::GetNextEntry() reads 7 variables and writes 3 variables:
![]()
ot::Dns::TxtEntry::Iterator::GetNextEntry()