Package dnssd implements a wrapper for Apple's C DNS Service Discovery API.
The DNS Service Discovery API is part of the Apple Bonjour zero
configuration networking stack. The API allows for network services to be
registered, browsed and resolved without configuration via multicast DNS
in the ".local" domain and with additional configuration in unicast DNS
domains. A service consists of a name, type, host, port and a set of
key-value pairs containing meta information.
Bonjour is bundled with OS X and available for Windows via Bonjour Print
Services for Windows¹, the Bonjour SDK for Windows² or bundled with iTunes.
For other POSIX platforms Apple offer mDNSResponder³ as open-source, however
the Avahi⁴ project is the de facto choice on most Linux and BSD systems.
Although Avahi has a different API, it does offer a compatibility shim which
covers a subset of the DNS Service Discovery API, and which this package
largely sticks to.
The DNS Service Discovery API is wrapped as follows:
All operations require a callback be set. RegisterOp, BrowseOp and ResolveOp
require a service type be set. QueryOp requires name, class and type be set.
If an InterfaceIndex is not set the default value of InterfaceIndexAny is
used which applies the operation to all network interfaces. For operations
that take a domain, if no domain is set or the domain is set to an empty
string the operation applies to all applicable DNS-SD domains.
If a service is registered with an empty string as it's name, the local
computer name (or hostname) will be substitued. If no host is specified a
hostname for the local machine will be used. By default services will be
renamed with a numeric suffix if a name collision occurs.
Callbacks are executed in serial. If an error is supplied to a callback
the operation will no longer be active and other arguments must be ignored.