#include <ipv4-flow-classifier.h>
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 |
![]() | |
FlowClassifier () | |
virtual | ~FlowClassifier () |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Private Attributes | |
std::map< FiveTuple, FlowId > | m_flowMap |
Additional Inherited Members | |
![]() | |
static void | Cleanup (void) |
![]() | |
FlowId | GetNewFlowId () |
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.
ns3::Ipv4FlowClassifier::Ipv4FlowClassifier | ( | ) |
Definition at line 98 of file ipv4-flow-classifier.cc.
bool ns3::Ipv4FlowClassifier::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
Definition at line 103 of file ipv4-flow-classifier.cc.
References ns3::Ipv4FlowClassifier::FiveTuple::destinationAddress, ns3::Ipv4FlowClassifier::FiveTuple::destinationPort, ns3::Ipv4Address::GetBroadcast(), ns3::Ipv4Header::GetDestination(), ns3::UdpHeader::GetDestinationPort(), ns3::TcpHeader::GetDestinationPort(), ns3::Ipv4Header::GetIdentification(), ns3::FlowClassifier::GetNewFlowId(), ns3::Ipv4Header::GetProtocol(), ns3::Ipv4Header::GetSource(), ns3::UdpHeader::GetSourcePort(), ns3::TcpHeader::GetSourcePort(), m_flowMap, ns3::Packet::PeekHeader(), ns3::Ipv4FlowClassifier::FiveTuple::protocol, ns3::Ipv4FlowClassifier::FiveTuple::sourceAddress, ns3::Ipv4FlowClassifier::FiveTuple::sourcePort, ns3::TCP_PROT_NUMBER, and ns3::UDP_PROT_NUMBER.
Referenced by ns3::Ipv4FlowProbe::DropLogger(), ns3::Ipv4FlowProbe::ForwardLogger(), ns3::Ipv4FlowProbe::ForwardUpLogger(), and ns3::Ipv4FlowProbe::SendOutgoingLogger().
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.
|
virtual |
Implements ns3::FlowClassifier.
Definition at line 175 of file ipv4-flow-classifier.cc.
Definition at line 66 of file ipv4-flow-classifier.h.
Referenced by Classify(), FindFlow(), and SerializeToXmlStream().