Crate fidl_fuchsia_net_interfaces_ext

Source
Expand description

Extensions for the fuchsia.net.interfaces FIDL library.

Modules§

admin
Extensions for fuchsia.net.interfaces.admin.

Structs§

Address
An address and its properties.
AllInterest
A marker for interest in all optional fields.
DefaultInterest
A marker for the default interest options as defined by the interfaces watcher API.
DisableInterest
Disabled interest in a FIDL field.
EnableInterest
Enabled interest in a FIDL field.
EventWithInterest
An fnet_interfaces::Event tagged with the interest parameters that created it.
NoInterest
A marker for a field that didn’t register interest with the watcher.
NotPositiveMonotonicInstantError
The error returned by attempting to convert a non positive instant to PositiveMonotonicInstant.
PositiveMonotonicInstant
A positive monotonic instant.
Properties
Properties of a network interface.
PropertiesAndState
The properties and state for an interface.
UnknownHardwareNetworkPortClassError
An error returned when fhardware_network::PortClass is an unknown variant.
UnknownNetInterfacesPortClassError
An error returned when fnet_interfaces::PortClass is an unknown variant.
ZeroError
An error indicated an unexpected zero value.

Enums§

AddressMissingFieldError
Missing fields in Address.
AddressValidationError
Errors validating Address.
IncludedAddresses
The kind of addresses included from the watcher.
InterfaceState
The local state of an interface’s properties.
PortClass
Like fnet_interfaces::PortClass, with the inner device flattened.
PreferredLifetimeInfo
Information about the preferred lifetime of an IP address or delegated prefix.
PropertiesMissingFieldError
Missing fields in Properties.
PropertiesValidationError
Errors validating Properties.
UnknownPortClassError
An Error returned when converting from fnet_interfaces::PortClass to PortClass.
UpdateError
Interface watcher event update errors.
UpdateResult
The result of updating network interface state with an event.
WatcherCreationError
Interface watcher creation errors.
WatcherOperationError
Interface watcher operational errors.

Traits§

FieldInterests
A trait that parameterizes interest in fields from interfaces watcher.
TryFromMaybeNonZero
A type that may fallibly convert from a u64 because the value is 0.
Update
A trait for types holding interface state that can be updated by change events.

Functions§

event_stream_from_state
Initialize a watcher with interest in all fields and return its events as a stream.
existing
Read Existing interface events from stream, updating init until the Idle event is detected, returning the resulting state.
is_globally_routable
Returns true iff the supplied Properties (expected to be fully populated) appears to provide network connectivity, i.e. is not loopback, is online, and has a default route and a globally routable address for either IPv4 or IPv6. An IPv4 address is assumed to be globally routable if it’s not link-local. An IPv6 address is assumed to be globally routable if it has global scope.
to_reachability_stream
Wraps event_stream and returns a stream which yields the reachability status as a bool (true iff there exists an interface with properties that satisfy is_globally_routable) whenever it changes. The first item the returned stream yields is the reachability status of the first interface discovered through an Added or Existing event on event_stream.
wait_for_reachability
Returns a future which resolves when any network interface observed through event_stream has properties which satisfy is_globally_routable.
wait_interface
Wait for a condition on interface state to be satisfied.
wait_interface_with_id
Wait for a condition on a specific interface to be satisfied.