mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 08:07:47 +00:00
This change moves the management of the infrastructure interface state out of the `RoutingManager` and centralizes it within the `InfraIf` class. This makes `InfraIf` a more self-contained component and simplifies the logic in `RoutingManager`. The `RoutingManager` now depends on an initialized `InfraIf`. Its `Init()` method is simplified and is now called from `InfraIf::Init()`. The public API `otBorderRoutingInit()` now directly initializes the `InfraIf`. The `InfraIf::Init()` method is updated to support re-initialization, allowing to switch to a new interface. When switching, it ensures that components on the previous interface are stopped before restarting on the new one.