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