radvd basic tests More...
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 | TestDuration { 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, TestDuration 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 45 of file ipv6-radvd-test.cc.
RadvdTestCase::RadvdTestCase | ( | ) |
Definition at line 82 of file ipv6-radvd-test.cc.
|
override |
Definition at line 87 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 92 of file ipv6-radvd-test.cc.
References m_addresses.
Referenced by DoRun().
|
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 113 of file ipv6-radvd-test.cc.
References m_addresses, m_routes, m_routingResults, ns3::Ipv6Header::SetDestination(), and ns3::Ipv6Header::SetSource().
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 154 of file ipv6-radvd-test.cc.
References ns3::NetDeviceContainer::Add(), ns3::Ipv6InterfaceContainer::Add(), ns3::RadvdHelper::AddAnnouncedPrefix(), ns3::Ipv6AddressHelper::Assign(), ns3::Ipv6AddressHelper::AssignWithoutAddress(), ns3::Ipv6AddressHelper::AssignWithoutOnLink(), CheckAddresses(), CheckRouting(), ns3::Simulator::Destroy(), ns3::Socket::ERROR_NOROUTETOHOST, ns3::Socket::ERROR_NOTERROR, ns3::NetDeviceContainer::Get(), ns3::Ipv6InterfaceContainer::GetInterfaceIndex(), ns3::RadvdInterface::GetPrefixes(), ns3::RadvdHelper::GetRadvdInterface(), ns3::RadvdHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), ns3::InternetStackHelper::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::Simulator::Stop(), and ns3::ApplicationContainer::Stop().
|
private |
Addresses on the nodes.
Definition at line 77 of file ipv6-radvd-test.cc.
Referenced by CheckAddresses(), CheckRouting(), and DoRun().
Routing call results.
Definition at line 79 of file ipv6-radvd-test.cc.
Referenced by CheckRouting(), and DoRun().
|
private |
Routing call return values.
Definition at line 78 of file ipv6-radvd-test.cc.
Referenced by CheckRouting(), and DoRun().