<br />

Added: 7

## **PROTOCOLS**

## RuleWatcherV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=140)*

An observer protocol for changes in the system's IPv4 rules table.
Added: HEAD

<br />

### Watch

Hanging-Get style API for observing routing rule changes.

Clients must only have one pending `Watch` call at a time. Calling
`Watch` while a request is already pending will cause the protocol to
close.

The first N events will always be `existing` where N is the number of
IPv4 rules that already existed when the server-end of the protocol was
initialized. The following event will be `idle` signaling the end of the
`existing` events. At this point the client has watched all existing
state and will never again observe an `existing` event.

- response `events` A vector of at most `MAX_EVENTS` events.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `events` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleEventV4>:512` |

## RuleWatcherV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=140)*

An observer protocol for changes in the system's IPv6 rules table.
Added: HEAD

<br />

### Watch

Hanging-Get style API for observing routing rule changes.

Clients must only have one pending `Watch` call at a time. Calling
`Watch` while a request is already pending will cause the protocol to
close.

The first N events will always be `existing` where N is the number of
IPv6 rules that already existed when the server-end of the protocol was
initialized. The following event will be `idle` signaling the end of the
`existing` events. At this point the client has watched all existing
state and will never again observe an `existing` event.

- response `events` A vector of at most `MAX_EVENTS` events.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `events` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleEventV6>:512` |

## State

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=87)*

Provides access to the system's routing state.

<br />

### GetRouteTableName

Gets the route table name by its ID.

- request `table_id` the ID of the route table in question.

<!-- -->

- response `table_name` the name of the route table, if the route table does not have a name, an empty string is returned.

<!-- -->

- error `NO_TABLE` if the route table does not exist.

Added: HEAD

#### Request

| Name | Type |
|---|---|
| `table_id` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableId` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_GetRouteTableName_Result` |

### Resolve

Resolves the route to a destination.

- request `destination` 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 `destination` determines variant of [fuchsia.net](https://fuchsia.dev/reference/fuchsia.net/)/[IpAddress](https://fuchsia.dev/reference/fuchsia.net/#IpAddress) fields in the resolved route.

<!-- -->

- response `result` contains the resolved route to `destination`.

<!-- -->

- error `ZX_ERR_ADDRESS_UNREACHABLE` if `destination` can't be resolved.

#### Request

| Name | Type |
|---|---|
| `destination` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#IpAddress` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_Resolve_Result` |

### Resolve2

Resolves the route to a destination.

- request `destination` 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 `destination` determines variant of [fuchsia.net](https://fuchsia.dev/reference/fuchsia.net/)/[IpAddress](https://fuchsia.dev/reference/fuchsia.net/#IpAddress) fields in the resolved route.
- request `options` contains optional information used for the route resolution.

<!-- -->

- response `result` contains the resolved route to `destination`.

<!-- -->

- error `ADDRESS_UNREACHABLE` if `destination` can't be resolved.

Added: HEAD

#### Request

| Name | Type |
|---|---|
| `destination` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#IpAddress` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#ResolveOptions` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_Resolve2_Result` |

## StateV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=56)*

Provides observability to the system's IPv4 routing state.
Added: HEAD

<br />

### GetRuleWatcherV4

Initialize a watcher for IPv4 rules state.

- request 'watcher' grants access to the `RuleWatcherV4` Protocol.
- request `watch_options` specifies the behavior of the `RuleWatcherV4`.

#### Request

| Name | Type |
|---|---|
| `watcher` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleWatcherV4` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleWatcherOptionsV4` |

### GetWatcherV4

Initialize a watcher for IPv4 routing state.

- request 'watcher' grants access to the `WatcherV4` Protocol.
- request `watch_options` specifies the behavior of the `WatcherV4`.

#### Request

| Name | Type |
|---|---|
| `watcher` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.net.routes#WatcherV4` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#WatcherOptionsV4` |

## StateV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=56)*

Provides observability to the system's IPv6 routing state.
Added: HEAD

<br />

### GetRuleWatcherV6

Initialize a watcher for IPv6 rules state.

- request 'watcher' grants access to the `RuleWatcherV6` Protocol.
- request `watch_options` specifies the behavior of the `RuleWatcherV6`.

#### Request

| Name | Type |
|---|---|
| `watcher` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleWatcherV6` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleWatcherOptionsV6` |

### GetWatcherV6

Initialize a watcher for IPv6 routing state.

- request 'watcher' grants access to the `WatcherV6` Protocol.
- request `watch_options` specifies the behavior of the `WatcherV6`.

#### Request

| Name | Type |
|---|---|
| `watcher` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.net.routes#WatcherV6` |
| `options` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#WatcherOptionsV6` |

## WatcherV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=84)*

An observer protocol for changes in system's IPv4 routing state.
Added: HEAD

<br />

### Watch

Hanging-Get style API for observing routing changes.

Clients must only have one pending `Watch` call at a time. Calling
`Watch` while a request is already pending will cause the protocol to
close.

The first N events will always be `existing` 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 `idle` signaling the end of the
`existing` events. At this point the client has watched all existing
state and will never again observe an `existing` event.

Events are returned in batches of up to `MAX_EVENTS` 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 `existing` 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.

- response `events` A vector of at most `MAX_EVENTS` events.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `events` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.net.routes#EventV4>:512` |

## WatcherV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=84)*

An observer protocol for changes in system's IPv6 routing state.
Added: HEAD

<br />

### Watch

Hanging-Get style API for observing routing changes.

Clients must only have one pending `Watch` call at a time. Calling
`Watch` while a request is already pending will cause the protocol to
close.

The first N events will always be `existing` 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 `idle` signaling the end of the
`existing` events. At this point the client has watched all existing
state and will never again observe an `existing` event.

Events are returned in batches of up to `MAX_EVENTS` 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 `existing` 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.

- response `events` A vector of at most `MAX_EVENTS` events.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `events` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.net.routes#EventV6>:512` |

## **STRUCTS**

### All

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=178)*

\<EMPTY\>

### Empty

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=26)*

