25 #include "ns3/packet.h"
26 #include "ns3/ipv4-header.h"
27 #include "ns3/udp-header.h"
28 #include "ns3/tcp-header.h"
29 #include "ns3/udp-l4-protocol.h"
30 #include "ns3/tcp-l4-protocol.h"
32 #include "ns3/epc-tft-classifier.h"
70 virtual void DoRun (
void);
81 :
TestCase (BuildNameString (c, d, sa, da, sp, dp, tos, tftId)),
96 EpcTftClassifierTestCase::~EpcTftClassifierTestCase ()
101 EpcTftClassifierTestCase::BuildNameString (Ptr<EpcTftClassifier> c,
110 std::ostringstream oss;
117 <<
", tos = 0x" << std::hex << (int) tos
118 <<
" --> tftId = " << tftId;
125 ns3::PacketMetadata::Enable ();
128 m_ipHeader.
SetProtocol (UdpL4Protocol::PROT_NUMBER);
132 uint32_t obtainedTftId = m_c ->Classify (udpPacket, m_d);
133 NS_TEST_ASSERT_MSG_EQ (obtainedTftId, m_tftId,
"bad classification of UDP packet");
147 EpcTftClassifierTestSuite::EpcTftClassifierTestSuite ()
165 pf1_1_1.localAddress.Set (
"2.0.0.0");
166 pf1_1_1.remoteMask.Set (0xFF000000);
167 pf1_1_1.localMask.Set (0xFF000000);
168 tft1_1->Add (pf1_1_1);
175 tft1_1->Add (pf1_1_2);
185 pf1_2_1.remotePortEnd = 1035;
186 tft1_2->Add (pf1_2_1);
191 tft1_2->Add (pf1_2_2);
197 tft1_2->Add (pf1_2_3);
203 tft1_2->Add (pf1_2_4);
320 tft4_1->Add (pf1_2_3);
323 tft4_2->Add (pf1_2_4);
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
static Ptr< EpcTft > Default()
#define NS_LOG_COMPONENT_DEFINE(name)
virtual void DoRun(void)
Implementation to actually run this test case.
#define NS_LOG_LOGIC(msg)
Ipv4Address remoteAddress
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite.
void Set(uint32_t address)
Ipv4 addresses are stored in host order in this class.
void AddHeader(const Header &header)