class Device
Defined at line 106 of file ../../src/virtualization/tests/lib/fake_netstack.cc
A network device connected to the fake network.
Thread hostile: construction and methods should all be called on the thread
backing the single-threaded `executor`.
Public Methods
fpromise::promise<std::unique_ptr<Device>, zx_status_t> Create (async::Executor * executor, fidl::InterfaceHandle<fuchsia::hardware::network::Port> port, fidl::InterfaceRequest<fuchsia::net::virtualization::Interface> interface)
Create and configure a new device.
The returned promise is resolved once the device has been configured and
is ready to send and receive packets.
Defined at line 112 of file ../../src/virtualization/tests/lib/fake_netstack.cc
const network::client::PortInfoAndMac & port_info ()
Defined at line 223 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fpromise::promise<Packet, zx_status_t> ReadPacket ()
Read the first available packet received by the device.
Defined at line 226 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fpromise::promise<void, zx_status_t> WritePacket (Packet payload)
Transmit a packet over the device.
Defined at line 243 of file ../../src/virtualization/tests/lib/fake_netstack.cc