class DeviceControl

Defined at line 6589 of file fidling/gen/sdk/fidl/fuchsia.net.interfaces.admin/fuchsia.net.interfaces.admin/hlcpp/fuchsia/net/interfaces/admin/cpp/fidl.h

Administrative control over an installed device on the network stack.

An instance of `DeviceControl` maps to an instance of

[`fuchsia.hardware.network/Session`]. All interfaces generated from a single

`DeviceControl` instance share the same `Session` and set of device buffers;

and are therefore subject to backpressure over the same pool of resources.

By the same measure, creating multiple `DeviceControl` instances attached to

the same underlying device causes data copies, because each `DeviceControl`

starts a new `Session`. For that reason, users should avoid creating

multiple `DeviceControl` instances for the same device and prefer

instantiating ports into interfaces from a single `DeviceControl` instance

per device.

This protocol encodes the underlying device's lifetime in both

directions; the device exists iff both ends of the protocol are open.

That is:

- Closing the client end causes the device to be removed, including all

interfaces created from it.

- Observing a closure of the server end indicates the device (and all

interfaces created from it) no longer exists.

Public Methods

void ~DeviceControl ()
void CreateInterface (::fuchsia::hardware::network::PortId port, ::fidl::InterfaceRequest< ::fuchsia::net::interfaces::admin::Control> control, ::fuchsia::net::interfaces::admin::Options options)

Creates an interface on the network stack.

+ request `port` the device's port to instantiate as an interface.

+ request `control` grants access to the created interface.

void Detach ()

Detaches the client end from the device's lifetime.

After calling `Detach`, closing this client end no longer causes the

device or any of the interfaces created from it to be removed. Note that

the lifetime of any created interface will continue to be coupled with

the associated [`Control`] client end.