Google is committed to advancing racial equity for Black communities. See how.

fuchsia.net.interfaces.admin

PROTOCOLS

AddressStateProvider

Defined in fuchsia.net.interfaces.admin/address.fidl

Offers state information about an IP address.

This protocol encodes the underlying object's lifetime in both directions; the underlying object is alive iff both ends of the protocol are open (unless AddressStateProvider.Detach has been called). That is:

  • Closing the client end causes the object to be destroyed.
  • Observing a closure of the server end indicates the object no longer exists.

Detach

Detaches the address' lifetime from the client end of the protocol.

The client end of the protocol can be closed immediately after calling this method, and the address will not be removed.

Request

<EMPTY>

OnAddressRemoved

Terminal event. Immediately precedes the closure of the server end of the protocol.

  • response error the removal reason.

Response

NameType
error AddressRemovalReason

UpdateAddressProperties

Push an update when the address properties change.

The client pushes updates on address properties changes, such as the address becoming deprecated, or the preferred and valid lifetimes being updated as a result of extending the address' lifetime. The server is expected to cache address properties.

  • request address_properties the updated properties of the address.

Request

NameType
address_properties AddressProperties

Response

<EMPTY>

WatchAddressAssignmentState

Hanging get for address assignment state.

The server does not keep a queue of assignment states, it returns the latest state if it differs from the last one observed.

The first call will always immediately return the current assignment state. Subsequent calls will block until the returned value differs from the last observed value.

It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.

  • response assignment_state the assignment state of the address.

Request

<EMPTY>

Response

NameType
assignment_state AddressAssignmentState

Control

Defined in fuchsia.net.interfaces.admin/control.fidl

Provides control over an interface.

This protocol encodes the underlying interface's lifetime in both directions; the interface exists iff both ends of the protocol are open. That is:

  • Closing the client end causes the interface to be removed.
  • Observing a closure of the server end indicates the interface no longer exists.

AddAddress

Assigns an address to the interface.

Errors are communicated via fuchsia.net.interfaces.admin/AddressStateProvider.OnAddressRemoved.

  • request address the address to assign to the interface.
  • request parameters additional address-specific options.
  • request address_state_provider provides address assignment state and enables updating address properties.

Request

NameType
address fuchsia.net/InterfaceAddress
parameters AddressParameters
address_state_provider request<AddressStateProvider>

Disable

Disables the interface.

  • response did_disable true iff the interface moved from enabled to disabled as a consequence of this call.

Request

<EMPTY>

Response

NameType
result Control_Disable_Result

Enable

Enables the interface.

  • response did_enable true iff the interface moved from disabled to enabled as a consequence of this call.

Request

<EMPTY>

Response

NameType
result Control_Enable_Result

GetId

Gets the interface identifier.

  • response id the interface identifier.

Request

<EMPTY>

Response

NameType
id fuchsia.net/interface_id

RemoveAddress

Removes an address from the interface.

  • request address the address to remove.
  • response did_remove true iff address was removed from the interface as a consequence of this call.

Request

NameType
address fuchsia.net/InterfaceAddress

Response

NameType
result Control_RemoveAddress_Result

DeviceControl

Defined in fuchsia.net.interfaces.admin/control.fidl

Administrative control over an installed device on the network stack.

An instance of DeviceControl maps to an instance of fuchsia.hardware.network/Session. All interfaces generated from a single DeviceControl instance share the same Session and set of device buffers; and are therefore subject to backpressure over the same pool of resources.

By the same measure, creating multiple DeviceControl instances attached to the same underlying device causes data copies, because each DeviceControl starts a new Session. For that reason, users should avoid creating multiple DeviceControl instances for the same device and prefer instantiating ports into interfaces from a single DeviceControl instance per device.

This protocol encodes the underlying device's lifetime in both directions; the device exists iff both ends of the protocol are open. That is:

  • Closing the client end causes the device to be removed, including all interfaces created from it.
  • Observing a closure of the server end indicates the device (and all interfaces created from it) no longer exists.

CreateInterface

Creates an interface on the network stack.

  • request port the device's port to instantiate as an interface.
  • request control grants access to the created interface.

Request

NameType
port fuchsia.hardware.network/port_id
control request<Control>
options Options

Installer

Defined in fuchsia.net.interfaces.admin/control.fidl

Installs devices on the network stack.

InstallDevice

Installs a device on the network stack.

  • request device the device to install on the network stack.
  • request device_control grants access to the installed device.

Request

NameType
device fuchsia.hardware.network/Device
device_control request<DeviceControl>

STRUCTS

Control_Disable_Response

Defined in fuchsia.net.interfaces.admin/control.fidl

FieldTypeDescriptionDefault
did_disable bool No default

Control_Enable_Response

Defined in fuchsia.net.interfaces.admin/control.fidl

FieldTypeDescriptionDefault
did_enable bool No default

