[dnssd] allow Dnssd platform to use native OT mDNS modules (#9944)

Updates the `Dnssd` module to allow it use

- Either the native OT mDNS implementation
- Or use the platform `otPlatDnssd` APIs (delegated to platform)

Also adds `OPENTHREAD_CONFIG_MULTICAST_DNS_AUTO_ENABLE_ON_INFRA_IF`
for mDNS module to be automatically enabled/disabled on the same
infra-if used for border routing based on infra-if state.
This commit is contained in:
Abtin Keshavarzian
2024-04-19 10:20:46 -07:00
committed by GitHub
parent 59572efb4e
commit 4737231d64
18 changed files with 292 additions and 47 deletions
+5 -1
View File
@@ -44,7 +44,7 @@
#if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE && OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE && \
OPENTHREAD_CONFIG_SRP_SERVER_ADVERTISING_PROXY_ENABLE && !OPENTHREAD_CONFIG_TIME_SYNC_ENABLE && \
!OPENTHREAD_PLATFORM_POSIX
!OPENTHREAD_PLATFORM_POSIX && OPENTHREAD_CONFIG_PLATFORM_DNSSD_ALLOW_RUN_TIME_SELECTION
#define ENABLE_ADV_PROXY_TEST 1
#else
#define ENABLE_ADV_PROXY_TEST 0
@@ -543,6 +543,10 @@ void InitTest(void)
SuccessOrQuit(otIp6SetEnabled(sInstance, true));
SuccessOrQuit(otThreadSetEnabled(sInstance, true));
// Configure the `Dnssd` module to use `otPlatDnssd` APIs.
sInstance->Get<Dnssd>().SetUseNativeMdns(false);
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Ensure device starts as leader.