Expand description
Extensions for the fuchsia.net.routes FIDL library.
The fuchsia.net.routes API has separate V4 and V6 watcher variants to
enforce maximum type safety and access control at the API layer. For the
most part, these APIs are a mirror image of one another. This library
provides an a single implementation that is generic over
net_types::ip::Ip
version, as well as conversion utilities.
Modules§
- Extensions for fuchsia.net.routes.admin.
- Extensions for route rules FIDL.
- Test Utilities for the fuchsia.net.routes FIDL library.
Structs§
- The effective properties of a route. This type enforces that all required fields from
fnet_routes::EffectiveRouteProperties
are set. - An installed route, abstracting over
fnet_routes::InstalledRouteV4
andfnet_routes::InstalledRouteV6
. - A route, abstracting over
fnet_routes::RouteV4
andfnet_routes::RouteV6
. - The properties of a route, abstracting over
fnet_routes::RoutePropertiesV4
andfnet_routes::RoutePropertiesV6
. - A target of a route, abstracting over
fnet_routes::RouteTargetV4
andfnet_routes::RouteTargetV6
. - The specified properties of a route. This type enforces that all required fields from
fnet_routes::SpecifiedRouteProperties
are set. - A newtype representing the ID of a route table.
- Options for getting a route watcher.
Enums§
- Errors returned by
collect_routes_until_idle
. - An event reported to the watcher, abstracting over
fnet_routes::EventV4
and fnet_routes::EventV6`. - Conversion errors from
fnet_routes
FIDL types to the generic equivalents defined in this module. - Conversion errors from generic route types defined in this module to their FIDL equivalents.
- The action of a route, abstracting over
fnet_routes::RouteActionV4
andfnet_routes::RouteActionV6
. - Required fields in
SpecifiedRouteProperties
. - Errors returned by
wait_for_routes
. - Route watcher
Watch
errors. - Route watcher creation errors.
Traits§
- IP Extension for the
fuchsia.net.routes
FIDL API. - Abstracts over AddRoute and RemoveRoute RouteSet method responders.
- A trait for responding with a slice of objects.
Functions§
- Collects all
existing
events from the stream, stopping once theidle
event is observed. event_stream_from_state_with_options
with defaultWatcherOptions
.- Connects to the watcher protocol with
WatcherOptions
and converts the Hanging-Get style API into an Event stream. - Turns the provided watcher client into a
Event
stream by applying Hanging-Get watch. - Dispatches either
GetWatcherV4
orGetWatcherV6
on the state proxy. - Wait for a condition on routing state to be satisfied.
- Wait for a condition on routing state to be satisfied, yielding a result from the predicate.
- Calls
Watch()
on the providedWatcherV4
orWatcherV6
proxy.