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

fuchsia.posix.socket

PROTOCOLS

BaseSocket

Defined in fuchsia.posix.socket/socket.fidl

A network socket.

Once a socket has been retrieved from a Provider, this interface is then used to further configure and use the socket. This interface is essentially POSIX. Its implementation must support Linux-specific arguments to {Get,Set}SockOpt.

All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.

Warning: This protocol is not yet ready for direct use by clients. Instead, clients should use the BSD sockets API to interact with sockets. We plan to change this protocol substantially and clients that couple directly to this protocol will make those changes more difficult.

Bind

Sets the local address used for the socket.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Bind_Result

Bind2

Sets the local address used for the socket.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Bind2_Result

Clone

Create another connection to the same remote object.

flags may be any of:

  • OPEN_RIGHT_*
  • OPEN_FLAG_APPEND
  • OPEN_FLAG_NO_REMOTE
  • OPEN_FLAG_DESCRIBE
  • CLONE_FLAG_SAME_RIGHTS

All other flags are ignored.

The OPEN_RIGHT_* bits in flags request corresponding rights over the resulting cloned object. The cloned object must have rights less than or equal to the original object. Alternatively, pass CLONE_FLAG_SAME_RIGHTS to inherit the rights on the source connection. It is invalid to pass any of the OPEN_RIGHT_* flags together with CLONE_FLAG_SAME_RIGHTS.

Request

NameType
flags uint32
object request<fuchsia.io/Node>

Close

Terminates connection with object.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status

Connect

Initiates a connection to a remote address.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Connect_Result

Connect2

Initiates a connection to a remote address.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Connect2_Result

Describe

Returns extra information about the type of the object. If the Describe operation fails, the connection is closed.

This method does not require any rights.

Request

NameType

Response

NameType
info fuchsia.io/NodeInfo

Disconnect

Clears connection information from this socket.

Request

NameType

Response

NameType
result BaseSocket_Disconnect_Result

GetAttr

Acquires information about the node.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status
attributes fuchsia.io/NodeAttributes

GetPeerName

Retrieves the remote socket address.

Request

NameType

Response

NameType
result BaseSocket_GetPeerName_Result

GetPeerName2

Retrieves the remote socket address.

Request

NameType

Response

NameType
result BaseSocket_GetPeerName2_Result

GetSockName

Retrieves the local socket address.

Request

NameType

Response

NameType
result BaseSocket_GetSockName_Result

GetSockName2

Retrieves the local socket address.

Request

NameType

Response

NameType
result BaseSocket_GetSockName2_Result

GetSockOpt

Retrieves the value of a socket option.

Request

NameType
level int16
optname int16

Response

NameType
result BaseSocket_GetSockOpt_Result

NodeGetFlags

Acquires the Directory.Open rights and flags used to access this file.

This method does not require any rights. This method has the same functionality as GetFlags for File and is meant as an in-progress replacement.

Request

NameType

Response

NameType
s zx/status
flags uint32

NodeSetFlags

Changes the Directory.Open flags used to access the file. Supported flags which can be turned on / off:

  • OPEN_FLAG_APPEND

This method does not require any rights. This method has the same functionality as SetFlags for File and is meant as an in-progress replacement.

Request

NameType
flags uint32

Response

NameType
s zx/status

OnOpen

An event produced eagerly by a FIDL server if requested by OPEN_FLAG_DESCRIBE.

Indicates the success or failure of the open operation, and optionally describes the object. If the status is ZX_OK, info contains descriptive information about the object (the same as would be returned by Describe).

Response

NameType
s zx/status
info fuchsia.io/NodeInfo?

SetAttr

Updates information about the node. flags may be any of NODE_ATTRIBUTE_FLAG_*.

This method requires following rights: OPEN_RIGHT_WRITABLE.

Request

NameType
flags uint32
attributes fuchsia.io/NodeAttributes

Response

NameType
s zx/status

SetSockOpt

Sets the value of a socket option.

Request

NameType
level int16
optname int16
optval sockopt

Response

NameType
result BaseSocket_SetSockOpt_Result

Sync

Synchronizes updates to the node to the underlying media, if it exists.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status

DatagramSocket

Defined in fuchsia.posix.socket/socket.fidl

A datagram socket.

This type's fuchsia.io.Node/Describe method returns an eventpair which is used to signal additional information about the state of the socket such as readiness or shutdown-ness.

