fuchsia.net.stack

PROTOCOLS

Stack

Defined in fuchsia.net.stack/stack.fidl

AddEthernetInterface

Add an Ethernet interface to the network stack. On success, returns the identifier assigned by the stack for use in subsequent calls.

Request

NameType
topological_path string
device fuchsia.hardware.ethernet/Device

Response

NameType
err Error?
id uint64

DelEthernetInterface

Remove an Ethernet interface from the network stack.

Request

NameType
id uint64

Response

NameType
err Error?

ListInterfaces

List all the interfaces available in the network stack.

Request

NameType

Response

NameType
ifs vector<InterfaceInfo>

GetInterfaceInfo

Retrieve info about a specific interface.

Request

NameType
id uint64

Response

NameType
info InterfaceInfo?
err Error?

EnableInterface

Enable the interface. Packets may be processed by the stack after this call is processed.

Request

NameType
id uint64

Response

NameType
err Error?

DisableInterface

Disable the interface. The stack will no longer process packets after this call.

Request

NameType
id uint64

Response

NameType
err Error?

AddInterfaceAddress

Add an address to the interface. If the interface already has an address of a given type that does not allow duplicates, this method will return an error.

Request

NameType
id uint64
addr InterfaceAddress

Response

NameType
err Error?

DelInterfaceAddress

Remove the address from the interface. If the address is not assigned to the interface, an error is returned.

Request

NameType
id uint64
addr InterfaceAddress

Response

NameType
err Error?

GetForwardingTable

List all the entries in the forwarding table for the network stack.

Request

NameType

Response

NameType
table vector<ForwardingEntry>

AddForwardingEntry

Add a new entry to the forwarding table. If the table already contains an entry with the same subnet, an error is returned. The entry may be deleted using DelForwardingEntry first.

Request

NameType
entry ForwardingEntry

Response

NameType
err Error?

DelForwardingEntry

Removes the forwarding entry with the given subnet. This will not affect any overlapping subnets (superset or subset) so the subnet must exactly match an entry in the forwarding table. If no entry for the subnet exists, an error is returned.

Request

NameType
subnet fuchsia.net/Subnet

Response

NameType
err Error?

EnablePacketFilter

Enable the packet filter on a specific interface.

Request

NameType
id uint64

Response

NameType
result Stack_EnablePacketFilter_Result

DisablePacketFilter

Disable the packet filter on a specific interface.

Request

NameType
id uint64

Response

NameType
result Stack_DisablePacketFilter_Result

EnableIpForwarding

Enable IP Forwarding.

Request

NameType

Response

NameType

DisableIpForwarding

Disable IP Forwarding.

Request

NameType

Response

NameType

OnInterfaceStatusChange

A status change event is triggered whenever an interface's status changes.

Response

NameType
info InterfaceStatusChange

STRUCTS

Stack_EnablePacketFilter_Response

generated

NameTypeDescriptionDefault

Stack_DisablePacketFilter_Response

generated

NameTypeDescriptionDefault

InterfaceAddress

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
ipAddress fuchsia.net/IpAddress The IP address of the interface. No default
prefixLen uint8 The length of the network portion of the interface IP address. No default

InterfaceInfo

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
id uint64 An opaque identifier for the interface, assigned by the stack. This identifier will never be 0, and will not be reused even if the device is removed and subsequently re-added. It is not stable across netstack instances. No default
properties InterfaceProperties All info of an interface except the interface name. No default

InterfaceProperties

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
name string Human friendly name of the interface. eg. eth001, wlanx35. No default
topopath string The topological path to the device, representing a stable identifier for the interface hardware. No default
filepath string An unstable file path corresponding to the interface. Used in watching the creation and destruction of the interface, or in accessing the interface using netdump. No default
mac fuchsia.hardware.ethernet/MacAddress? The MAC address of the interface, if available. No default
mtu uint32 The maximum transmission unit for the interface in bytes. No default
features uint32 The features present on the interface, as a bitfield. Valid flags are fuchsia.hardware.ethernet.`INFO_FEATURE_*`. No default
administrativeStatus AdministrativeStatus The administrative status of the interface. No default
physicalStatus PhysicalStatus The physical link status of the interface. No default
addresses vector<InterfaceAddress> The list of addresses currently assigned to the interface. No default

ForwardingEntry

Defined in fuchsia.net.stack/stack.fidl

An entry in the forwarding table for the network stack.

NameTypeDescriptionDefault
subnet fuchsia.net/Subnet The subnet is the key for the entry in the table. No default
destination ForwardingDestination The destination that will receive the forwarded packet. No default

InterfaceStatusChange

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
id uint64 The opaque identifier of the device that had its status change. No default
status InterfaceStatus The new status. No default

Error

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
type ErrorType No default

ENUMS

PresenceStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
ADDED 1
REMOVED 2

PhysicalStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
DOWN 1
UP 2

AdministrativeStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
DISABLED 1
ENABLED 2

ErrorType

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
INTERNAL 1
NOT_SUPPORTED 2
INVALID_ARGS 3
BAD_STATE 4
TIME_OUT 5
NOT_FOUND 6
ALREADY_EXISTS 7
IO 8

UNIONS

Stack_EnablePacketFilter_Result

generated

NameTypeDescription
response Stack_EnablePacketFilter_Response
err ErrorType

Stack_DisablePacketFilter_Result

generated

NameTypeDescription
response Stack_DisablePacketFilter_Response
err ErrorType

InterfaceStatus

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
presence PresenceStatus
physical PhysicalStatus
administrative AdministrativeStatus

ForwardingDestination

Defined in fuchsia.net.stack/stack.fidl

A ForwardingDestination represents either the device that should transmit a packet or the address of the next hop in the route.

NameTypeDescription
deviceId uint64 The opaque identifier of the device to which packets should be forwarded.
nextHop fuchsia.net/IpAddress The IP address of the next hop, used to look up the next forwarding entry.