A placeholder for empty values.
Added: HEAD

<br />

\<EMPTY\>

### InstalledRuleV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=122)*

An installed IPv4 routing rule.
Added: HEAD

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `rule_set_priority` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleSetPriority` | Rule sets are ordered by the rule set priority, rule sets are disjoint and don't have interleaving rules among them. | No default |
| `rule_index` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleIndex` | Rules within a rule set are locally ordered, together with the rule set priority, this defines a global order for all installed rules. | No default |
| `matcher` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleMatcherV4` | The matcher part of the rule, the rule is a no-op if the matcher does not match the packet. | No default |
| `action` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleAction` | The action part of the rule that describes what to do if the matcher matches the packet. | No default |

### InstalledRuleV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=122)*

An installed IPv6 routing rule.
Added: HEAD

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `rule_set_priority` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleSetPriority` | Rule sets are ordered by the rule set priority, rule sets are disjoint and don't have interleaving rules among them. | No default |
| `rule_index` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleIndex` | Rules within a rule set are locally ordered, together with the rule set priority, this defines a global order for all installed rules. | No default |
| `matcher` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleMatcherV6` | The matcher part of the rule, the rule is a no-op if the matcher does not match the packet. | No default |
| `action` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleAction` | The action part of the rule that describes what to do if the matcher matches the packet. | No default |

### Main

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=176)*

\<EMPTY\>

### RouteTargetV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=26)*

| Field | Type | Description | Default |
|---|---|---|---|
| `outbound_interface` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#InterfaceId` | The interface ID of the target's outbound interface. | No default |
| `next_hop` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Ipv4Address?` | The optional next-hop of the target. If provided, the address must be a unicast address. | No default |

### RouteTargetV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=26)*

| Field | Type | Description | Default |
|---|---|---|---|
| `outbound_interface` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#InterfaceId` | The interface ID of the target's outbound interface. | No default |
| `next_hop` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Ipv6Address?` | The optional next-hop of the target. If provided, the address must be a unicast address. | No default |

### RouteV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=16)*

A `RouteV4` specifies an IPv4 network route.
Added: HEAD

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `destination` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Ipv4AddressWithPrefix` | 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. | No default |
| `action` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RouteActionV4` | Packets matching this route will have the specified action applied to them. | No default |
| `properties` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RoutePropertiesV4` | The additional properties of the IPv4 route. | No default |

