blob: 205f22c2db2561d7a53d56bef2726b4f284ba670 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.net.name
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 11</span></div>
## **PROTOCOLS**
## DnsServerWatcher {#DnsServerWatcher}
*Defined in [fuchsia.net.name/server_watcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/server_watcher.fidl;l=7)*
<p>Provides a hanging get interface to watch for DNS servers configuration.</p>
### WatchServers {#DnsServerWatcher.WatchServers}
<p>Returns a list of DNS servers.</p>
<p>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.</p>
<p>The list of servers changes over time by configuration or network topology changes,
expiration, etc. Callers must repeatedly call <code>WatchServers</code> and replace any previously
returned <code>servers</code> with new ones to avoid using stale or expired entries.</p>
<p>It is invalid to call this method while a previous call is pending. Doing so will cause the
server end of the protocol to be closed.</p>
<ul>
<li>response <code>servers</code> The list of servers to use for DNS resolution, in priority order.</li>
</ul>
#### Request {#DnsServerWatcher.WatchServers_Request}
&lt;EMPTY&gt;
#### Response {#DnsServerWatcher.WatchServers_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>servers</code></td>
<td>
<code>vector&lt;<a class='link' href='#DnsServer'>DnsServer</a>&gt;</code>
</td>
</tr>
</table>
## Lookup {#Lookup}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=24)*
<p>Provides name and address resolution.</p>
### LookupHostname {#Lookup.LookupHostname}
<p>Look up a hostname by IP address.</p>
#### Request {#Lookup.LookupHostname_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>addr</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#IpAddress'>IpAddress</a></code>
</td>
</tr>
</table>
#### Response {#Lookup.LookupHostname_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Lookup_LookupHostname_Result'>Lookup_LookupHostname_Result</a></code>
</td>
</tr>
</table>
### LookupIp {#Lookup.LookupIp}
<p>Lookup a list of IP addresses by hostname.</p>
#### Request {#Lookup.LookupIp_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>hostname</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Hostname'>Hostname</a></code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#LookupIpOptions'>LookupIpOptions</a></code>
</td>
</tr>
</table>
#### Response {#Lookup.LookupIp_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Lookup_LookupIp_Result'>Lookup_LookupIp_Result</a></code>
</td>
</tr>
</table>
## LookupAdmin {#LookupAdmin}
*Defined in [fuchsia.net.name/lookup_admin.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup_admin.fidl;l=12)*
<p>Provides administration controls over name resolution settings.</p>
### GetDnsServers {#LookupAdmin.GetDnsServers}
<p>Gets the DNS servers currently in use to resolve name lookups.</p>
<ul>
<li>response <code>servers</code> The list of servers in use by <code>LookupAdmin</code>, in priority order.</li>
</ul>
#### Request {#LookupAdmin.GetDnsServers_Request}
&lt;EMPTY&gt;
#### Response {#LookupAdmin.GetDnsServers_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>servers</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#SocketAddress'>SocketAddress</a>&gt;</code>
</td>
</tr>
</table>
### SetDnsServers {#LookupAdmin.SetDnsServers}
<p>Sets the DNS servers to <code>servers</code></p>
<ul>
<li>request <code>servers</code> 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
<code>SocketAddress</code> in <code>servers</code> must be a valid unicast socket address. The list of servers
will be deduplicated.</li>
</ul>
<ul>
<li>error Returns <code>ZX_ERR_INVALID_ARGS</code> if any of the provided addresses does not meet the
conditions above.</li>
</ul>
#### Request {#LookupAdmin.SetDnsServers_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>servers</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#SocketAddress'>SocketAddress</a>&gt;</code>
</td>
</tr>
</table>
#### Response {#LookupAdmin.SetDnsServers_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#LookupAdmin_SetDnsServers_Result'>LookupAdmin_SetDnsServers_Result</a></code>
</td>
</tr>
</table>
## **STRUCTS**
### LookupAdmin_SetDnsServers_Response {#LookupAdmin_SetDnsServers_Response data-text="LookupAdmin_SetDnsServers_Response"}
*Defined in [fuchsia.net.name/lookup_admin.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup_admin.fidl;l=23)*
&lt;EMPTY&gt;
### Lookup_LookupHostname_Response {#Lookup_LookupHostname_Response data-text="Lookup_LookupHostname_Response"}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=68)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Lookup_LookupHostname_Response.hostname">
<td><code>hostname</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Hostname'>Hostname</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Lookup_LookupIp_Response {#Lookup_LookupIp_Response data-text="Lookup_LookupIp_Response"}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=56)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Lookup_LookupIp_Response.result">
<td><code>result</code></td>
<td>
<code><a class='link' href='#LookupResult'>LookupResult</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### LookupError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#LookupError data-text="LookupError"}
Type: <code>uint32</code>
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=9)*
<p>Lookup operation errors.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="LookupError.NOT_FOUND">
<td><h3 id="LookupError.NOT_FOUND" class="add-link hide-from-toc">NOT_FOUND</h3></td>
<td><code>1</code></td>
<td><p>No result was found for this query.</p>
</td>
</tr>
<tr id="LookupError.TRANSIENT">
<td><h3 id="LookupError.TRANSIENT" class="add-link hide-from-toc">TRANSIENT</h3></td>
<td><code>2</code></td>
<td><p>The lookup failed, but may succeed at a later time. For instance, the
network or DNS server may be unreachable.</p>
</td>
</tr>
<tr id="LookupError.INVALID_ARGS">
<td><h3 id="LookupError.INVALID_ARGS" class="add-link hide-from-toc">INVALID_ARGS</h3></td>
<td><code>3</code></td>
<td><p>The lookup failed due to an invalid argument (for instance, the hostname
was not encoded correctly, or was too long).</p>
</td>
</tr>
<tr id="LookupError.INTERNAL_ERROR">
<td><h3 id="LookupError.INTERNAL_ERROR" class="add-link hide-from-toc">INTERNAL_ERROR</h3></td>
<td><code>4</code></td>
<td><p>The lookup failed due to an internal error.</p>
</td>
</tr>
</table>
## **TABLES**
### DhcpDnsServerSource {#DhcpDnsServerSource data-text="DhcpDnsServerSource"}
*Defined in [fuchsia.net.name/dns.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/dns.fidl;l=19)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DhcpDnsServerSource.source_interface">
<td><h3 id="DhcpDnsServerSource.source_interface" class="add-link hide-from-toc">1</h3></td>
<td><code>source_interface</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The interface index over which this server was discovered.</p>
</td>
</tr>
</table>
### Dhcpv6DnsServerSource {#Dhcpv6DnsServerSource data-text="Dhcpv6DnsServerSource"}
*Defined in [fuchsia.net.name/dns.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/dns.fidl;l=29)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Dhcpv6DnsServerSource.source_interface">
<td><h3 id="Dhcpv6DnsServerSource.source_interface" class="add-link hide-from-toc">1</h3></td>
<td><code>source_interface</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The interface index over which this server was discovered.</p>
</td>
</tr>
</table>
### DnsServer {#DnsServer data-text="DnsServer"}
*Defined in [fuchsia.net.name/dns.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/dns.fidl;l=9)*
<p>A DNS server configuration.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DnsServer.address">
<td><h3 id="DnsServer.address" class="add-link hide-from-toc">1</h3></td>
<td><code>address</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#SocketAddress'>SocketAddress</a></code>
</td>
<td><p>The server's address, must be provided.</p>
</td>
</tr>
<tr id="DnsServer.source">
<td><h3 id="DnsServer.source" class="add-link hide-from-toc">2</h3></td>
<td><code>source</code></td>
<td>
<code><a class='link' href='#DnsServerSource'>DnsServerSource</a></code>
</td>
<td><p>The configuration source for this server. Defaults to
<a class='link' href='../fuchsia.net.name/'>fuchsia.net.name</a>/<a class='link' href='../fuchsia.net.name/#DnsServerSource.static_source'>DnsServerSource.static_source</a>.</p>
</td>
</tr>
</table>
### LookupIpOptions {#LookupIpOptions data-text="LookupIpOptions"}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=35)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="LookupIpOptions.ipv4_lookup">
<td><h3 id="LookupIpOptions.ipv4_lookup" class="add-link hide-from-toc">1</h3></td>
<td><code>ipv4_lookup</code></td>
<td>
<code>bool</code>
</td>
<td><p>Include IPv4 results.</p>
<p>If not set, interpreted as false.</p>
</td>
</tr>
<tr id="LookupIpOptions.ipv6_lookup">
<td><h3 id="LookupIpOptions.ipv6_lookup" class="add-link hide-from-toc">2</h3></td>
<td><code>ipv6_lookup</code></td>
<td>
<code>bool</code>
</td>
<td><p>Include IPv6 results.</p>
<p>If not set, interpreted as false.</p>
</td>
</tr>
<tr id="LookupIpOptions.sort_addresses">
<td><h3 id="LookupIpOptions.sort_addresses" class="add-link hide-from-toc">3</h3></td>
<td><code>sort_addresses</code></td>
<td>
<code>bool</code>
</td>
<td><p>Sort addresses in order of preference.</p>
<p>It true, Addresses are sorted according to destination address
selection described in
<a href="https://tools.ietf.org/html/rfc6724#section-6">RFC 6724 Section 6</a>.</p>
<p>If not set, interpreted as false.</p>
</td>
</tr>
</table>
### LookupResult {#LookupResult data-text="LookupResult"}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=57)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="LookupResult.addresses">
<td><h3 id="LookupResult.addresses" class="add-link hide-from-toc">1</h3></td>
<td><code>addresses</code></td>
<td>
<code>vector&lt;<a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#IpAddress'>IpAddress</a>&gt;</code>
</td>
<td><p>The IP addresses resulting from a lookup.</p>
<p>If sorting was requested, <code>addresses</code> is sorted in order of
preference, most preferred destination address first.</p>
</td>
</tr>
</table>
### NdpDnsServerSource {#NdpDnsServerSource data-text="NdpDnsServerSource"}
*Defined in [fuchsia.net.name/dns.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/dns.fidl;l=24)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="NdpDnsServerSource.source_interface">
<td><h3 id="NdpDnsServerSource.source_interface" class="add-link hide-from-toc">1</h3></td>
<td><code>source_interface</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The interface index over which this server was discovered.</p>
</td>
</tr>
</table>
### StaticDnsServerSource {#StaticDnsServerSource data-text="StaticDnsServerSource"}
*Defined in [fuchsia.net.name/dns.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/dns.fidl;l=17)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
## **UNIONS**
### DnsServerSource [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#DnsServerSource data-text="DnsServerSource"}
*Defined in [fuchsia.net.name/dns.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/dns.fidl;l=14)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="DnsServerSource.static_source">
<td><h3 id="DnsServerSource.static_source" class="add-link hide-from-toc">1</h3></td>
<td><code>static_source</code></td>
<td>
<code><a class='link' href='#StaticDnsServerSource'>StaticDnsServerSource</a></code>
</td>
<td><p>The server is statically configured through
<a class='link' href='../fuchsia.net.name/'>fuchsia.net.name</a>/<a class='link' href='../fuchsia.net.name/#LookupAdmin.SetDefaultServers'>LookupAdmin.SetDefaultServers</a>.</p>
</td>
</tr>
<tr id="DnsServerSource.dhcp">
<td><h3 id="DnsServerSource.dhcp" class="add-link hide-from-toc">2</h3></td>
<td><code>dhcp</code></td>
<td>
<code><a class='link' href='#DhcpDnsServerSource'>DhcpDnsServerSource</a></code>
</td>
<td><p>The server was discovered through DHCPv4.</p>
</td>
</tr>
<tr id="DnsServerSource.ndp">
<td><h3 id="DnsServerSource.ndp" class="add-link hide-from-toc">3</h3></td>
<td><code>ndp</code></td>
<td>
<code><a class='link' href='#NdpDnsServerSource'>NdpDnsServerSource</a></code>
</td>
<td><p>The server was discovered through an NDP Router Advertisement.</p>
</td>
</tr>
<tr id="DnsServerSource.dhcpv6">
<td><h3 id="DnsServerSource.dhcpv6" class="add-link hide-from-toc">4</h3></td>
<td><code>dhcpv6</code></td>
<td>
<code><a class='link' href='#Dhcpv6DnsServerSource'>Dhcpv6DnsServerSource</a></code>
</td>
<td><p>The server was discovered through DHCPv6.</p>
</td>
</tr>
</table>
### LookupAdmin_SetDnsServers_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#LookupAdmin_SetDnsServers_Result data-text="LookupAdmin_SetDnsServers_Result"}
*Defined in [fuchsia.net.name/lookup_admin.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup_admin.fidl;l=23)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="LookupAdmin_SetDnsServers_Result.response">
<td><h3 id="LookupAdmin_SetDnsServers_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#LookupAdmin_SetDnsServers_Response'>LookupAdmin_SetDnsServers_Response</a></code>
</td>
<td></td>
</tr>
<tr id="LookupAdmin_SetDnsServers_Result.err">
<td><h3 id="LookupAdmin_SetDnsServers_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### Lookup_LookupHostname_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Lookup_LookupHostname_Result data-text="Lookup_LookupHostname_Result"}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=68)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Lookup_LookupHostname_Result.response">
<td><h3 id="Lookup_LookupHostname_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Lookup_LookupHostname_Response'>Lookup_LookupHostname_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Lookup_LookupHostname_Result.err">
<td><h3 id="Lookup_LookupHostname_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#LookupError'>LookupError</a></code>
</td>
<td></td>
</tr>
</table>
### Lookup_LookupIp_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Lookup_LookupIp_Result data-text="Lookup_LookupIp_Result"}
*Defined in [fuchsia.net.name/lookup.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.name/lookup.fidl;l=56)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Lookup_LookupIp_Result.response">
<td><h3 id="Lookup_LookupIp_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Lookup_LookupIp_Response'>Lookup_LookupIp_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Lookup_LookupIp_Result.err">
<td><h3 id="Lookup_LookupIp_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#LookupError'>LookupError</a></code>
</td>
<td></td>
</tr>
</table>