class Network

Defined at line 3557 of file fidling/gen/src/connectivity/network/testing/netemul/network-context/fidl/network/hlcpp/fuchsia/netemul/network/cpp/fidl.h

Virtual network.

Public Methods

void ~Network ()
void AddPort (::fidl::InterfaceHandle< ::fuchsia::hardware::network::Port> port, ::fidl::InterfaceRequest< ::fuchsia::net::virtualization::Interface> interface)

Adds a port to the network.

+ request `port` port to be added.

+ request `interface` provides control over the interface.

void GetConfig (GetConfigCallback callback)

Gets network configuration.

void GetName (GetNameCallback callback)

Gets network name.

void SetConfig (::fuchsia::netemul::network::NetworkConfig config, SetConfigCallback callback)

Updates network configuration.

void AttachEndpoint (::std::string name, AttachEndpointCallback callback)

Attaches endpoint with given name to network.

void RemoveEndpoint (::std::string name, RemoveEndpointCallback callback)

Removes endpoint with given name from network.

void CreateFakeEndpoint (::fidl::InterfaceRequest< ::fuchsia::netemul::network::FakeEndpoint> ep)

Injects a fake endpoint.

void StartCapture (::std::string name, StartCaptureCallback callback)

Starts capturing packet in this network.

The packet capture will be stored at `/custom_artifacts/{name}.pcapng`.

Returns [`ZX_ERR_ALREADY_EXISTS`] if the capturing is already started

in this network.

void StopCapture (StopCaptureCallback callback)

Stops capturing packets. This function is guaranteed to succeed.

The packet capture will be stored in the file at the path chosen when

capturing started. The packet capture will stop automatically once the

network is destroyed regardless of whether this method is called.