All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.

Bind

Sets the local address used for the socket.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Bind_Result

Bind2

Sets the local address used for the socket.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Bind2_Result

Clone

Create another connection to the same remote object.

flags may be any of:

  • OPEN_RIGHT_*
  • OPEN_FLAG_APPEND
  • OPEN_FLAG_NO_REMOTE
  • OPEN_FLAG_DESCRIBE
  • CLONE_FLAG_SAME_RIGHTS

All other flags are ignored.

The OPEN_RIGHT_* bits in flags request corresponding rights over the resulting cloned object. The cloned object must have rights less than or equal to the original object. Alternatively, pass CLONE_FLAG_SAME_RIGHTS to inherit the rights on the source connection. It is invalid to pass any of the OPEN_RIGHT_* flags together with CLONE_FLAG_SAME_RIGHTS.

Request

NameType
flags uint32
object request<fuchsia.io/Node>

Close

Terminates connection with object.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status

Connect

Initiates a connection to a remote address.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Connect_Result

Connect2

Initiates a connection to a remote address.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Connect2_Result

Describe

Returns extra information about the type of the object. If the Describe operation fails, the connection is closed.

This method does not require any rights.

Request

NameType

Response

NameType
info fuchsia.io/NodeInfo

Disconnect

Clears connection information from this socket.

Request

NameType

Response

NameType
result BaseSocket_Disconnect_Result

GetAttr

Acquires information about the node.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status
attributes fuchsia.io/NodeAttributes

GetPeerName

Retrieves the remote socket address.

Request

NameType

Response

NameType
result BaseSocket_GetPeerName_Result

GetPeerName2

Retrieves the remote socket address.

Request

NameType

Response

NameType
result BaseSocket_GetPeerName2_Result

GetSockName

Retrieves the local socket address.

Request

NameType

Response

NameType
result BaseSocket_GetSockName_Result

GetSockName2

Retrieves the local socket address.

Request

NameType

Response

NameType
result BaseSocket_GetSockName2_Result

GetSockOpt

Retrieves the value of a socket option.

Request

NameType
level int16
optname int16

Response

NameType
result BaseSocket_GetSockOpt_Result

NodeGetFlags

Acquires the Directory.Open rights and flags used to access this file.

This method does not require any rights. This method has the same functionality as GetFlags for File and is meant as an in-progress replacement.

Request

NameType

Response

NameType
s zx/status
flags uint32

NodeSetFlags

Changes the Directory.Open flags used to access the file. Supported flags which can be turned on / off:

  • OPEN_FLAG_APPEND

This method does not require any rights. This method has the same functionality as SetFlags for File and is meant as an in-progress replacement.

Request

NameType
flags uint32

Response

NameType
s zx/status

OnOpen

An event produced eagerly by a FIDL server if requested by OPEN_FLAG_DESCRIBE.

Indicates the success or failure of the open operation, and optionally describes the object. If the status is ZX_OK, info contains descriptive information about the object (the same as would be returned by Describe).

Response

NameType
s zx/status
info fuchsia.io/NodeInfo?

RecvMsg

Receives a message from the socket.

Request

NameType
want_addr bool
data_len uint32
want_control bool
flags RecvMsgFlags

Response

NameType
result DatagramSocket_RecvMsg_Result

RecvMsg2

Receives a message from the socket.

Request

NameType
want_addr bool
data_len uint32
want_control bool
flags RecvMsgFlags

Response

NameType
result DatagramSocket_RecvMsg2_Result

SendMsg

Sends a message on the socket.

Request

NameType
addr fuchsia.net/SocketAddress?
data vector<uint8>
control SendControlData
flags SendMsgFlags

Response

NameType
result DatagramSocket_SendMsg_Result

SetAttr

Updates information about the node. flags may be any of NODE_ATTRIBUTE_FLAG_*.

This method requires following rights: OPEN_RIGHT_WRITABLE.

Request

NameType
flags uint32
attributes fuchsia.io/NodeAttributes

Response

NameType
s zx/status

SetSockOpt

Sets the value of a socket option.

Request

NameType
level int16
optname int16
optval sockopt

Response

NameType
result BaseSocket_SetSockOpt_Result

Shutdown

Shuts down part of the socket.

Request

NameType
mode ShutdownMode

Response

NameType
result DatagramSocket_Shutdown_Result

Shutdown2

Shuts down part of the socket.

Request

NameType
mode ShutdownMode

Response

NameType
result DatagramSocket_Shutdown2_Result

Sync

Synchronizes updates to the node to the underlying media, if it exists.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status

Provider

Defined in fuchsia.posix.socket/socket.fidl

Provider implements the POSIX sockets API.

DatagramSocket

Requests a datagram socket with the specified parameters.

Request

NameType
domain Domain
proto DatagramSocketProtocol

Response

NameType
result Provider_DatagramSocket_Result

GetInterfaceAddresses

Requests a list of fuchsia.posix.socket.InterfaceAddresses describing the network interfaces on the system.

Request

NameType

Response

NameType
interfaces vector<InterfaceAddresses>

InterfaceIndexToName

Looks up an interface by its index and returns its name. Returns ZX_ERR_NOT_FOUND if the specified index doesn't exist.

Request

NameType
index uint64

Response

NameType
result Provider_InterfaceIndexToName_Result

InterfaceNameToIndex

Looks up an interface by its name and returns its index. Returns ZX_ERR_NOT_FOUND if the specified name doesn't exist.

Request

NameType
name interface_name

Response

NameType
result Provider_InterfaceNameToIndex_Result

StreamSocket

Requests a stream socket with the specified parameters.

Request

NameType
domain Domain
proto StreamSocketProtocol

Response

NameType
result Provider_StreamSocket_Result

StreamSocket

Defined in fuchsia.posix.socket/socket.fidl

A stream socket.

This type's fuchsia.io.Node/Describe method returns a socket which is used to transfer data to and from the caller. Signals are used to communicate additional information about the state of the socket such as connectedness and the presence of incoming connections in the case of a listening socket.

All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.

Accept

Accepts a buffered incoming connection.

Request

NameType
want_addr bool

Response

NameType
result StreamSocket_Accept_Result

Accept2

Accepts a buffered incoming connection.

Request

NameType

Response

NameType
result StreamSocket_Accept2_Result

Bind

Sets the local address used for the socket.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Bind_Result

Bind2

Sets the local address used for the socket.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Bind2_Result

Clone

Create another connection to the same remote object.

flags may be any of:

  • OPEN_RIGHT_*
  • OPEN_FLAG_APPEND
  • OPEN_FLAG_NO_REMOTE
  • OPEN_FLAG_DESCRIBE
  • CLONE_FLAG_SAME_RIGHTS

All other flags are ignored.

The OPEN_RIGHT_* bits in flags request corresponding rights over the resulting cloned object. The cloned object must have rights less than or equal to the original object. Alternatively, pass CLONE_FLAG_SAME_RIGHTS to inherit the rights on the source connection. It is invalid to pass any of the OPEN_RIGHT_* flags together with CLONE_FLAG_SAME_RIGHTS.

Request

NameType
flags uint32
object request<fuchsia.io/Node>

Close

Terminates connection with object.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status

Connect

Initiates a connection to a remote address.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Connect_Result

Connect2

Initiates a connection to a remote address.

Request

NameType
addr fuchsia.net/SocketAddress

Response

NameType
result BaseSocket_Connect2_Result

Describe

Returns extra information about the type of the object. If the Describe operation fails, the connection is closed.

This method does not require any rights.

Request

NameType

Response

NameType
info fuchsia.io/NodeInfo

Disconnect

Clears connection information from this socket.

Request

NameType

Response

NameType
result BaseSocket_Disconnect_Result

GetAttr

Acquires information about the node.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status
attributes fuchsia.io/NodeAttributes

GetPeerName

Retrieves the remote socket address.

Request

NameType

Response

NameType
result BaseSocket_GetPeerName_Result

GetPeerName2

Retrieves the remote socket address.

Request

NameType

Response

NameType
result BaseSocket_GetPeerName2_Result

GetSockName

Retrieves the local socket address.

Request

NameType

Response

NameType
result BaseSocket_GetSockName_Result

GetSockName2

Retrieves the local socket address.

Request

NameType

Response

NameType
result BaseSocket_GetSockName2_Result

GetSockOpt

Retrieves the value of a socket option.

Request

NameType
level int16
optname int16

Response

NameType
result BaseSocket_GetSockOpt_Result

Listen

Begins listening for new incoming connections. At most backlog connections will be buffered.

Request

NameType
backlog int16

Response

NameType
result StreamSocket_Listen_Result

