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

#include <ipv4-flow-classifier.h>

+ Inheritance diagram for ns3::Ipv4FlowClassifier:
+ Collaboration diagram for ns3::Ipv4FlowClassifier:

Classes

struct  FiveTuple

Public Member Functions

 Ipv4FlowClassifier ()
bool Classify (const Ipv4Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t *out_flowId, uint32_t *out_packetId)
 try to classify the packet into flow-id and packet-id
FiveTuple FindFlow (FlowId flowId) const
 Searches for the FiveTuple corresponding to the given flowId.
virtual void SerializeToXmlStream (std::ostream &os, int indent) const
- Public Member Functions inherited from ns3::FlowClassifier
 FlowClassifier ()
virtual ~FlowClassifier ()
- Public Member Functions inherited from ns3::SimpleRefCount< FlowClassifier >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const

Private Attributes

std::map< FiveTuple, FlowIdm_flowMap

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< FlowClassifier >
static void Cleanup (void)
- Protected Member Functions inherited from ns3::FlowClassifier
FlowId GetNewFlowId ()

Detailed Description

Classifies packets by looking at their IP and TCP/UDP headers. From these packet headers, a tuple (source-ip, destination-ip, protocol, source-port, destination-port) is created, and a unique flow identifier is assigned for each different tuple combination

Definition at line 38 of file ipv4-flow-classifier.h.

Constructor & Destructor Documentation

ns3::Ipv4FlowClassifier::Ipv4FlowClassifier ( )

Definition at line 98 of file ipv4-flow-classifier.cc.

Member Function Documentation

Ipv4FlowClassifier::FiveTuple ns3::Ipv4FlowClassifier::FindFlow ( FlowId  flowId) const

Searches for the FiveTuple corresponding to the given flowId.

Definition at line 159 of file ipv4-flow-classifier.cc.

References ns3::Ipv4Address::GetZero(), m_flowMap, and NS_FATAL_ERROR.

+ Here is the call graph for this function:

void ns3::Ipv4FlowClassifier::SerializeToXmlStream ( std::ostream &  os,
int  indent 
) const
virtual

Implements ns3::FlowClassifier.

Definition at line 175 of file ipv4-flow-classifier.cc.

References INDENT, and m_flowMap.

Member Data Documentation

std::map<FiveTuple, FlowId> ns3::Ipv4FlowClassifier::m_flowMap
private

Definition at line 66 of file ipv4-flow-classifier.h.

Referenced by Classify(), FindFlow(), and SerializeToXmlStream().


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