diff --git a/src/lte/doc/source/lte-testing.rst b/src/lte/doc/source/lte-testing.rst index fc53cb797..9cab00393 100644 --- a/src/lte/doc/source/lte-testing.rst +++ b/src/lte/doc/source/lte-testing.rst @@ -437,8 +437,8 @@ received traffic pattern is detected for any UE, the test fails. TFT classifier -------------- -The test suite ``eps-tft-classifier`` checks in isolation that the -behavior of the EpsTftClassifier class is correct. This is performed +The test suite ``epc-tft-classifier`` checks in isolation that the +behavior of the EpcTftClassifier class is correct. This is performed by creating different classifier instances where different TFT instances are activated, and testing for each classifier that an heterogeneous set of packets (including IP and TCP/UDP headers) is diff --git a/src/lte/model/epc-sgw-pgw-application.h b/src/lte/model/epc-sgw-pgw-application.h index 3bb2304c2..3fdd1ea53 100644 --- a/src/lte/model/epc-sgw-pgw-application.h +++ b/src/lte/model/epc-sgw-pgw-application.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -169,7 +169,7 @@ private: private: - EpsTftClassifier m_tftClassifier; + EpcTftClassifier m_tftClassifier; Ipv4Address m_enbAddr; }; diff --git a/src/lte/model/eps-tft-classifier.cc b/src/lte/model/epc-tft-classifier.cc similarity index 91% rename from src/lte/model/eps-tft-classifier.cc rename to src/lte/model/epc-tft-classifier.cc index abccf68d5..cdc4b9476 100644 --- a/src/lte/model/eps-tft-classifier.cc +++ b/src/lte/model/epc-tft-classifier.cc @@ -17,8 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: - * Nicola Baldo (the EpsTftClassifier class) - * Giuseppe Piro (part of the code in EpsTftClassifier::Classify () + * Nicola Baldo (the EpcTftClassifier class) + * Giuseppe Piro (part of the code in EpcTftClassifier::Classify () * which comes from RrcEntity::Classify of the GSoC 2010 LTE module) * */ @@ -26,7 +26,7 @@ -#include "eps-tft-classifier.h" +#include "epc-tft-classifier.h" #include "epc-tft.h" #include "ns3/log.h" #include "ns3/packet.h" @@ -36,17 +36,17 @@ #include "ns3/udp-l4-protocol.h" #include "ns3/tcp-l4-protocol.h" -NS_LOG_COMPONENT_DEFINE ("EpsTftClassifier"); +NS_LOG_COMPONENT_DEFINE ("EpcTftClassifier"); namespace ns3 { -EpsTftClassifier::EpsTftClassifier () +EpcTftClassifier::EpcTftClassifier () { NS_LOG_FUNCTION (this); } void -EpsTftClassifier::Add (Ptr tft, uint32_t id) +EpcTftClassifier::Add (Ptr tft, uint32_t id) { NS_LOG_FUNCTION (this << tft); @@ -57,7 +57,7 @@ EpsTftClassifier::Add (Ptr tft, uint32_t id) } void -EpsTftClassifier::Delete (uint32_t id) +EpcTftClassifier::Delete (uint32_t id) { NS_LOG_FUNCTION (this << id); m_tftMap.erase (id); @@ -65,7 +65,7 @@ EpsTftClassifier::Delete (uint32_t id) uint32_t -EpsTftClassifier::Classify (Ptr p, EpcTft::Direction direction) +EpcTftClassifier::Classify (Ptr p, EpcTft::Direction direction) { NS_LOG_FUNCTION (this << p << direction); diff --git a/src/lte/model/eps-tft-classifier.h b/src/lte/model/epc-tft-classifier.h similarity index 92% rename from src/lte/model/eps-tft-classifier.h rename to src/lte/model/epc-tft-classifier.h index 4508859d1..60ee81452 100644 --- a/src/lte/model/eps-tft-classifier.h +++ b/src/lte/model/epc-tft-classifier.h @@ -19,8 +19,8 @@ */ -#ifndef EPS_TFT_CLASSIFIER_H -#define EPS_TFT_CLASSIFIER_H +#ifndef EPC_TFT_CLASSIFIER_H +#define EPC_TFT_CLASSIFIER_H #include "ns3/ptr.h" @@ -40,11 +40,11 @@ class Packet; * * \note this implementation works with IPv4 only. */ -class EpsTftClassifier : public SimpleRefCount +class EpcTftClassifier : public SimpleRefCount { public: - EpsTftClassifier (); + EpcTftClassifier (); /** * add a TFT to the Classifier diff --git a/src/lte/model/lte-ue-rrc.h b/src/lte/model/lte-ue-rrc.h index 6634db4d9..ef9995b06 100644 --- a/src/lte/model/lte-ue-rrc.h +++ b/src/lte/model/lte-ue-rrc.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -182,7 +182,7 @@ private: std::map > m_rbMap; - EpsTftClassifier m_tftClassifier; + EpcTftClassifier m_tftClassifier; }; diff --git a/src/lte/test/test-eps-tft-classifier.cc b/src/lte/test/test-epc-tft-classifier.cc similarity index 69% rename from src/lte/test/test-eps-tft-classifier.cc rename to src/lte/test/test-epc-tft-classifier.cc index d584aa40d..79db33bf4 100644 --- a/src/lte/test/test-eps-tft-classifier.cc +++ b/src/lte/test/test-epc-tft-classifier.cc @@ -29,18 +29,18 @@ #include "ns3/udp-l4-protocol.h" #include "ns3/tcp-l4-protocol.h" -#include "ns3/eps-tft-classifier.h" +#include "ns3/epc-tft-classifier.h" #include -NS_LOG_COMPONENT_DEFINE ("TestEpsTftClassifier"); +NS_LOG_COMPONENT_DEFINE ("TestEpcTftClassifier"); namespace ns3 { -class EpsTftClassifierTestCase : public TestCase +class EpcTftClassifierTestCase : public TestCase { public: - EpsTftClassifierTestCase (Ptr c, + EpcTftClassifierTestCase (Ptr c, EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, @@ -48,18 +48,18 @@ public: uint16_t dp, uint8_t tos, uint32_t tftId); - virtual ~EpsTftClassifierTestCase (); + virtual ~EpcTftClassifierTestCase (); private: - Ptr m_c; + Ptr m_c; EpcTft::Direction m_d; uint8_t m_tftId; Ipv4Header m_ipHeader; UdpHeader m_udpHeader; TcpHeader m_tcpHeader; - static std::string BuildNameString (Ptr c, + static std::string BuildNameString (Ptr c, EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, @@ -70,7 +70,7 @@ private: virtual void DoRun (void); }; -EpsTftClassifierTestCase::EpsTftClassifierTestCase (Ptr c, +EpcTftClassifierTestCase::EpcTftClassifierTestCase (Ptr c, EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, @@ -93,12 +93,12 @@ EpsTftClassifierTestCase::EpsTftClassifierTestCase (Ptr c, m_udpHeader.SetDestinationPort (dp); } -EpsTftClassifierTestCase::~EpsTftClassifierTestCase () +EpcTftClassifierTestCase::~EpcTftClassifierTestCase () { } std::string -EpsTftClassifierTestCase::BuildNameString (Ptr c, +EpcTftClassifierTestCase::BuildNameString (Ptr c, EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, @@ -120,7 +120,7 @@ EpsTftClassifierTestCase::BuildNameString (Ptr c, } void -EpsTftClassifierTestCase::DoRun (void) +EpcTftClassifierTestCase::DoRun (void) { ns3::PacketMetadata::Enable (); @@ -136,15 +136,15 @@ EpsTftClassifierTestCase::DoRun (void) -class EpsTftClassifierTestSuite : public TestSuite +class EpcTftClassifierTestSuite : public TestSuite { public: - EpsTftClassifierTestSuite (); + EpcTftClassifierTestSuite (); }; -static EpsTftClassifierTestSuite g_lteTftClassifierTestSuite; +static EpcTftClassifierTestSuite g_lteTftClassifierTestSuite; -EpsTftClassifierTestSuite::EpsTftClassifierTestSuite () +EpcTftClassifierTestSuite::EpcTftClassifierTestSuite () : TestSuite ("eps-tft-classifier", UNIT) { NS_LOG_FUNCTION (this); @@ -155,7 +155,7 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite () /////////////////////////// - Ptr c1 = Create (); + Ptr c1 = Create (); Ptr tft1_1 = Create (); @@ -208,68 +208,68 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite () // ------------------------------------classifier---direction--------------src address---------------dst address---src port--dst port--ToS--TFT id // test IP addresses - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 0)); // test remote port - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 0)); // test local port - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2)); /////////////////////////// // check default TFT /////////////////////////// - Ptr c2 = Create (); + Ptr c2 = Create (); c2->Add (EpcTft::Default (), 1); // ------------------------------------classifier---direction--------------src address---------------dst address---src port--dst port--ToS--TFT id // test IP addresses - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1)); // test remote port - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1)); // test local port - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 1)); @@ -277,7 +277,7 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite () // check default TFT plus dedicated ones /////////////////////////////////////////// - Ptr c3 = Create (); + Ptr c3 = Create (); c3->Add (EpcTft::Default (), 1); c3->Add (tft1_1, 2); c3->Add (tft1_2, 3); @@ -285,29 +285,29 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite () // ------------------------------------classifier---direction--------------src address---------------dst address---src port--dst port--ToS--TFT id // test IP addresses - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 2)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 2)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1)); // test remote port - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 3)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 3)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 3)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 3)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 3)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 3)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1)); // test local port - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 3)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 3)); - AddTestCase (new EpsTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 3)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 3)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 3)); + AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 3)); @@ -315,18 +315,18 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite () // check two TFTs with different ports /////////////////////////////////////////// - Ptr c4 = Create (); + Ptr c4 = Create (); Ptr tft4_1 = Create (); tft4_1->Add (pf1_2_3); c4->Add (tft4_1, 1); Ptr tft4_2 = Create (); tft4_2->Add (pf1_2_4); c4->Add (tft4_2, 2); - AddTestCase (new EpsTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 0)); - AddTestCase (new EpsTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c4, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 1)); - AddTestCase (new EpsTftClassifierTestCase (c4, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2)); - AddTestCase (new EpsTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 0)); + AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 1)); + AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2)); + AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2)); } diff --git a/src/lte/wscript b/src/lte/wscript index d5ecad630..c59ba5b3a 100644 --- a/src/lte/wscript +++ b/src/lte/wscript @@ -61,7 +61,7 @@ def build(bld): 'model/epc-enb-application.cc', 'model/epc-sgw-pgw-application.cc', 'model/epc-tft.cc', - 'model/eps-tft-classifier.cc', + 'model/epc-tft-classifier.cc', ] module_test = bld.create_ns3_module_test_library('lte') @@ -81,7 +81,7 @@ def build(bld): 'test/lte-test-rlc-um-transmitter.cc', 'test/lte-test-rlc-am-transmitter.cc', 'test/epc-test-gtpu.cc', - 'test/test-eps-tft-classifier.cc', + 'test/test-epc-tft-classifier.cc', 'test/epc-test-s1u-downlink.cc', 'test/epc-test-s1u-uplink.cc', 'test/test-lte-epc-e2e-data.cc', @@ -161,7 +161,7 @@ def build(bld): 'test/lte-test-pathloss-model.h', 'test/epc-test-gtpu.h', 'model/epc-tft.h', - 'model/eps-tft-classifier.h', + 'model/epc-tft-classifier.h', ] if (bld.env['ENABLE_EXAMPLES']):