Class used to test the messages only a link peer can forge.
More...
|
| void | SetUp () override |
| | set up the test fixture.
|
| |
| void | TearDown () override |
| | tear down the test fixture.
|
| |
|
| struct | __attribute__ ((packed)) Pseudo |
| | header the ICMPv6 checksum is computed over, RFC 8200 section 8.1.
|
| |
|
| static std::string | frameOf (std::string icmp, const IpAddress &destination, const MacAddress &mac) |
| | frame an ICMPv6 message sent from the unspecified address.
|
| |
| static std::string | solicitationOf (bool link) |
| | frame a router solicitation sent from the unspecified address.
|
| |
| static std::string | neighborSolicitationOf (bool link) |
| | frame a neighbor solicitation sent from the unspecified address.
|
| |
| static std::string | neighborAdvertisementOf (bool link) |
| | frame a neighbor advertisement sent from the unspecified address to all the nodes.
|
| |
| static void | inject (const std::string &frame) |
| | put a frame on the wire, bypassing the IPv6 stack.
|
| |
|
| static const std::string | _sender = "ndpa" |
| | interface the frames are written on.
|
| |
| static const std::string | _receiver = "ndpb" |
| | interface the router listens on.
|
| |
| static const std::string | _target = "2001:db8:24::2" |
| | address the receiving interface owns.
|
| |
Class used to test the messages only a link peer can forge.
◆ __attribute__()
| struct NdpLinkTest::__attribute__ |
( |
(packed) | | ) |
|
|
inlineprotected |
header the ICMPv6 checksum is computed over, RFC 8200 section 8.1.
◆ frameOf()
| static std::string NdpLinkTest::frameOf |
( |
std::string | icmp, |
|
|
const IpAddress & | destination, |
|
|
const MacAddress & | mac ) |
|
inlinestaticprotected |
frame an ICMPv6 message sent from the unspecified address.
- Parameters
-
| icmp | message, its checksum is computed here. |
| destination | destination address. |
| mac | destination hardware address. |
- Returns
- the frame.
◆ inject()
| static void NdpLinkTest::inject |
( |
const std::string & | frame | ) |
|
|
inlinestaticprotected |
put a frame on the wire, bypassing the IPv6 stack.
- Parameters
-
◆ neighborAdvertisementOf()
| static std::string NdpLinkTest::neighborAdvertisementOf |
( |
bool | link | ) |
|
|
inlinestaticprotected |
frame a neighbor advertisement sent from the unspecified address to all the nodes.
- Parameters
-
| link | carry the link layer address of the target. |
- Returns
- the frame.
◆ neighborSolicitationOf()
| static std::string NdpLinkTest::neighborSolicitationOf |
( |
bool | link | ) |
|
|
inlinestaticprotected |
frame a neighbor solicitation sent from the unspecified address.
- Parameters
-
| link | carry the link layer address of the sender. |
- Returns
- the frame.
◆ SetUp()
| void NdpLinkTest::SetUp |
( |
| ) |
|
|
inlineoverride |
◆ SetUpTestCase()
| static void NdpLinkTest::SetUpTestCase |
( |
| ) |
|
|
inlinestatic |
◆ solicitationOf()
| static std::string NdpLinkTest::solicitationOf |
( |
bool | link | ) |
|
|
inlinestaticprotected |
frame a router solicitation sent from the unspecified address.
- Parameters
-
| link | carry the link layer address of the sender. |
- Returns
- the frame.
◆ TearDown()
| void NdpLinkTest::TearDown |
( |
| ) |
|
|
inlineoverride |
tear down the test fixture.
◆ TearDownTestCase()
| static void NdpLinkTest::TearDownTestCase |
( |
| ) |
|
|
inlinestatic |
◆ _receiver
| const std::string NdpLinkTest::_receiver = "ndpb" |
|
staticprotected |
interface the router listens on.
◆ _sender
| const std::string NdpLinkTest::_sender = "ndpa" |
|
staticprotected |
interface the frames are written on.
◆ _server
router, destroyed before the solicitations its listener records.
◆ _solicitations
solicitations received by the router.
◆ _target
| const std::string NdpLinkTest::_target = "2001:db8:24::2" |
|
staticprotected |
address the receiving interface owns.
The documentation for this class was generated from the following file: