radvd basic tests More...
Public Member Functions | |
RadvdTestCase () | |
virtual | ~RadvdTestCase () |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) 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. More... | |
void | CheckRouting (Ptr< NetDevice > n0Dev, Ptr< NetDevice > r0Dev, Ptr< NetDevice > r1Dev, Ptr< NetDevice > n1Dev) |
Checks the routing between the selected NetDevices. More... | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
Private Attributes | |
std::vector< Ipv6Address > | m_addresses |
Addresses on the nodes. More... | |
std::vector< Ptr< Ipv6Route > > | m_routes |
Routing call results. More... | |
std::vector< Socket::SocketErrno > | m_routingResults |
Routing call return values. More... | |
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. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCsse. More... | |
bool | IsStatusFailure (void) const |
Check if any tests failed. More... | |
bool | IsStatusSuccess (void) const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
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. More... | |
bool | MustAssertOnFailure (void) const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure (void) const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
radvd basic tests
Definition at line 47 of file ipv6-radvd-test.cc.
RadvdTestCase::RadvdTestCase | ( | ) |
Definition at line 78 of file ipv6-radvd-test.cc.
|
virtual |
Definition at line 83 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 88 of file ipv6-radvd-test.cc.
References ns3::NetDevice::GetNode(), ns3::Object::GetObject(), and 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 106 of file ipv6-radvd-test.cc.
References ns3::NetDevice::GetNode(), ns3::Object::GetObject(), m_addresses, m_routes, m_routingResults, ns3::Ipv6Header::SetDestination(), and ns3::Ipv6Header::SetSource().
Referenced by DoRun().
|
privatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 144 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::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::Seconds(), ns3::Ipv6AddressHelper::SetBase(), ns3::SimpleNetDeviceHelper::SetChannelAttribute(), ns3::SimpleNetDeviceHelper::SetDeviceAttribute(), ns3::Ipv6InterfaceContainer::SetForwarding(), ns3::RadvdPrefix::SetOnLinkFlag(), ns3::ApplicationContainer::Start(), and ns3::ApplicationContainer::Stop().
|
private |
Addresses on the nodes.
Definition at line 73 of file ipv6-radvd-test.cc.
Referenced by CheckAddresses(), CheckRouting(), and DoRun().
Routing call results.
Definition at line 75 of file ipv6-radvd-test.cc.
Referenced by CheckRouting(), and DoRun().
|
private |
Routing call return values.
Definition at line 74 of file ipv6-radvd-test.cc.
Referenced by CheckRouting(), and DoRun().