blob: 0e6a2092336144f28aea60102e80e1ee40b1099c [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.net.routes
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## State {#State}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=70)*
<p>Provides access to the system's routing state.</p>
### Resolve {#State.Resolve}
<p>Resolves the route to a destination.</p>
<ul>
<li>request <code>destination</code> the IP address to resolve a route to. If the
unspecified address (all zeroes) is provided, the default route will
be returned. The variant of <code>destination</code> determines variant of
<a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#IpAddress'>IpAddress</a> fields in the resolved route.</li>
</ul>
<ul>
<li>response <code>result</code> contains the resolved route to <code>destination</code>.</li>
</ul>
<ul>
<li>error <code>ZX_ERR_ADDRESS_UNREACHABLE</code> if <code>destination</code> can't be resolved.</li>
</ul>
#### Request {#State.Resolve_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>destination</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 {#State.Resolve_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#State_Resolve_Result'>State_Resolve_Result</a></code>
</td>
</tr>
</table>
## StateV4 {#StateV4}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=54)*
<p>Provides observability to the system's IPv4 routing state.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
### GetWatcherV4 {#StateV4.GetWatcherV4}
<p>Initialize a watcher for IPv4 routing state.</p>
<ul>
<li>request 'watcher' grants access to the <code>WatcherV4</code> Protocol.</li>
<li>request <code>watch_options</code> specifies the behavior of the <code>WatcherV4</code>.</li>
</ul>
#### Request {#StateV4.GetWatcherV4_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>watcher</code></td>
<td>
<code>server_end&lt;<a class='link' href='#WatcherV4'>WatcherV4</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#WatcherOptionsV4'>WatcherOptionsV4</a></code>
</td>
</tr>
</table>
## StateV6 {#StateV6}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=54)*
<p>Provides observability to the system's IPv6 routing state.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
### GetWatcherV6 {#StateV6.GetWatcherV6}
<p>Initialize a watcher for IPv6 routing state.</p>
<ul>
<li>request 'watcher' grants access to the <code>WatcherV6</code> Protocol.</li>
<li>request <code>watch_options</code> specifies the behavior of the <code>WatcherV6</code>.</li>
</ul>
#### Request {#StateV6.GetWatcherV6_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>watcher</code></td>
<td>
<code>server_end&lt;<a class='link' href='#WatcherV6'>WatcherV6</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#WatcherOptionsV6'>WatcherOptionsV6</a></code>
</td>
</tr>
</table>
## WatcherV4 {#WatcherV4}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=67)*
<p>An observer protocol for changes in system's IPv4 routing state.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
### Watch {#WatcherV4.Watch}
<p>Hanging-Get style API for observing routing changes.</p>
<p>Clients must only have one pending <code>Watch</code> call at a time. Calling
<code>Watch</code> while a request is already pending will cause the protocol to
close.</p>
<p>The first N events will always be <code>existing</code> where N is the number of
IPv4 routes that already existed when the server-end of the protocol was
initialized. The following event will be <code>idle</code> signaling the end of the
<code>existing</code> events. At this point the client has watched all existing
state and will never again observe an <code>existing</code> event.</p>
<p>Events are returned in batches of up to <code>MAX_EVENTS</code> events. There is no
correlation between the batch size/boundary and it's contents: it is
perfectly valid for the server to split the block of <code>existing</code> events,
across several batches. Clients should view this API as providing a
stream of events, where batches are used to reduce IPC load on the
system.</p>
<ul>
<li>response <code>events</code> A vector of at most <code>MAX_EVENTS</code> events.</li>
</ul>
#### Request {#WatcherV4.Watch_Request}
&lt;EMPTY&gt;
#### Response {#WatcherV4.Watch_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>events</code></td>
<td>
<code>vector&lt;<a class='link' href='#EventV4'>EventV4</a>&gt;[512]</code>
</td>
</tr>
</table>
## WatcherV6 {#WatcherV6}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=67)*
<p>An observer protocol for changes in system's IPv6 routing state.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
### Watch {#WatcherV6.Watch}
<p>Hanging-Get style API for observing routing changes.</p>
<p>Clients must only have one pending <code>Watch</code> call at a time. Calling
<code>Watch</code> while a request is already pending will cause the protocol to
close.</p>
<p>The first N events will always be <code>existing</code> where N is the number of
IPv6 routes that already existed when the server-end of the protocol was
initialized. The following event will be <code>idle</code> signaling the end of the
<code>existing</code> events. At this point the client has watched all existing
state and will never again observe an <code>existing</code> event.</p>
<p>Events are returned in batches of up to <code>MAX_EVENTS</code> events. There is no
correlation between the batch size/boundary and it's contents: it is
perfectly valid for the server to split the block of <code>existing</code> events,
across several batches. Clients should view this API as providing a
stream of events, where batches are used to reduce IPC load on the
system.</p>
<ul>
<li>response <code>events</code> A vector of at most <code>MAX_EVENTS</code> events.</li>
</ul>
#### Request {#WatcherV6.Watch_Request}
&lt;EMPTY&gt;
#### Response {#WatcherV6.Watch_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>events</code></td>
<td>
<code>vector&lt;<a class='link' href='#EventV6'>EventV6</a>&gt;[512]</code>
</td>
</tr>
</table>
## **STRUCTS**
### Empty {#Empty data-text="Empty"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=12)*
<p>A placeholder for empty values.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
&lt;EMPTY&gt;
### RouteTargetV4 {#RouteTargetV4 data-text="RouteTargetV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=26)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RouteTargetV4.outbound_interface">
<td><code>outbound_interface</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#InterfaceId'>InterfaceId</a></code>
</td>
<td><p>The interface ID of the target's outbound interface.</p>
</td>
<td>No default</td>
</tr>
<tr id="RouteTargetV4.next_hop">
<td><code>next_hop</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Ipv4Address'>Ipv4Address</a>?</code>
</td>
<td><p>The optional next-hop of the target. If provided, the address
must be a unicast address.</p>
</td>
<td>No default</td>
</tr>
</table>
### RouteTargetV6 {#RouteTargetV6 data-text="RouteTargetV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=26)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RouteTargetV6.outbound_interface">
<td><code>outbound_interface</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#InterfaceId'>InterfaceId</a></code>
</td>
<td><p>The interface ID of the target's outbound interface.</p>
</td>
<td>No default</td>
</tr>
<tr id="RouteTargetV6.next_hop">
<td><code>next_hop</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Ipv6Address'>Ipv6Address</a>?</code>
</td>
<td><p>The optional next-hop of the target. If provided, the address
must be a unicast address.</p>
</td>
<td>No default</td>
</tr>
</table>
### RouteV4 {#RouteV4 data-text="RouteV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=16)*
<p>A <code>RouteV4</code> specifies an IPv4 network route.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RouteV4.destination">
<td><code>destination</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Ipv4AddressWithPrefix'>Ipv4AddressWithPrefix</a></code>
</td>
<td><p>The destination subnet of the route. When making a routing decision
for a given packet the route whose destination forms the longest
matching prefix will be selected, with ties being broken by the route's
metric.</p>
</td>
<td>No default</td>
</tr>
<tr id="RouteV4.action">
<td><code>action</code></td>
<td>
<code><a class='link' href='#RouteActionV4'>RouteActionV4</a></code>
</td>
<td><p>Packets matching this route will have the specified action applied to
them.</p>
</td>
<td>No default</td>
</tr>
<tr id="RouteV4.properties">
<td><code>properties</code></td>
<td>
<code><a class='link' href='#RoutePropertiesV4'>RoutePropertiesV4</a></code>
</td>
<td><p>The additional properties of the IPv4 route.</p>
</td>
<td>No default</td>
</tr>
</table>
### RouteV6 {#RouteV6 data-text="RouteV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=16)*
<p>A <code>RouteV6</code> specifies an IPv6 network route.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RouteV6.destination">
<td><code>destination</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Ipv6AddressWithPrefix'>Ipv6AddressWithPrefix</a></code>
</td>
<td><p>The destination subnet of the route. When making a routing decision
for a given packet the route whose destination forms the longest
matching prefix will be selected, with ties being broken by the route's
metric.</p>
</td>
<td>No default</td>
</tr>
<tr id="RouteV6.action">
<td><code>action</code></td>
<td>
<code><a class='link' href='#RouteActionV6'>RouteActionV6</a></code>
</td>
<td><p>Packets matching this route will have the specified action applied to
them.</p>
</td>
<td>No default</td>
</tr>
<tr id="RouteV6.properties">
<td><code>properties</code></td>
<td>
<code><a class='link' href='#RoutePropertiesV6'>RoutePropertiesV6</a></code>
</td>
<td><p>The additional properties of the IPv6 route.</p>
</td>
<td>No default</td>
</tr>
</table>
### State_Resolve_Response {#State_Resolve_Response data-text="State_Resolve_Response"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=85)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="State_Resolve_Response.result">
<td><code>result</code></td>
<td>
<code><a class='link' href='#Resolved'>Resolved</a></code>
</td>
<td><p>A resolved route.</p>
<p>Contains the information for the &quot;next-hop&quot; or immediate-destination
that is the result of a route resolution. A resolved route is only
meaningful in the context of a requested destination.</p>
</td>
<td>No default</td>
</tr>
</table>
## **TABLES**
### Destination {#Destination data-text="Destination"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=56)*
<p>Collection of addresses and identifiers describing a network destination.</p>
<p>A <code>Destination</code> is the &quot;next-hop&quot; for a routed packet.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Destination.address">
<td><h3 id="Destination.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/#IpAddress'>IpAddress</a></code>
</td>
<td><p>The IP address of the destination.</p>
</td>
</tr>
<tr id="Destination.mac">
<td><h3 id="Destination.mac" class="add-link hide-from-toc">2</h3></td>
<td><code>mac</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#MacAddress'>MacAddress</a></code>
</td>
<td><p>The MAC address of the destination. Only set if the destination is on a
link that requires a MAC address.</p>
</td>
</tr>
<tr id="Destination.interface_id">
<td><h3 id="Destination.interface_id" class="add-link hide-from-toc">3</h3></td>
<td><code>interface_id</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#InterfaceId'>InterfaceId</a></code>
</td>
<td><p>The interface identifier over which the destination can be reached.</p>
</td>
</tr>
<tr id="Destination.source_address">
<td><h3 id="Destination.source_address" class="add-link hide-from-toc">4</h3></td>
<td><code>source_address</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#IpAddress'>IpAddress</a></code>
</td>
<td><p>The preferred local IP address used to communicate with the destination.</p>
</td>
</tr>
</table>
### EffectiveRouteProperties {#EffectiveRouteProperties data-text="EffectiveRouteProperties"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=33)*
<p>The effective properties of a route installed in the system.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="EffectiveRouteProperties.metric">
<td><h3 id="EffectiveRouteProperties.metric" class="add-link hide-from-toc">1</h3></td>
<td><code>metric</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#RouteMetric'>RouteMetric</a></code>
</td>
<td><p>The route's effective metric, dependent on the value of the route's
<a class='link' href='#SpecifiedRouteProperties'>SpecifiedRouteProperties</a>. If the <code>specified_metric</code> is
<code>explicit_metric</code>, this value will be identical to the provided value;
if the <code>specified_metric</code> is <code>inherited_from_interface</code> this value will
be the interface's routing metric.</p>
</td>
</tr>
</table>
### InstalledRouteV4 {#InstalledRouteV4 data-text="InstalledRouteV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=44)*
<p>An <code>InstalledRouteV4</code> specifies an IPv4 network route that is installed in
the system's routing table.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="InstalledRouteV4.route">
<td><h3 id="InstalledRouteV4.route" class="add-link hide-from-toc">1</h3></td>
<td><code>route</code></td>
<td>
<code><a class='link' href='#RouteV4'>RouteV4</a></code>
</td>
<td><p>The route.</p>
</td>
</tr>
<tr id="InstalledRouteV4.effective_properties">
<td><h3 id="InstalledRouteV4.effective_properties" class="add-link hide-from-toc">2</h3></td>
<td><code>effective_properties</code></td>
<td>
<code><a class='link' href='#EffectiveRouteProperties'>EffectiveRouteProperties</a></code>
</td>
<td><p>The route's effective properties.</p>
</td>
</tr>
</table>
### InstalledRouteV6 {#InstalledRouteV6 data-text="InstalledRouteV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=44)*
<p>An <code>InstalledRouteV6</code> specifies an IPv6 network route that is installed in
the system's routing table.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="InstalledRouteV6.route">
<td><h3 id="InstalledRouteV6.route" class="add-link hide-from-toc">1</h3></td>
<td><code>route</code></td>
<td>
<code><a class='link' href='#RouteV6'>RouteV6</a></code>
</td>
<td><p>The route.</p>
</td>
</tr>
<tr id="InstalledRouteV6.effective_properties">
<td><h3 id="InstalledRouteV6.effective_properties" class="add-link hide-from-toc">2</h3></td>
<td><code>effective_properties</code></td>
<td>
<code><a class='link' href='#EffectiveRouteProperties'>EffectiveRouteProperties</a></code>
</td>
<td><p>The route's effective properties.</p>
</td>
</tr>
</table>
### RoutePropertiesV4 {#RoutePropertiesV4 data-text="RoutePropertiesV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=35)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="RoutePropertiesV4.specified_properties">
<td><h3 id="RoutePropertiesV4.specified_properties" class="add-link hide-from-toc">1</h3></td>
<td><code>specified_properties</code></td>
<td>
<code><a class='link' href='#SpecifiedRouteProperties'>SpecifiedRouteProperties</a></code>
</td>
<td><p>The route's specified properties.</p>
</td>
</tr>
</table>
### RoutePropertiesV6 {#RoutePropertiesV6 data-text="RoutePropertiesV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=35)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="RoutePropertiesV6.specified_properties">
<td><h3 id="RoutePropertiesV6.specified_properties" class="add-link hide-from-toc">1</h3></td>
<td><code>specified_properties</code></td>
<td>
<code><a class='link' href='#SpecifiedRouteProperties'>SpecifiedRouteProperties</a></code>
</td>
<td><p>The route's specified properties.</p>
</td>
</tr>
</table>
### SpecifiedRouteProperties {#SpecifiedRouteProperties data-text="SpecifiedRouteProperties"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=17)*
<p>The properties of the route that were explicitly specified at the time the
route was created.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="SpecifiedRouteProperties.metric">
<td><h3 id="SpecifiedRouteProperties.metric" class="add-link hide-from-toc">1</h3></td>
<td><code>metric</code></td>
<td>
<code><a class='link' href='#SpecifiedMetric'>SpecifiedMetric</a></code>
</td>
<td><p>The route's effective metric will be determined by whichever value is
specified below.</p>
</td>
</tr>
</table>
### WatcherOptionsV4 {#WatcherOptionsV4 data-text="WatcherOptionsV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=61)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
### WatcherOptionsV6 {#WatcherOptionsV6 data-text="WatcherOptionsV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=61)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
## **UNIONS**
### EventV4 [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#EventV4 data-text="EventV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=89)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="EventV4.existing">
<td><h3 id="EventV4.existing" class="add-link hide-from-toc">1</h3></td>
<td><code>existing</code></td>
<td>
<code><a class='link' href='#InstalledRouteV4'>InstalledRouteV4</a></code>
</td>
<td><p>A route that already existed when watching started.</p>
</td>
</tr>
<tr id="EventV4.idle">
<td><h3 id="EventV4.idle" class="add-link hide-from-toc">2</h3></td>
<td><code>idle</code></td>
<td>
<code><a class='link' href='#Empty'>Empty</a></code>
</td>
<td><p>Sentinel value indicating no more <code>existing</code> events will be
received.</p>
</td>
</tr>
<tr id="EventV4.added">
<td><h3 id="EventV4.added" class="add-link hide-from-toc">3</h3></td>
<td><code>added</code></td>
<td>
<code><a class='link' href='#InstalledRouteV4'>InstalledRouteV4</a></code>
</td>
<td><p>A route that was added while watching.</p>
</td>
</tr>
<tr id="EventV4.removed">
<td><h3 id="EventV4.removed" class="add-link hide-from-toc">4</h3></td>
<td><code>removed</code></td>
<td>
<code><a class='link' href='#InstalledRouteV4'>InstalledRouteV4</a></code>
</td>
<td><p>A route that was removed while watching.</p>
</td>
</tr>
</table>
### EventV6 [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#EventV6 data-text="EventV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=89)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="EventV6.existing">
<td><h3 id="EventV6.existing" class="add-link hide-from-toc">1</h3></td>
<td><code>existing</code></td>
<td>
<code><a class='link' href='#InstalledRouteV6'>InstalledRouteV6</a></code>
</td>
<td><p>A route that already existed when watching started.</p>
</td>
</tr>
<tr id="EventV6.idle">
<td><h3 id="EventV6.idle" class="add-link hide-from-toc">2</h3></td>
<td><code>idle</code></td>
<td>
<code><a class='link' href='#Empty'>Empty</a></code>
</td>
<td><p>Sentinel value indicating no more <code>existing</code> events will be
received.</p>
</td>
</tr>
<tr id="EventV6.added">
<td><h3 id="EventV6.added" class="add-link hide-from-toc">3</h3></td>
<td><code>added</code></td>
<td>
<code><a class='link' href='#InstalledRouteV6'>InstalledRouteV6</a></code>
</td>
<td><p>A route that was added while watching.</p>
</td>
</tr>
<tr id="EventV6.removed">
<td><h3 id="EventV6.removed" class="add-link hide-from-toc">4</h3></td>
<td><code>removed</code></td>
<td>
<code><a class='link' href='#InstalledRouteV6'>InstalledRouteV6</a></code>
</td>
<td><p>A route that was removed while watching.</p>
</td>
</tr>
</table>
### Resolved [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Resolved data-text="Resolved"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=91)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Resolved.direct">
<td><h3 id="Resolved.direct" class="add-link hide-from-toc">1</h3></td>
<td><code>direct</code></td>
<td>
<code><a class='link' href='#Destination'>Destination</a></code>
</td>
<td><p>The requested destination is directly reachable.</p>
</td>
</tr>
<tr id="Resolved.gateway">
<td><h3 id="Resolved.gateway" class="add-link hide-from-toc">2</h3></td>
<td><code>gateway</code></td>
<td>
<code><a class='link' href='#Destination'>Destination</a></code>
</td>
<td><p>The requested destination is reachable through a gateway, thus
the next hop is the gateway.</p>
</td>
</tr>
</table>
### RouteActionV4 [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RouteActionV4 data-text="RouteActionV4"}
*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=24)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="RouteActionV4.forward">
<td><h3 id="RouteActionV4.forward" class="add-link hide-from-toc">1</h3></td>
<td><code>forward</code></td>
<td>
<code><a class='link' href='#RouteTargetV4'>RouteTargetV4</a></code>
</td>
<td><p>Forward the packet to the specified target.</p>
</td>
</tr>
</table>
### RouteActionV6 [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RouteActionV6 data-text="RouteActionV6"}
*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=24)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="RouteActionV6.forward">
<td><h3 id="RouteActionV6.forward" class="add-link hide-from-toc">1</h3></td>
<td><code>forward</code></td>
<td>
<code><a class='link' href='#RouteTargetV6'>RouteTargetV6</a></code>
</td>
<td><p>Forward the packet to the specified target.</p>
</td>
</tr>
</table>
### SpecifiedMetric [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#SpecifiedMetric data-text="SpecifiedMetric"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=20)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="SpecifiedMetric.explicit_metric">
<td><h3 id="SpecifiedMetric.explicit_metric" class="add-link hide-from-toc">1</h3></td>
<td><code>explicit_metric</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#RouteMetric'>RouteMetric</a></code>
</td>
<td><p>The route's metric will be this explicitly specified value.</p>
</td>
</tr>
<tr id="SpecifiedMetric.inherited_from_interface">
<td><h3 id="SpecifiedMetric.inherited_from_interface" class="add-link hide-from-toc">2</h3></td>
<td><code>inherited_from_interface</code></td>
<td>
<code><a class='link' href='#Empty'>Empty</a></code>
</td>
<td><p>The route's metric is inherited from its outbound interface, and
will track this value as it changes throughout the route's lifetime.
Clients may prefer this approach if they wish to offload the
responsibility of &quot;which route is best&quot; to the system.</p>
</td>
</tr>
</table>
### State_Resolve_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#State_Resolve_Result data-text="State_Resolve_Result"}
*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=85)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="State_Resolve_Result.response">
<td><h3 id="State_Resolve_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#State_Resolve_Response'>State_Resolve_Response</a></code>
</td>
<td></td>
</tr>
<tr id="State_Resolve_Result.err">
<td><h3 id="State_Resolve_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>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_EVENTS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=51">MAX_EVENTS</a></td>
<td>
<code>512</code>
</td>
<td><code>uint16</code></td>
<td><p>The maximum number of events that can be returned by one call to <code>Watch()</code>.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
</td>
</tr>
</table>