fuchsia.fdomain

Added: 27

PROTOCOLS

Channel

Defined in fuchsia.fdomain/channel.fidl

FDomain operations on Channels.

CreateChannel

Create a new channel in this FDomain and return both its ends.

Request

NameType
handles array<NewHandleId, 2>

Response

NameType
payload Channel_CreateChannel_Result

OnChannelStreamingData

Data read asynchronously from a channel.

Response

NameType
handle HandleId
channel_sent ChannelSent

ReadChannel

Read a message from a channel. This method will fail if the channel is currently being read using the streaming read functions.

Note that this method is not like zx_channel_read in that it will not return SHOULD_WAIT but will instead delay returning until there is data to return.

Request

NameType
handle HandleId

Response

NameType
payload Channel_ReadChannel_Result

ReadChannelStreamingStart

Starts reading from the given channel. Data is returned via the ChannelStreamingData event. That event will occur repeatedly until ReadChannelStreamingStop is called for the same handle or the event indicates the handle is closed.

Request

NameType
handle HandleId

Response

NameType
payload Channel_ReadChannelStreamingStart_Result

ReadChannelStreamingStop

Stop asynchronous reading from the given channel.

Request

NameType
handle HandleId

Response

NameType
payload Channel_ReadChannelStreamingStop_Result

WriteChannel

Write to a channel. Handles are always consumed.

Request

NameType
handle HandleId
data vector<uint8>:65536
handles Handles

Response

NameType
payload Channel_WriteChannel_Result

Event

Defined in fuchsia.fdomain/event.fidl

FDomain operations on Events.

CreateEvent

Create a new event in this FDomain and return it.

Request

NameType
handle NewHandleId

Response

NameType
payload Event_CreateEvent_Result

EventPair

Defined in fuchsia.fdomain/event_pair.fidl

FDomain operations on EventPairs.

CreateEventPair

Create a new event pair in this FDomain and return both its ends.

Request

NameType
handles array<NewHandleId, 2>

Response

NameType
payload EventPair_CreateEventPair_Result

FDomain

Defined in fuchsia.fdomain/protocol.fidl

The FDomain control protocol.

This protocol is designed to be used over a network or other non-channel transport.

Close

Close one or more handles.

Request

NameType
handles vector<HandleId>

Response

NameType
payload FDomain_Close_Result

CreateChannel

Create a new channel in this FDomain and return both its ends.

Request

NameType
handles array<NewHandleId, 2>

Response

NameType
payload Channel_CreateChannel_Result

CreateEvent

Create a new event in this FDomain and return it.

Request

NameType
handle NewHandleId

Response

NameType
payload Event_CreateEvent_Result

CreateEventPair

Create a new event pair in this FDomain and return both its ends.

Request

NameType
handles array<NewHandleId, 2>

Response

NameType
payload EventPair_CreateEventPair_Result

CreateSocket

Create a new socket in this FDomain and return both its ends.

Request

NameType
options SocketType
handles array<NewHandleId, 2>

Response

NameType
payload Socket_CreateSocket_Result

Duplicate

Duplicate a handle.

Request

NameType
handle HandleId
new_handle NewHandleId
rights zx/Rights

Response

NameType
payload FDomain_Duplicate_Result

GetKoid

Return the kernel object ID (koid) of the handle.

Added: 30

Request

NameType
handle HandleId

Response

NameType
payload FDomain_GetKoid_Result

GetNamespace

Adds a new channel handle to this namespace which points to a fuchsia.io.Directory. Can be used to "bootstrap" the FDomain.

Request

NameType
new_handle NewHandleId

Response

NameType
payload FDomain_GetNamespace_Result

OnChannelStreamingData

Data read asynchronously from a channel.

Response

NameType
handle HandleId
channel_sent ChannelSent

OnSocketStreamingData

Data read asynchronously from a socket.

Response

NameType
handle HandleId
socket_message SocketMessage

ReadChannel

Read a message from a channel. This method will fail if the channel is currently being read using the streaming read functions.

Note that this method is not like zx_channel_read in that it will not return SHOULD_WAIT but will instead delay returning until there is data to return.

Request

NameType
handle HandleId

Response

NameType
payload Channel_ReadChannel_Result

ReadChannelStreamingStart

Starts reading from the given channel. Data is returned via the ChannelStreamingData event. That event will occur repeatedly until ReadChannelStreamingStop is called for the same handle or the event indicates the handle is closed.

Request

NameType
handle HandleId

Response

NameType
payload Channel_ReadChannelStreamingStart_Result

ReadChannelStreamingStop

Stop asynchronous reading from the given channel.

Request

NameType
handle HandleId