Control_RemoveAddress_Response

Defined in fuchsia.net.interfaces.admin/control.fidl

FieldTypeDescriptionDefault
did_remove bool No default

Empty

Defined in fuchsia.net.interfaces.admin/address.fidl

<EMPTY>

ENUMS

AddressAssignmentState strict

Type: uint32

Defined in fuchsia.net.interfaces.admin/address.fidl

Assignment state of an IP address.

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

AddressRemovalReason strict

Type: uint32

Defined in fuchsia.net.interfaces.admin/address.fidl

Reasons from IP address removal.

NameValueDescription
INVALID 1

The address is not a valid address.

ALREADY_ASSIGNED 2

The address is already assigned to the interface.

DAD_FAILED 3

Duplicate Address Detection failed.

A neighbor was found to hold the address.

INTERFACE_REMOVED 4

The address was removed as a result of the interface being removed.

USER_REMOVED 5

The address was removed from the interface by user action.

Control_Disable_Error flexible

Type: uint32

Defined in fuchsia.net.interfaces.admin/control.fidl

NameValueDescription
RESERVED 0

Control_Enable_Error flexible

Type: uint32

Defined in fuchsia.net.interfaces.admin/control.fidl

NameValueDescription
RESERVED 0

Control_RemoveAddress_Error flexible

Type: uint32

Defined in fuchsia.net.interfaces.admin/control.fidl

NameValueDescription
RESERVED 0

TABLES

AddressParameters resource

Defined in fuchsia.net.interfaces.admin/address.fidl

Address assignment parameters.

OrdinalFieldTypeDescription
1 initial_properties AddressProperties

The initial properties of the address.

If not set, interpreted as an empty AddressProperties.

2 temporary bool

True if the address is temporary.

A temporary address is intended to be used for a short period of time (hours to days), and its lifetime may not be extended, as detailed in RFC 4941.

Both temporary and non-temporary addresses have preferred and valid lifetimes, but temporary addresses may not be renewed beyond their initial lifetime.

Information used in source address selection; temporary addresses are preferred over non-temporary addresses if both types are available, as detailed in RFC 6724, section 5.

If not set, interpreted as false.

AddressProperties

Defined in fuchsia.net.interfaces.admin/address.fidl

Properties of an IP address.

OrdinalFieldTypeDescription
1 preferred_lifetime_info PreferredLifetimeInfo

Information about the preferred lifetime of the address.

If not set, interpreted as PreferredLifetimeInfo.preferred_lifetime_end = zx.time.INFINITE.

2 valid_lifetime_end zx/time

The end of the valid lifetime of the address.

The address should not be considered invalid if zx.time is in the past. valid_lifetime_end is exchanged as a means to inform the deadline where invalidation is expected to happen.

Refers to the valid lifetime of the address, as defined in RFC 4862, section 2.

Must be greater than 0. If zx.time.INFINITE, the valid lifetime does not expire.

If not set, interpreted as zx.time.INFINITE.

Options

Defined in fuchsia.net.interfaces.admin/control.fidl

OrdinalFieldTypeDescription
1 name fuchsia.net.interfaces/name

New interface name.

If not set, an implementation-defined name will be selected.

2 metric uint32

The default metric value used for routes through this interface.

If not set, interpreted as 0.

UNIONS

Control_Disable_Result strict

Defined in fuchsia.net.interfaces.admin/control.fidl

Ordinal
VariantTypeDescription
1 response Control_Disable_Response
2 err Control_Disable_Error

Control_Enable_Result strict

Defined in fuchsia.net.interfaces.admin/control.fidl

Ordinal
VariantTypeDescription
1 response Control_Enable_Response
2 err Control_Enable_Error

Control_RemoveAddress_Result strict

Defined in fuchsia.net.interfaces.admin/control.fidl

Ordinal
VariantTypeDescription
1 response Control_RemoveAddress_Response
2 err Control_RemoveAddress_Error

PreferredLifetimeInfo strict

Defined in fuchsia.net.interfaces.admin/address.fidl

Information about the preferred lifetime of an IP address.

Ordinal
VariantTypeDescription
1 preferred_lifetime_end zx/time

The end of the preferred lifetime of the address.

The address should not be considered deprecated if zx.time is in the past. preferred_lifetime_end is exchanged as a means to inform the deadline where deprecation is expected to happen.

Refers to the preferred lifetime of the address, as defined in RFC 4862, section 2.

Must be greater than 0. If zx.time.INFINITE, the preferred lifetime does not expire.

2 deprecated Empty

Set if the address is deprecated.

When deprecated, the address should no longer be used for initiating new connection unless explicitly requested, or if no other non-deprecated addresses are assigned (as described in RFC 4862, section 1).

Once deprecated, an address can became undeprecated if its preferred lifetime is extended.

This field is used to signal that the address should be deprecated.