mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[mdns] add native mDNS support in OT (#9797)
This commit introduces native mDNS support within the OpenThread stack, implementing RFC 6762 compliant registration of hosts, services, and keys. It supports the following functionalities: - Sending probes to claim names. - Sending announcements on initial registration and changes. - Sending "goodbye" announcements when unregistered or upon record removal. - Negative responses (NSEC). - Support for service sub-types and their addition/removal. - Support for `_services._dns-sd._udp` queries (all service types). - Responding to queries (including "QU" questions). - Delay mechanism when responding to multi-question query messages, ensuring unique answers. - Providing extra records in the Additional Data section if not already in the Answer section (e.g., on a PTR query, include SRV and host AAAA addresses). - Implementing Known-Answer Suppression. - Supporting multi-packet queries with known answers in follow-up messages. - Rate-limiting record multicasts (once per second). - Rate-limiting probe responses (once per 250ms). - Detecting conflicts after probes. - Limiting the size of emitted responses or probes, breaking into multiple messages if necessary. - Detecting self originating messages (sent by mDNS module). - Support for service browser. - Support for service resolvers (SRV and TXT records) and IPv4/IPv6 address resolvers for hostnames. - Introduces smart cache management: - Passively caches service records for active browsers. - Passively caches address records for active service resolvers. - Enables multiple simultaneous browsers/resolvers for the same service/host. This commit introduces public `otMdns` OpenThread APIs and related CLI commands for the mDNS module. For platform abstraction, `otPlatMdns` APIs are defined in `mdns_socket.h` (e.g., to send or receive mDNS messages): - An implementation of the platform APIs is provided for posix. - Also under the simulation platform, a simplified implementation of the `otPlatMdns` APIs is provided (intended for testing). This commit also adds a detailed `test_mdns` unit test, validating various functionalities and covering potential edge cases.
This commit is contained in:
committed by
GitHub
parent
6de5cd8256
commit
bf41332061
@@ -58,6 +58,7 @@
|
||||
* @defgroup api-dnssd-server DNS-SD Server
|
||||
* @defgroup api-icmp6 ICMPv6
|
||||
* @defgroup api-ip6 IPv6
|
||||
* @defgroup api-mdns Multicast DNS
|
||||
* @defgroup api-nat64 NAT64
|
||||
* @defgroup api-srp SRP
|
||||
* @defgroup api-ping-sender Ping Sender
|
||||
@@ -181,6 +182,7 @@
|
||||
* @defgroup plat-memory Memory
|
||||
* @defgroup plat-messagepool Message Pool
|
||||
* @defgroup plat-misc Miscellaneous
|
||||
* @defgroup plat-mdns Multicast DNS
|
||||
* @defgroup plat-multipan Multipan
|
||||
* @defgroup plat-otns Network Simulator
|
||||
* @defgroup plat-radio Radio
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
* @defgroup config-mesh-forwarder Mesh Forwarder
|
||||
* @defgroup config-misc Miscellaneous Constants
|
||||
* @defgroup config-mle MLE Service
|
||||
* @defgroup config-mdns Multicast DNS
|
||||
* @defgroup config-nat64 NAT64
|
||||
* @defgroup config-netdata-publisher Network Data Publisher
|
||||
* @defgroup config-network-diagnostic Network Diagnostics
|
||||
|
||||
Reference in New Issue
Block a user