Response

NameType
payload Channel_ReadChannelStreamingStop_Result

ReadSocket

Read data from a socket. This method will fail if the socket is currently being read asynchronously.

Request

NameType
handle HandleId
max_bytes uint64

Response

NameType
payload Socket_ReadSocket_Result

ReadSocketStreamingStart

Starts reading from the given socket. Data is returned via the SocketStreamingData event. That event will occur repeatedly until ReadSocketStreamingStop is called for the same handle or the event indicates the handle is closed.

Request

NameType
handle HandleId

Response

NameType
payload Socket_ReadSocketStreamingStart_Result

ReadSocketStreamingStop

Stop asynchronous reading from the given socket.

Request

NameType
handle HandleId

Response

NameType
payload Socket_ReadSocketStreamingStop_Result

Replace

Close a handle and replace it with a new one with possibly different rights.

Request

NameType
handle HandleId
new_handle NewHandleId
rights zx/Rights

Response

NameType
payload FDomain_Replace_Result

SetSocketDisposition

Set the disposition of a given socket.

Request

NameType
handle HandleId
disposition SocketDisposition
disposition_peer SocketDisposition

Response

NameType
payload Socket_SetSocketDisposition_Result

Signal

Set or clear signals on a handle.

Request

NameType
handle HandleId
set zx/Signals
clear zx/Signals

Response

NameType
payload FDomain_Signal_Result

SignalPeer

Set or clear signals on a handle's peer.

Request

NameType
handle HandleId
set zx/Signals
clear zx/Signals

Response

NameType
payload FDomain_SignalPeer_Result

WaitForSignals

Wait for signals from the given handle. Reply will be returned when one of the given signals is asserted.

Request

NameType
handle HandleId
signals zx/Signals

Response

NameType
payload FDomain_WaitForSignals_Result

WriteChannel

Write to a channel. Handles are always consumed.

Request

NameType
handle HandleId
data vector<uint8>:65536
handles Handles

Response

NameType
payload Channel_WriteChannel_Result

WriteSocket

Write to a socket. This will attempt to write all the data passed, and will block and retry whenever it is safe (e.g. it should never return SHOULD_WAIT). The WriteSocketError contains a wrote parameter to indicate if some bytes were written successfully before the failure occurred.

Request

NameType
handle HandleId
data vector<uint8>

Response

NameType
payload Socket_WriteSocket_Result

Socket

Defined in fuchsia.fdomain/socket.fidl

FDomain operations on sockets

CreateSocket

Create a new socket in this FDomain and return both its ends.

Request

NameType
options SocketType
handles array<NewHandleId, 2>

Response

NameType
payload Socket_CreateSocket_Result

OnSocketStreamingData

Data read asynchronously from a socket.

Response

NameType
handle HandleId
socket_message SocketMessage

ReadSocket

Read data from a socket. This method will fail if the socket is currently being read asynchronously.

Request

NameType
handle HandleId
max_bytes uint64

Response

NameType
payload Socket_ReadSocket_Result

ReadSocketStreamingStart

Starts reading from the given socket. Data is returned via the SocketStreamingData event. That event will occur repeatedly until ReadSocketStreamingStop is called for the same handle or the event indicates the handle is closed.

Request

NameType
handle HandleId

Response

NameType
payload Socket_ReadSocketStreamingStart_Result

ReadSocketStreamingStop

Stop asynchronous reading from the given socket.

Request

NameType
handle HandleId

Response

NameType
payload Socket_ReadSocketStreamingStop_Result

SetSocketDisposition

Set the disposition of a given socket.

Request

NameType
handle HandleId
disposition SocketDisposition
disposition_peer SocketDisposition

Response

NameType
payload Socket_SetSocketDisposition_Result

WriteSocket

Write to a socket. This will attempt to write all the data passed, and will block and retry whenever it is safe (e.g. it should never return SHOULD_WAIT). The WriteSocketError contains a wrote parameter to indicate if some bytes were written successfully before the failure occurred.

Request

NameType
handle HandleId
data vector<uint8>

Response

NameType
payload Socket_WriteSocket_Result

STRUCTS

AioStopped

Defined in fuchsia.fdomain/protocol.fidl

A return value indicating asynchronous IO has stopped, optionally with an error.

FieldTypeDescriptionDefault
error Error? No default

BadHandleId

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
id uint32 No default

ChannelMessage

Defined in fuchsia.fdomain/channel.fidl

Message received through a channel.

FieldTypeDescriptionDefault
data vector<uint8>:65536 No default
handles vector<HandleInfo>:64 No default

Channel_CreateChannel_Response

