Lte Ipv6 routing test case. More...
Public Member Functions | |
LteIpv6RoutingTestCase () | |
virtual | ~LteIpv6RoutingTestCase () |
void | Checker () |
Initialize testing parameters. More... | |
void | EnbToPgw (Ptr< Packet > p) |
Received Packet at pgw from enb. More... | |
void | ReceivedAtClient (Ptr< const Packet > p, Ptr< Ipv6 > ipv6, uint32_t interface) |
Received Packets at client's IPv6 interface. More... | |
void | SentAtClient (Ptr< const Packet > p, Ptr< Ipv6 > ipv6, uint32_t interface) |
sent Packets from client's IPv6 interface. More... | |
void | TunToPgw (Ptr< Packet > p) |
Received Packet at pgw from enb. More... | |
Public Member Functions inherited from ns3::TestCase | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
Private Attributes | |
std::list< Ptr< Packet > > | m_clientRxPkts |
list of received packets at client More... | |
std::list< Ptr< Packet > > | m_clientTxPkts |
list of sent packets from client More... | |
std::list< uint64_t > | m_pgwUidRxFrmEnb |
list of uids of packets received at pgw from enb More... | |
std::list< uint64_t > | m_pgwUidRxFrmTun |
list of uids of packets received at pgw from tunnel net device More... | |
Ipv6Address | m_remoteHostAddr |
remote host address More... | |
Ipv6InterfaceContainer | m_ueIpIface |
IPv6 interface container for ue. 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... | |
Lte Ipv6 routing test case.
Definition at line 60 of file lte-test-ipv6-routing.cc.
LteIpv6RoutingTestCase::LteIpv6RoutingTestCase | ( | ) |
Definition at line 111 of file lte-test-ipv6-routing.cc.
|
virtual |
Definition at line 116 of file lte-test-ipv6-routing.cc.
void LteIpv6RoutingTestCase::Checker | ( | ) |
Initialize testing parameters.
Definition at line 160 of file lte-test-ipv6-routing.cc.
References ns3::Packet::Copy(), ns3::Ipv6Header::GetDestinationAddress(), ns3::UdpHeader::GetDestinationPort(), ns3::Ipv6Header::GetSourceAddress(), ns3::UdpHeader::GetSourcePort(), ns3::Packet::GetUid(), ns3::Ipv6Address::IsEqual(), list, m_clientRxPkts, m_clientTxPkts, m_pgwUidRxFrmEnb, m_pgwUidRxFrmTun, NS_TEST_ASSERT_MSG_EQ, and ns3::Packet::RemoveHeader().
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 216 of file lte-test-ipv6-routing.cc.
References ns3::ListPositionAllocator::Add(), ns3::Ipv6StaticRouting::AddNetworkRouteTo(), ns3::Ipv6AddressHelper::Assign(), ns3::LteHelper::Attach(), Checker(), ns3::ConfigStore::ConfigureDefaults(), ns3::NodeContainer::Create(), EnbToPgw(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv6InterfaceContainer::GetAddress(), ns3::Node::GetApplication(), ns3::NodeContainer::GetN(), ns3::Object::GetObject(), ns3::Ipv6StaticRoutingHelper::GetStaticRouting(), ns3::UdpEchoServerHelper::Install(), ns3::PointToPointHelper::Install(), ns3::InternetStackHelper::Install(), ns3::UdpEchoClientHelper::Install(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), m_remoteHostAddr, m_ueIpIface, ns3::MakeCallback(), third::mobility, ReceivedAtClient(), ns3::Seconds(), SentAtClient(), first::serverApps, ns3::UdpEchoClientHelper::SetAttribute(), ns3::Ipv6AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Ipv6StaticRouting::SetDefaultRoute(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::LteHelper::SetEpcHelper(), ns3::Ipv6InterfaceContainer::SetForwarding(), ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), ns3::ObjectBase::TraceConnectWithoutContext(), and TunToPgw().
Received Packet at pgw from enb.
p | packet |
Definition at line 140 of file lte-test-ipv6-routing.cc.
References ns3::Ipv6Header::GetNextHeader(), ns3::Packet::GetUid(), m_pgwUidRxFrmEnb, and ns3::Packet::PeekHeader().
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 130 of file lte-test-ipv6-routing.cc.
References ns3::Packet::Copy(), ns3::Ipv6Header::GetNextHeader(), m_clientRxPkts, and ns3::Packet::PeekHeader().
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 120 of file lte-test-ipv6-routing.cc.
References ns3::Packet::Copy(), ns3::Ipv6Header::GetNextHeader(), m_clientTxPkts, and ns3::Packet::PeekHeader().
Referenced by DoRun().
Received Packet at pgw from enb.
p | packet |
Definition at line 150 of file lte-test-ipv6-routing.cc.
References ns3::Ipv6Header::GetNextHeader(), ns3::Packet::GetUid(), m_pgwUidRxFrmTun, and ns3::Packet::PeekHeader().
Referenced by DoRun().
list of received packets at client
Definition at line 107 of file lte-test-ipv6-routing.cc.
Referenced by Checker(), and ReceivedAtClient().
list of sent packets from client
Definition at line 106 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 103 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 104 of file lte-test-ipv6-routing.cc.
Referenced by Checker(), and TunToPgw().
|
private |
|
private |
IPv6 interface container for ue.
Definition at line 101 of file lte-test-ipv6-routing.cc.
Referenced by DoRun().