A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
RadvdTestCase Class Reference

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
 
TestCaseoperator= (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< Ipv6Addressm_addresses
 Addresses on the nodes.
 
std::vector< Ptr< Ipv6Route > > m_routes
 Routing call results.
 
std::vector< Socket::SocketErrnom_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...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 
- 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.
 
TestCaseGetParent () 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.
 

Detailed Description

radvd basic tests

Definition at line 34 of file ipv6-radvd-test.cc.

Constructor & Destructor Documentation

◆ RadvdTestCase()

RadvdTestCase::RadvdTestCase ( )

Definition at line 71 of file ipv6-radvd-test.cc.

◆ ~RadvdTestCase()

RadvdTestCase::~RadvdTestCase ( )
override

Definition at line 76 of file ipv6-radvd-test.cc.

Member Function Documentation

◆ CheckAddresses()

void RadvdTestCase::CheckAddresses ( Ptr< NetDevice > n0Dev,
Ptr< NetDevice > r0Dev,
Ptr< NetDevice > r1Dev,
Ptr< NetDevice > n1Dev )
private

Checks the addresses on the selected NetDevices.

Parameters
n0Devnode 0 device
r0Devrouter device toward node 0
r1Devrouter device toward node 1
n1Devnode 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:

◆ CheckRouting()

void RadvdTestCase::CheckRouting ( Ptr< NetDevice > n0Dev,
Ptr< NetDevice > r0Dev,
Ptr< NetDevice > r1Dev,
Ptr< NetDevice > n1Dev )
private

Checks the routing between the selected NetDevices.

Parameters
n0Devnode 0 device
r0Devrouter device toward node 0
r1Devrouter device toward node 1
n1Devnode 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:

◆ DoRun()

Member Data Documentation

◆ m_addresses

std::vector<Ipv6Address> RadvdTestCase::m_addresses
private

Addresses on the nodes.

Definition at line 66 of file ipv6-radvd-test.cc.

Referenced by CheckAddresses(), CheckRouting(), and DoRun().

◆ m_routes

std::vector<Ptr<Ipv6Route> > RadvdTestCase::m_routes
private

Routing call results.

Definition at line 68 of file ipv6-radvd-test.cc.

Referenced by CheckRouting(), and DoRun().

◆ m_routingResults

std::vector<Socket::SocketErrno> RadvdTestCase::m_routingResults
private

Routing call return values.

Definition at line 67 of file ipv6-radvd-test.cc.

Referenced by CheckRouting(), and DoRun().


The documentation for this class was generated from the following file: