A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::EpcTftClassifier Class Reference

classifies IP packets accoding to Traffic Flow Templates (TFTs) More...

#include <epc-tft-classifier.h>

+ Inheritance diagram for ns3::EpcTftClassifier:
+ Collaboration diagram for ns3::EpcTftClassifier:

Public Member Functions

 EpcTftClassifier ()
void Add (Ptr< EpcTft > tft, uint32_t id)
uint32_t Classify (Ptr< Packet > p, EpcTft::Direction direction)
void Delete (uint32_t id)
- Public Member Functions inherited from ns3::SimpleRefCount< EpcTftClassifier >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const

Protected Attributes

std::map< uint32_t, Ptr< EpcTft > > m_tftMap

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< EpcTftClassifier >
static void Cleanup (void)

Detailed Description

classifies IP packets accoding to Traffic Flow Templates (TFTs)

Note
this implementation works with IPv4 only.

Definition at line 43 of file epc-tft-classifier.h.

Constructor & Destructor Documentation

ns3::EpcTftClassifier::EpcTftClassifier ( )

Definition at line 43 of file epc-tft-classifier.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EpcTftClassifier::Add ( Ptr< EpcTft tft,
uint32_t  id 
)

add a TFT to the Classifier

Parameters
tftthe TFT to be added

Definition at line 49 of file epc-tft-classifier.cc.

References m_tftMap, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::EpcTftClassifierTestSuite::EpcTftClassifierTestSuite(), and ns3::LteUeRrc::SetupRadioBearer().

+ Here is the caller graph for this function:

uint32_t ns3::EpcTftClassifier::Classify ( Ptr< Packet p,
EpcTft::Direction  direction 
)

classify an IP packet

Parameters
pthe IP packet. It is assumed that the outmost header is an IPv4 header.
Returns
the identifier (>0) of the first TFT that matches with the IP packet; 0 if no TFT matched.

Definition at line 68 of file epc-tft-classifier.cc.

References ns3::Packet::Copy(), ns3::EpcTft::DOWNLINK, ns3::Ipv4Header::GetDestination(), ns3::UdpHeader::GetDestinationPort(), ns3::TcpHeader::GetDestinationPort(), ns3::Ipv4Header::GetProtocol(), ns3::Ipv4Header::GetSource(), ns3::UdpHeader::GetSourcePort(), ns3::TcpHeader::GetSourcePort(), ns3::Ipv4Header::GetTos(), m_tftMap, ns3::EpcTft::Matches(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::UdpL4Protocol::PROT_NUMBER, ns3::TcpL4Protocol::PROT_NUMBER, ns3::Packet::RemoveHeader(), and ns3::EpcTft::UPLINK.

Referenced by ns3::EpcTftClassifierTestCase::DoRun(), and ns3::LteUeRrc::Send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EpcTftClassifier::Delete ( uint32_t  id)

delete an existing TFT from the classifier

Parameters
idthe identifier of the TFT to be deleted

Definition at line 60 of file epc-tft-classifier.cc.

References m_tftMap, and NS_LOG_FUNCTION.

Member Data Documentation

std::map<uint32_t, Ptr<EpcTft> > ns3::EpcTftClassifier::m_tftMap
protected

Definition at line 76 of file epc-tft-classifier.h.

Referenced by Add(), Classify(), and Delete().


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