A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::EpcTftClassifier Class Reference

classifies IP packets according 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)
 add a TFT to the Classifier
 
uint32_t Classify (Ptr< Packet > p, EpcTft::Direction direction, uint16_t protocolNumber)
 classify an IP packet
 
void Delete (uint32_t id)
 delete an existing TFT from the classifier
 
- Public Member Functions inherited from ns3::SimpleRefCount< EpcTftClassifier >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Protected Attributes

std::map< std::tuple< uint32_t, uint32_t, uint8_t, uint16_t >, std::pair< uint32_t, uint32_t > > m_classifiedIpv4Fragments
 Map with already classified IPv4 Fragments An entry is added when the port info is available, i.e.
 
std::map< uint32_t, Ptr< EpcTft > > m_tftMap
 TFT map.
 

Detailed Description

classifies IP packets according to Traffic Flow Templates (TFTs)

Note
this implementation works with IPv4 and IPv6. When there is fragmentation of IP packets, UDP/TCP ports maybe missing.

The following actions are performed to use the port info present in the first segment with the next fragments:

  • Port info is stored if it is available, i.e. it is the first fragment with UDP/TCP protocol and there is enough data in the payload of the IP packet for the port numbers.
  • Port info is used for the next fragments.
  • Port info is deleted, when the last fragment is processed.

When we cannot cache the port info, the TFT of the default bearer is used. This may happen if there is reordering or losses of IP packets.

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

Constructor & Destructor Documentation

◆ EpcTftClassifier()

ns3::EpcTftClassifier::EpcTftClassifier ( )

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

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Add()

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

add a TFT to the Classifier

Parameters
tftthe TFT to be added
idthe ID of the bearer which will be classified by specified TFT classifier

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

References m_tftMap, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::EpcUeNas::DoActivateEpsBearer().

+ Here is the caller graph for this function:

◆ Classify()

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

◆ Delete()

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 63 of file epc-tft-classifier.cc.

References m_tftMap, and NS_LOG_FUNCTION.

Referenced by ns3::EpcUeNas::DoNotifyConnectionReleased().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_classifiedIpv4Fragments

std::map<std::tuple<uint32_t, uint32_t, uint8_t, uint16_t>, std::pair<uint32_t, uint32_t> > ns3::EpcTftClassifier::m_classifiedIpv4Fragments
protected

Map with already classified IPv4 Fragments An entry is added when the port info is available, i.e.

first fragment, UDP/TCP protocols and enough payload data An entry is used if port info is not available, i.e. not first fragment or not enough payload data for TCP/UDP An entry is removed when the last fragment is classified Note: If last fragment is lost, entry is not removed

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

Referenced by Classify().

◆ m_tftMap

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

TFT map.

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

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


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