[neighbor-table] add 'NeighborTable' class (#5354)

This commit adds a `NeighborTable` class which provides helper methods
dealing with neighbor, e.g., finding a `Neighbor` (i.e., a `Child`
from `ChildTable`, a `Router` from `RouterTable`, or parent or parent
candidate entries), or iterating through all neighbors.  These methods
use the newly added `Neighbor::AddressMacther` to simplify the
implementation. The `NeighborTable` methods replace the similar ones
in `Mle` and `MleRouter`.
This commit is contained in:
Abtin Keshavarzian
2020-08-10 09:07:52 -07:00
committed by Jonathan Hui
parent 6c75a53bdc
commit 36b9ecbf11
19 changed files with 479 additions and 416 deletions
+1 -1
View File
@@ -304,7 +304,7 @@ otError otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterato
OT_ASSERT((aInfo != nullptr) && (aIterator != nullptr));
return instance.Get<Mle::MleRouter>().GetNextNeighborInfo(*aIterator, *static_cast<Neighbor::Info *>(aInfo));
return instance.Get<NeighborTable>().GetNextNeighborInfo(*aIterator, *static_cast<Neighbor::Info *>(aInfo));
}
otDeviceRole otThreadGetDeviceRole(otInstance *aInstance)