21 #ifndef IPV6_FLOW_CLASSIFIER_H
22 #define IPV6_FLOW_CLASSIFIER_H
26 #include "ns3/ipv6-header.h"
68 uint32_t* out_packetId);
83 bool operator()(std::pair<Ipv6Header::DscpType, uint32_t> left,
84 std::pair<Ipv6Header::DscpType, uint32_t> right);
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.
void SerializeToXmlStream(std::ostream &os, uint16_t indent) const override
Serializes the results to an std::ostream in XML format.
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.
uint32_t FlowId
Abstract identifier of a packet flow.
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.