radvd basic tests More...
Inheritance diagram for RadvdTestCase:
Collaboration diagram for RadvdTestCase:Public Member Functions | |
| RadvdTestCase () | |
| ~RadvdTestCase () override | |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | CheckAddresses (Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev) |
| Checks the addresses on the selected NetDevices. | |
| void | CheckRouting (Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev) |
| Checks the routing between the selected NetDevices. | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
Private Attributes | |
| std::vector< Ipv6Address > | m_addresses |
| Addresses on the nodes. | |
| std::vector< Ptr< Ipv6Route > > | m_routes |
| Routing call results. | |
| std::vector< Socket::SocketErrno > | m_routingResults |
| Routing call return values. | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
| enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
| How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| Constructor. | |
| void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
| Add an individual child TestCase to this test suite. | |
| TestCase * | GetParent () const |
| Get the parent of this TestCase. | |
| bool | IsStatusFailure () const |
| Check if any tests failed. | |
| bool | IsStatusSuccess () const |
| Check if all tests passed. | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. | |
| void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
| Log the failure of this TestCase. | |
| bool | MustAssertOnFailure () const |
| Check if this run should assert on failure. | |
| bool | MustContinueOnFailure () const |
| Check if this run should continue on failure. | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. | |
radvd basic tests
Definition at line 34 of file ipv6-radvd-test.cc.
| RadvdTestCase::RadvdTestCase | ( | ) |
Definition at line 71 of file ipv6-radvd-test.cc.
References ns3::TestCase::TestCase().
Here is the call graph for this function:
|
override |
Definition at line 76 of file ipv6-radvd-test.cc.
|
private |
Checks the addresses on the selected NetDevices.
| n0Dev | node 0 device |
| r0Dev | router device toward node 0 |
| r1Dev | router device toward node 1 |
| n1Dev | node 1 device |
Definition at line 81 of file ipv6-radvd-test.cc.
References m_addresses.
Referenced by DoRun().
Here is the caller graph for this function:
|
private |
Checks the routing between the selected NetDevices.
| n0Dev | node 0 device |
| r0Dev | router device toward node 0 |
| r1Dev | router device toward node 1 |
| n1Dev | node 1 device |
Definition at line 102 of file ipv6-radvd-test.cc.
References ns3::Create(), m_addresses, m_routes, m_routingResults, ns3::Ipv6Header::SetDestination(), and ns3::Ipv6Header::SetSource().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 143 of file ipv6-radvd-test.cc.
References ns3::Ipv6InterfaceContainer::Add(), ns3::NetDeviceContainer::Add(), ns3::RadvdHelper::AddAnnouncedPrefix(), ns3::Ipv6AddressHelper::Assign(), ns3::Ipv6AddressHelper::AssignWithoutAddress(), ns3::Ipv6AddressHelper::AssignWithoutOnLink(), CheckAddresses(), CheckRouting(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::Socket::ERROR_NOROUTETOHOST, ns3::Socket::ERROR_NOTERROR, ns3::NetDeviceContainer::Get(), ns3::Ipv6InterfaceContainer::GetInterfaceIndex(), ns3::RadvdHelper::GetRadvdInterface(), ns3::ApplicationHelper::Install(), ns3::InternetStackHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), m_addresses, m_routes, m_routingResults, ns3::MilliSeconds(), NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::Ipv6AddressHelper::SetBase(), ns3::SimpleNetDeviceHelper::SetChannelAttribute(), ns3::SimpleNetDeviceHelper::SetDeviceAttribute(), ns3::Ipv6InterfaceContainer::SetForwarding(), ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), and ns3::Simulator::Stop().
Here is the call graph for this function:
|
private |
Addresses on the nodes.
Definition at line 66 of file ipv6-radvd-test.cc.
Referenced by CheckAddresses(), CheckRouting(), and DoRun().
Routing call results.
Definition at line 68 of file ipv6-radvd-test.cc.
Referenced by CheckRouting(), and DoRun().
|
private |
Routing call return values.
Definition at line 67 of file ipv6-radvd-test.cc.
Referenced by CheckRouting(), and DoRun().