template <>

class NaturalClientImpl

Defined at line 784 of file fidling/gen/sdk/fidl/fuchsia.hardware.network.driver/fuchsia.hardware.network.driver/cpp/fidl/fuchsia.hardware.network.driver/cpp/driver/natural_messaging.h

Public Methods

::fidl::internal::NaturalThenable< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::Init> Init (::fidl::Request< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::Init> request)

Initializes the network device.

`Init` is only called once during the lifetime of the device to register

`iface` as the callback target for the Network Device implementation.

Upon initialization, the device is expected to be in the "Stopped"

state, the `Start` method will be called once the data path needs to be

opened.

+ request `iface` handle to the device interface.

- response `s` initialization status. A value other than `ZX_OK` will

cause the device to unbind.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::Start> Start ()

Starts the device's data path.

`start` signals to the device implementation that it should bring up its

data path and be ready to receive tx frames and `iface` will start

accepting rx frames.

The device is only considered started once `Start` returns successfully.

Until then, the contract guarantees that no other data-path calls will

be made to the device (`QueueTx`, `RxAvailable`, `Stop`, or a second

call to `Start`), so implementers can safely assume or assert that this

contract is upheld.

- response `s` start status. `ZX_OK` indicates a successful start.

`ZX_ERR_ALREADY_BOUND` indicates that the device has already been

successfully started. Any other status value indicates an implementation

specific error.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::Stop> Stop ()

Stops the network device.

The device implementation must return all outstanding Tx and Rx buffers

upon receiving this call. Any new buffers received in the stopped state

must be returned with an appropriate error (tx) or unfulfilled (rx). See

[`NetworkDeviceIfc.CompleteTx`] and [`NetworkDeviceIfc.CompleteRx`] for

details.

The device implementation may perform any power saving measures after

observing stop.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::GetInfo> GetInfo ()

Gets information about the device.

Device information must not change over the course of the lifetime of

the device.

- response `info` device information.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::PrepareVmo> PrepareVmo (::fidl::Request< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::PrepareVmo> request)

Informs device that a new VMO is being used to store frame data.

Implementers must store the VMO handle referenced by `id` until

[`NetworkDeviceImpl.ReleaseVmo`] is called with the same `id`.

+ request `id` identifier used to reference this VMO.

+ request `vmo` VMO where frame data will be stored.

- response `s` vmo registration status. `ZX_OK` indicates a successful

VMO preparation. Any other status value indicates an implementation

specific error and causes the client session which owns the VMO to be

closed.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::ReleaseVmo> ReleaseVmo (const ::fidl::Request< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::ReleaseVmo> & request)

Device may dispose of all references to the VMO referenced by `id`.

No more buffers will be sent with this `id`.

`ReleaseVmo` is guaranteed to only be called when the implementation

holds no buffers that reference that `id`.

+ request `id` VMO identifier.

::fit::result< ::fidl::OneWayError> QueueTx (const ::fidl::Request< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::QueueTx> & request)

Enqueues a list of buffers for transmission on the network device.

The driver takes ownership of the buffer and must complete the tx

transaction by using [`NetworkDeviceIfc.CompleteTx`] operations once it

is done with each buffer in `buffers`.

The total number of outstanding tx buffers given to a device will never

exceed the reported [`DeviceInfo.tx_depth`] value. Which also means that

no more than `tx_depth` buffers are going to be informed at once in a

single call to `QueueTx`.

Buffers enqueued while the device in is the stopped state must be

returned with an appropriate error. See [`TxResult.status`] for specific

error codes.

+ request `buffers` tx buffers to enqueue for sending.

::fit::result< ::fidl::OneWayError> QueueRxSpace (const ::fidl::Request< ::fuchsia_hardware_network_driver::NetworkDeviceImpl::QueueRxSpace> & request)

Enqueues a list of rx buffer space on the network device.

The driver takes ownership of the buffer and must complete the

transaction (once network data arrives) using

[`NetworkDeviceIfc.CompleteRx`].

The total number of outstanding rx buffers given to a device will never

exceed the reported [`DeviceInfo.rx_depth`] value. Which also means that

no more than `rx_depth` buffers are going to be informed at once in a

single call to `QueueRxSpace`.

Buffers enqueued while the device in is the stopped state must be

returned with a zero length.

+ request `buffers` rx space buffers to be filled with network data when

it arrives.