21 #ifndef IPV4_FLOW_CLASSIFIER_H
22 #define IPV4_FLOW_CLASSIFIER_H
27 #include "ns3/ipv4-header.h"
28 #include "ns3/flow-classifier.h"
65 uint32_t *out_flowId, uint32_t *out_packetId);
80 bool operator() (std::pair<Ipv4Header::DscpType, uint32_t> left,
81 std::pair<Ipv4Header::DscpType, uint32_t> right);
89 std::vector<std::pair<Ipv4Header::DscpType, uint32_t> >
GetDscpCounts (
FlowId flowId)
const;
Provides a method to translate raw packet data into abstract flow identifier and packet identifier pa...
Ipv4 addresses are stored in host order in this class.
Comparator used to sort the vector of DSCP values.
bool operator()(std::pair< Ipv4Header::DscpType, uint32_t > left, std::pair< Ipv4Header::DscpType, uint32_t > right)
Comparator function.
Classifies packets by looking at their IP and TCP/UDP headers.
std::map< FlowId, FlowPacketId > m_flowPktIdMap
Map to FlowIds to FlowPacketId.
virtual void SerializeToXmlStream(std::ostream &os, uint16_t indent) const
Serializes the results to an std::ostream in XML format.
std::vector< std::pair< Ipv4Header::DscpType, uint32_t > > GetDscpCounts(FlowId flowId) const
get the DSCP values of the packets belonging to the flow with the given FlowId, sorted in decreasing ...
FiveTuple FindFlow(FlowId flowId) const
Searches for the FiveTuple corresponding to the given flowId.
std::map< FlowId, std::map< Ipv4Header::DscpType, uint32_t > > m_flowDscpMap
Map FlowIds to (DSCP value, packet count) pairs.
std::map< FiveTuple, FlowId > m_flowMap
Map to Flows Identifiers to FlowIds.
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
uint32_t FlowId
Abstract identifier of a packet flow.
def indent(source, debug, level)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
bool operator<(const EventId &a, const EventId &b)
Structure to classify a packet.
uint16_t destinationPort
Destination port.
Ipv4Address sourceAddress
Source address.
Ipv4Address destinationAddress
Destination address.
uint8_t protocol
Protocol.
uint16_t sourcePort
Source port.