class FakeNetstack
Defined at line 27 of file ../../src/virtualization/tests/lib/fake_netstack.h
Implements a fake netstack, providing the fuchsia.net.virtualization.Control
API.
and allowing packets to be sent and received from devices that attach to the
fake netstack.
Thread-safe.
Public Methods
void FakeNetstack ()
Defined at line 453 of file ../../src/virtualization/tests/lib/fake_netstack.cc
void ~FakeNetstack ()
Defined at line 470 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fpromise::promise<void, zx_status_t> SendUdpPacket (const fuchsia::net::MacAddress & mac_addr, std::vector<uint8_t> packet)
Send a packet with UDP headers, including the ethernet and IPv6 headers, to the interface with
the specified MAC address.
Defined at line 483 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fpromise::promise<void, zx_status_t> SendPacket (const fuchsia::net::MacAddress & mac_addr, std::vector<uint8_t> packet)
Send a raw packet to the interface with the specified MAC address.
Defined at line 533 of file ../../src/virtualization/tests/lib/fake_netstack.cc
fpromise::promise<std::vector<uint8_t>, zx_status_t> ReceivePacket (const fuchsia::net::MacAddress & mac_addr)
Receive a raw packet from the interface with the specified MAC address.
Defined at line 549 of file ../../src/virtualization/tests/lib/fake_netstack.cc
std::unique_ptr<component_testing::LocalComponentImpl> NewComponent ()
Defined at line 578 of file ../../src/virtualization/tests/lib/fake_netstack.cc