PROTOCOLS
State
Defined in fuchsia.net.routes/routes.fidl
Provides access to the system's routing state.
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 ofdestination
determines variant of fuchsia.net/IpAddress fields in the resolved route.
- response
result
contains the resolved route todestination
.
- error
ZX_ERR_ADDRESS_UNREACHABLE
ifdestination
can't be resolved.
Request
Name | Type |
---|---|
destination |
fuchsia.net/IpAddress
|
Response
Name | Type |
---|---|
result |
State_Resolve_Result
|
StateV4
Defined in fuchsia.net.routes/ipv4.fidl
Provides observability to the system's IPv4 routing state.
GetWatcherV4
Initialize a watcher for IPv4 routing state.
- request 'watcher' grants access to the
WatcherV4
Protocol. - request
watch_options
specifies the behavior of theWatcherV4
.
Request
Name | Type |
---|---|
watcher |
server_end<WatcherV4>
|
options |
WatcherOptionsV4
|
StateV6
Defined in fuchsia.net.routes/ipv6.fidl
Provides observability to the system's IPv6 routing state.
GetWatcherV6
Initialize a watcher for IPv6 routing state.
- request 'watcher' grants access to the
WatcherV6
Protocol. - request
watch_options
specifies the behavior of theWatcherV6
.
Request
Name | Type |
---|---|
watcher |
server_end<WatcherV6>
|
options |
WatcherOptionsV6
|
WatcherV4
Defined in fuchsia.net.routes/ipv4.fidl
An observer protocol for changes in system's IPv4 routing state.
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 mostMAX_EVENTS
events.
Request
<EMPTY>
Response
Name | Type |
---|---|
events |
vector<EventV4>[512]
|
WatcherV6
Defined in fuchsia.net.routes/ipv6.fidl
An observer protocol for changes in system's IPv6 routing state.
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 mostMAX_EVENTS
events.
Request
<EMPTY>
Response
Name | Type |
---|---|
events |
vector<EventV6>[512]
|
STRUCTS
Empty
Defined in fuchsia.net.routes/routes.fidl
A placeholder for empty values.
<EMPTY>
RouteTargetV4
Defined in fuchsia.net.routes/ipv4.fidl
Field | Type | Description | Default |
---|---|---|---|
outbound_interface |
fuchsia.net/InterfaceId
|
The interface ID of the target's outbound interface. |
No default |
next_hop |
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
Field | Type | Description | Default |
---|---|---|---|
outbound_interface |
fuchsia.net/InterfaceId
|
The interface ID of the target's outbound interface. |
No default |
next_hop |
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
A RouteV4
specifies an IPv4 network route.
Field | Type | Description | Default |
---|---|---|---|
destination |
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 |
RouteActionV4
|
Packets matching this route will have the specified action applied to them. |
No default |
properties |
RoutePropertiesV4
|
The additional properties of the IPv4 route. |
No default |
RouteV6
Defined in fuchsia.net.routes/ipv6.fidl
A RouteV6
specifies an IPv6 network route.
Field | Type | Description | Default |
---|---|---|---|
destination |
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 |
RouteActionV6
|
Packets matching this route will have the specified action applied to them. |
No default |
properties |
RoutePropertiesV6
|
The additional properties of the IPv6 route. |
No default |
State_Resolve_Response
Defined in fuchsia.net.routes/routes.fidl
Field | Type | Description | Default |
---|---|---|---|
result |
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 |
TABLES
Destination
Defined in fuchsia.net.routes/routes.fidl
Collection of addresses and identifiers describing a network destination.
A Destination
is the "next-hop" for a routed packet.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
address |
fuchsia.net/IpAddress
|
The IP address of the destination. |
2 |
mac |
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 |
fuchsia.net/InterfaceId
|
The interface identifier over which the destination can be reached. |
4 |
source_address |
fuchsia.net/IpAddress
|
The preferred local IP address used to communicate with the destination. |
EffectiveRouteProperties
Defined in fuchsia.net.routes/routes.fidl
The effective properties of a route installed in the system.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
metric |
fuchsia.net/RouteMetric
|
The route's effective metric, dependent on the value of the route's
SpecifiedRouteProperties. If the |
InstalledRouteV4
Defined in fuchsia.net.routes/ipv4.fidl
An InstalledRouteV4
specifies an IPv4 network route that is installed in
the system's routing table.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
route |
RouteV4
|
The route. |
2 |
effective_properties |
EffectiveRouteProperties
|
The route's effective properties. |
InstalledRouteV6
Defined in fuchsia.net.routes/ipv6.fidl
An InstalledRouteV6
specifies an IPv6 network route that is installed in
the system's routing table.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
route |
RouteV6
|
The route. |
2 |
effective_properties |
EffectiveRouteProperties
|
The route's effective properties. |
RoutePropertiesV4
Defined in fuchsia.net.routes/ipv4.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
specified_properties |
SpecifiedRouteProperties
|
The route's specified properties. |
RoutePropertiesV6
Defined in fuchsia.net.routes/ipv6.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
specified_properties |
SpecifiedRouteProperties
|
The route's specified properties. |
SpecifiedRouteProperties
Defined in fuchsia.net.routes/routes.fidl
The properties of the route that were explicitly specified at the time the route was created.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
metric |
SpecifiedMetric
|
The route's effective metric will be determined by whichever value is specified below. |
WatcherOptionsV4
Defined in fuchsia.net.routes/ipv4.fidl
Ordinal | Field | Type | Description |
---|
WatcherOptionsV6
Defined in fuchsia.net.routes/ipv6.fidl
Ordinal | Field | Type | Description |
---|
UNIONS
EventV4 flexible
Defined in fuchsia.net.routes/ipv4.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
existing |
InstalledRouteV4
|
A route that already existed when watching started. |
2 |
idle |
Empty
|
Sentinel value indicating no more |
3 |
added |
InstalledRouteV4
|
A route that was added while watching. |
4 |
removed |
InstalledRouteV4
|
A route that was removed while watching. |
EventV6 flexible
Defined in fuchsia.net.routes/ipv6.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
existing |
InstalledRouteV6
|
A route that already existed when watching started. |
2 |
idle |
Empty
|
Sentinel value indicating no more |
3 |
added |
InstalledRouteV6
|
A route that was added while watching. |
4 |
removed |
InstalledRouteV6
|
A route that was removed while watching. |
Resolved strict
Defined in fuchsia.net.routes/routes.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
direct |
Destination
|
The requested destination is directly reachable. |
2 |
gateway |
Destination
|
The requested destination is reachable through a gateway, thus the next hop is the gateway. |
RouteActionV4 flexible
Defined in fuchsia.net.routes/ipv4.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
forward |
RouteTargetV4
|
Forward the packet to the specified target. |
RouteActionV6 flexible
Defined in fuchsia.net.routes/ipv6.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
forward |
RouteTargetV6
|
Forward the packet to the specified target. |
SpecifiedMetric strict
Defined in fuchsia.net.routes/routes.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
explicit_metric |
fuchsia.net/RouteMetric
|
The route's metric will be this explicitly specified value. |
2 |
inherited_from_interface |
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. |
State_Resolve_Result strict
Defined in fuchsia.net.routes/routes.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
State_Resolve_Response
|
|
2 |
err |
zx/Status
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_EVENTS |
512
|
uint16 |
The maximum number of events that can be returned by one call to Added: HEAD
|