class FakeNetstack

Defined at line 349 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

The minimal set of fuchsia networking protocols required for WARM to run.

Public Methods

FakeNetstack & AddOwnedInterface (std::string name)

Add a fake interface with the given name. Does not check for duplicates.

Defined at line 400 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

FakeNetstack & RemoveOwnedInterface (std::string name)

Remove the fake interface with the given name. If it is not present, no change occurs.

Defined at line 419 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

void InjectAddAddressFailures (zx_status_t error)

Inject the given failure when adding addresses.

Defined at line 435 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

const std::vector<OwnedInterface> & interfaces ()

Access the current interfaces.

Defined at line 440 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

const std::vector<fuchsia::net::stack::ForwardingEntry> & route_table ()

Access the current route table.

Defined at line 443 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

OwnedInterface & GetInterfaceByName (const std::string name)

Get a pointer to an interface by name.

Defined at line 448 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

OwnedInterface & GetInterfaceById (const uint64_t id)

Get a pointer to an interface by ID.

Defined at line 456 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

bool IsInterfaceForwarded (uint64_t id)

Check if interface is forwarded.

Defined at line 464 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

fidl::InterfaceRequestHandler<fuchsia::net::stack::Stack> GetStackHandler (async_dispatcher_t * dispatcher)

Defined at line 466 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

bool FindRouteTableEntry (uint32_t nicid, ::nl::Inet::IPAddress addr, uint32_t metric)

Check if the given interface ID and address exists in the route table.

Defined at line 475 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp

fidl::InterfaceRequestHandler<fuchsia::net::root::Interfaces> GetRootHandler (async_dispatcher_t * dispatcher)

TODO(https://fxbug.dev/42062982) Delete this once Weavestack no longer relies

on the root API.

Defined at line 489 of file ../../src/connectivity/weave/adaptation/tests/warm_unittests.cpp