A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
qos-utils.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 MIRKO BANCHI
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mirko Banchi <mk.banchi@gmail.com>
19  */
20 #ifndef QOS_UTILS_H
21 #define QOS_UTILS_H
22 
23 #include "ns3/uinteger.h"
24 #include "ns3/ptr.h"
25 #include "ns3/packet.h"
26 
27 namespace ns3 {
28 
35 enum AcIndex
36 {
38  AC_BE = 0,
40  AC_BK = 1,
42  AC_VI = 2,
44  AC_VO = 3,
45 
48  AC_UNDEF
49 };
50 
56 AcIndex QosUtilsMapTidToAc (uint8_t tid);
57 
63 uint8_t QosUtilsGetTidForPacket (Ptr<const Packet> packet);
64 
71 uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t endSequence);
72 
107 bool QosUtilsIsOldPacket (uint16_t startingSeq, uint16_t seqNumber);
108 
109 } // namespace ns3
110 
111 #endif /* QOS_UTILS_H */
bool QosUtilsIsOldPacket(uint16_t startingSeq, uint16_t seqNumber)
Definition: qos-utils.cc:86
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
Definition: qos-utils.cc:60
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Definition: qos-utils.cc:27
uint32_t QosUtilsMapSeqControlToUniqueInteger(uint16_t seqControl, uint16_t endSequence)
Definition: qos-utils.cc:75
AcIndex
Definition: qos-utils.h:35