PROTOCOLS
State
Defined in fuchsia.net.interfaces/interfaces.fidl
Network interface state inspection and observation.
GetWatcher
Initialize a watcher for interface state.
The server enqueues interface addition, deletion and property changes as they occur, which can then be retrieved via the pipelined protocol.
- request
options
specifies the behavior of the Watcher. - request
watcher
grants access to a Watcher. Closed if the queue cannot be allocated or if the queue is full when the server attempts to enqueue an event.
Request
Name | Type |
---|---|
options |
WatcherOptions
|
watcher |
server_end:Watcher
|
Watcher
Defined in fuchsia.net.interfaces/interfaces.fidl
Observer protocol for changes to network interfaces (addition, deletion, and interface property changes).
Watch
Hanging get for an interface addition/deletion change.
Clients should only have one call of this method at a time; a second call to this method while a call is already pending will cause the server end of the protocol to be closed.
If there are N interfaces present at the time the server end of the protocol is initialized, then the first N invocations of this method will return Event.existing followed by a single Event.idle indicating that all existing interfaces have been sent. Subsequent calls will immediately return if there is a change to be reported, or block until a change occurs.
The server may choose to coalesce property change events, e.g. when multiple independent property changes occur. As a result, clients cannot assume that the order in which they observe the interface changes is the order in which the changes occurred.
- response
event
the interface change event.
Request
<EMPTY>
Response
Name | Type |
---|---|
event |
Event
|
STRUCTS
Empty
Defined in fuchsia.net.interfaces/interfaces.fidl
<EMPTY>
ENUMS
AddressAssignmentState strict
Type: uint32
Defined in fuchsia.net.interfaces/interfaces.fidl
Assignment state of an IP address.
Name | Value | Description |
---|---|---|
TENTATIVE |
1 |
Address assignment is in progress, e.g. Duplicate Address Detection is being performed. The address cannot be used when in this state (cannot bind to it yet or receive packets destined to it). The Duplicate Address Detection mechanism is described in RFC 4862, section 5.4 |
ASSIGNED |
2 |
The address is assigned to an interface. |
UNAVAILABLE |
3 |
The address is unavailable, e.g. if the interface holding the address is offline. |
TABLES
Address
Defined in fuchsia.net.interfaces/interfaces.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
addr |
fuchsia.net/Subnet
|
The address and prefix length. Required. |
2 |
valid_until |
zx/Time
|
The time after which the address will no longer be valid. Its value must be greater than 0. A value of As a Optional; may be omitted due to disinterest. |
3 |
preferred_lifetime_info |
PreferredLifetimeInfo
|
Preferred lifetime information. Optional; may be omitted due to disinterest. Added: 9
|
4 |
assignment_state |
AddressAssignmentState
|
The address's assignment state. Required. Added: HEAD
|
Properties
Defined in fuchsia.net.interfaces/interfaces.fidl
Properties of a network interface.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
id |
fuchsia.net/InterfaceId
|
An opaque identifier for the interface. Its value will not be reused even if the device is removed and subsequently re-added. Immutable. |
2 |
addresses |
vector<Address>
|
The addresses currently installed on the interface. Addresses are sorted on Address.addr, and no two addresses can have
the same Only assigned addresses are included unless the watcher was created with
WatcherOptions.include_non_assigned_addresses set to |
3 |
online |
bool
|
The device is enabled and its physical state is online. |
4 |
device_class |
DeviceClass
|
The device class of the interface. Immutable. DeprecationReplaced by Removed: 23 Deprecated: 22
|
5 |
has_default_ipv4_route |
bool
|
Whether there is a default IPv4 route through this interface. |
6 |
has_default_ipv6_route |
bool
|
Whether there is a default IPv6 route through this interface. |
7 |
name |
Name
|
The name of the interface. Immutable. |
8 |
port_class |
PortClass
|
The port class of the interface. Immutable. Added: 22
|
WatcherOptions
Defined in fuchsia.net.interfaces/interfaces.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
address_properties_interest |
AddressPropertiesInterest
|
Bitfield for registering interest in address properties. Optional; interpreted as all bits set to 0 if not present. Added: HEAD
|
2 |
include_non_assigned_addresses |
bool
|
Flag to determine if only assigned addresses are returned (where the assignment state is AddressAssignmentState::Assigned) or all addresses are returned. Optional; interpreted as false if not present. Added: HEAD
|
UNIONS
DeviceClass strict
Defined in fuchsia.net.interfaces/interfaces.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
loopback |
Empty
|
The interface is loopback. |
2 |
device |
fuchsia.hardware.network/DeviceClass
|
Event strict
Defined in fuchsia.net.interfaces/interfaces.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
existing |
Properties
|
Properties of an interface that existed when watching started. All interested fields and Properties.id are set. |
2 |
added |
Properties
|
Properties of an interface that was added while watching. All interested fields and Properties.id are set. |
3 |
removed |
fuchsia.net/InterfaceId
|
ID of an interface that was removed while watching. |
4 |
changed |
Properties
|
Properties of an interface that changed while watching. Only Properties.id and interested fields which have changed are set with the new values. |
5 |
idle |
Empty
|
Sentinel value indicating no more existing events will be sent. |
PortClass flexible
Defined in fuchsia.net.interfaces/interfaces.fidl
The port class of an interface.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
loopback |
Empty
|
The interface is loopback. |
2 |
device |
fuchsia.hardware.network/PortClass
|
The interface's network device port class. |
PreferredLifetimeInfo strict
Defined in fuchsia.net.interfaces/interfaces.fidl
Information about the preferred lifetime of an IP address or delegated prefix.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
preferred_until |
zx/Time
|
The end of the preferred lifetime. The address/prefix should not be considered deprecated if The preferred lifetime of addresses is defined in RFC 4862, section 2. Addresses configured using a delegated prefix must have a preferred lifetime no longer than that of the prefix according to RFC 8415, section 6.3. Must be greater than 0. If |
2 |
deprecated |
Empty
|
The address/prefix is deprecated. Deprecated addresses should no longer be used for initiating new connections unless explicitly requested, or if no other non-deprecated addresses are assigned (as described in RFC 4862, section 1). Addresses configured using a deprecated delegated prefix must also be deprecated according to RFC 8415, section 6.3. An address/prefix can become undeprecated if its preferred lifetime is extended. |
BITS
AddressPropertiesInterest flexible
Type: uint64
Defined in fuchsia.net.interfaces/interfaces.fidl
Name | Value | Description |
---|---|---|
VALID_UNTIL |
1 | |
PREFERRED_LIFETIME_INFO |
2 |
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
INTERFACE_NAME_LENGTH |
15
|
uint8 |
The maximum length of an interface name. |
ALIASES
Name | Value | Description |
---|---|---|
Name |
string [INTERFACE_NAME_LENGTH ] |
An interface name as a sequence of bytes. |