Google is committed to advancing racial equity for Black communities. See how.

fuchsia.net.name

PROTOCOLS

DnsServerWatcher

Defined in fuchsia.net.name/server_watcher.fidl

Provides a hanging get interface to watch for DNS servers configuration.

WatchServers

Returns a list of DNS servers.

First call always returns a snapshot of the current list of servers or blocks if an empty list would be returned. Subsequent calls will block until the list of servers changes.

The list of servers changes over time by configuration or network topology changes, expiration, etc. Callers must repeatedly call WatchServers and replace any previously returned servers with new ones to avoid using stale or expired entries.

It is invalid to call WatchServers while a previous call is still pending. Doing so will cause the DnsServerWatcher channel to be closed.

  • response servers The list of servers to use for DNS resolution, in priority order.

Request

NameType

Response

NameType
servers vector<DnsServer>

Lookup

Defined in fuchsia.net.name/lookup.fidl

Provides name and address resolution.

LookupHostname

Look up a hostname by IP address.

Request

NameType
addr fuchsia.net/IpAddress

Response

NameType
result Lookup_LookupHostname_Result

LookupIp

Lookup a list of IP addresses by hostname.

If hostname is an Internationalized Domain Name, it must be encoded as per RFC 3490.

Request

NameType
hostname Hostname
options LookupIpOptions

Response

NameType
result Lookup_LookupIp_Result

LookupAdmin

Defined in fuchsia.net.name/lookup_admin.fidl

Provides administration controls over name resolution settings.

GetDnsServers

Gets the DNS servers currently in use to resolve name lookups.

  • response servers The list of servers in use by LookupAdmin, in priority order.

Request

NameType

Response

NameType
servers vector<fuchsia.net/SocketAddress>

SetDnsServers

Sets the DNS servers to servers

  • request servers The list of servers to use for domain name resolution, in priority order. An empty list means no servers will be used and name resolution may fail. Each SocketAddress in servers must be a valid unicast socket address. The list of servers will be deduplicated.
  • error Returns ZX_ERR_INVALID_ARGS if any of the provided addresses does not meet the conditions above.

Request

NameType
servers vector<fuchsia.net/SocketAddress>

Response

NameType
result LookupAdmin_SetDnsServers_Result

STRUCTS

LookupAdmin_SetDnsServers_Response

Defined in fuchsia.net.name/lookup_admin.fidl

NameTypeDescriptionDefault

Lookup_LookupHostname_Response

Defined in fuchsia.net.name/lookup.fidl

NameTypeDescriptionDefault
hostname Hostname No default

Lookup_LookupIp_Response

Defined in fuchsia.net.name/lookup.fidl

NameTypeDescriptionDefault
result LookupResult No default

ENUMS

LookupError strict

Type: uint32

Defined in fuchsia.net.name/lookup.fidl

Lookup operation errors.

NameValueDescription
NOT_FOUND 1

No result was found for this query.

TRANSIENT 2

The lookup failed, but may succeed at a later time. For instance, the network or DNS server may be unreachable.

INVALID_ARGS 3

The lookup failed due to an invalid argument (for instance, the hostname was not encoded correctly, or was too long).

INTERNAL_ERROR 4

The lookup failed due to an internal error.

TABLES

DhcpDnsServerSource

Defined in fuchsia.net.name/dns.fidl

Extra information about DNS servers discovered through DHCPv4.

OrdinalNameTypeDescription
1 source_interface uint64

The interface index over which this server was discovered.

Dhcpv6DnsServerSource

Defined in fuchsia.net.name/dns.fidl

Extra information about DNS servers discovered through DHCPv6.

OrdinalNameTypeDescription
1 source_interface uint64

The interface index over which this server was discovered.

DnsServer

Defined in fuchsia.net.name/dns.fidl

A DNS server configuration.

OrdinalNameTypeDescription
1 address fuchsia.net/SocketAddress

The server's address, must be provided.

2 source DnsServerSource

The configuration source for this server. Defaults to DnsServerSource.static_source.

LookupIpOptions

Defined in fuchsia.net.name/lookup.fidl

Lookup operation options.

OrdinalNameTypeDescription
1 ipv4_lookup bool

Include IPv4 results.

If not set, interpreted as false.

2 ipv6_lookup bool

Include IPv6 results.

If not set, interpreted as false.

3 sort_addresses bool

Sort addresses in order of preference.

It true, Addresses are sorted according to destination address selection described in RFC 6724 Section 6.

If not set, interpreted as false.

LookupResult

Defined in fuchsia.net.name/lookup.fidl

The result of a lookup operation.

OrdinalNameTypeDescription
1 addresses vector<fuchsia.net/IpAddress>

The IP addresses resulting from a lookup.

If sorting was requested, addresses is sorted in order of preference, most preferred destination address first.

NdpDnsServerSource

Defined in fuchsia.net.name/dns.fidl

Extra information about DNS servers discovered through NDP.

OrdinalNameTypeDescription
1 source_interface uint64

The interface index over which this server was discovered.

StaticDnsServerSource

Defined in fuchsia.net.name/dns.fidl

Extra information about statically set DNS servers.

OrdinalNameTypeDescription

UNIONS

DnsServerSource strict

Defined in fuchsia.net.name/dns.fidl

The configuration source for a DnsServer.

NameTypeDescription
static_source StaticDnsServerSource

The server is statically configured through LookupAdmin.SetDefaultServers.

dhcp DhcpDnsServerSource

The server was discovered through DHCPv4.

ndp NdpDnsServerSource

The server was discovered through an NDP Router Advertisement.

dhcpv6 Dhcpv6DnsServerSource

The server was discovered through DHCPv6.

LookupAdmin_SetDnsServers_Result strict

Defined in fuchsia.net.name/lookup_admin.fidl

NameTypeDescription
response LookupAdmin_SetDnsServers_Response
err zx/status

Lookup_LookupHostname_Result strict

Defined in fuchsia.net.name/lookup.fidl

NameTypeDescription
response Lookup_LookupHostname_Response
err LookupError

Lookup_LookupIp_Result strict

Defined in fuchsia.net.name/lookup.fidl

NameTypeDescription
response Lookup_LookupIp_Response
err LookupError

CONSTANTS

NameValueTypeDescription
MAX_HOSTNAME_SIZE 255 uint64

The maximum length of a hostname, as per RFC 1035 section 2.3.4.

TYPE ALIASES

NameValueDescription
Hostname string[MAX_HOSTNAME_SIZE]

A hostname.

Although the maximum length of a domain or hostname is 255 characters, each label within a name must not be longer than 63 characters as per RFC 1035 section 2.3.4. A label in a host name is the alphanumeric characters or hyphens, seperated by a period (e.g. abc.com has two labels, 'abc' and 'com').