Multicast DNS

Multicast DNS (mDNS) is a part of Zero Configuration Networking (Zeroconf) and provides the ability to address hosts using DNS-like names without the need of an existing (unicast), managed DNS server.

The project is divided into two phases each with a set of sub-projects. The sub-projects in phase 1 is more or less listed in the order they will be implemented in (they depend on each other), sub-projects in phase 2 is not listed in the same order as they will be implemented.

A public mercurial repository with snapshots is available at

Phase 1

Multicast DNS responder (mdnsd)

Status: Feature complete, requires testing and bugfixing.

This is the core responder daemon, performs multicast dns queries on behalf of clients and acts as a unified cache to all clients. Provides the ability to announce its own mdns records onto the network.


Client API (libmdns)

Status: Working

Provides a easy programming interface to the client side of responderd. Privileges operations include addition/removal of self-claimed records, while non-privileged operations are limited to basic host lookup routines.

NSS module

Status: Complete

Uses libmdns and hooks into the name-service switch system to expose mdns aware-versions of name lookup functions. Implements gethostby{name,name2,addr}, getaddrinfo and ghby{addr,name} (used by getipnodeby{name,addr} and getnameinfo). Configuration file /etc/mdns.conf (similar to resolv.conf) controld the search space. Default is .local and private ip-addresses.

Command line utility

Status: Working

Utility named mdns (or similar) to provide basic host name lookup for debugging purposes and to provide a way to dynamically add and remove self-claimed mdns records. It currently supports resolving names, add/remove/list names and resources and view/flush cache, its feature set is in sync with features provided by libmdns.

Phase 2

Service Discovery integration

Status: Not started (Open task)

Create an application to do both multicast (libmdns) and unicase service discovery. The previous idea with a separate library is probably overkill at the moment.

Avahi library wrapper (mdns_compat_avahi)

Status: Not started (Open task)

A wrapper library around libmdns to allow avahi-aware applications to work with mdns_responderd. It seems most normal avahi consumers performs queries through d-bus so this compat library will probably mimic this interface. The api avahi-core exposes will probably not be covered.

dns_sd library wrapper (mdns_compat_dns_sd)

Status: Not started (Open task)

A wrapper library around libmdns (and possibly libsd) to allow apple dns_sd-aware applications to work with mdns_responderd. The API header (dns_sd.h) is released by Apple under a BSD-license.


MulticastDNS (last edited 2019-02-01 09:46:02 by MateuszPiotrowski)