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

Lte Ipv6 routing test case. More...

+ Inheritance diagram for LteIpv6RoutingTestCase:
+ Collaboration diagram for LteIpv6RoutingTestCase:

Public Member Functions

 LteIpv6RoutingTestCase ()
 
 ~LteIpv6RoutingTestCase () override
 
void Checker ()
 Initialize testing parameters.
 
void EnbToPgw (Ptr< Packet > p)
 Received Packet at pgw from enb.
 
void ReceivedAtClient (Ptr< const Packet > p, Ptr< Ipv6 > ipv6, uint32_t interface)
 Received Packets at client's IPv6 interface.
 
void SentAtClient (Ptr< const Packet > p, Ptr< Ipv6 > ipv6, uint32_t interface)
 sent Packets from client's IPv6 interface.
 
void TunToPgw (Ptr< Packet > p)
 Received Packet at pgw from enb.
 
- 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 DoRun () override
 Implementation to actually run this TestCase.
 

Private Attributes

std::list< Ptr< Packet > > m_clientRxPkts
 list of received packets at client
 
std::list< Ptr< Packet > > m_clientTxPkts
 list of sent packets from client
 
std::list< uint64_t > m_pgwUidRxFrmEnb
 list of uids of packets received at pgw from enb
 
std::list< uint64_t > m_pgwUidRxFrmTun
 list of uids of packets received at pgw from tunnel net device
 
Ipv6Address m_remoteHostAddr
 remote host address
 
Ipv6InterfaceContainer m_ueIpIface
 IPv6 interface container for ue.
 

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

Lte Ipv6 routing test case.

Definition at line 46 of file lte-test-ipv6-routing.cc.

Constructor & Destructor Documentation

◆ LteIpv6RoutingTestCase()

LteIpv6RoutingTestCase::LteIpv6RoutingTestCase ( )

Definition at line 97 of file lte-test-ipv6-routing.cc.

◆ ~LteIpv6RoutingTestCase()

LteIpv6RoutingTestCase::~LteIpv6RoutingTestCase ( )
override

Definition at line 102 of file lte-test-ipv6-routing.cc.

Member Function Documentation

◆ Checker()

void LteIpv6RoutingTestCase::Checker ( )

Initialize testing parameters.

Definition at line 151 of file lte-test-ipv6-routing.cc.

References ns3::Ipv6Header::GetDestination(), ns3::UdpHeader::GetDestinationPort(), ns3::Ipv6Header::GetSource(), ns3::UdpHeader::GetSourcePort(), m_clientRxPkts, m_clientTxPkts, m_pgwUidRxFrmEnb, m_pgwUidRxFrmTun, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

◆ EnbToPgw()

void LteIpv6RoutingTestCase::EnbToPgw ( Ptr< Packet > p)

Received Packet at pgw from enb.

Parameters
ppacket

Definition at line 129 of file lte-test-ipv6-routing.cc.

References ns3::Ipv6Header::GetNextHeader(), m_pgwUidRxFrmEnb, and ns3::UdpL4Protocol::PROT_NUMBER.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReceivedAtClient()

void LteIpv6RoutingTestCase::ReceivedAtClient ( Ptr< const Packet > p,
Ptr< Ipv6 > ipv6,
uint32_t interface )

Received Packets at client's IPv6 interface.

Parameters
ppacket
ipv6Ipv6 object
interfaceIpv6interface at which the packet is received

Definition at line 118 of file lte-test-ipv6-routing.cc.

References ns3::Ipv6Header::GetNextHeader(), m_clientRxPkts, and ns3::UdpL4Protocol::PROT_NUMBER.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SentAtClient()

void LteIpv6RoutingTestCase::SentAtClient ( Ptr< const Packet > p,
Ptr< Ipv6 > ipv6,
uint32_t interface )

sent Packets from client's IPv6 interface.

Parameters
ppacket
ipv6Ipv6 object
interfaceIpv6interface from which the packet is transmitted

Definition at line 107 of file lte-test-ipv6-routing.cc.

References ns3::Ipv6Header::GetNextHeader(), m_clientTxPkts, and ns3::UdpL4Protocol::PROT_NUMBER.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TunToPgw()

void LteIpv6RoutingTestCase::TunToPgw ( Ptr< Packet > p)

Received Packet at pgw from enb.

Parameters
ppacket

Definition at line 140 of file lte-test-ipv6-routing.cc.

References ns3::Ipv6Header::GetNextHeader(), m_pgwUidRxFrmTun, and ns3::UdpL4Protocol::PROT_NUMBER.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_clientRxPkts

std::list<Ptr<Packet> > LteIpv6RoutingTestCase::m_clientRxPkts
private

list of received packets at client

Definition at line 94 of file lte-test-ipv6-routing.cc.

Referenced by Checker(), and ReceivedAtClient().

◆ m_clientTxPkts

std::list<Ptr<Packet> > LteIpv6RoutingTestCase::m_clientTxPkts
private

list of sent packets from client

Definition at line 93 of file lte-test-ipv6-routing.cc.

Referenced by Checker(), and SentAtClient().

◆ m_pgwUidRxFrmEnb

std::list<uint64_t> LteIpv6RoutingTestCase::m_pgwUidRxFrmEnb
private

list of uids of packets received at pgw from enb

Definition at line 89 of file lte-test-ipv6-routing.cc.

Referenced by Checker(), and EnbToPgw().

◆ m_pgwUidRxFrmTun

std::list<uint64_t> LteIpv6RoutingTestCase::m_pgwUidRxFrmTun
private

list of uids of packets received at pgw from tunnel net device

Definition at line 91 of file lte-test-ipv6-routing.cc.

Referenced by Checker(), and TunToPgw().

◆ m_remoteHostAddr

Ipv6Address LteIpv6RoutingTestCase::m_remoteHostAddr
private

remote host address

Definition at line 88 of file lte-test-ipv6-routing.cc.

Referenced by DoRun().

◆ m_ueIpIface

Ipv6InterfaceContainer LteIpv6RoutingTestCase::m_ueIpIface
private

IPv6 interface container for ue.

Definition at line 87 of file lte-test-ipv6-routing.cc.

Referenced by DoRun().


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