class Mdns
Defined at line 38 of file ../../src/connectivity/network/mdns/service/mdns.h
Implements mDNS.
Public Methods
void Mdns (Transceiver & transceiver)
|transceiver| must live as long as this |Mdns| object.
Defined at line 33 of file ../../src/connectivity/network/mdns/service/mdns.cc
void ~Mdns ()
Defined at line 36 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SetVerbose (bool verbose)
Determines whether message traffic will be logged.
Defined at line 38 of file ../../src/connectivity/network/mdns/service/mdns.cc
void Start (fuchsia::net::interfaces::WatcherPtr , const DnsName & local_host_name, bool perform_address_probe, fit::closure ready_callback, std::vector<DnsName> alt_services)
Starts the transceiver. |ready_callback| is called once we're is ready for
calls to |ResolveHostName|, |SubscribeToService| and
|PublishServiceInstance|.
Defined at line 44 of file ../../src/connectivity/network/mdns/service/mdns.cc
void Stop ()
Stops the transceiver.
Defined at line 148 of file ../../src/connectivity/network/mdns/service/mdns.cc
void ResolveHostName (const DnsName & host_name, zx::duration timeout, Media media, IpVersions ip_versions, bool include_local, bool include_local_proxies, ResolveHostNameCallback callback)
Resolves |host_name| to |IpAddress|es. Must not be called before |Start|'s ready callback is
called.
Defined at line 156 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SubscribeToHostName (const DnsName & host_name, Media media, IpVersions ip_versions, bool include_local, bool include_local_proxies, HostNameSubscriber * subscriber)
Subscribes to the specified host name. Must not be called before
|Start|'s ready callback is called. The subscription is cancelled when
the subscriber is deleted or its |Unsubscribe| method is called.
Multiple subscriptions may be created for a given host name.
Defined at line 169 of file ../../src/connectivity/network/mdns/service/mdns.cc
void ResolveServiceInstance (const DnsName & service, const DnsLabel & instance, zx::time timeout, Media media, IpVersions ip_versions, bool include_local, bool include_local_proxies, ResolveServiceInstanceCallback callback)
Resolves |service+instance| to a node, i.e sends an SRV query and gets
a valid response if the service instance exists/is active.
Defined at line 199 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SubscribeToService (const DnsName & service_name, Media media, IpVersions ip_versions, bool include_local, bool include_local_proxies, Subscriber * subscriber)
Subscribes to the specified service. The subscription is cancelled when
the subscriber is deleted or its |Unsubscribe| method is called.
Multiple subscriptions may be created for a given service name. Must not be
called before |Start|'s ready callback is called.
Defined at line 213 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SubscribeToAllServices (Media media, IpVersions ip_versions, bool include_local, bool include_local_proxies, Subscriber * subscriber)
Subscribes to all services. The subscription is cancelled when the subscriber is deleted or its
|Unsubscribe| method is called. Multiple subscriptions may be created for a all services. Must
not be called before |Start|'s ready callback is called.
Defined at line 244 of file ../../src/connectivity/network/mdns/service/mdns.cc
DnsName local_host_name ()
Returns the local host name currently in use. May be different than the host name
passed in to |Start| if address probing detected conflicts.
Defined at line 265 of file ../../src/connectivity/network/mdns/service/mdns.h
bool PublishServiceInstance (DnsName host_name, std::vector<inet::IpAddress> addresses, DnsName service_name, DnsLabel instance_name, Media media, IpVersions ip_versions, bool perform_probe, Publisher * publisher)
Publishes a service instance for a host identified by |host_name| and |addresses|. Returns
false if and only if the instance was already published locally. The instance is unpublished
when the publisher is deleted or its |Unpublish| method is called. Must not be called before
|Start|'s ready callback is called.
Defined at line 273 of file ../../src/connectivity/network/mdns/service/mdns.cc
bool PublishServiceInstance (DnsName service_name, DnsLabel instance_name, Media media, IpVersions ip_versions, bool perform_probe, Publisher * publisher)
Publishes a service instance. Returns false if and only if the instance was
already published locally. The instance is unpublished when the publisher
is deleted or its |Unpublish| method is called. Must not be called before
|Start|'s ready callback is called.
Defined at line 304 of file ../../src/connectivity/network/mdns/service/mdns.h
bool PublishHost (DnsName host_name, std::vector<inet::IpAddress> addresses, Media media, IpVersions ip_versions, bool perform_probe, HostPublisher * publisher)
Publishes a host. Returns false if and only if the host was already published locally. The
host is unpublished when the publisher is deleted or its |Unpublish| method is called. Must
not be called for |Start|'s ready callback is called.
Defined at line 350 of file ../../src/connectivity/network/mdns/service/mdns.cc
void LogTraffic ()
Writes log messages describing lifetime traffic.
Defined at line 410 of file ../../src/connectivity/network/mdns/service/mdns.cc
void Mdns (const Mdns & )
Disallow copy, assign and move.
Defined at line 569 of file ../../src/connectivity/network/mdns/service/mdns.h
void Mdns (Mdns && )
Defined at line 570 of file ../../src/connectivity/network/mdns/service/mdns.h
Mdns & operator= (const Mdns & )
Defined at line 571 of file ../../src/connectivity/network/mdns/service/mdns.h
Mdns & operator= (Mdns && )
Defined at line 572 of file ../../src/connectivity/network/mdns/service/mdns.h