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

fuchsia.net.stack

PROTOCOLS

Log

Defined in fuchsia.net.stack/stack.fidl

SetLogLevel

Dynamically set a syslog level. See syslog/logger.go for level definition.

Request

NameType
level LogLevelFilter

Response

NameType
result Log_SetLogLevel_Result

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 device_path
device fuchsia.hardware.ethernet/Device

Response

NameType
result Stack_AddEthernetInterface_Result

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
result Stack_AddForwardingEntry_Result

AddInterface

Add a new interface to the network stack backed by the provided DeviceDefinition. On success, returns the identifier assigned by the stack for use in subsequent calls.

Request

NameType
config InterfaceConfig
device DeviceDefinition

Response

NameType
result Stack_AddInterface_Result

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
result Stack_AddInterfaceAddress_Result

DelEthernetInterface

Remove an Ethernet interface from the network stack.

Request

NameType
id uint64

Response

NameType
result Stack_DelEthernetInterface_Result

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
result Stack_DelForwardingEntry_Result

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
result Stack_DelInterfaceAddress_Result

DisableInterface

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

Request

NameType
id uint64

Response

NameType
result Stack_DisableInterface_Result

DisableIpForwarding

Disable IP Forwarding.

Request

NameType

Response

NameType

DisablePacketFilter

Disable the packet filter on a specific interface.

Request

NameType
id uint64

Response

NameType
result Stack_DisablePacketFilter_Result

EnableInterface

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

Request

NameType
id uint64

Response

NameType
result Stack_EnableInterface_Result

EnableIpForwarding

Enable IP Forwarding.

Request

NameType

Response

NameType

EnablePacketFilter

Enable the packet filter on a specific interface.

Request

NameType
id uint64

Response

NameType
result Stack_EnablePacketFilter_Result

GetDnsServerWatcher

Get a fuchsia.net.name/DnsServerWatcher.

Request

NameType
watcher request<fuchsia.net.name/DnsServerWatcher>

GetForwardingTable

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

Request

NameType

Response

NameType
table vector<ForwardingEntry>

GetInterfaceInfo

Retrieve info about a specific interface.

Request

NameType
id uint64

Response

NameType
result Stack_GetInterfaceInfo_Result

ListInterfaces

List all the interfaces available in the network stack.

Request

NameType

Response

NameType
ifs interface_list

OnInterfaceStatusChange

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

Response

NameType
info InterfaceStatusChange

STRUCTS

EthernetDeviceDefinition

Defined in fuchsia.net.stack/stack.fidl

An Ethernet device. The provided network_device is expected to support Ethernet frames. Its MAC address and MAC filtering is controlled by the provided mac channel.

NameTypeDescriptionDefault
network_device fuchsia.hardware.network/Device

The connection to the device's data plane.

No default
mac fuchsia.hardware.network/MacAddressing

The connection to the device's addressing control plane.

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

InterfaceAddress

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
ip_address fuchsia.net/IpAddress

The IP address of the interface.

No default
prefix_len 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 fuchsia.posix.socket/interface_name

Human-readable name of the interface. eg. eth001, wlanx35.

No default
topopath device_path

The topological path to the device, representing a stable identifier for the interface hardware.

No default
filepath device_path

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
administrative_status AdministrativeStatus

The administrative status of the interface.

No default
physical_status PhysicalStatus

The physical link status of the interface.

No default
addresses interface_address_list

The list of addresses currently assigned to the interface.

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

Log_SetLogLevel_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_AddEthernetInterface_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
id uint64 No default

Stack_AddForwardingEntry_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_AddInterfaceAddress_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_AddInterface_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
id uint64 No default

Stack_DelEthernetInterface_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_DelForwardingEntry_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_DelInterfaceAddress_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_DisableInterface_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_DisablePacketFilter_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_EnableInterface_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_EnablePacketFilter_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault

Stack_GetInterfaceInfo_Response

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescriptionDefault
info InterfaceInfo No default

ENUMS

AdministrativeStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
DISABLED 1

The interface is administratively disabled.

ENABLED 2

The interface is administratively enabled.

Error

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

LogLevelFilter

Type: int8

Defined in fuchsia.net.stack/stack.fidl

Note LogLevelFilter and protocol Log is transient, and is planned to be deprecated by logger.fidl's LogLevelFilter. This definition is to support syslog/logger.go and Netstack2.

NameValueDescription
TRACE 16
DEBUG 32
INFO 48
WARN 64
ERROR 80
FATAL 96

PhysicalStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
DOWN 1

The link is not attached to the medium.

UP 2

The link is attached to the medium.

PresenceStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
ADDED 1

The interface is added.

REMOVED 2

The interface is removed.

TABLES

InterfaceConfig

Defined in fuchsia.net.stack/stack.fidl

Base configuration for Stack interfaces.

OrdinalNameTypeDescription
1 name fuchsia.posix.socket/interface_name

Human-readable name of the interface. eg. eth001, wlanx35. Will be set to a default generic name if not provided.

2 topopath device_path

The topological path to the device, representing a stable identifier for the interface hardware.

3 metric uint32

The default metric value used for routes to this interface.

UNIONS

DeviceDefinition

Defined in fuchsia.net.stack/stack.fidl

Devices that can be used to back a Stack interface.

NameTypeDescription
ip fuchsia.hardware.network/Device

A fuchsia.hardware.network.Device that exchanges only IP frames. It either doesn't have a layer 2 or its layer 2 is irrelevant to the Stack.

ethernet EthernetDeviceDefinition

An Ethernet device.

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
device_id uint64

The opaque identifier of the device to which packets should be forwarded.

next_hop fuchsia.net/IpAddress

The IP address of the next hop, used to look up the next forwarding entry.

InterfaceStatus

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
presence PresenceStatus
physical PhysicalStatus
administrative AdministrativeStatus

Log_SetLogLevel_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Log_SetLogLevel_Response
err Error

Stack_AddEthernetInterface_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_AddEthernetInterface_Response
err Error

Stack_AddForwardingEntry_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_AddForwardingEntry_Response
err Error

Stack_AddInterfaceAddress_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_AddInterfaceAddress_Response
err Error

Stack_AddInterface_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_AddInterface_Response
err Error

Stack_DelEthernetInterface_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_DelEthernetInterface_Response
err Error

Stack_DelForwardingEntry_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_DelForwardingEntry_Response
err Error

Stack_DelInterfaceAddress_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_DelInterfaceAddress_Response
err Error

Stack_DisableInterface_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_DisableInterface_Response
err Error

Stack_DisablePacketFilter_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_DisablePacketFilter_Response
err Error

Stack_EnableInterface_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_EnableInterface_Response
err Error

Stack_EnablePacketFilter_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_EnablePacketFilter_Response
err Error

Stack_GetInterfaceInfo_Result

Defined in fuchsia.net.stack/stack.fidl

NameTypeDescription
response Stack_GetInterfaceInfo_Response
err Error

TYPE ALIASES

NameValueDescription
device_path string

A path to a device node.

interface_address_list vector

A list of IP addresses for an interface.

interface_list vector

A list of interface descriptors.