NodeGetFlags

Acquires the Directory.Open rights and flags used to access this file.

This method does not require any rights. This method has the same functionality as GetFlags for File and is meant as an in-progress replacement.

Request

NameType

Response

NameType
s zx/status
flags uint32

NodeSetFlags

Changes the Directory.Open flags used to access the file. Supported flags which can be turned on / off:

  • OPEN_FLAG_APPEND

This method does not require any rights. This method has the same functionality as SetFlags for File and is meant as an in-progress replacement.

Request

NameType
flags uint32

Response

NameType
s zx/status

OnOpen

An event produced eagerly by a FIDL server if requested by OPEN_FLAG_DESCRIBE.

Indicates the success or failure of the open operation, and optionally describes the object. If the status is ZX_OK, info contains descriptive information about the object (the same as would be returned by Describe).

Response

NameType
s zx/status
info fuchsia.io/NodeInfo?

SetAttr

Updates information about the node. flags may be any of NODE_ATTRIBUTE_FLAG_*.

This method requires following rights: OPEN_RIGHT_WRITABLE.

Request

NameType
flags uint32
attributes fuchsia.io/NodeAttributes

Response

NameType
s zx/status

SetSockOpt

Sets the value of a socket option.

Request

NameType
level int16
optname int16
optval sockopt

Response

NameType
result BaseSocket_SetSockOpt_Result

Sync

Synchronizes updates to the node to the underlying media, if it exists.

This method does not require any rights.

Request

NameType

Response

NameType
s zx/status

STRUCTS

BaseSocket_Bind2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

BaseSocket_Bind_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

BaseSocket_Connect2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

BaseSocket_Connect_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

BaseSocket_Disconnect_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

BaseSocket_GetPeerName2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress No default

BaseSocket_GetPeerName_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress No default

BaseSocket_GetSockName2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress No default

BaseSocket_GetSockName_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress No default

BaseSocket_GetSockOpt_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
optval sockopt No default

BaseSocket_SetSockOpt_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

DatagramSocket_RecvMsg2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress? No default
data vector<uint8> No default
control RecvControlData No default
truncated uint32 No default

DatagramSocket_RecvMsg_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress? No default
data vector<uint8> No default
control RecvControlData No default
truncated uint32 No default

DatagramSocket_SendMsg_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
len int64 No default

DatagramSocket_Shutdown2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

DatagramSocket_Shutdown_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

Empty

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

Provider_DatagramSocket_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
s DatagramSocket No default

Provider_InterfaceIndexToName_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
name interface_name No default

Provider_InterfaceNameToIndex_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
index uint64 No default

Provider_StreamSocket_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
s StreamSocket No default

StreamSocket_Accept2_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
s StreamSocket No default

StreamSocket_Accept_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault
addr fuchsia.net/SocketAddress? No default
s StreamSocket No default

StreamSocket_Listen_Response

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescriptionDefault

ENUMS

DatagramSocketProtocol

Type: uint32

Defined in fuchsia.posix.socket/socket.fidl

Protocols supported by DatagramSocket.

DatagramSocketProtocol enumerates the protocols supported by the network stack over datagram sockets.

NameValueDescription
UDP 1

UDP (User Datagram Protocol).

A UDP socket is equivalent to the POSIX API of SOCK_DGRAM with a protocol of 0 or IPPROTO_UDP.

ICMP_ECHO 2

ICMP (Internet Control Message Protocol) echo.

An ICMP echo socket is equivalent to the POSIX API of SOCK_DGRAM with a protocol of IPPROTO_ICMP IPPROTO_ICMPV6 (depending on provided domain).

Datagrams sent over an ICMP echo socket must have a valid ICMP or ICMPv6 echo header.

Domain

Type: int16

Defined in fuchsia.posix.socket/socket.fidl

A socket's domain.

Determines the addressing domain for a socket.

NameValueDescription
IPV4 0

An IPv4 socket. Equivalent to AF_INET.

IPV6 1

An IPv6 socket. Equivalent to AF_INET6.

StreamSocketProtocol

Type: uint32

Defined in fuchsia.posix.socket/socket.fidl

Protocols supported by StreamSocket.

StreamSocketProtocol enumerates the protocols supported by the network stack over stream sockets.

NameValueDescription
TCP 0

TCP (Transmission Control Protocol).

