class TunCtl

Defined at line 26 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.h

Implements `fuchsia.net.tun.Control`.

`TunCtl` is created with a `dispatcher`, over which it serves the `fuchsia.net.tun.Control`

protocol. It retains lists of created `TunDevice`s and `TunPair`s.

Public Methods

void ~TunCtl ()

Defined at line 47 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.cc

zx::result<std::unique_ptr<TunCtl>> Create (async_dispatcher_t * dispatcher)

Defined at line 18 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.cc

void Connect (fidl::ServerEnd<fuchsia_net_tun::Control> req)

Defined at line 31 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.h

void CreateDevice (CreateDeviceRequestView request, CreateDeviceCompleter::Sync & completer)

Defined at line 58 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.cc

void CreatePair (CreatePairRequestView request, CreatePairCompleter::Sync & completer)

Defined at line 82 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.cc

void SetSafeShutdownCallback (fit::callback<void ()> shutdown_callback)

Schedules `shutdown_callback` to be called once all devices and device pairs are torn down and

destroyed.

NOTE: This does not trigger the destruction of all devices, it installs an observer that

will notify the caller when all the devices are destroyed by their regular lifetime semantics.

Defined at line 104 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.cc

Protected Methods

const fbl::DoublyLinkedList<std::unique_ptr<TunDevice>> & devices ()

Defined at line 48 of file ../../src/connectivity/network/tun/network-tun/tun_ctl.h

Friends

class TunTest