22 #include "ns3/socket.h"
23 #include "ns3/queue-item.h"
35 addressTidPair.first.CopyTo (buffer);
36 buffer[6] = addressTidPair.second;
38 std::string s (buffer, buffer + 7);
39 return std::hash<std::string>{} (s);
48 std::string s (buffer, buffer + 6);
49 return std::hash<std::string>{} (s);
81 NS_ABORT_MSG (
"TID " << tid <<
" does not belong to this AC");
100 return static_cast<uint8_t
> (left) >
static_cast<uint8_t
> (right);
107 return (left == right || left > right);
112 return !(left >= right);
117 return !(left > right);
169 uint32_t integer = 0;
170 uint16_t numberSeq = (seqControl >> 4) & 0x0fff;
171 integer = (4096 - (endSequence + 1) + numberSeq) % 4096;
173 integer += (seqControl & 0x000f);
182 uint16_t distance = ((seqNumber - startingSeq) + 4096) % 4096;
183 return (distance >= 2048);
236 NS_FATAL_ERROR (
"Cannot extract Traffic ID from this BA action frame");
242 NS_FATAL_ERROR (
"Cannot extract Traffic ID from this action frame");
254 uint8_t dscp, priority = 0;
260 priority = dscp >> 5;
266 item->GetPacket ()->ReplacePacketTag (priorityTag);
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
indicates whether the socket has a priority set.
uint8_t GetPriority(void) const
Get the tag's priority.
void SetPriority(uint8_t priority)
Set the tag's priority.
WifiAc(uint8_t lowTid, uint8_t highTid)
Constructor.
uint8_t GetOtherTid(uint8_t tid) const
Given a TID belonging to this Access Category, get the other TID of this AC.
uint8_t GetLowTid(void) const
Get the TID with lower priority.
uint8_t m_highTid
the TID with higher priority
uint8_t GetHighTid(void) const
Get the TID with higher priority.
uint8_t m_lowTid
the TID with lower priority
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
bool operator>(const int64x64_t &lhs, const int64x64_t &rhs)
Greater operator.
bool operator>=(const int64x64_t &lhs, const int64x64_t &rhs)
Greater or equal operator.
bool operator<=(const int64x64_t &lhs, const int64x64_t &rhs)
Less or equal operator.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
bool QosUtilsIsOldPacket(uint16_t startingSeq, uint16_t seqNumber)
This function checks if packet with sequence number seqNumber is an "old" packet.
uint32_t QosUtilsMapSeqControlToUniqueInteger(uint16_t seqControl, uint16_t endSequence)
Next function is useful to correctly sort buffered packets under block ack.
uint8_t GetTid(Ptr< const Packet > packet, const WifiMacHeader hdr)
This function is useful to get traffic id of different packet types.
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
If a QoS tag is attached to the packet, returns a value < 8.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
uint8_t SelectQueueByDSField(Ptr< QueueItem > item)
Determine the TX queue for a given packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator<(const EventId &a, const EventId &b)
const std::map< AcIndex, WifiAc > wifiAcList
Map containing the four ACs in increasing order of priority (according to Table 10-1 "UP-to-AC Mappin...
std::pair< Mac48Address, uint8_t > WifiAddressTidPair
(MAC address, TID) pair
std::size_t operator()(const Mac48Address &address) const
Functional operator for MAC address hash computation.
std::size_t operator()(const WifiAddressTidPair &addressTidPair) const
Functional operator for (MAC address, TID) hash computation.