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

Response

NameType
result Stack_AddEthernetInterface_Result

DelEthernetInterface

Remove an Ethernet interface from the network stack.

Request

NameType
id uint64

Response

NameType
result Stack_DelEthernetInterface_Result

ListInterfaces

List all the interfaces available in the network stack.

Request

NameType

Response

NameType
ifs interface_list

GetInterfaceInfo

Retrieve info about a specific interface.

Request

NameType
id uint64

Response

NameType
result Stack_GetInterfaceInfo_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

DisableInterface

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

Request

NameType
id uint64

Response

NameType
result Stack_DisableInterface_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

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

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

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

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

STRUCTS

Stack_AddEthernetInterface_Response

generated

NameTypeDescriptionDefault
id uint64 No default

Stack_DelEthernetInterface_Response

generated

NameTypeDescriptionDefault

Stack_GetInterfaceInfo_Response

generated

NameTypeDescriptionDefault
info InterfaceInfo No default

Stack_EnableInterface_Response

generated

NameTypeDescriptionDefault

Stack_DisableInterface_Response

generated

NameTypeDescriptionDefault

Stack_AddInterfaceAddress_Response

generated

NameTypeDescriptionDefault

Stack_DelInterfaceAddress_Response

generated

NameTypeDescriptionDefault

Stack_AddForwardingEntry_Response

generated

NameTypeDescriptionDefault

Stack_DelForwardingEntry_Response

generated

NameTypeDescriptionDefault

Stack_EnablePacketFilter_Response

generated

NameTypeDescriptionDefault

Stack_DisablePacketFilter_Response

generated

NameTypeDescriptionDefault

Log_SetLogLevel_Response

generated

NameTypeDescriptionDefault

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 interface_name

Human friendly 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

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

ENUMS

PresenceStatus

Type: uint32

Defined in fuchsia.net.stack/stack.fidl

NameValueDescription
ADDED 1

The interface is added.

REMOVED 2

The interface is removed.

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.

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: int32

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 -2
DEBUG -1
INFO 0
WARN 1
ERROR 2
FATAL 3

UNIONS

Stack_AddEthernetInterface_Result

generated

NameTypeDescription
response Stack_AddEthernetInterface_Response
err Error

Stack_DelEthernetInterface_Result

generated

NameTypeDescription
response Stack_DelEthernetInterface_Response
err Error

Stack_GetInterfaceInfo_Result

generated

NameTypeDescription
response Stack_GetInterfaceInfo_Response
err Error

Stack_EnableInterface_Result

generated

NameTypeDescription
response Stack_EnableInterface_Response
err Error

Stack_DisableInterface_Result

generated

NameTypeDescription
response Stack_DisableInterface_Response
err Error

Stack_AddInterfaceAddress_Result

generated

NameTypeDescription
response Stack_AddInterfaceAddress_Response
err Error

Stack_DelInterfaceAddress_Result

generated

NameTypeDescription
response Stack_DelInterfaceAddress_Response
err Error

Stack_AddForwardingEntry_Result

generated

NameTypeDescription
response Stack_AddForwardingEntry_Response
err Error

Stack_DelForwardingEntry_Result

generated

NameTypeDescription
response Stack_DelForwardingEntry_Response
err Error

Stack_EnablePacketFilter_Result

generated

NameTypeDescription
response Stack_EnablePacketFilter_Response
err Error

Stack_DisablePacketFilter_Result

generated

NameTypeDescription
response Stack_DisablePacketFilter_Response
err Error

Log_SetLogLevel_Result

generated

NameTypeDescription
response Log_SetLogLevel_Response
err Error

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

TYPE ALIASES

NameValueDescription
interface_address_list vector

A list of IP addresses for an interface.

device_path string

A path to a device node.

interface_list vector

A list of interface descriptors.

interface_name string

An alias that may be used to refer to an interface.