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

fuchsia.netstack

PROTOCOLS

Netstack

Defined in fuchsia.netstack/netstack.fidl

AddEthernetDevice

Adds a new interface backed by the given ethernet device.

Request

NameType
topological_path string
interface_config InterfaceConfig
device fuchsia.hardware.ethernet/Device

Response

NameType
result Netstack_AddEthernetDevice_Result

BridgeInterfaces

Creates a bridge and returns the newly created nicid or an error if the creation fails.

Request

NameType
nicids vector<uint32>

Response

NameType
result NetErr
nicid uint32

GetDhcpClient

Request

NameType
nicid uint32
client request<fuchsia.net.dhcp/Client>

Response

NameType
result Netstack_GetDhcpClient_Result

GetRouteTable

Returns current route table.

Request

NameType

Response

NameType
rt vector<RouteTableEntry>

RemoveInterfaceAddress

Removes the address for the interface with the given nicid. Masks off addr.PrefixLen bits from addr.Addr to set the subnet.

Request

NameType
nicid uint32
addr fuchsia.net/IpAddress
prefix_len uint8

Response

NameType
result NetErr

SetInterfaceAddress

Sets the address for the interface with the given nicid. Masks off addr.PrefixLen bits from addr.Addr to set the subnet.

Request

NameType
nicid uint32
addr fuchsia.net/IpAddress
prefix_len uint8

Response

NameType
result NetErr

SetInterfaceMetric

Sets the route metric for the interface with the given nicid.

Request

NameType
nicid uint32
metric uint32

Response

NameType
result NetErr

SetInterfaceStatus

Sets the status (up or down) for the interface with the given nicid.

Request

NameType
nicid uint32
enabled bool

StartRouteTableTransaction

Begin a route transaction to synchronize updates to the route table.

Returns ZX_OK if a transaction can be started; ZX_ERR_SHOULD_WAIT if a transaction is currently in progress.

Request

NameType
route_table_transaction request<RouteTableTransaction>

Response

NameType
status zx/status

RouteTableTransaction

Defined in fuchsia.netstack/netstack.fidl

AddRoute

Request

NameType
r RouteTableEntry

Response

NameType
status zx/status

DelRoute

Request

NameType
r RouteTableEntry

Response

NameType
status zx/status

STRUCTS

InterfaceConfig

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescriptionDefault
name fuchsia.net.interfaces/name 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
metric uint32 No default

NetErr

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescriptionDefault
status Status No default
message string No default

Netstack_AddEthernetDevice_Response

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescriptionDefault
nicid uint32 No default

Netstack_GetDhcpClient_Response

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescriptionDefault

RouteTableEntry

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescriptionDefault
destination fuchsia.net/Subnet No default
gateway fuchsia.net/IpAddress? No default
nicid uint32 No default
metric uint32 No default

SocketAddress

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescriptionDefault
addr fuchsia.net/IpAddress No default
port uint16 No default

ENUMS

Status strict

Type: uint32

Defined in fuchsia.netstack/netstack.fidl

NameValueDescription
OK 0
UNKNOWN_ERROR 1
DNS_ERROR 2
PARSE_ERROR 3
IPV4_ONLY 4
UNKNOWN_INTERFACE 5

UNIONS

Netstack_AddEthernetDevice_Result strict

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescription
response Netstack_AddEthernetDevice_Response
err zx/status

Netstack_GetDhcpClient_Result strict

Defined in fuchsia.netstack/netstack.fidl

NameTypeDescription
response Netstack_GetDhcpClient_Response
err zx/status