mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
1e61811e70
The same external route or on-mesh prefix can be registered by different devices with different flags (e.g., different preference level). This info is stored in network data as part of the BorderRouterEntry TLV. This commit changes the methods `GetNextOnMeshPrefix()` and `GetNextExternalRoute()` to ensure that different entries corresponding to the same prefix are provided separately when iterating over all entries (i.e., without giving a specific RLOC16). To implement this the `otNetworkDataIterator` is changed to track both the index into the `mTlvs` buffer and the entry index. This commit also appends an RLOC16 field to the struct packing format of `SPINEL_PROP_THREAD_ON_MESH_NETS and `OFF_MESH_ROUTES` spinel properties and updates the implementation and documentation accordingly.