### RouteV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=16)*

A `RouteV6` specifies an IPv6 network route.
Added: HEAD

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `destination` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Ipv6AddressWithPrefix` | 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. | No default |
| `action` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RouteActionV6` | Packets matching this route will have the specified action applied to them. | No default |
| `properties` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RoutePropertiesV6` | The additional properties of the IPv6 route. | No default |

### State_GetRouteTableName_Response

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=163)*

| Field | Type | Description | Default |
|---|---|---|---|
| `table_name` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableName` |   | No default |

### State_Resolve2_Response

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=138)*

| Field | Type | Description | Default |
|---|---|---|---|
| `result` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#ResolveResult` | A resolved route. Contains the information for the "next-hop" or immediate-destination that is the result of a route resolution. A resolved route is only meaningful in the context of a requested destination. | No default |

### 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=98)*

| Field | Type | Description | Default |
|---|---|---|---|
| `result` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Resolved` | A resolved route. Contains the information for the "next-hop" or immediate-destination that is the result of a route resolution. A resolved route is only meaningful in the context of a requested destination. | No default |

### Unreachable

*Defined in [fuchsia.net.routes/rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/rules.fidl;l=39)*

\<EMPTY\>

## **ENUMS**

### ResolveError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=151)*

| Name | Value | Description |
|---|---|---|
| ### ADDRESS_UNREACHABLE | `1` |   |

### State_GetRouteTableName_Error [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=165)*

| Name | Value | Description |
|---|---|---|
| ### NO_TABLE | `1` |   |

## **TABLES**

### BaseMatcher

*Defined in [fuchsia.net.routes/rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/rules.fidl;l=47)*

The common matcher that can be matched to both IPv4 and IPv6 packets.

A matcher matches a packet if all of the present fields match the
corresponding properties.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `locally_generated` | `bool` | Matches the packet iff the packet was locally generated. |
| ### 2 | `bound_device` | `https://fuchsia.dev/reference/fuchsia.net.matchers//https://fuchsia.dev/reference/fuchsia.net.matchers#BoundInterface` | Matches on the originating interface of the outgoing packet. |
| ### 3 | `mark_1` | `https://fuchsia.dev/reference/fuchsia.net.matchers//https://fuchsia.dev/reference/fuchsia.net.matchers#Mark` | Matches the MARK_1 domain. |
| ### 4 | `mark_2` | `https://fuchsia.dev/reference/fuchsia.net.matchers//https://fuchsia.dev/reference/fuchsia.net.matchers#Mark` | Matches for the MARK_2 domain. |

### Destination

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=73)*

Collection of addresses and identifiers describing a network destination.

A `Destination` is the "next-hop" for a routed packet.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `address` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#IpAddress` | The IP address of the destination. |
| ### 2 | `mac` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#MacAddress` | The MAC address of the destination. Only set if the destination is on a link that requires a MAC address. |
| ### 3 | `interface_id` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#InterfaceId` | The interface identifier over which the destination can be reached. |
| ### 4 | `source_address` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#IpAddress` | The preferred local IP address used to communicate with the destination. |

### EffectiveRouteProperties

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=50)*

The effective properties of a route installed in the system.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `metric` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#RouteMetric` | The route's effective metric, dependent on the value of the route's [SpecifiedRouteProperties](https://fuchsia.dev/reference/fidl/fuchsia.net.routes#SpecifiedRouteProperties). If the `specified_metric` is `explicit_metric`, this value will be identical to the provided value; if the `specified_metric` is `inherited_from_interface` this value will be the interface's routing metric. |

### InstalledRouteV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=44)*

