A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
wimax-mac-header.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008, 2009 INRIA, UDcast
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: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20
* <amine.ismail@udcast.com>
21
*/
22
23
#include "
wimax-mac-header.h
"
24
#include "
crc8.h
"
25
26
namespace
ns3
{
27
28
NS_OBJECT_ENSURE_REGISTERED
(MacHeaderType);
29
30
MacHeaderType::MacHeaderType
(
void
)
31
: m_type (0)
32
{
33
}
34
35
MacHeaderType::MacHeaderType
(uint8_t type)
36
: m_type (type)
37
{
38
}
39
40
MacHeaderType::~MacHeaderType
(
void
)
41
{
42
}
43
44
void
45
MacHeaderType::SetType
(uint8_t type)
46
{
47
m_type
= type;
48
}
49
50
uint8_t
51
MacHeaderType::GetType
(
void
)
const
52
{
53
return
m_type
;
54
}
55
56
std::string
57
MacHeaderType::GetName
(
void
)
const
58
{
59
return
"MAC Header Type"
;
60
}
61
62
TypeId
63
MacHeaderType::GetTypeId
(
void
)
64
{
65
static
TypeId
tid =
TypeId
(
"ns3::MacHeaderType"
)
66
.
SetParent
<
Header
> ()
67
.SetGroupName(
"Wimax"
)
68
.AddConstructor<
MacHeaderType
> ()
69
;
70
return
tid;
71
}
72
73
TypeId
MacHeaderType::GetInstanceTypeId
(
void
)
const
74
{
75
return
GetTypeId
();
76
}
77
78
void
MacHeaderType::Print
(std::ostream &os)
const
79
{
80
os <<
" header type = "
<< (uint32_t)
m_type
;
81
}
82
83
uint32_t
MacHeaderType::GetSerializedSize
(
void
)
const
84
{
85
return
0;
86
}
87
88
void
MacHeaderType::Serialize
(
Buffer::Iterator
start
)
const
89
{
90
}
91
92
uint32_t
MacHeaderType::Deserialize
(
Buffer::Iterator
start
)
93
{
94
return
0;
95
}
96
97
// ----------------------------------------------------------------------------------------------------------
98
99
NS_OBJECT_ENSURE_REGISTERED
(
GenericMacHeader
);
100
101
GenericMacHeader::GenericMacHeader
(
void
)
102
: m_ht (0),
103
m_ec (0),
104
m_type (0),
105
m_ci (0),
106
m_eks (0),
107
m_len (0),
108
m_cid (
Cid
())
109
{
110
m_esf
= 0;
111
m_hcs
= 0;
112
m_rsv1
= 0;
113
c_hcs
= 0;
114
}
115
116
GenericMacHeader::~GenericMacHeader
(
void
)
117
{
118
}
119
120
void
GenericMacHeader::SetHt
(uint8_t ht)
121
{
122
m_ht
= ht;
123
}
124
125
void
GenericMacHeader::SetEc
(uint8_t ec)
126
{
127
m_ec
= ec;
128
}
129
130
void
GenericMacHeader::SetType
(uint8_t type)
131
{
132
m_type
= type;
133
}
134
135
void
GenericMacHeader::SetCi
(uint8_t ci)
136
{
137
m_ci
= ci;
138
}
139
140
void
GenericMacHeader::SetEks
(uint8_t eks)
141
{
142
m_eks
= eks;
143
}
144
145
void
GenericMacHeader::SetLen
(uint16_t len)
146
{
147
m_len
= len;
148
}
149
150
void
GenericMacHeader::SetCid
(
Cid
cid)
151
{
152
m_cid
= cid;
153
}
154
155
void
GenericMacHeader::SetHcs
(uint8_t hcs)
156
{
157
m_hcs
= hcs;
158
}
159
160
uint8_t
GenericMacHeader::GetHt
(
void
)
const
161
{
162
return
m_ht
;
163
}
164
165
uint8_t
GenericMacHeader::GetEc
(
void
)
const
166
{
167
return
m_ec
;
168
}
169
170
uint8_t
GenericMacHeader::GetType
(
void
)
const
171
{
172
return
m_type
;
173
}
174
175
uint8_t
GenericMacHeader::GetCi
(
void
)
const
176
{
177
return
m_ci
;
178
}
179
180
uint8_t
GenericMacHeader::GetEks
(
void
)
const
181
{
182
return
m_eks
;
183
}
184
185
uint16_t
GenericMacHeader::GetLen
(
void
)
const
186
{
187
return
m_len
;
188
}
189
190
Cid
GenericMacHeader::GetCid
(
void
)
const
191
{
192
return
m_cid
;
193
}
194
195
uint8_t
GenericMacHeader::GetHcs
(
void
)
const
196
{
197
return
m_hcs
;
198
}
199
200
std::string
GenericMacHeader::GetName
(
void
)
const
201
{
202
return
"Generic Mac Header"
;
203
}
204
205
TypeId
GenericMacHeader::GetTypeId
(
void
)
206
{
207
static
TypeId
tid =
TypeId
(
"ns3::GenericMacHeader"
)
208
.
SetParent
<
Header
> ()
209
.SetGroupName(
"Wimax"
)
210
.AddConstructor<
GenericMacHeader
> ()
211
;
212
return
tid;
213
}
214
215
TypeId
GenericMacHeader::GetInstanceTypeId
(
void
)
const
216
{
217
return
GetTypeId
();
218
}
219
220
void
GenericMacHeader::Print
(std::ostream &os)
const
221
{
222
os <<
" ec (encryption control) = "
<< (uint32_t)
m_ec
<<
", type = "
<< (uint32_t)
m_type
223
<<
", ci (crc indicator) = "
<< (uint32_t)
m_ci
<<
", eks (encryption key sequence) = "
<< (uint32_t)
m_eks
224
<<
", len (length) = "
<<
m_len
<<
", cid = "
<<
m_cid
<<
", hcs (header check sequence) = "
<< (uint32_t)
m_hcs
;
225
}
226
227
uint32_t
GenericMacHeader::GetSerializedSize
(
void
)
const
228
{
229
return
6;
230
}
231
232
void
GenericMacHeader::Serialize
(
Buffer::Iterator
start
)
const
233
{
234
235
/*
236
* AI:Serialize function according to the
237
* IEEE 8002.16e.
238
* Please send bug and comments to
239
* amine.ismail@udcast.com
240
* amine.ismail@sophia.inria.fr
241
*/
242
243
Buffer::Iterator
i =
start
;
244
245
uint8_t headerBuffer[6];
246
memset (headerBuffer, 0, 6);
247
248
headerBuffer[0] = ((
m_ht
<< 7) & 0x80) | ((
m_ec
<< 6) & 0x40) | (
m_type
& 0x3F);
249
headerBuffer[1] = ((
m_esf
<< 7) & 0x80) | ((
m_ci
<< 6) & 0x40) | ((
m_eks
<< 4) & 0x30) | ((
m_rsv1
<< 3) & 0x08)
250
| (((uint8_t)(
m_len
>> 8)) & 0x07);
251
headerBuffer[2] = (uint8_t)(
m_len
);
252
headerBuffer[3] = (uint8_t)(
m_cid
.
GetIdentifier
() >> 8);
253
headerBuffer[4] = (uint8_t)(
m_cid
.
GetIdentifier
());
254
uint8_t crc =
CRC8Calculate
(headerBuffer, 5);
255
headerBuffer[5] = crc;
256
for
(
int
j = 0; j < 6; j++)
257
{
258
i.
WriteU8
(headerBuffer[j]);
259
}
260
261
}
262
263
uint32_t
GenericMacHeader::Deserialize
(
Buffer::Iterator
start
)
264
{
265
266
/*
267
* AI:Deserialize function according to the
268
* IEEE 8002.16e.
269
* Please send bug and comments to
270
* amine.ismail@udcast.com
271
* amine.ismail@sophia.inria.fr
272
*/
273
274
Buffer::Iterator
i =
start
;
275
276
uint8_t headerBuffer[6];
277
for
(
int
j = 0; j < 6; j++)
278
{
279
headerBuffer[j] = i.
ReadU8
();
280
}
281
m_ht
= (headerBuffer[0] >> 7) & 0x01;
282
m_ec
= (headerBuffer[0] >> 6) & 0x01;
283
m_type
= (headerBuffer[0]) & 0x3F;
284
m_esf
= (headerBuffer[1] >> 7) & 0x01;
285
m_ci
= (headerBuffer[1] >> 6) & 0x01;
286
m_eks
= (headerBuffer[1] >> 4) & 0x03;
287
m_rsv1
= (headerBuffer[1] >> 3) & 0x01;
288
uint16_t lenmsb = (headerBuffer[1] & 0x07);
289
uint16_t lenlsb = headerBuffer[2];
290
m_len
= ((lenmsb << 8) & 0x0700) | (lenlsb & 0x00FF);
291
uint16_t cidmsb = headerBuffer[3];
292
uint16_t cidlsb = headerBuffer[4];
293
uint16_t cid = ((cidmsb << 8) & 0xFF00) | (cidlsb & 0x00FF);
294
m_cid
=
Cid
(cid);
295
m_hcs
= headerBuffer[5];
296
c_hcs
=
CRC8Calculate
(headerBuffer, 5);
297
return
i.
GetDistanceFrom
(
start
);
298
}
299
300
bool
GenericMacHeader::check_hcs
(
void
)
const
301
{
302
return
(
m_hcs
==
c_hcs
);
303
}
304
305
// ----------------------------------------------------------------------------------------------------------
306
307
NS_OBJECT_ENSURE_REGISTERED
(
BandwidthRequestHeader
);
308
309
BandwidthRequestHeader::BandwidthRequestHeader
(
void
)
310
: m_ht (1),
311
m_ec (0),
312
m_type (0),
313
m_br (0),
314
m_cid (
Cid
()),
315
m_hcs (0)
316
{
317
}
318
319
BandwidthRequestHeader::~BandwidthRequestHeader
(
void
)
320
{
321
}
322
323
void
BandwidthRequestHeader::SetHt
(uint8_t ht)
324
{
325
m_ht
= ht;
326
}
327
328
void
BandwidthRequestHeader::SetEc
(uint8_t ec)
329
{
330
m_ec
= ec;
331
}
332
333
void
BandwidthRequestHeader::SetType
(uint8_t type)
334
{
335
m_type
= type;
336
}
337
338
void
BandwidthRequestHeader::SetBr
(uint32_t br)
339
{
340
m_br
= br;
341
}
342
343
void
BandwidthRequestHeader::SetCid
(
Cid
cid)
344
{
345
m_cid
= cid;
346
}
347
348
void
BandwidthRequestHeader::SetHcs
(uint8_t hcs)
349
{
350
m_hcs
= hcs;
351
}
352
353
uint8_t
BandwidthRequestHeader::GetHt
(
void
)
const
354
{
355
return
m_ht
;
356
}
357
358
uint8_t
BandwidthRequestHeader::GetEc
(
void
)
const
359
{
360
return
m_ec
;
361
}
362
363
uint8_t
BandwidthRequestHeader::GetType
(
void
)
const
364
{
365
return
m_type
;
366
}
367
368
uint32_t
BandwidthRequestHeader::GetBr
(
void
)
const
369
{
370
return
m_br
;
371
}
372
373
Cid
BandwidthRequestHeader::GetCid
(
void
)
const
374
{
375
return
m_cid
;
376
}
377
378
uint8_t
BandwidthRequestHeader::GetHcs
(
void
)
const
379
{
380
return
m_hcs
;
381
}
382
383
std::string
BandwidthRequestHeader::GetName
(
void
)
const
384
{
385
return
"Bandwidth Request Header"
;
386
}
387
388
TypeId
BandwidthRequestHeader::GetTypeId
(
void
)
389
{
390
static
TypeId
tid =
TypeId
(
"ns3::BandwidthRequestHeader"
)
391
.
SetParent
<
Header
> ()
392
.SetGroupName(
"Wimax"
)
393
.AddConstructor<
BandwidthRequestHeader
> ()
394
;
395
return
tid;
396
}
397
398
TypeId
BandwidthRequestHeader::GetInstanceTypeId
(
void
)
const
399
{
400
return
GetTypeId
();
401
}
402
403
void
BandwidthRequestHeader::Print
(std::ostream &os)
const
404
{
405
os <<
" ec (encryption control) = "
<< (uint32_t)
m_ec
<<
", type = "
<< (uint32_t)
m_type
406
<<
", br (bandwidth request) = "
<<
m_br
<<
", cid = "
;
407
m_cid
.
GetIdentifier
();
408
os <<
", hcs (header check sequence) = "
<< (uint32_t)
m_hcs
;
409
}
410
411
uint32_t
BandwidthRequestHeader::GetSerializedSize
(
void
)
const
412
{
413
/*
414
* The size of the BandwidthRequest mac header is always 6 bytes
415
*/
416
return
6;
417
}
418
419
void
BandwidthRequestHeader::Serialize
(
Buffer::Iterator
start
)
const
420
{
421
422
/*
423
* AI:Serialize function according to the
424
* IEEE 8002.16e.
425
* please send bug and comments to
426
* amine.ismail@udcast.com
427
* amine.ismail@sophia.inria.fr
428
*/
429
430
Buffer::Iterator
i =
start
;
431
uint8_t headerBuffer[6];
432
uint8_t br_msb1 = (((uint32_t)
m_br
) >> 16) & 0x00000007;
433
uint8_t br_msb2 = (((uint32_t)
m_br
) >> 8) & 0x000000FF;
434
uint8_t br_lsb =
m_br
& 0x000000FF;
435
headerBuffer[0] = ((
m_ht
<< 7) & 0x80) | ((
m_ec
<< 6) & 0x40) | ((
m_type
<< 3) & 0x38) | br_msb1;
436
headerBuffer[1] = br_msb2;
437
headerBuffer[2] = br_lsb;
438
headerBuffer[3] = (uint8_t)((
m_cid
.
GetIdentifier
() >> 8) & 0x00FF);
439
headerBuffer[4] = (uint8_t)(
m_cid
.
GetIdentifier
() & 0x00FF);
440
headerBuffer[5] =
CRC8Calculate
(headerBuffer, 5);
441
442
for
(
int
j = 0; j < 6; j++)
443
{
444
i.
WriteU8
(headerBuffer[j]);
445
}
446
}
447
448
uint32_t
BandwidthRequestHeader::Deserialize
(
Buffer::Iterator
start
)
449
{
450
451
/*
452
* AI:Deserialize function according to the
453
* IEEE 8002.16e.
454
* Please send bug and comments to
455
* amine.ismail@udcast.com
456
* amine.ismail@sophia.inria.fr
457
*/
458
459
Buffer::Iterator
i =
start
;
460
461
uint8_t headerBuffer[6];
462
for
(
int
j = 0; j < 6; j++)
463
{
464
headerBuffer[j] = i.
ReadU8
();
465
}
466
467
m_ht
= (headerBuffer[0] >> 7) & 0x01;
468
m_ec
= (headerBuffer[0] >> 6) & 0x01;
469
m_type
= (headerBuffer[0] >> 3) & 0x07;
470
uint32_t br_msb1 = headerBuffer[0] & 0x00000007;
471
uint32_t br_msb2 = headerBuffer[1] & 0x000000FF;
472
uint32_t br_lsb = headerBuffer[2] & 0x000000FF;
473
m_br
= ((uint32_t) br_msb1 << 14) | ((uint32_t) br_msb2 << 8) | br_lsb;
474
uint16_t cidmsb = headerBuffer[3];
475
uint16_t cidlsb = headerBuffer[4];
476
uint16_t cid = ((cidmsb << 8) & 0xFF00) | (cidlsb & 0x00FF);
477
m_cid
=
Cid
(cid);
478
m_hcs
= headerBuffer[5];
479
c_hcs
=
CRC8Calculate
(headerBuffer, 5);
480
481
return
i.
GetDistanceFrom
(
start
);
482
483
}
484
485
bool
BandwidthRequestHeader::check_hcs
(
void
)
const
486
{
487
return
(
m_hcs
==
c_hcs
);
488
}
489
490
// ----------------------------------------------------------------------------------------------------------
491
492
NS_OBJECT_ENSURE_REGISTERED
(
GrantManagementSubheader
);
493
494
GrantManagementSubheader::GrantManagementSubheader
(
void
)
495
: m_si (0),
496
m_pm (0),
497
m_pbr (0)
498
{
499
}
500
501
GrantManagementSubheader::~GrantManagementSubheader
(
void
)
502
{
503
}
504
505
void
GrantManagementSubheader::SetSi
(uint8_t si)
506
{
507
m_si
= si;
508
}
509
510
void
GrantManagementSubheader::SetPm
(uint8_t pm)
511
{
512
m_pm
= pm;
513
}
514
515
void
GrantManagementSubheader::SetPbr
(uint16_t pbr)
516
{
517
m_pbr
= pbr;
518
}
519
520
uint8_t
GrantManagementSubheader::GetSi
(
void
)
const
521
{
522
return
m_si
;
523
}
524
525
uint8_t
GrantManagementSubheader::GetPm
(
void
)
const
526
{
527
return
m_pm
;
528
}
529
530
uint16_t
GrantManagementSubheader::GetPbr
(
void
)
const
531
{
532
return
m_pbr
;
533
}
534
535
std::string
GrantManagementSubheader::GetName
(
void
)
const
536
{
537
return
"Grant Management Subheader"
;
538
}
539
540
TypeId
GrantManagementSubheader::GetTypeId
(
void
)
541
{
542
static
TypeId
tid =
TypeId
(
"ns3::GrantManagementSubheader"
)
543
.
SetParent
<
Header
> ()
544
.SetGroupName(
"Wimax"
)
545
.AddConstructor<
GrantManagementSubheader
> ()
546
;
547
return
tid;
548
}
549
550
TypeId
GrantManagementSubheader::GetInstanceTypeId
(
void
)
const
551
{
552
return
GetTypeId
();
553
}
554
555
void
GrantManagementSubheader::Print
(std::ostream &os)
const
556
{
557
os <<
" si (slip indicator) = "
<< (uint32_t)
m_si
<<
", pm (poll me) = "
<< (uint32_t)
m_pm
558
<<
", pbr (piggyback request) = "
<<
m_pbr
;
559
}
560
561
uint32_t
GrantManagementSubheader::GetSerializedSize
(
void
)
const
562
{
563
return
1 + 1 + 2;
564
}
565
566
void
GrantManagementSubheader::Serialize
(
Buffer::Iterator
start
)
const
567
{
568
Buffer::Iterator
i =
start
;
569
i.
WriteU8
(
m_si
);
570
i.
WriteU8
(
m_pm
);
571
i.
WriteU16
(
m_pbr
);
572
}
573
574
uint32_t
GrantManagementSubheader::Deserialize
(
Buffer::Iterator
start
)
575
{
576
Buffer::Iterator
i =
start
;
577
m_si
= i.
ReadU8
();
578
m_pm
= i.
ReadU8
();
579
m_pbr
= i.
ReadU16
();
580
581
return
i.
GetDistanceFrom
(
start
);
582
}
583
584
// ----------------------------------------------------------------------------------------------------------
585
586
NS_OBJECT_ENSURE_REGISTERED
(
FragmentationSubheader
);
587
588
FragmentationSubheader::FragmentationSubheader
(
void
)
589
: m_fc (0),
590
m_fsn (0)
591
{
592
}
593
594
FragmentationSubheader::~FragmentationSubheader
(
void
)
595
{
596
}
597
598
void
599
FragmentationSubheader::SetFc
(uint8_t fc)
600
{
601
m_fc
= fc;
602
}
603
604
void
605
FragmentationSubheader::SetFsn
(uint8_t fsn)
606
{
607
m_fsn
= fsn;
608
}
609
610
uint8_t
611
FragmentationSubheader::GetFc
(
void
)
const
612
{
613
return
m_fc
;
614
}
615
616
uint8_t
617
FragmentationSubheader::GetFsn
(
void
)
const
618
{
619
return
m_fsn
;
620
}
621
622
623
std::string
624
FragmentationSubheader::GetName
(
void
)
const
625
{
626
return
"Fragmentation Subheader"
;
627
}
628
629
TypeId
630
FragmentationSubheader::GetTypeId
(
void
)
631
{
632
static
TypeId
tid =
TypeId
(
"ns3::FragmentationSubheader"
)
633
.
SetParent
<
Header
> ()
634
.SetGroupName(
"Wimax"
)
635
.AddConstructor<
FragmentationSubheader
> ()
636
;
637
return
tid;
638
}
639
640
TypeId
641
FragmentationSubheader::GetInstanceTypeId
(
void
)
const
642
{
643
return
GetTypeId
();
644
}
645
646
void
647
FragmentationSubheader::Print
(std::ostream &os)
const
648
{
649
os <<
" fc (fragment control) = "
<< (uint32_t)
m_fc
<<
", fsn (fragmentation sequence number) = "
650
<< (uint32_t)
m_fsn
<<
"\n"
;
651
}
652
653
uint32_t
654
FragmentationSubheader::GetSerializedSize
(
void
)
const
655
{
656
return
2;
657
}
658
659
void
660
FragmentationSubheader::Serialize
(
Buffer::Iterator
start
)
const
661
{
662
Buffer::Iterator
i =
start
;
663
i.
WriteU8
(
m_fc
);
664
i.
WriteU8
(
m_fsn
);
665
}
666
667
uint32_t
668
FragmentationSubheader::Deserialize
(
Buffer::Iterator
start
)
669
{
670
Buffer::Iterator
i =
start
;
671
m_fc
= i.
ReadU8
();
672
m_fsn
= i.
ReadU8
();
673
674
return
i.
GetDistanceFrom
(
start
);
675
}
676
677
}
// namespace ns3
ns3::BandwidthRequestHeader::check_hcs
bool check_hcs(void) const
Check HCS.
Definition:
wimax-mac-header.cc:485
ns3::BandwidthRequestHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
wimax-mac-header.cc:411
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::BandwidthRequestHeader::BandwidthRequestHeader
BandwidthRequestHeader(void)
Definition:
wimax-mac-header.cc:309
ns3::GenericMacHeader::SetHt
void SetHt(uint8_t ht)
Set HT field.
Definition:
wimax-mac-header.cc:120
ns3::GrantManagementSubheader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
wimax-mac-header.cc:561
ns3::MacHeaderType::Print
void Print(std::ostream &os) const
Definition:
wimax-mac-header.cc:78
ns3::GrantManagementSubheader::~GrantManagementSubheader
~GrantManagementSubheader(void)
Definition:
wimax-mac-header.cc:501
ns3::FragmentationSubheader::GetName
std::string GetName(void) const
Get name field.
Definition:
wimax-mac-header.cc:624
ns3::GenericMacHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wimax-mac-header.cc:215
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
ns3::GrantManagementSubheader::Print
void Print(std::ostream &os) const
Definition:
wimax-mac-header.cc:555
ns3::BandwidthRequestHeader::SetCid
void SetCid(Cid cid)
Set CID field.
Definition:
wimax-mac-header.cc:343
ns3::Cid
Cid class.
Definition:
cid.h:38
ns3::GenericMacHeader::m_eks
uint8_t m_eks
Encryption Key Sequence.
Definition:
wimax-mac-header.h:221
ns3::BandwidthRequestHeader::m_hcs
uint8_t m_hcs
Header Check Sequence.
Definition:
wimax-mac-header.h:351
ns3::GenericMacHeader::GetEks
uint8_t GetEks(void) const
Get EKS field.
Definition:
wimax-mac-header.cc:180
ns3::BandwidthRequestHeader::m_ec
uint8_t m_ec
Encryption Control.
Definition:
wimax-mac-header.h:347
ns3::GenericMacHeader::GetName
std::string GetName(void) const
Get name field.
Definition:
wimax-mac-header.cc:200
ns3::BandwidthRequestHeader::GetEc
uint8_t GetEc(void) const
Get EC field.
Definition:
wimax-mac-header.cc:358
ns3::FragmentationSubheader::m_fsn
uint8_t m_fsn
Fragment Sequence Number.
Definition:
wimax-mac-header.h:503
ns3::BandwidthRequestHeader::m_type
uint8_t m_type
type
Definition:
wimax-mac-header.h:348
ns3::BandwidthRequestHeader::SetEc
void SetEc(uint8_t ec)
Set EC field.
Definition:
wimax-mac-header.cc:328
ns3::GrantManagementSubheader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
wimax-mac-header.cc:566
ns3::MacHeaderType::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
wimax-mac-header.cc:88
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Cid::GetIdentifier
uint16_t GetIdentifier(void) const
Definition:
cid.cc:45
ns3::Buffer::Iterator::GetDistanceFrom
uint32_t GetDistanceFrom(Iterator const &o) const
Definition:
buffer.cc:788
ns3::MacHeaderType::GetType
uint8_t GetType(void) const
Get type field.
Definition:
wimax-mac-header.cc:51
ns3::MacHeaderType::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wimax-mac-header.cc:63
ns3::BandwidthRequestHeader::GetHcs
uint8_t GetHcs(void) const
Get HCS field.
Definition:
wimax-mac-header.cc:378
ns3::Buffer::Iterator::ReadU8
uint8_t ReadU8(void)
Definition:
buffer.h:1021
ns3::BandwidthRequestHeader
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
Definition:
wimax-mac-header.h:252
crc8.h
ns3::MacHeaderType::SetType
void SetType(uint8_t type)
Set type field.
Definition:
wimax-mac-header.cc:45
ns3::FragmentationSubheader::SetFsn
void SetFsn(uint8_t fsn)
Set FSN field.
Definition:
wimax-mac-header.cc:605
ns3::GrantManagementSubheader::SetPm
void SetPm(uint8_t pm)
Set PM field.
Definition:
wimax-mac-header.cc:510
ns3::GenericMacHeader::m_type
uint8_t m_type
type
Definition:
wimax-mac-header.h:218
ns3::GenericMacHeader::GetHcs
uint8_t GetHcs(void) const
Get HCS field.
Definition:
wimax-mac-header.cc:195
ns3::FragmentationSubheader::GetFc
uint8_t GetFc(void) const
Get FC field.
Definition:
wimax-mac-header.cc:611
ns3::GenericMacHeader::m_len
uint16_t m_len
length
Definition:
wimax-mac-header.h:223
ns3::MacHeaderType
This class Represents the HT (Header Type) field of generic MAC and bandwidth request headers.
Definition:
wimax-mac-header.h:37
ns3::BandwidthRequestHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wimax-mac-header.cc:388
ns3::Buffer::Iterator::WriteU8
void WriteU8(uint8_t data)
Definition:
buffer.h:869
ns3::Buffer::Iterator::WriteU16
void WriteU16(uint16_t data)
Definition:
buffer.cc:871
ns3::GenericMacHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
wimax-mac-header.cc:227
ns3::GenericMacHeader::m_cid
Cid m_cid
CID.
Definition:
wimax-mac-header.h:224
ns3::GenericMacHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wimax-mac-header.cc:205
ns3::MacHeaderType::~MacHeaderType
virtual ~MacHeaderType(void)
Definition:
wimax-mac-header.cc:40
ns3::GenericMacHeader::GetHt
uint8_t GetHt(void) const
Get HT field.
Definition:
wimax-mac-header.cc:160
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:923
ns3::GenericMacHeader::GetLen
uint16_t GetLen(void) const
Get length field.
Definition:
wimax-mac-header.cc:185
ns3::GrantManagementSubheader::GrantManagementSubheader
GrantManagementSubheader(void)
Definition:
wimax-mac-header.cc:494
ns3::GrantManagementSubheader::SetPbr
void SetPbr(uint16_t pbr)
Set PRR field.
Definition:
wimax-mac-header.cc:515
ns3::GenericMacHeader::SetCi
void SetCi(uint8_t ci)
Set CI field.
Definition:
wimax-mac-header.cc:135
ns3::GenericMacHeader::~GenericMacHeader
~GenericMacHeader(void)
Definition:
wimax-mac-header.cc:116
ns3::GenericMacHeader::m_esf
uint8_t m_esf
ESF.
Definition:
wimax-mac-header.h:219
ns3::GenericMacHeader::m_ht
uint8_t m_ht
Header type.
Definition:
wimax-mac-header.h:216
ns3::BandwidthRequestHeader::m_cid
Cid m_cid
Connection identifier.
Definition:
wimax-mac-header.h:350
ns3::GenericMacHeader::SetLen
void SetLen(uint16_t len)
Set length field.
Definition:
wimax-mac-header.cc:145
ns3::BandwidthRequestHeader::GetHt
uint8_t GetHt(void) const
Get HT field.
Definition:
wimax-mac-header.cc:353
visualizer.core.start
def start()
Definition:
core.py:1855
ns3::GrantManagementSubheader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wimax-mac-header.cc:540
ns3::GenericMacHeader::SetType
void SetType(uint8_t type)
Set type field.
Definition:
wimax-mac-header.cc:130
ns3::BandwidthRequestHeader::SetHcs
void SetHcs(uint8_t hcs)
Set HCS field.
Definition:
wimax-mac-header.cc:348
ns3::BandwidthRequestHeader::GetBr
uint32_t GetBr(void) const
Get BR field.
Definition:
wimax-mac-header.cc:368
ns3::BandwidthRequestHeader::GetName
std::string GetName(void) const
Get name field.
Definition:
wimax-mac-header.cc:383
ns3::GrantManagementSubheader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wimax-mac-header.cc:550
wimax-mac-header.h
ns3::BandwidthRequestHeader::~BandwidthRequestHeader
~BandwidthRequestHeader(void)
Definition:
wimax-mac-header.cc:319
ns3::BandwidthRequestHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wimax-mac-header.cc:398
ns3::GenericMacHeader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
wimax-mac-header.cc:232
ns3::BandwidthRequestHeader::SetType
void SetType(uint8_t type)
Set type field.
Definition:
wimax-mac-header.cc:333
ns3::FragmentationSubheader::~FragmentationSubheader
~FragmentationSubheader(void)
Definition:
wimax-mac-header.cc:594
ns3::GrantManagementSubheader::GetPbr
uint16_t GetPbr(void) const
Get PBR field.
Definition:
wimax-mac-header.cc:530
ns3::BandwidthRequestHeader::SetBr
void SetBr(uint32_t br)
Set BR field.
Definition:
wimax-mac-header.cc:338
ns3::BandwidthRequestHeader::m_ht
uint8_t m_ht
Header type.
Definition:
wimax-mac-header.h:346
ns3::MacHeaderType::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wimax-mac-header.cc:73
ns3::GenericMacHeader::GenericMacHeader
GenericMacHeader(void)
Definition:
wimax-mac-header.cc:101
ns3::GenericMacHeader::m_ec
uint8_t m_ec
Encryption Control.
Definition:
wimax-mac-header.h:217
ns3::GenericMacHeader::GetType
uint8_t GetType(void) const
Get type field.
Definition:
wimax-mac-header.cc:170
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:43
ns3::GenericMacHeader::SetHcs
void SetHcs(uint8_t hcs)
Set HCS field.
Definition:
wimax-mac-header.cc:155
ns3::MacHeaderType::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
wimax-mac-header.cc:83
ns3::FragmentationSubheader
This class implements the fragmentation sub-header as described by IEEE Standard for Local and metrop...
Definition:
wimax-mac-header.h:458
ns3::FragmentationSubheader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
wimax-mac-header.cc:654
ns3::BandwidthRequestHeader::c_hcs
uint8_t c_hcs
calculated header check sequence; this is used to check if the received header is correct or not
Definition:
wimax-mac-header.h:352
ns3::GenericMacHeader::m_rsv1
uint8_t m_rsv1
RSV.
Definition:
wimax-mac-header.h:222
ns3::FragmentationSubheader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wimax-mac-header.cc:630
ns3::Buffer::Iterator::ReadU16
uint16_t ReadU16(void)
Definition:
buffer.h:1029
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::GenericMacHeader
This class implements the Generic mac Header as described by IEEE Standard for Local and metropolitan...
Definition:
wimax-mac-header.h:109
ns3::BandwidthRequestHeader::GetType
uint8_t GetType(void) const
Get type field.
Definition:
wimax-mac-header.cc:363
ns3::GenericMacHeader::SetEks
void SetEks(uint8_t eks)
Set EKS field.
Definition:
wimax-mac-header.cc:140
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:99
ns3::GrantManagementSubheader::m_si
uint8_t m_si
Slip Indicator.
Definition:
wimax-mac-header.h:433
ns3::FragmentationSubheader::Print
void Print(std::ostream &os) const
Definition:
wimax-mac-header.cc:647
ns3::BandwidthRequestHeader::SetHt
void SetHt(uint8_t ht)
Set HT field.
Definition:
wimax-mac-header.cc:323
ns3::GrantManagementSubheader
This class implements the grant management sub-header as described by IEEE Standard for Local and met...
Definition:
wimax-mac-header.h:377
ns3::GenericMacHeader::check_hcs
bool check_hcs(void) const
Check HCS.
Definition:
wimax-mac-header.cc:300
ns3::MacHeaderType::m_type
uint8_t m_type
MAC header type.
Definition:
wimax-mac-header.h:84
ns3::FragmentationSubheader::SetFc
void SetFc(uint8_t fc)
Set FC field.
Definition:
wimax-mac-header.cc:599
ns3::GenericMacHeader::m_ci
uint8_t m_ci
CRC Indicator.
Definition:
wimax-mac-header.h:220
ns3::GenericMacHeader::c_hcs
uint8_t c_hcs
calculated header check sequence; this is used to check if the received header is correct or not
Definition:
wimax-mac-header.h:226
ns3::GrantManagementSubheader::m_pbr
uint16_t m_pbr
PiggyBack Request.
Definition:
wimax-mac-header.h:435
ns3::CRC8Calculate
uint8_t CRC8Calculate(const uint8_t *data, int length)
Definition:
crc8.cc:57
ns3::GenericMacHeader::m_hcs
uint8_t m_hcs
Header Check Sequence.
Definition:
wimax-mac-header.h:225
ns3::GrantManagementSubheader::GetPm
uint8_t GetPm(void) const
Get PM field.
Definition:
wimax-mac-header.cc:525
ns3::FragmentationSubheader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
wimax-mac-header.cc:660
ns3::GrantManagementSubheader::m_pm
uint8_t m_pm
Poll-Me bit (byte in this case)
Definition:
wimax-mac-header.h:434
ns3::MacHeaderType::GetName
std::string GetName(void) const
Get name field.
Definition:
wimax-mac-header.cc:57
ns3::GrantManagementSubheader::GetSi
uint8_t GetSi(void) const
Get SI field.
Definition:
wimax-mac-header.cc:520
ns3::GenericMacHeader::SetEc
void SetEc(uint8_t ec)
Set EC field.
Definition:
wimax-mac-header.cc:125
ns3::FragmentationSubheader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wimax-mac-header.cc:641
ns3::MacHeaderType::MacHeaderType
MacHeaderType(void)
Constructor.
Definition:
wimax-mac-header.cc:30
ns3::GenericMacHeader::GetEc
uint8_t GetEc(void) const
Get EC field.
Definition:
wimax-mac-header.cc:165
ns3::GenericMacHeader::Print
void Print(std::ostream &os) const
Definition:
wimax-mac-header.cc:220
ns3::GenericMacHeader::GetCid
Cid GetCid(void) const
Get CID field.
Definition:
wimax-mac-header.cc:190
ns3::BandwidthRequestHeader::m_br
uint32_t m_br
Bandwidth Request.
Definition:
wimax-mac-header.h:349
ns3::FragmentationSubheader::GetFsn
uint8_t GetFsn(void) const
Get FSN field.
Definition:
wimax-mac-header.cc:617
ns3::GenericMacHeader::SetCid
void SetCid(Cid cid)
Set CID field.
Definition:
wimax-mac-header.cc:150
ns3::GenericMacHeader::GetCi
uint8_t GetCi(void) const
Get CI field.
Definition:
wimax-mac-header.cc:175
ns3::GrantManagementSubheader::SetSi
void SetSi(uint8_t si)
Set SI field.
Definition:
wimax-mac-header.cc:505
ns3::BandwidthRequestHeader::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
wimax-mac-header.cc:419
ns3::GrantManagementSubheader::GetName
std::string GetName(void) const
Get name field.
Definition:
wimax-mac-header.cc:535
ns3::FragmentationSubheader::FragmentationSubheader
FragmentationSubheader(void)
Definition:
wimax-mac-header.cc:588
ns3::FragmentationSubheader::m_fc
uint8_t m_fc
Fragment Control.
Definition:
wimax-mac-header.h:502
ns3::BandwidthRequestHeader::Print
void Print(std::ostream &os) const
Definition:
wimax-mac-header.cc:403
ns3::BandwidthRequestHeader::GetCid
Cid GetCid(void) const
Get CID field.
Definition:
wimax-mac-header.cc:373
src
wimax
model
wimax-mac-header.cc
Generated on Fri Oct 1 2021 17:03:54 for ns-3 by
1.8.20