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

This class implements the EPS bearer Traffic Flow Template (TFT), which is the set of all packet filters associated with an EPS bearer. More...

#include "epc-tft.h"

+ Inheritance diagram for ns3::EpcTft:
+ Collaboration diagram for ns3::EpcTft:

Classes

struct  PacketFilter
 Implement the data structure representing a TrafficFlowTemplate Packet Filter. More...
 

Public Types

enum  Direction { DOWNLINK = 1 , UPLINK = 2 , BIDIRECTIONAL = 3 }
 Indicates the direction of the traffic that is to be classified. More...
 

Public Member Functions

 EpcTft ()
 
uint8_t Add (PacketFilter f)
 add a PacketFilter to the Traffic Flow Template
 
std::list< PacketFilterGetPacketFilters () const
 Get the packet filters.
 
bool Matches (Direction direction, Ipv4Address remoteAddress, Ipv4Address localAddress, uint16_t remotePort, uint16_t localPort, uint8_t typeOfService)
 
bool Matches (Direction direction, Ipv6Address remoteAddress, Ipv6Address localAddress, uint16_t remotePort, uint16_t localPort, uint8_t typeOfService)
 
- Public Member Functions inherited from ns3::SimpleRefCount< EpcTft >
 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.
 

Static Public Member Functions

static Ptr< EpcTftDefault ()
 creates a TFT matching any traffic
 

Private Attributes

std::list< PacketFilterm_filters
 packet filter list
 
uint8_t m_numFilters
 number of packet filters applied to this TFT
 

Detailed Description

This class implements the EPS bearer Traffic Flow Template (TFT), which is the set of all packet filters associated with an EPS bearer.

Definition at line 37 of file epc-tft.h.

Member Enumeration Documentation

◆ Direction

Indicates the direction of the traffic that is to be classified.

Enumerator
DOWNLINK 
UPLINK 
BIDIRECTIONAL 

Definition at line 50 of file epc-tft.h.

Constructor & Destructor Documentation

◆ EpcTft()

ns3::EpcTft::EpcTft ( )

Definition at line 237 of file epc-tft.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Add()

uint8_t ns3::EpcTft::Add ( PacketFilter  f)

add a PacketFilter to the Traffic Flow Template

Parameters
fthe PacketFilter to be added
Returns
the id( 0 <= id < 16) of the newly added filter, if the addition was successful. Will fail if you try to add more than 15 filters. This is to be compliant with TS 24.008.

Definition at line 244 of file epc-tft.cc.

References m_filters, m_numFilters, NS_ABORT_IF, NS_LOG_FUNCTION, and ns3::EpcTft::PacketFilter::precedence.

◆ Default()

Ptr< EpcTft > ns3::EpcTft::Default ( )
static

◆ GetPacketFilters()

std::list< EpcTft::PacketFilter > ns3::EpcTft::GetPacketFilters ( ) const

Get the packet filters.

Returns
a container of packet filters

Definition at line 309 of file epc-tft.cc.

References m_filters, and NS_LOG_FUNCTION.

◆ Matches() [1/2]

bool ns3::EpcTft::Matches ( Direction  direction,
Ipv4Address  remoteAddress,
Ipv4Address  localAddress,
uint16_t  remotePort,
uint16_t  localPort,
uint8_t  typeOfService 
)
Parameters
direction
remoteAddress
localAddress
remotePort
localPort
typeOfService
Returns
true if any PacketFilter in the TFT matches with the parameters, false otherwise.

Definition at line 259 of file epc-tft.cc.

References m_filters, and NS_LOG_FUNCTION.

◆ Matches() [2/2]

bool ns3::EpcTft::Matches ( Direction  direction,
Ipv6Address  remoteAddress,
Ipv6Address  localAddress,
uint16_t  remotePort,
uint16_t  localPort,
uint8_t  typeOfService 
)
Parameters
direction
remoteAddress
localAddress
remotePort
localPort
typeOfService
Returns
true if any PacketFilter in the TFT matches with the parameters, false otherwise.

Definition at line 284 of file epc-tft.cc.

References m_filters, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_filters

std::list<PacketFilter> ns3::EpcTft::m_filters
private

packet filter list

Definition at line 195 of file epc-tft.h.

Referenced by Add(), GetPacketFilters(), and Matches().

◆ m_numFilters

uint8_t ns3::EpcTft::m_numFilters
private

number of packet filters applied to this TFT

Definition at line 196 of file epc-tft.h.

Referenced by Add().


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