Classifies packets by looking at their IP and TCP/UDP headers. More...
#include "ipv6-flow-classifier.h"
 Inheritance diagram for ns3::Ipv6FlowClassifier:
 Collaboration diagram for ns3::Ipv6FlowClassifier:Classes | |
| struct | FiveTuple | 
| Structure to classify a packet.  More... | |
Public Member Functions | |
| Ipv6FlowClassifier () | |
| bool | Classify (const Ipv6Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t *out_flowId, uint32_t *out_packetId) | 
| try to classify the packet into flow-id and packet-id  More... | |
| FiveTuple | FindFlow (FlowId flowId) const | 
| Searches for the FiveTuple corresponding to the given flowId.  More... | |
| virtual void | SerializeToXmlStream (std::ostream &os, int indent) const | 
| Serializes the results to an std::ostream in XML format.  More... | |
  Public Member Functions inherited from ns3::FlowClassifier | |
| FlowClassifier () | |
| virtual | ~FlowClassifier () | 
  Public Member Functions inherited from ns3::SimpleRefCount< FlowClassifier > | |
| SimpleRefCount () | |
| Constructor.  More... | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor.  More... | |
| uint32_t | GetReferenceCount (void) const | 
| Get the reference count of the object.  More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) | 
| Assignment.  More... | |
| void | Ref (void) const | 
| Increment the reference count.  More... | |
| void | Unref (void) const | 
| Decrement the reference count.  More... | |
Private Attributes | |
| std::map< FiveTuple, FlowId > | m_flowMap | 
| Map to Flows Identifiers to FlowIds.  More... | |
| std::map< FlowId, FlowPacketId > | m_flowPktIdMap | 
| Map to FlowIds to FlowPacketId.  More... | |
Additional Inherited Members | |
  Static Public Member Functions inherited from ns3::SimpleRefCount< FlowClassifier > | |
| static void | Cleanup (void) | 
| Noop.  More... | |
  Protected Member Functions inherited from ns3::FlowClassifier | |
| FlowId | GetNewFlowId () | 
| Returns a new, unique Flow Identifier.  More... | |
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 39 of file ipv6-flow-classifier.h.
| ns3::Ipv6FlowClassifier::Ipv6FlowClassifier | ( | ) | 
Definition at line 99 of file ipv6-flow-classifier.cc.
| bool ns3::Ipv6FlowClassifier::Classify | ( | const Ipv6Header & | ipHeader, | 
| Ptr< const Packet > | ipPayload, | ||
| uint32_t * | out_flowId, | ||
| uint32_t * | out_packetId | ||
| ) | 
try to classify the packet into flow-id and packet-id
| ipHeader | packet's IP header | 
| ipPayload | packet's IP payload | 
| out_flowId | packet's FlowId | 
| out_packetId | packet's identifier | 
Definition at line 104 of file ipv6-flow-classifier.cc.
References ns3::Packet::CopyData(), data, ns3::Ipv6FlowClassifier::FiveTuple::destinationAddress, ns3::Ipv6FlowClassifier::FiveTuple::destinationPort, ns3::Ipv6Header::GetDestinationAddress(), ns3::FlowClassifier::GetNewFlowId(), ns3::Ipv6Header::GetNextHeader(), ns3::Packet::GetSize(), ns3::Ipv6Header::GetSourceAddress(), ns3::Ipv6Address::IsMulticast(), m_flowMap, m_flowPktIdMap, ns3::Ipv6FlowClassifier::FiveTuple::protocol, ns3::Ipv6FlowClassifier::FiveTuple::sourceAddress, and ns3::Ipv6FlowClassifier::FiveTuple::sourcePort.
 Here is the call graph for this function:| Ipv6FlowClassifier::FiveTuple ns3::Ipv6FlowClassifier::FindFlow | ( | FlowId | flowId | ) | const | 
Searches for the FiveTuple corresponding to the given flowId.
| flowId | the FlowId to search for | 
Definition at line 174 of file ipv6-flow-classifier.cc.
References ns3::Ipv6Address::GetZero(), m_flowMap, and NS_FATAL_ERROR.
 Here is the call graph for this function:
      
  | 
  virtual | 
Serializes the results to an std::ostream in XML format.
| os | the output stream | 
| indent | number of spaces to use as base indentation level | 
Implements ns3::FlowClassifier.
Definition at line 190 of file ipv6-flow-classifier.cc.
Map to Flows Identifiers to FlowIds.
Definition at line 78 of file ipv6-flow-classifier.h.
Referenced by Classify(), FindFlow(), and SerializeToXmlStream().
      
  | 
  private | 
Map to FlowIds to FlowPacketId.
Definition at line 80 of file ipv6-flow-classifier.h.
Referenced by Classify().