An `InstalledRouteV4` specifies an IPv4 network route that is installed in
the system's routing table.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `route` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RouteV4` | The route. |
| ### 2 | `effective_properties` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#EffectiveRouteProperties` | The route's effective properties. |
| ### 3 | `table_id` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableId` | The ID of the table to which this route belongs. |

### InstalledRouteV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=44)*

An `InstalledRouteV6` specifies an IPv6 network route that is installed in
the system's routing table.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `route` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RouteV6` | The route. |
| ### 2 | `effective_properties` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#EffectiveRouteProperties` | The route's effective properties. |
| ### 3 | `table_id` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableId` | The ID of the table to which this route belongs. |

### ResolveOptions

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=129)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `marks` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Marks` | The marks used for the route resolution. For mark domains that are not present, the route resolution will happen with no marks for the domain. This field is also optional. If absent, all mark domains are considered to be unmarked for the route resolution. |

### RoutePropertiesV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=35)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `specified_properties` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#SpecifiedRouteProperties` | The route's specified properties. |

### RoutePropertiesV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=35)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `specified_properties` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#SpecifiedRouteProperties` | The route's specified properties. |

### RuleMatcherV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=174)*

The matcher part of the rule that is used to match packets.

A matcher matches a packet if all of the present fields match the
corresponding properties.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `from` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Ipv4AddressWithPrefix` | Matches whether the source address of the packet is from the subnet. |
| ### 2 | `base` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#BaseMatcher` | The rest of the matcher that is common between IP versions. Interpreted as an empty table if absent. |

### RuleMatcherV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=174)*

The matcher part of the rule that is used to match packets.

A matcher matches a packet if all of the present fields match the
corresponding properties.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `from` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Ipv6AddressWithPrefix` | Matches whether the source address of the packet is from the subnet. |
| ### 2 | `base` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#BaseMatcher` | The rest of the matcher that is common between IP versions. Interpreted as an empty table if absent. |

### RuleWatcherOptionsV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=78)*

| Ordinal | Field | Type | Description |
|---|---|---|---|

### RuleWatcherOptionsV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=78)*

| Ordinal | Field | Type | Description |
|---|---|---|---|

### SpecifiedRouteProperties

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=31)*

The properties of the route that were explicitly specified at the time the
route was created.
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `metric` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#SpecifiedMetric` | The route's effective metric will be determined by whichever value is specified below. |

### WatcherOptionsV4

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=63)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `table_interest` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableInterest` | Filter events on tables matching `table_interest`. Interpreted as `all` if absent. The server does not validate if `TableInterest` contains valid table IDs. |

### WatcherOptionsV6

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=63)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `table_interest` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableInterest` | Filter events on tables matching `table_interest`. Interpreted as `all` if absent. The server does not validate if `TableInterest` contains valid table IDs. |

## **UNIONS**

### EventV4 [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=106)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `existing` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRouteV4` | A route that already existed when watching started. |
| ### 2 | `idle` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Empty` | Sentinel value indicating no more `existing` events will be received. |
| ### 3 | `added` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRouteV4` | A route that was added while watching. |
| ### 4 | `removed` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRouteV4` | A route that was removed while watching. |

<br />

### EventV6 [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=106)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `existing` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRouteV6` | A route that already existed when watching started. |
| ### 2 | `idle` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Empty` | Sentinel value indicating no more `existing` events will be received. |
| ### 3 | `added` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRouteV6` | A route that was added while watching. |
| ### 4 | `removed` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRouteV6` | A route that was removed while watching. |

<br />

### ResolveResult [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=144)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `direct` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Destination` | The requested destination is directly reachable. |
| ### 2 | `gateway` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Destination` | The requested destination is reachable through a gateway, thus the next hop is the gateway. |

<br />

### Resolved [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=107)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `direct` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Destination` | The requested destination is directly reachable. |
| ### 2 | `gateway` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Destination` | The requested destination is reachable through a gateway, thus the next hop is the gateway. |

<br />

### RouteActionV4 [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=24)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `forward` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RouteTargetV4` | Forward the packet to the specified target. |

