template <>
class WireServer
Defined at line 1689 of file fidling/gen/sdk/fidl/fuchsia.hardware.network.driver/fuchsia.hardware.network.driver/cpp/fidl/fuchsia.hardware.network.driver/cpp/driver/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fdf::ClientEnd
<
::fuchsia_hardware_network_driver::NetworkDeviceIfc>|
and |::fdf::ServerEnd
<
::fuchsia_hardware_network_driver::NetworkDeviceIfc>|).
Public Methods
void PortStatusChanged (::fuchsia_hardware_network_driver::wire::NetworkDeviceIfcPortStatusChangedRequest * request, fdf::Arena & arena, PortStatusChangedCompleter::Sync & completer)
Notifies the interface of status changes on port with `id`.
Port status changes must always be notified through `StatusChanged`. The
interface will not poll ports for status via [`NetworkPort.GetStatus`].
+ request `id` port identifier.
+ request `new_status` new port's status.
void AddPort (::fuchsia_hardware_network_driver::wire::NetworkDeviceIfcAddPortRequest * request, fdf::Arena & arena, AddPortCompleter::Sync & completer)
Instantiates a new port with `id`.
`id` must not be currently in use by any other ports. `id`s may be
reused once the provided port is destroyed by [`NetworkPort.Removed`].
Port identifiers do not need to be stable across instantiations or
reboots. Port identifiers don't need to be allocated in any specific
order as long as [`MAX_PORTS`] is not exceeded.
+ request `id` new port identifier.
+ request `port` handle to network port implementation.
void RemovePort (::fuchsia_hardware_network_driver::wire::NetworkDeviceIfcRemovePortRequest * request, fdf::Arena & arena, RemovePortCompleter::Sync & completer)
Destroys port with `id`.
NOTE: Resources associated with the port must not be freed until
[`NetworkPort.Removed`] is called.
+ request `id` removed port identifier.
void CompleteRx (::fuchsia_hardware_network_driver::wire::NetworkDeviceIfcCompleteRxRequest * request, fdf::Arena & arena, CompleteRxCompleter::Sync & completer)
Notifies interface of incoming rx data, contained in [`RxBuffer`].
Callers should attempt to batch as many buffers as possible in a single
call. Number of buffers in a single call must be limited to the
[`DeviceInfo.rx_depth`] reported by the `NetworkDeviceImpl` that is
returning the buffers.
Buffers with zero length are considered "unfulfilled". They're not
reported to any sessions and the buffer space comprising them may be
reused. Devices should return any outstanding buffer space as
unfulfilled on stop. See [`NetworkDeviceImpl.Stop`].
By calling `CompleteRx` the caller relinquishes ownership of all buffers
that are being marked as complete.
+ request `rx` buffers containing incoming data.
void CompleteTx (::fuchsia_hardware_network_driver::wire::NetworkDeviceIfcCompleteTxRequest * request, fdf::Arena & arena, CompleteTxCompleter::Sync & completer)
Notifies interface of complete transmit buffers.
Callers should attempt to batch as many buffers as possible in a single
call.
Number of buffers in a single call must be limited to the
[`DeviceInfo.tx_depth`] reported by the `NetworkDeviceImpl` that is
returning the buffers.
By calling `CompleteTx` the caller relinquishes ownership of all buffers
that are being returned.
+ request `tx` transmit results.
void DelegateRxLease (::fuchsia_hardware_network_driver::wire::NetworkDeviceIfcDelegateRxLeaseRequest * request, fdf::Arena & arena, DelegateRxLeaseCompleter::Sync & completer)
Transfers a receive wake lease up to the application.
Devices that allow applications to fully deal with a frame after a wake
from network traffic may use this method as a "lease baton passing"
strategy. Applications that support wake handling hold on to the lease
until the rx traffic is fully processed.
Devices must keep track of the number of rx frames sent over
[`NetworkDeviceIfc.CompleteRx`] and use the latest issued frame number
as [`fuchsia.hardware.network/DelegatedRxLease.hold_until_frame`] to
guarantee processing. *Every* frame successfully given to `CompleteRx`
should increase the rx frame count. Note that the frame number is
1-based, see `hold_until_frame` docs for details.
Note that this is a one-way method and flow-control is enforced via the
regular rx space -> rx completion flow.
void WireServer ()
Defined at line 1692 of file fidling/gen/sdk/fidl/fuchsia.hardware.network.driver/fuchsia.hardware.network.driver/cpp/fidl/fuchsia.hardware.network.driver/cpp/driver/wire_messaging.h
Handler bind_handler (fdf_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~WireServer ()
Defined at line 1693 of file fidling/gen/sdk/fidl/fuchsia.hardware.network.driver/fuchsia.hardware.network.driver/cpp/fidl/fuchsia.hardware.network.driver/cpp/driver/wire_messaging.h