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.
- Default
Interest - A marker for the default interest options as defined by the interfaces watcher API.
- Disable
Interest - Disabled interest in a FIDL field.
- Enable
Interest - Enabled interest in a FIDL field.
- Event
With Interest - 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.
- NotPositive
Monotonic Instant Error - The error returned by attempting to convert a non positive instant to
PositiveMonotonicInstant
. - Positive
Monotonic Instant - A positive monotonic instant.
- Properties
- Properties of a network interface.
- Properties
AndState - The properties and state for an interface.
- Unknown
Hardware Network Port Class Error - An error returned when
fhardware_network::PortClass
is an unknown variant. - Unknown
NetInterfaces Port Class Error - An error returned when
fnet_interfaces::PortClass
is an unknown variant. - Zero
Error - An error indicated an unexpected zero value.
Enums§
- Address
Missing Field Error - Missing fields in
Address
. - Address
Validation Error - Errors validating
Address
. - Included
Addresses - The kind of addresses included from the watcher.
- Interface
State - The local state of an interface’s properties.
- Port
Class - Like
fnet_interfaces::PortClass
, with the innerdevice
flattened. - Preferred
Lifetime Info - Information about the preferred lifetime of an IP address or delegated prefix.
- Properties
Missing Field Error - Missing fields in
Properties
. - Properties
Validation Error - Errors validating
Properties
. - Unknown
Port Class Error - An Error returned when converting from
fnet_interfaces::PortClass
toPortClass
. - Update
Error - Interface watcher event update errors.
- Update
Result - The result of updating network interface state with an event.
- Watcher
Creation Error - Interface watcher creation errors.
- Watcher
Operation Error - Interface watcher operational errors.
Traits§
- Field
Interests - A trait that parameterizes interest in fields from interfaces watcher.
- TryFrom
Maybe NonZero - 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
, updatinginit
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 satisfyis_globally_routable
) whenever it changes. The first item the returned stream yields is the reachability status of the first interface discovered through anAdded
orExisting
event onevent_stream
. - wait_
for_ reachability - Returns a future which resolves when any network interface observed through
event_stream
has properties which satisfyis_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.