fuchsia.net.routes

Added: 7

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 of destination determines variant of 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

NameType
destination fuchsia.net/IpAddress

Response

NameType
payload State_Resolve_Result

StateV4

Defined in fuchsia.net.routes/ipv4.fidl

Provides observability to the system's IPv4 routing state.

Added: HEAD

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

NameType
watcher server_end<WatcherV4>
options WatcherOptionsV4

StateV6

Defined in fuchsia.net.routes/ipv6.fidl

Provides observability to the system's IPv6 routing state.

Added: HEAD

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

NameType
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.

Added: HEAD

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

NameType
events vector<EventV4>[512]

WatcherV6

Defined in fuchsia.net.routes/ipv6.fidl

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

Added: HEAD

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

NameType
events vector<EventV6>[512]

STRUCTS

Empty

Defined in fuchsia.net.routes/routes.fidl

A placeholder for empty values.

Added: HEAD

<EMPTY>

RouteTargetV4

Defined in fuchsia.net.routes/ipv4.fidl

FieldTypeDescriptionDefault
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

FieldTypeDescriptionDefault
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.

Added: HEAD

FieldTypeDescriptionDefault
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.

Added: HEAD

FieldTypeDescriptionDefault
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

FieldTypeDescriptionDefault
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.

OrdinalFieldTypeDescription
address fuchsia.net/IpAddress

The IP address of the destination.

mac fuchsia.net/MacAddress

The MAC address of the destination. Only set if the destination is on a link that requires a MAC address.

interface_id fuchsia.net/InterfaceId

The interface identifier over which the destination can be reached.

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.

Added: HEAD

OrdinalFieldTypeDescription
metric fuchsia.net/RouteMetric

The route's effective metric, dependent on the value of the route's 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

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

Added: HEAD

OrdinalFieldTypeDescription
route RouteV4

The route.

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.

Added: HEAD

OrdinalFieldTypeDescription
route RouteV6

The route.

effective_properties EffectiveRouteProperties

The route's effective properties.

RoutePropertiesV4

Defined in fuchsia.net.routes/ipv4.fidl

OrdinalFieldTypeDescription
specified_properties SpecifiedRouteProperties

The route's specified properties.

RoutePropertiesV6

Defined in fuchsia.net.routes/ipv6.fidl

OrdinalFieldTypeDescription
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.

Added: HEAD

OrdinalFieldTypeDescription
metric SpecifiedMetric

The route's effective metric will be determined by whichever value is specified below.

WatcherOptionsV4

Defined in fuchsia.net.routes/ipv4.fidl

OrdinalFieldTypeDescription

WatcherOptionsV6

Defined in fuchsia.net.routes/ipv6.fidl

OrdinalFieldTypeDescription

UNIONS

EventV4 flexible

Defined in fuchsia.net.routes/ipv4.fidl

OrdinalVariantTypeDescription
existing InstalledRouteV4

A route that already existed when watching started.

idle Empty

Sentinel value indicating no more existing events will be received.

added InstalledRouteV4

A route that was added while watching.

removed InstalledRouteV4

A route that was removed while watching.

EventV6 flexible

Defined in fuchsia.net.routes/ipv6.fidl

OrdinalVariantTypeDescription
existing InstalledRouteV6

A route that already existed when watching started.

idle Empty

Sentinel value indicating no more existing events will be received.

added InstalledRouteV6

A route that was added while watching.

removed InstalledRouteV6

A route that was removed while watching.

Resolved strict

Defined in fuchsia.net.routes/routes.fidl

OrdinalVariantTypeDescription
direct Destination

The requested destination is directly reachable.

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

OrdinalVariantTypeDescription
forward RouteTargetV4

Forward the packet to the specified target.

RouteActionV6 flexible

Defined in fuchsia.net.routes/ipv6.fidl

OrdinalVariantTypeDescription
forward RouteTargetV6

Forward the packet to the specified target.

SpecifiedMetric strict

Defined in fuchsia.net.routes/routes.fidl

OrdinalVariantTypeDescription
explicit_metric fuchsia.net/RouteMetric

The route's metric will be this explicitly specified value.

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

OrdinalVariantTypeDescription
response State_Resolve_Response
err zx/Status

CONSTANTS

NameValueTypeDescription
MAX_EVENTS 512 uint16

The maximum number of events that can be returned by one call to Watch().

Added: HEAD