mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
c2de9f646a
This commit enhances the TREL module to manage mDNS/DNSSD service registration and peer discovery (browse and resolving for TREL services). This feature can be controlled through `OPENTHREAD_CONFIG_TREL_MANAGE_DNSSD_ENABLE` (and/or the CMake option `OT_TREL_MANAGE_DNSSD`). When enabled, TREL will utilize the `Dnssd` module, which provides mDNS-related APIs. This can be tied to OpenThread's native mDNS implementation or to `otPlatDnssd` (i.e., provided by the platform layer). This commit also adds support for the TREL platform in the `Nexus` test framework and uses this to add a detailed `test_trel` case. This test covers basic TREL peer discovery and operation, along with specific scenarios such as peer removal delay, delayed mDNS start, TREL service name conflict resolution, host address changes, and supporting multiple services on the same host (while unlikely in actual deployments, this can be useful for testing and simulation where a single machine may act as multiple Thread nodes, thus advertising multiple TREL services from the same hostname. This is explicitly supported by the implementation and covered in the tests).