struct MdnsNames
Defined at line 14 of file ../../src/connectivity/network/mdns/service/common/mdns_names.h
Public Members
static DnsName kAnyServiceFullName
Public Methods
DnsName HostFullName (const DnsName & host_name)
Constructs a local host name from a simple host name. For example, produces
"host.local." from "host".
Defined at line 31 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
DnsName HostNameFromFullName (const DnsName & host_full_name)
Constructs a simple host name from a local host name. For example, produces
"host" from "host.local.".
Defined at line 38 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
DnsName ServiceFullName (const DnsName & service_name)
Constructs a local service name from a simple service name. For example,
produces "_foo._tcp.local." from "_foo._tcp.".
Defined at line 57 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
DnsName ServiceSubtypeFullName (const DnsName & service_name, const DnsLabel & subtype)
Constructs a local service name from a simple service name and subtype.
For example, produces "_bar._sub_.foo._tcp.local." from "_foo._tcp." and
subtype "_bar".
Defined at line 64 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
DnsName InstanceFullName (const DnsLabel & instance_name, const DnsName & service_name)
Constructs a local service instance name from a simple instance name and
a simple service name. For example, produces "myfoo._foo._tcp.local." from
"myfoo" and "_foo._tcp.". The simple instance name does not include the trailing ".",
and the simple service name must end in ".".
Defined at line 75 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool SplitInstanceFullName (const DnsName & instance_full_name, DnsLabel * instance_name_out, DnsName * service_name_out)
Parses an instance full name to extract the simple instance name and the simple service
name.
Defined at line 83 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool MatchServiceName (const DnsName & name, const DnsName & service_name, DnsLabel * subtype_out)
Determines if |name| is a local service name matching |service_name| or
a subtype of |service_name|. If |name| does specify a subtype, the
subtype is returned via |subtype_out|. Otherwise |*subtype_out| is
cleared.
Defined at line 113 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool IsValidHostName (const DnsName & host_name)
Determines if |host_name| is a valid host name.
Defined at line 172 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool IsValidServiceName (const DnsName & service_name)
Determines if |service_name| is a valid simple service name.
Defined at line 179 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool IsValidInstanceName (const DnsLabel & instance_name)
Determines if |instance_name| is a valid simple instance name.
Defined at line 204 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool IsValidSubtypeName (const DnsLabel & subtype_name)
Determines if |subtype_name| is a valid simple subtype name.
Defined at line 210 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool IsValidTextString (const std::string & text_string)
Determines if |text_string| is a valid text string.
Defined at line 217 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
bool IsValidTextString (const std::vector<uint8_t> & text_string)
Determines if |text_string| is a valid text string.
Defined at line 223 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc
DnsName AltHostName (const DnsName & host_name)
Returns the alternate host name for |host_name|. For example, if |host_name| is
"fuchsia-1234-5678-9abc", this method returns "123456789ABC". If |host_name| isn't
the expected size (22 characters), this method returns the |host_name| argument.
TODO(https://fxbug.dev/42065146): Remove this when alt_services is no longer needed.
Defined at line 229 of file ../../src/connectivity/network/mdns/service/common/mdns_names.cc