equal
deleted
inserted
replaced
14 * You should have received a copy of the GNU General Public License |
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 |
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 |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * |
17 * |
18 * Author: Mirko Banchi <mk.banchi@gmail.com> |
18 * Author: Mirko Banchi <mk.banchi@gmail.com> |
|
19 * Author: Cecchi Niccolò <insa@igeek.it> |
19 */ |
20 */ |
20 #include "qos-utils.h" |
21 #include "qos-utils.h" |
21 #include "qos-tag.h" |
22 #include "qos-tag.h" |
22 |
23 |
23 namespace ns3 { |
24 namespace ns3 { |
67 } |
68 } |
68 } |
69 } |
69 return tid; |
70 return tid; |
70 } |
71 } |
71 |
72 |
|
73 uint32_t |
|
74 QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t endSequence) |
|
75 { |
|
76 uint32_t integer = 0; |
|
77 uint16_t numberSeq = (seqControl>>4) & 0x0fff; |
|
78 integer = (4096 - (endSequence + 1) + numberSeq) % 4096; |
|
79 integer *= 16; |
|
80 integer += (seqControl & 0x000f); |
|
81 return integer; |
|
82 } |
|
83 |
|
84 |
72 } //namespace ns3 |
85 } //namespace ns3 |