class FakeNetwork
Defined at line 323 of file ../../src/virtualization/tests/lib/fake_netstack.cc
A fake network, consisting of one or more devices.
This class implements both the `fuchsia.net.virtualization/Control` and
`fuchsia.net.virtualization/Network` FIDL protocols.
The Control API is able to create multiple independent networks, but this
class simply maps them all into a single network for simplicity.
Thread hostile: unless specified otherwise, construction,
destruction, and methods should all be called on the thread backing
the single-threaded `executor`.
Public Methods
void FakeNetwork (async::Executor * executor)
Defined at line 326 of file ../../src/virtualization/tests/lib/fake_netstack.cc
void ~FakeNetwork ()
Defined at line 327 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fidl::InterfaceRequestHandler<fuchsia::net::virtualization::Control> GetHandler ()
Get an interface request handler.
This method and the returned handler are thread safe.
Defined at line 332 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fpromise::promise<Device *, zx_status_t> GetDevice (const fuchsia::net::MacAddress & mac_addr)
Wait for a device with the given MAC address to be added to this network,
and then return it.
Defined at line 343 of file ../../src/virtualization/tests/lib/fake_netstack.cc
void CreateNetwork (fuchsia::net::virtualization::Config config, fidl::InterfaceRequest<fuchsia::net::virtualization::Network> network)
`fuchsia.net.virtualization/Control` implementation.
Defined at line 369 of file ../../src/virtualization/tests/lib/fake_netstack.cc
void AddPort (fidl::InterfaceHandle<fuchsia::hardware::network::Port> port, fidl::InterfaceRequest<fuchsia::net::virtualization::Interface> interface)
`fuchsia.net.virtualization/Network` implementation.
Defined at line 387 of file ../../src/virtualization/tests/lib/fake_netstack.cc