Defined in fuchsia.fdomain/channel.fidl

<EMPTY>

Channel_ReadChannelStreamingStart_Response

Defined in fuchsia.fdomain/channel.fidl

<EMPTY>

Channel_ReadChannelStreamingStop_Response

Defined in fuchsia.fdomain/channel.fidl

<EMPTY>

Channel_WriteChannel_Response

Defined in fuchsia.fdomain/channel.fidl

<EMPTY>

ClosedDuringRead

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

EventPair_CreateEventPair_Response

Defined in fuchsia.fdomain/event_pair.fidl

<EMPTY>

Event_CreateEvent_Response

Defined in fuchsia.fdomain/event.fidl

<EMPTY>

FDomain_Close_Response

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

FDomain_Duplicate_Response

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

FDomain_GetKoid_Response

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
koid zx/Koid No default

FDomain_GetNamespace_Response

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

FDomain_Replace_Response

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

FDomain_SignalPeer_Response

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

FDomain_Signal_Response

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

FDomain_WaitForSignals_Response

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
signals zx/Signals No default

HandleDisposition

Defined in fuchsia.fdomain/protocol.fidl

A handle disposition. Contains a handle to be written to a channel, as well as an operation to perform before writing.

FieldTypeDescriptionDefault
handle HandleOp No default
rights zx/Rights No default

HandleId

Defined in fuchsia.fdomain/protocol.fidl

A handle ID. This is the same size as an actual Zircon handle, and refers to one conceptually, but internally it is not actually a Zircon handle number.

FieldTypeDescriptionDefault
id uint32 No default

HandleInfo

Defined in fuchsia.fdomain/protocol.fidl

A handle, and the rights that handle is known to possess. This is meant to be a direct analogue to zx_handle_info_t as described in https://fuchsia.dev/reference/syscalls/channel_read_etc

FieldTypeDescriptionDefault
handle HandleId No default
type zx/ObjType No default
rights zx/Rights No default

NewHandleId

Defined in fuchsia.fdomain/protocol.fidl

A new handle ID. The ID should be a handle ID that has not been used before in this session. The call this is passed to will presumably make a handle at this ID, and it can be used as a HandleId in subsequent calls.

FieldTypeDescriptionDefault
id uint32 No default

NewHandleIdOutOfRange

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
id uint32 No default

NewHandleIdReused

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
id uint32 No default
same_call bool

Indicates this NewHandleId did not collide before the method was called, but we passed the same NewHandleId to the method twice.

No default

NoReadInProgress

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

RightsUnknown

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
rights zx/Rights No default

SignalsUnknown

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
signals zx/Signals No default

SocketData

Defined in fuchsia.fdomain/socket.fidl

Data resulting from reading a socket.

FieldTypeDescriptionDefault
data vector<uint8> No default
is_datagram bool No default

SocketDispositionUnknown

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
disposition SocketDisposition No default

SocketTypeUnknown

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
type SocketType No default

Socket_CreateSocket_Response

Defined in fuchsia.fdomain/socket.fidl

<EMPTY>

Socket_ReadSocketStreamingStart_Response

Defined in fuchsia.fdomain/socket.fidl

<EMPTY>

Socket_ReadSocketStreamingStop_Response

Defined in fuchsia.fdomain/socket.fidl

<EMPTY>

Socket_SetSocketDisposition_Response

Defined in fuchsia.fdomain/socket.fidl

<EMPTY>

Socket_WriteSocket_Response

Defined in fuchsia.fdomain/socket.fidl

FieldTypeDescriptionDefault
wrote uint64 No default

StreamingReadInProgress

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

WriteSocketError

Defined in fuchsia.fdomain/socket.fidl

Result from a socket write operation.

FieldTypeDescriptionDefault
error Error No default
wrote uint64 No default

WrongHandleType

Defined in fuchsia.fdomain/protocol.fidl

FieldTypeDescriptionDefault
expected zx/ObjType No default
got zx/ObjType No default

WroteToSelf

Defined in fuchsia.fdomain/protocol.fidl

<EMPTY>

ENUMS

SocketDisposition flexible

Type: uint32

Defined in fuchsia.fdomain/socket.fidl

Socket disposition.

NameValueDescription
0
1
2

SocketType flexible

Type: uint32

Defined in fuchsia.fdomain/socket.fidl

Socket type.

NameValueDescription
0
1

UNIONS

ChannelSent flexible

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
message ChannelMessage
stopped AioStopped

Channel_CreateChannel_Result strict

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
response Channel_CreateChannel_Response
err Error
framework_err internal

Channel_ReadChannelStreamingStart_Result strict

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
response Channel_ReadChannelStreamingStart_Response
err Error
framework_err internal

