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