class Session
Defined at line 609 of file fidling/gen/sdk/fidl/fuchsia.hardware.network/fuchsia.hardware.network/cpp/fidl/fuchsia.hardware.network/cpp/markers.h
Represents a session with a Network device.
A session has a data plane and a control plane. The `Session` protocol
represents the control plane of the session and the FIFOs and VMOs exchanged
during the [`Device.OpenSession`] call are the data plane. Lifetime of the
session is controlled by a `Session` protocol handle.
Sessions must attach to ports of interest to start receiving and sending
data. Sessions are always created with no ports attached.
If a port is destroyed from the underlying device, it is automatically
detached from the session.
Inbound traffic is dispatched to all open sessions. Devices typically
operate with a single primary session, see [`SessionFlags.PRIMARY`]. Each
additional open session to the same device causes data copy overhead on the
device's data path.
The session is closed with an error epitaph if an invalid buffer descriptor
is sent over either the tx or rx FIFOs. Invalid descriptors include:
- Descriptor index larger than [`SessionInfo.descriptor_count`].
- Descriptor chains larger than [`MAX_DESCRIPTOR_CHAIN`].
- rx buffers smaller than [`Info.min_rx_buffer_length`].
- tx buffers smaller than [`Info.min_tx_buffer_length`].
- tx buffers not respecting [`Info.min_tx_buffer_head`] or
[`Info.min_tx_buffer_tail`].
Public Members
static Openness kOpenness