A Discrete-Event Network Simulator
API
ns3::FlowClassifier Class Referenceabstract

Provides a method to translate raw packet data into abstract flow identifier and packet identifier parameters. More...

#include "flow-classifier.h"

+ Inheritance diagram for ns3::FlowClassifier:
+ Collaboration diagram for ns3::FlowClassifier:

Public Member Functions

 FlowClassifier ()
 
 FlowClassifier (const FlowClassifier &)=delete
 
virtual ~FlowClassifier ()
 
FlowClassifieroperator= (const FlowClassifier &)=delete
 
virtual void SerializeToXmlStream (std::ostream &os, uint16_t indent) const =0
 Serializes the results to an std::ostream in XML format. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< FlowClassifier >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () const
 Decrement the reference count. More...
 

Protected Member Functions

FlowId GetNewFlowId ()
 Returns a new, unique Flow Identifier. More...
 
void Indent (std::ostream &os, uint16_t level) const
 Add a number of spaces for indentation purposes. More...
 

Private Attributes

FlowId m_lastNewFlowId
 Last known Flow ID. More...
 

Detailed Description

Provides a method to translate raw packet data into abstract flow identifier and packet identifier parameters.

These identifiers are unsigned 32-bit integers that uniquely identify a flow and a packet within that flow, respectively, for the whole simulation, regardless of the point in which the packet was captured. These abstract identifiers are used in the communication between FlowProbe and FlowMonitor, and all collected statistics reference only those abstract identifiers in order to keep the core architecture generic and not tied down to any particular flow capture method or classification system.

Definition at line 53 of file flow-classifier.h.

Constructor & Destructor Documentation

◆ FlowClassifier() [1/2]

ns3::FlowClassifier::FlowClassifier ( )

Definition at line 25 of file flow-classifier.cc.

◆ ~FlowClassifier()

ns3::FlowClassifier::~FlowClassifier ( )
virtual

Definition at line 30 of file flow-classifier.cc.

◆ FlowClassifier() [2/2]

ns3::FlowClassifier::FlowClassifier ( const FlowClassifier )
delete

Member Function Documentation

◆ GetNewFlowId()

FlowId ns3::FlowClassifier::GetNewFlowId ( )
protected

Returns a new, unique Flow Identifier.

Returns
a new FlowId

Definition at line 35 of file flow-classifier.cc.

References m_lastNewFlowId.

Referenced by ns3::Ipv4FlowClassifier::Classify(), and ns3::Ipv6FlowClassifier::Classify().

+ Here is the caller graph for this function:

◆ Indent()

void ns3::FlowClassifier::Indent ( std::ostream &  os,
uint16_t  level 
) const
inlineprotected

Add a number of spaces for indentation purposes.

Parameters
osThe stream to write to.
levelThe number of spaces to add.

Definition at line 84 of file flow-classifier.h.

Referenced by ns3::Ipv4FlowClassifier::SerializeToXmlStream(), and ns3::Ipv6FlowClassifier::SerializeToXmlStream().

+ Here is the caller graph for this function:

◆ operator=()

FlowClassifier& ns3::FlowClassifier::operator= ( const FlowClassifier )
delete

◆ SerializeToXmlStream()

virtual void ns3::FlowClassifier::SerializeToXmlStream ( std::ostream &  os,
uint16_t  indent 
) const
pure virtual

Serializes the results to an std::ostream in XML format.

Parameters
osthe output stream
indentnumber of spaces to use as base indentation level

Implemented in ns3::Ipv6FlowClassifier, and ns3::Ipv4FlowClassifier.

Member Data Documentation

◆ m_lastNewFlowId

FlowId ns3::FlowClassifier::m_lastNewFlowId
private

Last known Flow ID.

Definition at line 56 of file flow-classifier.h.

Referenced by GetNewFlowId().


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