Chapter 187. mDNS overview

Table of Contents

187.1. Introduction

187.1. Introduction

eCosPro-mDNS is eCosCentric's commercial name for the CYGPKG_NET_MDNS package. The CYGPKG_NET_MDNS package implements a small, lightweight, link-local scope mDNS Responder designed to provide Service Discovery (DNS-SD) support for services announced to the network. It optionally provides a DNS-SD API to allow network services to be discovered by the client application. The current mDNS implementation makes use of the lwIP TCP/IP stack.

mDNS Responder Features:

  • Probing and Announcement of the local hostname and of registered services.

    These are repeated as necessary on cable change, mDNS naming conflict, and so on.

  • Configuration of local DNS records, and responding to external mDNS queries for the local hostname and registered services.

    [Note]Note

    Only the class IN “the Internet” is supported.

  • Support for both IPv4 and IPv6 addressing.

    [Note]Note

    Only link-local scope.

The goal of the mDNS Responder support is to have as small a dynamic memory footprint as possible, whilst still being flexible enough for a variety of real-world scenarios. The mDNS Responder currently has a simple single-packet probe/announce scheme. This limits the number of services that can be registered depending on the lwIP heap available and the limitations that lwIP imposes on individual UDP packet transmissions. It is important that the mDNS configuration matches the client application expectations as regards number of services, and the resources available (and configured) for the target platform.

DNS-SD Features:

  • Simple, low resource footprint, callback mechanism for Resource Record processing.
  • Ability to generate network queries for specific Resource Record types, to trigger responses.

Similar to the goal for the mDNS Responder, the DNS-SD API allows for clients to be coded with as small a dynamic memory footprint as possible, whilst not limiting the possibilities for resource-rich applications.

The mDNS implementation is based on the Multicast DNS RFC6762 and DNS-Based Service Discovery RFC6763 standards.

These in turn reference many other RFCs, for example RFC2782 for DNS SRV records, and RFC1035 covering DNS TXT entries.

The MCASTDNS section 16 “Multicast DNS Character Set” explicitly states that all names in mDNS MUST be encoded as precomposed UTF-8 [RFC3629] “Net-Unicode” [RFC5198] text. When an application provides strings to the mDNS Responder it should ensure that they conform to the standard naming requirements.

A good introduction to the features and benefits of Bonjour/Zeroconf can be found in the O'Reilly book “Zero Configuration Networking - The Definitive Guide” written by Stuart Chesire and Daniel H. Steinberg.