[dnssd] support forwarding DNS queries to platform upstream (#8668)

This commit adds a set of APsI for forwarding a DNS query to the
upstream DNS server via platform API and a posix platform
implementation.

This feature is disabled by default, and this PR adds a `dns server
upstream {enable|disable}` command CLI for enabling and disabling this
feature.

Tests will be added after ot-br-posix adds related support.
This commit is contained in:
Song GUO
2023-02-21 21:15:03 -08:00
committed by GitHub
parent c311b85cc9
commit 852d076f00
28 changed files with 1038 additions and 16 deletions
+14
View File
@@ -505,4 +505,18 @@ otError otPlatUdpLeaveMulticastGroup(otUdpSocket *aUdpSocket,
}
#endif // OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE
#if OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE
void otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, const otMessage *aQuery)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aTxn);
OT_UNUSED_VARIABLE(aQuery);
}
void otPlatDnsCancelUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn)
{
otPlatDnsUpstreamQueryDone(aInstance, aTxn, nullptr);
}
#endif
} // extern "C"