blob: 27134b5f557f4d51e9201be1b127e807d0555b37 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.net
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **STRUCTS**
### Ipv4Address {#Ipv4Address data-text="Ipv4Address"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=31)*
<p>Ipv4Address is expressed in network byte order, so the most significant byte
(&quot;127&quot; in the address &quot;127.0.0.1&quot;) will be at index 0.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Ipv4Address.addr">
<td><code>addr</code></td>
<td>
<code>uint8[4]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Ipv4AddressWithPrefix {#Ipv4AddressWithPrefix data-text="Ipv4AddressWithPrefix"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=65)*
<p>An IPv4 address with its subnet prefix length.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Ipv4AddressWithPrefix.addr">
<td><code>addr</code></td>
<td>
<code><a class='link' href='#Ipv4Address'>Ipv4Address</a></code>
</td>
<td><p>The IPv4 address.</p>
</td>
<td>No default</td>
</tr>
<tr id="Ipv4AddressWithPrefix.prefix_len">
<td><code>prefix_len</code></td>
<td>
<code>uint8</code>
</td>
<td><p>The prefix length. Must be in the range [0, 32].</p>
</td>
<td>No default</td>
</tr>
</table>
### Ipv4SocketAddress {#Ipv4SocketAddress data-text="Ipv4SocketAddress"}
*Defined in [fuchsia.net/socket.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/socket.fidl;l=11)*
<p>An IPv4 socket address, composed of an IPv4 address and a port.</p>
<p>Inspired by the address definition in the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/">POSIX specification</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Ipv4SocketAddress.address">
<td><code>address</code></td>
<td>
<code><a class='link' href='#Ipv4Address'>Ipv4Address</a></code>
</td>
<td><p>IPv4 Address.</p>
</td>
<td>No default</td>
</tr>
<tr id="Ipv4SocketAddress.port">
<td><code>port</code></td>
<td>
<code>uint16</code>
</td>
<td><p>Transport-layer port.</p>
</td>
<td>No default</td>
</tr>
</table>
### Ipv6Address {#Ipv6Address data-text="Ipv6Address"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=38)*
<p>Ipv6Address is expressed in network byte order, so the most significant byte
(&quot;ff&quot; in the address &quot;ff02::1&quot;) will be at index 0.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Ipv6Address.addr">
<td><code>addr</code></td>
<td>
<code>uint8[16]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Ipv6AddressWithPrefix {#Ipv6AddressWithPrefix data-text="Ipv6AddressWithPrefix"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=74)*
<p>An IPv6 address with its subnet prefix length.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Ipv6AddressWithPrefix.addr">
<td><code>addr</code></td>
<td>
<code><a class='link' href='#Ipv6Address'>Ipv6Address</a></code>
</td>
<td><p>The IPv6 address.</p>
</td>
<td>No default</td>
</tr>
<tr id="Ipv6AddressWithPrefix.prefix_len">
<td><code>prefix_len</code></td>
<td>
<code>uint8</code>
</td>
<td><p>The prefix length. Must be in the range [0, 128].</p>
</td>
<td>No default</td>
</tr>
</table>
### Ipv6SocketAddress {#Ipv6SocketAddress data-text="Ipv6SocketAddress"}
*Defined in [fuchsia.net/socket.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/socket.fidl;l=23)*
<p>An IPV6 socket address, composed of an IPv6 address, a port, and a scope identifier.</p>
<p>Inspired by the address definition in the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/">POSIX specification</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Ipv6SocketAddress.address">
<td><code>address</code></td>
<td>
<code><a class='link' href='#Ipv6Address'>Ipv6Address</a></code>
</td>
<td><p>IPv6 Address.</p>
</td>
<td>No default</td>
</tr>
<tr id="Ipv6SocketAddress.port">
<td><code>port</code></td>
<td>
<code>uint16</code>
</td>
<td><p>Transport-layer port.</p>
</td>
<td>No default</td>
</tr>
<tr id="Ipv6SocketAddress.zone_index">
<td><code>zone_index</code></td>
<td>
<code><a class='link' href='#InterfaceId'>InterfaceId</a></code>
</td>
<td><p>Provides a means to identify to which zone a non-global address belongs.</p>
<p>A node may have interfaces attached to different zones of the same scope, for example
different link-local zones are disambiguated by the use of a <code>zone_index</code> providing the
interface identifier.</p>
<p><code>zone_index</code> 0 is the default zone.</p>
<p>See <a href="https://tools.ietf.org/html/rfc4007">RFC 4007</a> for terminology and examples.</p>
</td>
<td>No default</td>
</tr>
</table>
### MacAddress {#MacAddress data-text="MacAddress"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=83)*
<p>A MAC address used to identify a network interface on the data link layer within the network.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="MacAddress.octets">
<td><code>octets</code></td>
<td>
<code>uint8[6]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Subnet {#Subnet data-text="Subnet"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=52)*
<p>An IP address with its subnet prefix length.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Subnet.addr">
<td><code>addr</code></td>
<td>
<code><a class='link' href='#IpAddress'>IpAddress</a></code>
</td>
<td><p>The IPv4 or IPv6 address.</p>
</td>
<td>No default</td>
</tr>
<tr id="Subnet.prefix_len">
<td><code>prefix_len</code></td>
<td>
<code>uint8</code>
</td>
<td><p>The number of bits set to 1 in the subnet mask.</p>
<p>When <a class='link' href='#addr'>addr</a> is <a class='link' href='#IpAddress.ipv4'>IpAddress.ipv4</a>, must be in the range <code>[0, 32]</code>.
When <a class='link' href='#addr'>addr</a> is <a class='link' href='#IpAddress.ipv6'>IpAddress.ipv6</a>, must be in the range <code>[0, 128]</code>.</p>
</td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### IpVersion [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#IpVersion data-text="IpVersion"}
Type: <code>uint32</code>
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=24)*
<p>IpVersion is an IP version.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="IpVersion.V4">
<td><h3 id="IpVersion.V4" class="add-link hide-from-toc">V4</h3></td>
<td><code>1</code></td>
<td></td>
</tr>
<tr id="IpVersion.V6">
<td><h3 id="IpVersion.V6" class="add-link hide-from-toc">V6</h3></td>
<td><code>2</code></td>
<td></td>
</tr>
</table>
## **UNIONS**
### IpAddress [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#IpAddress data-text="IpAddress"}
*Defined in [fuchsia.net/net.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=44)*
<p>Represents an IP address that may be either v4 or v6.</p>
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="IpAddress.ipv4">
<td><h3 id="IpAddress.ipv4" class="add-link hide-from-toc">1</h3></td>
<td><code>ipv4</code></td>
<td>
<code><a class='link' href='#Ipv4Address'>Ipv4Address</a></code>
</td>
<td></td>
</tr>
<tr id="IpAddress.ipv6">
<td><h3 id="IpAddress.ipv6" class="add-link hide-from-toc">2</h3></td>
<td><code>ipv6</code></td>
<td>
<code><a class='link' href='#Ipv6Address'>Ipv6Address</a></code>
</td>
<td></td>
</tr>
</table>
### SocketAddress [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#SocketAddress data-text="SocketAddress"}
*Defined in [fuchsia.net/socket.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/socket.fidl;l=43)*
<p>Represents an IP socket address that may be either v4 or v6.</p>
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="SocketAddress.ipv4">
<td><h3 id="SocketAddress.ipv4" class="add-link hide-from-toc">1</h3></td>
<td><code>ipv4</code></td>
<td>
<code><a class='link' href='#Ipv4SocketAddress'>Ipv4SocketAddress</a></code>
</td>
<td></td>
</tr>
<tr id="SocketAddress.ipv6">
<td><h3 id="SocketAddress.ipv6" class="add-link hide-from-toc">2</h3></td>
<td><code>ipv6</code></td>
<td>
<code><a class='link' href='#Ipv6SocketAddress'>Ipv6SocketAddress</a></code>
</td>
<td></td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_HOSTNAME_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=9">MAX_HOSTNAME_SIZE</a></td>
<td>
<code>255</code>
</td>
<td><code>uint64</code></td>
<td><p>The maximum length of a hostname, as per
<a href="https://tools.ietf.org/html/rfc1035#section-2.3.4">RFC 1035 section 2.3.4</a>.</p>
</td>
</tr>
</table>
## **ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="Hostname">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=18">Hostname</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_HOSTNAME_SIZE'>MAX_HOSTNAME_SIZE</a></code>]</td>
<td><p>A hostname.</p>
<p>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
<a href="https://tools.ietf.org/html/rfc1035#section-2.3.4">RFC 1035 section 2.3.4</a>.
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').</p>
</td>
</tr>
<tr id="InterfaceId">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=21">InterfaceId</a></td>
<td>
<code>uint64</code></td>
<td><p>A unique non-zero interface identifier.</p>
</td>
</tr>
<tr id="RouteMetric">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net/net.fidl;l=88">RouteMetric</a></td>
<td>
<code>uint32</code></td>
<td><p>The metric of a route. Lower metrics indicate higher priority.</p>
</td>
</tr>
</table>