Lte Ipv6 routing test case. More...
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 |
TestCase & | operator= (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. | |
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. | |
Lte Ipv6 routing test case.
Definition at line 46 of file lte-test-ipv6-routing.cc.
LteIpv6RoutingTestCase::LteIpv6RoutingTestCase | ( | ) |
Definition at line 97 of file lte-test-ipv6-routing.cc.
|
override |
Definition at line 102 of file lte-test-ipv6-routing.cc.
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().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 213 of file lte-test-ipv6-routing.cc.
References ns3::Ipv6AddressHelper::Assign(), Checker(), ns3::ConfigStore::ConfigureDefaults(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), EnbToPgw(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv6InterfaceContainer::GetAddress(), ns3::NodeContainer::GetN(), ns3::Ipv6StaticRoutingHelper::GetStaticRouting(), ns3::ApplicationHelper::Install(), ns3::PointToPointHelper::Install(), m_remoteHostAddr, m_ueIpIface, ns3::MakeCallback(), ReceivedAtClient(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), SentAtClient(), ns3::ApplicationHelper::SetAttribute(), ns3::Ipv6AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::Ipv6InterfaceContainer::SetForwarding(), ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), ns3::Simulator::Stop(), and TunToPgw().
Received Packet at pgw from enb.
p | packet |
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().
void LteIpv6RoutingTestCase::ReceivedAtClient | ( | Ptr< const Packet > | p, |
Ptr< Ipv6 > | ipv6, | ||
uint32_t | interface ) |
Received Packets at client's IPv6 interface.
p | packet |
ipv6 | Ipv6 object |
interface | Ipv6interface 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().
void LteIpv6RoutingTestCase::SentAtClient | ( | Ptr< const Packet > | p, |
Ptr< Ipv6 > | ipv6, | ||
uint32_t | interface ) |
sent Packets from client's IPv6 interface.
p | packet |
ipv6 | Ipv6 object |
interface | Ipv6interface 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().
Received Packet at pgw from enb.
p | packet |
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().
list of received packets at client
Definition at line 94 of file lte-test-ipv6-routing.cc.
Referenced by Checker(), and ReceivedAtClient().
list of sent packets from client
Definition at line 93 of file lte-test-ipv6-routing.cc.
Referenced by Checker(), and SentAtClient().
|
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().
|
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().
|
private |
|
private |
IPv6 interface container for ue.
Definition at line 87 of file lte-test-ipv6-routing.cc.
Referenced by DoRun().