mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
a0c332b2a2
This commit introduces the `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE` configuration and the `otIp6Init()` API. When enabled, this feature allows the OpenThread stack to use externally provided memory buffers for its external unicast and multicast address pools. By decoupling the pool sizes from build-time configurations (`OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS` and `OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS`), the OpenThread stack can be compiled as a generic library without hardcoding the address pool sizes. It delegates the memory allocation and configuration to the application layer at run-time. When the feature is enabled, `otIp6Init()` must be invoked to initialize the `Netif` address pools before calling `otIp6SetEnabled()`.