<br />

### RouteActionV6 [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=24)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `forward` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RouteTargetV6` | Forward the packet to the specified target. |

<br />

### RuleAction [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/rules.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/rules.fidl;l=31)*

Actions of a rule if the matcher matches.
Added: HEAD

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `lookup` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableId` | Look for a route in the indicated route table. If there is no matching route in the target table, the lookup will continue to consider the next rule. |
| ### 2 | `unreachable` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Unreachable` | Return network is unreachable. This is contrary to if a `lookup` table is empty or no matching routes, this decision is terminal and stops the lookup process from continuing. |

<br />

### RuleEventV4 [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/ipv4.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv4.fidl;l=155)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `existing` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRuleV4` | A rule that already existed when watching started. |
| ### 2 | `idle` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Empty` | Sentinel value indicating no more `existing` events will be received. |
| ### 3 | `added` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRuleV4` | A rule that was added while watching. |
| ### 4 | `removed` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRuleV4` | A rule that was removed while watching. |

<br />

### RuleEventV6 [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/ipv6.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/ipv6.fidl;l=155)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `existing` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRuleV6` | A rule that already existed when watching started. |
| ### 2 | `idle` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Empty` | Sentinel value indicating no more `existing` events will be received. |
| ### 3 | `added` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRuleV6` | A rule that was added while watching. |
| ### 6 | `removed` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#InstalledRuleV6` | A rule that was removed while watching. |

<br />

### SpecifiedMetric [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=37)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `explicit_metric` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#RouteMetric` | The route's metric will be this explicitly specified value. |
| ### 2 | `inherited_from_interface` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Empty` | 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 "which route is best" to the system. |

<br />

### State_GetRouteTableName_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=163)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_GetRouteTableName_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_GetRouteTableName_Error` |   |

<br />

### State_Resolve2_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=138)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_Resolve2_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#ResolveError` |   |

<br />

### State_Resolve_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=98)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#State_Resolve_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |

<br />

### TableInterest [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.routes/routes.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=172)*

Specifies which table(s) the watcher is interested in.
Added: HEAD

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `only` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#TableId` | Only watch for events on the specified table. |
| ### 2 | `main` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#Main` | Watches on the main table without knowing the table ID. |
| ### 3 | `all` | `https://fuchsia.dev/reference/fidl/fuchsia.net.routes#All` | Watches for all routing tables. |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [DEFAULT_RULE_SET_PRIORITY](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/rules.fidl;l=20) | `4294967295` | `uint32` | A reserved rule set priority for the netstack. This is used by the network stack for installing default rules. Added: HEAD |
| [MAX_EVENTS](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=68) | `512` | `uint16` | The maximum number of events that can be returned by one call to `Watch()`. Added: HEAD |
| [MAX_TABLE_NAME_LEN](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=18) | `255` | `uint64` | Maximum length of a table name. Added: HEAD |

## **ALIASES**

| Name | Value | Description |
|---|---|---|
| [RuleIndex](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/rules.fidl;l=27) | `uint32` | The index of a rule within a provided rule set. Rules within the same `RuleSet` are oredered based on the index. Rule at index 0 is evaluated first among the entire set. Added: HEAD |
| [RuleSetPriority](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/rules.fidl;l=14) | `uint32` | The priority of the rule set, all rule sets are linearized based on this. Rules of a `RuleSet` with a smaller [RuleSetPriority](https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleSetPriority) are executed before rules of a `RuleSet` with a larger [RuleSetPriority](https://fuchsia.dev/reference/fidl/fuchsia.net.routes#RuleSetPriority). That is, `RuleSet` with priority 0 has the top priority. Added: HEAD |
| [TableId](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=14) | `uint32` | The ID of a route table. `TableId`s are globally unique non-reusable identifiers for a route table. Added: HEAD |
| [TableName](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.routes/routes.fidl;l=22) | `string`\[`https://fuchsia.dev/reference/fidl/fuchsia.net.routes#MAX_TABLE_NAME_LEN`\] | The name of a route table. Added: HEAD |