Class used to test the neighbor discovery protocol API.
More...
|
| void | SetUp () override |
| | set up the test fixture, the router answers every solicitation to the solicitor.
|
| |
| void | TearDown () override |
| | tear down the test fixture.
|
| |
|
| static const std::string | _device = "ndp0" |
| | interface name.
|
| |
| static const std::string | _mac = "4e:ed:ed:ee:59:db" |
| | hardware address of the interface.
|
| |
| static const std::string | _router = "fe80::4ced:edff:feee:59db" |
| | link-local address of the interface.
|
| |
| static const std::string | _global = "2a01:e34:ed42:a680::1" |
| | global address of the interface.
|
| |
| static const int | _mtu = 9000 |
| | MTU of the interface.
|
| |
| static const std::chrono::milliseconds | timeout = std::chrono::seconds (5) |
| | timeout.
|
| |
Class used to test the neighbor discovery protocol API.
◆ checkSettings()
check that an advertisement carries what the router sends.
- Parameters
-
| advert | advertisement to check. |
◆ inject()
| static void NdpTest::inject |
( |
const std::string & | wire, |
|
|
const IpAddress & | destination, |
|
|
int | hop = Ndp::hopLimit, |
|
|
const IpAddress & | source = IpAddress::ipv6Wildcard ) |
|
inlinestaticprotected |
put raw bytes on the link, bypassing the library.
- Parameters
-
| wire | message to write. |
| destination | destination address. |
| hop | hop limit to send the message with. |
| source | source address, wildcard to let the stack choose. |
◆ settings()
get the advertisement the router sends.
- Returns
- the advertisement.
◆ SetUp()
set up the test fixture, the router answers every solicitation to the solicitor.
◆ SetUpTestCase()
| static void NdpTest::SetUpTestCase |
( |
| ) |
|
|
inlinestatic |
◆ TearDown()
| void NdpTest::TearDown |
( |
| ) |
|
|
inlineoverride |
tear down the test fixture.
◆ TearDownTestCase()
| static void NdpTest::TearDownTestCase |
( |
| ) |
|
|
inlinestatic |
◆ wireOf()
serialize an advertisement.
- Parameters
-
| advert | advertisement to serialize. |
- Returns
- the serialized advertisement.
◆ _device
| const std::string NdpTest::_device = "ndp0" |
|
staticprotected |
◆ _global
| const std::string NdpTest::_global = "2a01:e34:ed42:a680::1" |
|
staticprotected |
global address of the interface.
◆ _mac
| const std::string NdpTest::_mac = "4e:ed:ed:ee:59:db" |
|
staticprotected |
hardware address of the interface.
◆ _mtu
| const int NdpTest::_mtu = 9000 |
|
staticprotected |
◆ _router
| const std::string NdpTest::_router = "fe80::4ced:edff:feee:59db" |
|
staticprotected |
link-local address of the interface.
◆ _server
| Ndp::Server NdpTest::_server {_device} |
|
protected |
router, destroyed before the solicitations its listener records.
◆ _solicitations
solicitations received by the router.
◆ timeout
| const std::chrono::milliseconds NdpTest::timeout = std::chrono::seconds (5) |
|
staticprotected |
The documentation for this class was generated from the following file: