Skip to content

Add mDNS support #190

Description

@mrabine

Description:

As part of the DNS transport layer extension, introduce mDNS (Multicast DNS) support by adding a new Mdns protocol class and a BasicDatagramPeer template class implementing the mDNS peer role over multicast UDP.

The Mdns protocol follows the same policy-based design as the existing Dns and Dot protocols, and provides the multicast group addresses and default port (5353) required by RFC 6762.

The BasicDatagramPeer class extends BasicDatagramNameServer and provides the building blocks for full mDNS participation: probing, announcing, browsing, goodbye, and synchronous address/name resolution over multicast. It integrates with the existing Reactor event loop, DnsMessage codec, and Condition-based synchronization infrastructure already used by BasicDatagramResolver.

Acceptance Criteria:

  • Mdns protocol must compile and be accessible via Mdns::v4() and Mdns::v6()
  • bind(int family) must correctly join the multicast group and set the outgoing interface for the given interface name
    probe(), announce(), goodbye(), browse() must send correctly formed mDNS packets to 224.0.0.251:5353 (IPv4) or [ff02::fb]:5353 (IPv6)
  • resolveAddress() and resolveName() must block until a matching response is received or timeout expires, using the existing Condition/Mutex infrastructure
  • onAnnouncement() must be called for all unsolicited QR=1 packets with no matching pending request
    GTest must cover: bind, probe, announce, goodbye, browse, resolveAddress, resolveName, onAnnouncement, onQuery
  • All existing GTest cases in DnsTest and DotTest must continue to pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions