This directory contains the implementation of the fuchsia.net.mdns service and mdns-util, a developer utility for issuing mDNS-related commands from a console.
The service subdirectory builds the mdns
package, which provides the mDNS service implementation, and the mdns_config
package, which registers the service and instructs the component manager to start the service on boot.
The mdns service will log mDNS-related network traffic if:
enable_mdns_trace
gn arg is set to true
, and$ mdns-util verbose
).The utility, mdns-util
has the following usage:
commands: resolve <host_name> subscribe <service_name> respond <service_name> <instance_name> <port> verbose (requires enable_mdns_trace gn arg) quiet (requires enable_mdns_trace gn arg) options: --timeout=<seconds> # applies to resolve --text=<text,...> # applies to respond --announce=<subtype,...> # applies to respond options must precede the command <host_name> and <instance_name> cannot end in '.' <service_name> must start with '_' and end in '._tcp.' or '._udp.'
For detailed constraints on the format of strings, see the FIDL definition.
In order for traffic logging to work, the enable_mdns_trace
gn arg must be set during the build.