Channel_ReadChannelStreamingStop_Result strict

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
response Channel_ReadChannelStreamingStop_Response
err Error
framework_err internal

Channel_ReadChannel_Result strict

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
response ChannelMessage
err Error
framework_err internal

Channel_WriteChannel_Result strict

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
response Channel_WriteChannel_Response
err WriteChannelError
framework_err internal

Error flexible

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
target_error zx/Status

An error produced by interacting with the handle itself.

bad_handle_id BadHandleId

An invalid handle ID was given.

new_handle_id_out_of_range NewHandleIdOutOfRange

We passed a NewHandleId that contained an ID with a 1 in the most significant bit.

new_handle_id_reused NewHandleIdReused

We passed a NewHandleId that collides with an already-allocated handle.

wrong_handle_type WrongHandleType

The handle used is not of the right type for the operation requested.

streaming_read_in_progress StreamingReadInProgress

Occurs when we try to start streaming reading twice on the same handle, or try to directly read from a handle which we are already streaming reading from.

no_read_in_progress NoReadInProgress

We tried to stop streaming reading on a handle we weren't streaming reads from to begin with.

wrote_to_self WroteToSelf

We tried to write a channel into itself.

closed_during_read ClosedDuringRead

We received a request to close or transfer a handle while we were waiting to read from it.

signals_unknown SignalsUnknown

The flexible features of this protocol allowed the client to send us signals that we didn't actually understand, and we couldn't proceed safely without knowing what they were. The signals field should contain only the signals that weren't understood.

rights_unknown RightsUnknown

The flexible features of this protocol allowed the client to send us rights that we didn't actually understand, and we couldn't proceed safely without knowing what they were. The rights field should contain only the rights that weren't understood.

socket_disposition_unknown SocketDispositionUnknown

The client used a socket disposition that the FDomain did not recognize.

socket_type_unknown SocketTypeUnknown

The client used a socket type that the FDomain did not recognize.

EventPair_CreateEventPair_Result strict

Defined in fuchsia.fdomain/event_pair.fidl

OrdinalVariantTypeDescription
response EventPair_CreateEventPair_Response
err Error
framework_err internal

Event_CreateEvent_Result strict

Defined in fuchsia.fdomain/event.fidl

OrdinalVariantTypeDescription
response Event_CreateEvent_Response
err Error
framework_err internal

FDomain_Close_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_Close_Response
err Error
framework_err internal

FDomain_Duplicate_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_Duplicate_Response
err Error
framework_err internal

FDomain_GetKoid_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_GetKoid_Response
err Error
framework_err internal

FDomain_GetNamespace_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_GetNamespace_Response
err Error
framework_err internal

FDomain_Replace_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_Replace_Response
err Error
framework_err internal

FDomain_SignalPeer_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_SignalPeer_Response
err Error
framework_err internal

FDomain_Signal_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_Signal_Response
err Error
framework_err internal

FDomain_WaitForSignals_Result strict

Defined in fuchsia.fdomain/protocol.fidl

OrdinalVariantTypeDescription
response FDomain_WaitForSignals_Response
err Error
framework_err internal

HandleOp strict

Defined in fuchsia.fdomain/protocol.fidl

A handle, paired with an operation to perform on that handle (move or duplicate).

OrdinalVariantTypeDescription
move HandleId
duplicate HandleId

Handles strict

Defined in fuchsia.fdomain/channel.fidl

OrdinalVariantTypeDescription
handles vector<HandleId>:64
dispositions vector<HandleDisposition>:64

SocketMessage flexible

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
data SocketData
stopped AioStopped

Socket_CreateSocket_Result strict

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
response Socket_CreateSocket_Response
err Error
framework_err internal

Socket_ReadSocketStreamingStart_Result strict

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
response Socket_ReadSocketStreamingStart_Response
err Error
framework_err internal

Socket_ReadSocketStreamingStop_Result strict

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
response Socket_ReadSocketStreamingStop_Response
err Error
framework_err internal

Socket_ReadSocket_Result strict

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
response SocketData
err Error
framework_err internal

Socket_SetSocketDisposition_Result strict

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
response Socket_SetSocketDisposition_Response
err Error
framework_err internal

Socket_WriteSocket_Result strict

Defined in fuchsia.fdomain/socket.fidl

OrdinalVariantTypeDescription
response Socket_WriteSocket_Response
err WriteSocketError
framework_err internal

WriteChannelError strict

Defined in fuchsia.fdomain/channel.fidl

Result from a channel write operation.

OrdinalVariantTypeDescription
error Error
op_errors vector<Error?>