22 #ifndef IPV6_FLOW_CLASSIFIER_H
23 #define IPV6_FLOW_CLASSIFIER_H
28 #include "ns3/ipv6-header.h"
29 #include "ns3/flow-classifier.h"
66 uint32_t *out_flowId, uint32_t *out_packetId);
81 bool operator() (std::pair<Ipv6Header::DscpType, uint32_t> left,
82 std::pair<Ipv6Header::DscpType, uint32_t> right);
90 std::vector<std::pair<Ipv6Header::DscpType, uint32_t> >
GetDscpCounts (
FlowId flowId)
const;
Provides a method to translate raw packet data into abstract flow identifier and packet identifier pa...
Describes an IPv6 address.
Comparator used to sort the vector of DSCP values.
bool operator()(std::pair< Ipv6Header::DscpType, uint32_t > left, std::pair< Ipv6Header::DscpType, uint32_t > right)
Comparator function.
Classifies packets by looking at their IP and TCP/UDP headers.
std::map< FiveTuple, FlowId > m_flowMap
Map to Flows Identifiers to FlowIds.
std::vector< std::pair< Ipv6Header::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.
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
std::map< FlowId, FlowPacketId > m_flowPktIdMap
Map to FlowIds to FlowPacketId.
std::map< FlowId, std::map< Ipv6Header::DscpType, uint32_t > > m_flowDscpMap
Map FlowIds to (DSCP value, packet count) pairs.
virtual void SerializeToXmlStream(std::ostream &os, uint16_t indent) const
Serializes the results to an std::ostream in XML format.
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.
Ipv6Address destinationAddress
Destination address.
uint16_t sourcePort
Source port.
uint8_t protocol
Protocol.
Ipv6Address sourceAddress
Source address.