A TCP socket is equivalent to the POSIX API of SOCK_STREAM with a protocol of 0 or IPPROTO_TCP.

TABLES

InterfaceAddresses

Defined in fuchsia.posix.socket/socket.fidl

Holds information about an interface and its addresses.

OrdinalNameTypeDescription
1 id uint64

ID of the interface.

2 name interface_name

Name of the interface.

3 flags uint32

Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl operation.

4 addresses vector<fuchsia.net/Subnet>

All addresses currently assigned to the interface.

RecvControlData

Defined in fuchsia.posix.socket/socket.fidl

Ancillary data for received datagram sockets.

OrdinalNameTypeDescription

SendControlData

Defined in fuchsia.posix.socket/socket.fidl

Ancillary data for sending datagram sockets.

OrdinalNameTypeDescription

UNIONS

BaseSocket_Bind2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_Bind2_Response
err fuchsia.posix/Errno

BaseSocket_Bind_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_Bind_Response
err fuchsia.posix/Errno

BaseSocket_Connect2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_Connect2_Response
err fuchsia.posix/Errno

BaseSocket_Connect_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_Connect_Response
err fuchsia.posix/Errno

BaseSocket_Disconnect_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_Disconnect_Response
err fuchsia.posix/Errno

BaseSocket_GetPeerName2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_GetPeerName2_Response
err fuchsia.posix/Errno

BaseSocket_GetPeerName_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_GetPeerName_Response
err fuchsia.posix/Errno

BaseSocket_GetSockName2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_GetSockName2_Response
err fuchsia.posix/Errno

BaseSocket_GetSockName_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_GetSockName_Response
err fuchsia.posix/Errno

BaseSocket_GetSockOpt_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_GetSockOpt_Response
err fuchsia.posix/Errno

BaseSocket_SetSockOpt_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response BaseSocket_SetSockOpt_Response
err fuchsia.posix/Errno

DatagramSocket_RecvMsg2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response DatagramSocket_RecvMsg2_Response
err fuchsia.posix/Errno

DatagramSocket_RecvMsg_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response DatagramSocket_RecvMsg_Response
err fuchsia.posix/Errno

DatagramSocket_SendMsg_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response DatagramSocket_SendMsg_Response
err fuchsia.posix/Errno

DatagramSocket_Shutdown2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response DatagramSocket_Shutdown2_Response
err fuchsia.posix/Errno

DatagramSocket_Shutdown_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response DatagramSocket_Shutdown_Response
err fuchsia.posix/Errno

Provider_DatagramSocket_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response Provider_DatagramSocket_Response
err fuchsia.posix/Errno

Provider_InterfaceIndexToName_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response Provider_InterfaceIndexToName_Response
err zx/status

Provider_InterfaceNameToIndex_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response Provider_InterfaceNameToIndex_Response
err zx/status

Provider_StreamSocket_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response Provider_StreamSocket_Response
err fuchsia.posix/Errno

StreamSocket_Accept2_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response StreamSocket_Accept2_Response
err fuchsia.posix/Errno

StreamSocket_Accept_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response StreamSocket_Accept_Response
err fuchsia.posix/Errno

StreamSocket_Listen_Result

Defined in fuchsia.posix.socket/socket.fidl

NameTypeDescription
response StreamSocket_Listen_Response
err fuchsia.posix/Errno

BITS

RecvMsgFlags

Type: uint16

Defined in fuchsia.posix.socket/socket.fidl

Flags controlling RecvMsg behavior.

NameValueDescription
PEEK 2

Returns data from the receive queue without removing from it.

Equivalent to MSG_PEEK.

SendMsgFlags

Type: uint16

Defined in fuchsia.posix.socket/socket.fidl

NameValueDescription
RESERVED 32768

ShutdownMode

Type: uint16

Defined in fuchsia.posix.socket/socket.fidl

Socket shutdown mode.

NameValueDescription
READ 1

Shutdown socket read endpoint.

WRITE 2

Shutdown socket write endpoint.

CONSTANTS

NameValueTypeDescription
INTERFACE_NAME_LENGTH 15 uint8

The maximum length of an interface name.

TYPE ALIASES

NameValueDescription
interface_name string[INTERFACE_NAME_LENGTH]

An interface name as a sequence of bytes.

sockopt vector[900]

Chosen to be large enough to hold whatever we might want to cram in it. So long as we support socket options, we don't have a good sense of what we might want to send as payload.