mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 05:10:25 +00:00
14ef4e4082
This commit adds a new public `ot` API for parsing an encoded DNS TXT record data into `TxtEntry` key/value pairs. It also updates the TXT data iterator model used for going through all TXT entries. The new iterator definition provides a small buffer to store the key string. This helps simplify the definition of `otDnsTxtEntry` to use null-terminated C string for the key. The new parsing APIs are used in CLI module. This commit also fixes an issue with `TxtEntry::AppendEntries()` using incorrect value for the key length. Finally, this commit adds a test covering the behavior of all `TxtEntry` related methods (encoding and parsing TXT data) in the unit test `test_dns`.