Apple Open Source DNS Service Discovery Collection

repository·main·Indexed 18 days ago

https://github.com/apple-oss-distributions/mdnsresponder

A suite of tools, daemons, and libraries for implementing DNS Service Discovery (DNS-SD) and multicast DNS (mDNS). It includes the mDNSResponder daemon, which acts as a DNS stub resolver, mDNS resolver, and mDNS publisher. The collection also features the dns-sd command-line tool, the DNSSD Client Library, and various proxies for Service Registration Protocol (SRP), DNS Push, and Thread mesh networks.

Tokens
17.5K
Snippets
32
Records
91
Agent score
64%

What's inside mdnsresponder

  1. Overview of Apple's DNS Service Discovery Collection

    main
    Apple's DNS Service Discovery Collection is a suite of daemons, tools, and libraries designed for deploying and using DNS Service Discovery. It includes components for mDNS (multicast DNS) resolution, service registration via SRP (Service Registration Protocol), and proxying services across different network types (like Thread mesh networks or infrastructure networks).
  2. Overview of the OpenThread Stub Network Border Router (BR)

    main

    The OpenThread Stub Network Border Router (BR) is a system composed of three primary components:

    1. OpenThread: The core Thread protocol implementation.
    2. Service Registration Protocol (SRP) Advertising Proxy: Handles service advertisement.
    3. OpenThread Stub Network Border Router management system: Currently integrated into the Advertising Proxy.

    Connectivity

    • Infrastructure Networks: The BR connects to infrastructure networks via Ethernet and/or Wi-Fi. Additional connections can be added using USB Ethernet/Wi-Fi adapters or VLANs.
    • Thread Mesh: The BR requires at least one connected Thread device to form a mesh. Without a Thread device, the BR will not advertise routes or start the SRP Advertising Proxy.

    Supported Platforms

    • Raspberry Pi 4 (Raspbian Buster): The currently verified platform.
    • Linux (OpenWRT, etc.): Possible, but not explicitly documented for this specific setup.
    • BSD: No installations have been attempted.
  3. Use the dns_sd.h APIs for DNS Service Discovery

    main

    The mdnsresponder project provides a variety of client implementations that demonstrate how to use the /usr/include/dns_sd.h APIs. These APIs allow developers to perform DNS Service Discovery (DNS-SD) tasks, such as browsing for services or registering services on a network.

    Clients provided in this repository include:

    • dns-sd: A command-line tool that can be built for multiple platforms (OS X via XCode or Make, and POSIX via Make).
    • DNS Service Browser: A graphical client for OS X (requires Objective C and Cocoa).
    • DNS Service Registration: A graphical client for OS X (requires Objective C and Cocoa).

    Developers can use these clients as reference implementations to understand how to integrate DNS-SD capabilities into their own applications using the dns_sd.h header.

  4. Use the DNSSD Client Library for DNS-SD operations

    main

    The DNSSD client library enables applications to interact with the mDNSResponder daemon to perform DNS-SD (DNS Service Discovery) operations. You can use this library to:

    • Publish services: Advertise your application's services to the local network using DNS-SD.
    • Browse services: Discover and list services being advertised by other devices on the local network.
    • Resolve services: Once a service has been discovered/selected, use the library to resolve its specific details (such as IP addresses and ports).
  5. What is the mdnsNSP NameSpace Provider?

    main

    The mdnsNSP is a NameSpace Provider (NSP) for Windows. It hooks into the standard Windows name resolution infrastructure, allowing any software that uses standard Windows APIs to resolve names via DNS-SD (DNS Service Discovery).

    Once installed, services advertised via DNS-SD on the local network (e.g., http://computer.local./) will resolve correctly using standard Windows tools like Internet Explorer or other applications relying on Winsock name resolution.

  6. What is the mDNS Responder Daemon?

    main

    The mDNSResponder daemon serves three primary roles:

    1. DNS Stub Resolver: Performs DNS resolution for non-local queries.
    2. mDNS Resolver: Resolves queries in the special .local domain using multicast DNS.
    3. mDNS Publisher: Monitors multicast traffic on port 5353 to track advertised services and publishes its own mDNS information.

    It is used as the system resolver on macOS and can be deployed on Linux and BSD platforms.

  7. What is the DNSSD Discovery Proxy?

    main

    The DNSSD Discovery Proxy implements IETF DNSSD Discovery Proxy ([RFC8766]) and DNS Push ([RFC 8765]).

    It provides authoritative DNS service for DNS Service Discovery by using mDNS instead of a stateful DNS database. This enables network infrastructure to provide service discovery automatically over DNS, solving the issue where services are only discoverable when a host is connected to a specific link in multi-link networks.

  8. What is the DNSSD Service Registration Protocol Update Proxy?

    main

    The DNSSD Service Registration Protocol Update Proxy acts as an SRP server that translates SRP registrations into DNS Updates ([RFC2136]).

    Workflow:

    1. The proxy accepts service registrations from SRP clients.
    2. It generates a series of DNS Updates.
    3. These updates can be authenticated using TSIG.
    4. The proxy responds to the client only after all DNS Updates have completed (or reports if a part of the update fails).

    Running this proxy makes the target DNS server behave as if it were natively an SRP server.