template <>

class WireServer

Defined at line 1129 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::NetworkPort>|

and |::fdf::ServerEnd

<

::fuchsia_hardware_network_driver::NetworkPort>|).

Public Methods

void GetInfo (fdf::Arena & arena, GetInfoCompleter::Sync & completer)

Gets information about the port.

Port information must not change over the port's lifetime.

- response `info` port information.

void GetStatus (fdf::Arena & arena, GetStatusCompleter::Sync & completer)

Gets operational status of the port.

Changes to operational status must be reported via

[`NetworkDeviceIfc.StatusChanged`]

- response `status` snapshot of port's operational status.

void SetActive (::fuchsia_hardware_network_driver::wire::NetworkPortSetActiveRequest * request, fdf::Arena & arena, SetActiveCompleter::Sync & completer)

Notifies the port that there are sessions interested in it.

An active port has sessions attached to it. Implementations may employ

power saving or other strategies on disabled ports. Implementations that

do employ such strategies:

- should not report inbound frames for inactive ports;

- must return errors for outbound frames destined to inactive ports.

All ports are inactive on creation.

+ request `active` `true` if port has sessions attached to it, `false`

otherwise.

void GetMac (fdf::Arena & arena, GetMacCompleter::Sync & completer)

Gets an interface to the MAC addressing layer of the port.

Ports that do not support MAC addressing must return an empty interface.

- response `mac_ifc` mac addressing handle.

void Removed (fdf::Arena & arena, RemovedCompleter::Sync & completer)

Notifies this port has been removed from the interface.

Resources associated with the port must only be freed upon receiving the

`Removed` call. Note that Removed will ONLY be called if AddPort has

returned and indicated success. If AddPort fails this will not be called,

check the return status of AddPort instead.

void GetPowerDependencyToken (fdf::Arena & arena, GetPowerDependencyTokenCompleter::Sync & completer)

Gets the Power Broker dependency token for this port's power element.

The token exposes two levels: `0` (off) and `1` (on). Clients lease

level `1` whenever the port's datapath is required and hold the lease

for as long as it is required. Drivers are free to internally

power-manage a leased-but-idle port so long as it's invisible to upper

layers.

The token is fixed for the lifetime of the port.

- response `token` absent if this port does not participate in power

management.

void WireServer ()

Defined at line 1132 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 1133 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