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
ipv6-extension-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008-2009 Strasbourg University
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: David Gross <gdavid.devel@gmail.com>
7
*/
8
9
#ifndef IPV6_EXTENSION_HEADER_H
10
#define IPV6_EXTENSION_HEADER_H
11
12
#include "
ipv6-option-header.h
"
13
14
#include "ns3/header.h"
15
#include "ns3/ipv6-address.h"
16
17
#include <list>
18
#include <ostream>
19
#include <vector>
20
21
namespace
ns3
22
{
23
24
/**
25
* \ingroup ipv6HeaderExt
26
*
27
* \brief Header for IPv6 Extension.
28
*/
29
class
Ipv6ExtensionHeader
:
public
Header
30
{
31
public
:
32
/**
33
* \brief Get the type identificator.
34
* \return type identificator
35
*/
36
static
TypeId
GetTypeId
();
37
38
/**
39
* \brief Get the instance type ID.
40
* \return instance type ID
41
*/
42
TypeId
GetInstanceTypeId
()
const override
;
43
44
/**
45
* \brief Constructor.
46
*/
47
Ipv6ExtensionHeader
();
48
49
/**
50
* \brief Destructor.
51
*/
52
~Ipv6ExtensionHeader
()
override
;
53
54
/**
55
* \brief Set the "Next header" field.
56
* \param nextHeader the next header number
57
*/
58
void
SetNextHeader
(uint8_t nextHeader);
59
60
/**
61
* \brief Get the next header.
62
* \return the next header number
63
*/
64
uint8_t
GetNextHeader
()
const
;
65
66
/**
67
* brief Set the length of the extension.
68
* \param length the length of the extension in bytes
69
*/
70
void
SetLength
(uint16_t length);
71
72
/**
73
* \brief Get the length of the extension.
74
* \return the length of the extension
75
*/
76
uint16_t
GetLength
()
const
;
77
78
/**
79
* \brief Print some information about the packet.
80
* \param os output stream
81
*/
82
void
Print
(std::ostream& os)
const override
;
83
84
/**
85
* \brief Get the serialized size of the packet.
86
* \return size
87
*/
88
uint32_t
GetSerializedSize
()
const override
;
89
90
/**
91
* \brief Serialize the packet.
92
* \param start Buffer iterator
93
*/
94
void
Serialize
(
Buffer::Iterator
start)
const override
;
95
96
/**
97
* \brief Deserialize the packet.
98
* \param start Buffer iterator
99
* \return size of the packet
100
*/
101
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
102
103
protected
:
104
/**
105
* \brief The "length" field.
106
*/
107
uint8_t
m_length
;
108
109
private
:
110
/**
111
* \brief The "next header" field.
112
*/
113
uint8_t
m_nextHeader
;
114
115
/**
116
* \brief The data of the extension.
117
*/
118
Buffer
m_data
;
119
};
120
121
/**
122
* \ingroup ipv6HeaderExt
123
*
124
* \brief Option field for an IPv6ExtensionHeader.
125
*
126
* Enables adding options to an IPv6ExtensionHeader.
127
*
128
* Implementor's note: Make sure to add the result of
129
* OptionField::GetSerializedSize () to your IPv6ExtensionHeader::GetSerializedSize ()
130
* return value. Call OptionField::Serialize and OptionField::Deserialize at the
131
* end of your corresponding IPv6ExtensionHeader methods.
132
*/
133
class
OptionField
134
{
135
public
:
136
/**
137
* \brief Constructor.
138
* \param optionsOffset option offset
139
*/
140
OptionField
(
uint32_t
optionsOffset);
141
142
/**
143
* \brief Destructor.
144
*/
145
~OptionField
();
146
147
/**
148
* \brief Get the serialized size of the packet.
149
* \return size
150
*/
151
uint32_t
GetSerializedSize
()
const
;
152
153
/**
154
* \brief Serialize all added options.
155
* \param start Buffer iterator
156
*/
157
void
Serialize
(
Buffer::Iterator
start)
const
;
158
159
/**
160
* \brief Deserialize the packet.
161
* \param start Buffer iterator
162
* \param length length
163
* \return size of the packet
164
*/
165
uint32_t
Deserialize
(
Buffer::Iterator
start,
uint32_t
length);
166
167
/**
168
* \brief Serialize the option, prepending pad1 or padn option as necessary
169
* \param option the option header to serialize
170
*/
171
void
AddOption
(
const
Ipv6OptionHeader
& option);
172
173
/**
174
* \brief Get the offset where the options begin, measured from the start of
175
* the extension header.
176
* \return the offset from the start of the extension header
177
*/
178
uint32_t
GetOptionsOffset
()
const
;
179
180
/**
181
* \brief Get the buffer.
182
* \return buffer
183
*/
184
Buffer
GetOptionBuffer
();
185
186
private
:
187
/**
188
* \brief Calculate padding.
189
* \param alignment alignment
190
* \return the number of pad bytes
191
*/
192
uint32_t
CalculatePad
(
Ipv6OptionHeader::Alignment
alignment)
const
;
193
194
/**
195
* \brief Data payload.
196
*/
197
Buffer
m_optionData
;
198
199
/**
200
* \brief Offset.
201
*/
202
uint32_t
m_optionsOffset
;
203
};
204
205
/**
206
* \ingroup ipv6HeaderExt
207
*
208
* \brief Header of IPv6 Extension "Hop by Hop"
209
*/
210
class
Ipv6ExtensionHopByHopHeader
:
public
Ipv6ExtensionHeader
,
public
OptionField
211
{
212
public
:
213
/**
214
* \brief Get the type identificator.
215
* \return type identificator
216
*/
217
static
TypeId
GetTypeId
();
218
219
/**
220
* \brief Get the instance type ID.
221
* \return instance type ID
222
*/
223
TypeId
GetInstanceTypeId
()
const override
;
224
225
/**
226
* \brief Constructor.
227
*/
228
Ipv6ExtensionHopByHopHeader
();
229
230
/**
231
* \brief Destructor.
232
*/
233
~Ipv6ExtensionHopByHopHeader
()
override
;
234
235
/**
236
* \brief Print some information about the packet.
237
* \param os output stream
238
*/
239
void
Print
(std::ostream& os)
const override
;
240
241
/**
242
* \brief Get the serialized size of the packet.
243
* \return size
244
*/
245
uint32_t
GetSerializedSize
()
const override
;
246
247
/**
248
* \brief Serialize the packet.
249
* \param start Buffer iterator
250
*/
251
void
Serialize
(
Buffer::Iterator
start)
const override
;
252
253
/**
254
* \brief Deserialize the packet.
255
* \param start Buffer iterator
256
* \return size of the packet
257
*/
258
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
259
};
260
261
/**
262
* \ingroup ipv6HeaderExt
263
*
264
* \brief Header of IPv6 Extension Destination
265
*/
266
class
Ipv6ExtensionDestinationHeader
:
public
Ipv6ExtensionHeader
,
public
OptionField
267
{
268
public
:
269
/**
270
* \brief Get the type identificator.
271
* \return type identificator
272
*/
273
static
TypeId
GetTypeId
();
274
275
/**
276
* \brief Get the instance type ID.
277
* \return instance type ID
278
*/
279
TypeId
GetInstanceTypeId
()
const override
;
280
281
/**
282
* \brief Constructor.
283
*/
284
Ipv6ExtensionDestinationHeader
();
285
286
/**
287
* \brief Destructor.
288
*/
289
~Ipv6ExtensionDestinationHeader
()
override
;
290
291
/**
292
* \brief Print some information about the packet.
293
* \param os output stream
294
*/
295
void
Print
(std::ostream& os)
const override
;
296
297
/**
298
* \brief Get the serialized size of the packet.
299
* \return size
300
*/
301
uint32_t
GetSerializedSize
()
const override
;
302
303
/**
304
* \brief Serialize the packet.
305
* \param start Buffer iterator
306
*/
307
void
Serialize
(
Buffer::Iterator
start)
const override
;
308
309
/**
310
* \brief Deserialize the packet.
311
* \param start Buffer iterator
312
* \return size of the packet
313
*/
314
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
315
};
316
317
/**
318
* \ingroup ipv6HeaderExt
319
*
320
* \brief Header of IPv6 Extension Fragment
321
*/
322
class
Ipv6ExtensionFragmentHeader
:
public
Ipv6ExtensionHeader
323
{
324
public
:
325
/**
326
* \brief Get the type identificator.
327
* \return type identificator
328
*/
329
static
TypeId
GetTypeId
();
330
331
/**
332
* \brief Get the instance type ID.
333
* \return instance type ID
334
*/
335
TypeId
GetInstanceTypeId
()
const override
;
336
337
/**
338
* \brief Constructor.
339
*/
340
Ipv6ExtensionFragmentHeader
();
341
342
/**
343
* \brief Destructor.
344
*/
345
~Ipv6ExtensionFragmentHeader
()
override
;
346
347
/**
348
* \brief Set the "Offset" field.
349
* \param offset the offset of the fragment
350
*/
351
void
SetOffset
(uint16_t offset);
352
353
/**
354
* \brief Get the field "Offset".
355
* \return the offset of the fragment
356
*/
357
uint16_t
GetOffset
()
const
;
358
359
/**
360
* \brief Set the status of "More Fragment" bit.
361
* \param moreFragment the bit "More Fragment"
362
*/
363
void
SetMoreFragment
(
bool
moreFragment);
364
365
/**
366
* \brief Get the status of "More Fragment" bit.
367
* \return the status of "More Fragment" bit.
368
*/
369
bool
GetMoreFragment
()
const
;
370
371
/**
372
* \brief Set the "Identification" field.
373
* \param identification the identifier of the fragment
374
*/
375
void
SetIdentification
(
uint32_t
identification);
376
377
/**
378
* \brief Get the field "Identification".
379
* \return the identifier of the fragment
380
*/
381
uint32_t
GetIdentification
()
const
;
382
383
/**
384
* \brief Print some information about the packet.
385
* \param os output stream
386
*/
387
void
Print
(std::ostream& os)
const override
;
388
389
/**
390
* \brief Get the serialized size of the packet.
391
* \return size
392
*/
393
uint32_t
GetSerializedSize
()
const override
;
394
395
/**
396
* \brief Serialize the packet.
397
* \param start Buffer iterator
398
*/
399
void
Serialize
(
Buffer::Iterator
start)
const override
;
400
401
/**
402
* \brief Deserialize the packet.
403
* \param start Buffer iterator
404
* \return size of the packet
405
*/
406
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
407
408
private
:
409
/**
410
* \brief Offset of the fragment and More Fragment bit.
411
*/
412
uint16_t
m_offset
;
413
414
/**
415
* \brief Identifier of the packet.
416
*/
417
uint32_t
m_identification
;
418
};
419
420
/**
421
* \ingroup ipv6HeaderExt
422
*
423
* \brief Header of IPv6 Extension Routing
424
*/
425
class
Ipv6ExtensionRoutingHeader
:
public
Ipv6ExtensionHeader
426
{
427
public
:
428
/**
429
* \brief Get the type identificator.
430
* \return type identificator
431
*/
432
static
TypeId
GetTypeId
();
433
434
/**
435
* \brief Get the instance type ID.
436
* \return instance type ID
437
*/
438
TypeId
GetInstanceTypeId
()
const override
;
439
440
/**
441
* \brief Constructor.
442
*/
443
Ipv6ExtensionRoutingHeader
();
444
445
/**
446
* \brief Destructor.
447
*/
448
~Ipv6ExtensionRoutingHeader
()
override
;
449
450
/**
451
* \brief Set the "Type of Routing" field.
452
* \param typeRouting the type of routing
453
*/
454
void
SetTypeRouting
(uint8_t typeRouting);
455
456
/**
457
* \brief Get the field "Type of Routing".
458
* \return the type of routing
459
*/
460
uint8_t
GetTypeRouting
()
const
;
461
462
/**
463
* \brief Set the "Segments left" field.
464
* \param segmentsLeft the number of segments left
465
*/
466
void
SetSegmentsLeft
(uint8_t segmentsLeft);
467
468
/**
469
* \brief Get the field "Segments left".
470
* \return the number of segments left
471
*/
472
uint8_t
GetSegmentsLeft
()
const
;
473
474
/**
475
* \brief Print some information about the packet.
476
* \param os output stream
477
*/
478
void
Print
(std::ostream& os)
const override
;
479
480
/**
481
* \brief Get the serialized size of the packet.
482
* \return size
483
*/
484
uint32_t
GetSerializedSize
()
const override
;
485
486
/**
487
* \brief Serialize the packet.
488
* \param start Buffer iterator
489
*/
490
void
Serialize
(
Buffer::Iterator
start)
const override
;
491
492
/**
493
* \brief Deserialize the packet.
494
* \param start Buffer iterator
495
* \return size of the packet
496
*/
497
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
498
499
private
:
500
/**
501
* \brief Type of routing.
502
*/
503
uint8_t
m_typeRouting
;
504
505
/**
506
* \brief Number of left segments.
507
*/
508
uint8_t
m_segmentsLeft
;
509
};
510
511
/**
512
* \ingroup ipv6HeaderExt
513
*
514
* \brief Header of IPv6 Extension Routing : Type 0 (Loose Routing)
515
*/
516
class
Ipv6ExtensionLooseRoutingHeader
:
public
Ipv6ExtensionRoutingHeader
517
{
518
public
:
519
/**
520
* \brief Get the type identificator.
521
* \return type identificator
522
*/
523
static
TypeId
GetTypeId
();
524
525
/**
526
* \brief Get the instance type ID.
527
* \return instance type ID
528
*/
529
TypeId
GetInstanceTypeId
()
const override
;
530
531
/**
532
* \brief Constructor.
533
*/
534
Ipv6ExtensionLooseRoutingHeader
();
535
536
/**
537
* \brief Destructor.
538
*/
539
~Ipv6ExtensionLooseRoutingHeader
()
override
;
540
541
/**
542
* \brief Set the number of routers' address.
543
* \param n the number of routers' address
544
*/
545
void
SetNumberAddress
(uint8_t n);
546
547
/**
548
* \brief Set the vector of routers' address
549
* \param routersAddress the vector of routers's address
550
*/
551
void
SetRoutersAddress
(std::vector<Ipv6Address> routersAddress);
552
553
/**
554
* \brief Get the vector of routers' address
555
* \return the vector of routers' address
556
*/
557
std::vector<Ipv6Address>
GetRoutersAddress
()
const
;
558
559
/**
560
* \brief Set a Router IPv6 Address.
561
* \param index the index of the IPv6 Address
562
* \param addr the new IPv6 Address
563
*/
564
void
SetRouterAddress
(uint8_t index,
Ipv6Address
addr);
565
566
/**
567
* \brief Get a Router IPv6 Address.
568
* \param index the index of the IPv6 Address
569
* \return the router IPv6 Address
570
*/
571
Ipv6Address
GetRouterAddress
(uint8_t index)
const
;
572
573
/**
574
* \brief Print some information about the packet.
575
* \param os output stream
576
*/
577
void
Print
(std::ostream& os)
const override
;
578
579
/**
580
* \brief Get the serialized size of the packet.
581
* \return size
582
*/
583
uint32_t
GetSerializedSize
()
const override
;
584
585
/**
586
* \brief Serialize the packet.
587
* \param start Buffer iterator
588
*/
589
void
Serialize
(
Buffer::Iterator
start)
const override
;
590
591
/**
592
* \brief Deserialize the packet.
593
* \param start Buffer iterator
594
* \return size of the packet
595
*/
596
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
597
598
private
:
599
/**
600
* \brief A vector of IPv6 Address.
601
*/
602
typedef
std::vector<Ipv6Address>
VectorIpv6Address_t
;
603
604
/**
605
* \brief The vector of Routers' IPv6 Address.
606
*/
607
VectorIpv6Address_t
m_routersAddress
;
608
};
609
610
/**
611
* \ingroup ipv6HeaderExt
612
*
613
* \brief Header of IPv6 Extension ESP
614
*/
615
class
Ipv6ExtensionESPHeader
:
public
Ipv6ExtensionHeader
616
{
617
public
:
618
/**
619
* \brief Get the type identificator.
620
* \return type identificator
621
*/
622
static
TypeId
GetTypeId
();
623
624
/**
625
* \brief Get the instance type ID.
626
* \return instance type ID
627
*/
628
TypeId
GetInstanceTypeId
()
const override
;
629
630
/**
631
* \brief Constructor.
632
*/
633
Ipv6ExtensionESPHeader
();
634
635
/**
636
* \brief Destructor.
637
*/
638
~Ipv6ExtensionESPHeader
()
override
;
639
640
/**
641
* \brief Print some information about the packet.
642
* \param os output stream
643
*/
644
void
Print
(std::ostream& os)
const override
;
645
646
/**
647
* \brief Get the serialized size of the packet.
648
* \return size
649
*/
650
uint32_t
GetSerializedSize
()
const override
;
651
652
/**
653
* \brief Serialize the packet.
654
* \param start Buffer iterator
655
*/
656
void
Serialize
(
Buffer::Iterator
start)
const override
;
657
658
/**
659
* \brief Deserialize the packet.
660
* \param start Buffer iterator
661
* \return size of the packet
662
*/
663
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
664
};
665
666
/**
667
* \ingroup ipv6HeaderExt
668
*
669
* \brief Header of IPv6 Extension AH
670
*/
671
class
Ipv6ExtensionAHHeader
:
public
Ipv6ExtensionHeader
672
{
673
public
:
674
/**
675
* \brief Get the type identificator.
676
* \return type identificator
677
*/
678
static
TypeId
GetTypeId
();
679
680
/**
681
* \brief Get the instance type ID.
682
* \return instance type ID
683
*/
684
TypeId
GetInstanceTypeId
()
const override
;
685
686
/**
687
* \brief Constructor.
688
*/
689
Ipv6ExtensionAHHeader
();
690
691
/**
692
* \brief Destructor.
693
*/
694
~Ipv6ExtensionAHHeader
()
override
;
695
696
/**
697
* \brief Print some information about the packet.
698
* \param os output stream
699
*/
700
void
Print
(std::ostream& os)
const override
;
701
702
/**
703
* \brief Get the serialized size of the packet.
704
* \return size
705
*/
706
uint32_t
GetSerializedSize
()
const override
;
707
708
/**
709
* \brief Serialize the packet.
710
* \param start Buffer iterator
711
*/
712
void
Serialize
(
Buffer::Iterator
start)
const override
;
713
714
/**
715
* \brief Deserialize the packet.
716
* \param start Buffer iterator
717
* \return size of the packet
718
*/
719
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
720
};
721
722
}
// namespace ns3
723
724
#endif
/* IPV6_EXTENSION_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Buffer
automatically resized byte buffer
Definition
buffer.h:83
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::Ipv6Address
Describes an IPv6 address.
Definition
ipv6-address.h:38
ns3::Ipv6ExtensionAHHeader
Header of IPv6 Extension AH.
Definition
ipv6-extension-header.h:672
ns3::Ipv6ExtensionAHHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:728
ns3::Ipv6ExtensionAHHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:761
ns3::Ipv6ExtensionAHHeader::~Ipv6ExtensionAHHeader
~Ipv6ExtensionAHHeader() override
Destructor.
Definition
ipv6-extension-header.cc:737
ns3::Ipv6ExtensionAHHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:718
ns3::Ipv6ExtensionAHHeader::Ipv6ExtensionAHHeader
Ipv6ExtensionAHHeader()
Constructor.
Definition
ipv6-extension-header.cc:733
ns3::Ipv6ExtensionAHHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:748
ns3::Ipv6ExtensionAHHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:742
ns3::Ipv6ExtensionAHHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:755
ns3::Ipv6ExtensionDestinationHeader
Header of IPv6 Extension Destination.
Definition
ipv6-extension-header.h:267
ns3::Ipv6ExtensionDestinationHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:316
ns3::Ipv6ExtensionDestinationHeader::~Ipv6ExtensionDestinationHeader
~Ipv6ExtensionDestinationHeader() override
Destructor.
Definition
ipv6-extension-header.cc:304
ns3::Ipv6ExtensionDestinationHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:309
ns3::Ipv6ExtensionDestinationHeader::Ipv6ExtensionDestinationHeader
Ipv6ExtensionDestinationHeader()
Constructor.
Definition
ipv6-extension-header.cc:299
ns3::Ipv6ExtensionDestinationHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:284
ns3::Ipv6ExtensionDestinationHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:332
ns3::Ipv6ExtensionDestinationHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:322
ns3::Ipv6ExtensionDestinationHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:294
ns3::Ipv6ExtensionESPHeader
Header of IPv6 Extension ESP.
Definition
ipv6-extension-header.h:616
ns3::Ipv6ExtensionESPHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:666
ns3::Ipv6ExtensionESPHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:676
ns3::Ipv6ExtensionESPHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:696
ns3::Ipv6ExtensionESPHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:709
ns3::Ipv6ExtensionESPHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:690
ns3::Ipv6ExtensionESPHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:703
ns3::Ipv6ExtensionESPHeader::~Ipv6ExtensionESPHeader
~Ipv6ExtensionESPHeader() override
Destructor.
Definition
ipv6-extension-header.cc:685
ns3::Ipv6ExtensionESPHeader::Ipv6ExtensionESPHeader
Ipv6ExtensionESPHeader()
Constructor.
Definition
ipv6-extension-header.cc:681
ns3::Ipv6ExtensionFragmentHeader
Header of IPv6 Extension Fragment.
Definition
ipv6-extension-header.h:323
ns3::Ipv6ExtensionFragmentHeader::Ipv6ExtensionFragmentHeader
Ipv6ExtensionFragmentHeader()
Constructor.
Definition
ipv6-extension-header.cc:361
ns3::Ipv6ExtensionFragmentHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:346
ns3::Ipv6ExtensionFragmentHeader::SetIdentification
void SetIdentification(uint32_t identification)
Set the "Identification" field.
Definition
ipv6-extension-header.cc:399
ns3::Ipv6ExtensionFragmentHeader::SetOffset
void SetOffset(uint16_t offset)
Set the "Offset" field.
Definition
ipv6-extension-header.cc:373
ns3::Ipv6ExtensionFragmentHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:419
ns3::Ipv6ExtensionFragmentHeader::m_identification
uint32_t m_identification
Identifier of the packet.
Definition
ipv6-extension-header.h:417
ns3::Ipv6ExtensionFragmentHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:356
ns3::Ipv6ExtensionFragmentHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:411
ns3::Ipv6ExtensionFragmentHeader::m_offset
uint16_t m_offset
Offset of the fragment and More Fragment bit.
Definition
ipv6-extension-header.h:412
ns3::Ipv6ExtensionFragmentHeader::GetOffset
uint16_t GetOffset() const
Get the field "Offset".
Definition
ipv6-extension-header.cc:381
ns3::Ipv6ExtensionFragmentHeader::GetMoreFragment
bool GetMoreFragment() const
Get the status of "More Fragment" bit.
Definition
ipv6-extension-header.cc:393
ns3::Ipv6ExtensionFragmentHeader::GetIdentification
uint32_t GetIdentification() const
Get the field "Identification".
Definition
ipv6-extension-header.cc:405
ns3::Ipv6ExtensionFragmentHeader::~Ipv6ExtensionFragmentHeader
~Ipv6ExtensionFragmentHeader() override
Destructor.
Definition
ipv6-extension-header.cc:368
ns3::Ipv6ExtensionFragmentHeader::SetMoreFragment
void SetMoreFragment(bool moreFragment)
Set the status of "More Fragment" bit.
Definition
ipv6-extension-header.cc:387
ns3::Ipv6ExtensionFragmentHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:437
ns3::Ipv6ExtensionFragmentHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:425
ns3::Ipv6ExtensionHeader
Header for IPv6 Extension.
Definition
ipv6-extension-header.h:30
ns3::Ipv6ExtensionHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:79
ns3::Ipv6ExtensionHeader::m_nextHeader
uint8_t m_nextHeader
The "next header" field.
Definition
ipv6-extension-header.h:113
ns3::Ipv6ExtensionHeader::GetLength
uint16_t GetLength() const
Get the length of the extension.
Definition
ipv6-extension-header.cc:73
ns3::Ipv6ExtensionHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:86
ns3::Ipv6ExtensionHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:23
ns3::Ipv6ExtensionHeader::SetLength
void SetLength(uint16_t length)
brief Set the length of the extension.
Definition
ipv6-extension-header.cc:62
ns3::Ipv6ExtensionHeader::m_data
Buffer m_data
The data of the extension.
Definition
ipv6-extension-header.h:118
ns3::Ipv6ExtensionHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:33
ns3::Ipv6ExtensionHeader::Ipv6ExtensionHeader
Ipv6ExtensionHeader()
Constructor.
Definition
ipv6-extension-header.cc:38
ns3::Ipv6ExtensionHeader::~Ipv6ExtensionHeader
~Ipv6ExtensionHeader() override
Destructor.
Definition
ipv6-extension-header.cc:45
ns3::Ipv6ExtensionHeader::SetNextHeader
void SetNextHeader(uint8_t nextHeader)
Set the "Next header" field.
Definition
ipv6-extension-header.cc:50
ns3::Ipv6ExtensionHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:102
ns3::Ipv6ExtensionHeader::GetNextHeader
uint8_t GetNextHeader() const
Get the next header.
Definition
ipv6-extension-header.cc:56
ns3::Ipv6ExtensionHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:92
ns3::Ipv6ExtensionHeader::m_length
uint8_t m_length
The "length" field.
Definition
ipv6-extension-header.h:107
ns3::Ipv6ExtensionHopByHopHeader
Header of IPv6 Extension "Hop by Hop".
Definition
ipv6-extension-header.h:211
ns3::Ipv6ExtensionHopByHopHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:270
ns3::Ipv6ExtensionHopByHopHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:222
ns3::Ipv6ExtensionHopByHopHeader::Ipv6ExtensionHopByHopHeader
Ipv6ExtensionHopByHopHeader()
Constructor.
Definition
ipv6-extension-header.cc:237
ns3::Ipv6ExtensionHopByHopHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:260
ns3::Ipv6ExtensionHopByHopHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:232
ns3::Ipv6ExtensionHopByHopHeader::~Ipv6ExtensionHopByHopHeader
~Ipv6ExtensionHopByHopHeader() override
Destructor.
Definition
ipv6-extension-header.cc:242
ns3::Ipv6ExtensionHopByHopHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:254
ns3::Ipv6ExtensionHopByHopHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:247
ns3::Ipv6ExtensionLooseRoutingHeader
Header of IPv6 Extension Routing : Type 0 (Loose Routing)
Definition
ipv6-extension-header.h:517
ns3::Ipv6ExtensionLooseRoutingHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:599
ns3::Ipv6ExtensionLooseRoutingHeader::Ipv6ExtensionLooseRoutingHeader
Ipv6ExtensionLooseRoutingHeader()
Constructor.
Definition
ipv6-extension-header.cc:558
ns3::Ipv6ExtensionLooseRoutingHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:543
ns3::Ipv6ExtensionLooseRoutingHeader::GetRoutersAddress
std::vector< Ipv6Address > GetRoutersAddress() const
Get the vector of routers' address.
Definition
ipv6-extension-header.cc:581
ns3::Ipv6ExtensionLooseRoutingHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:641
ns3::Ipv6ExtensionLooseRoutingHeader::SetRoutersAddress
void SetRoutersAddress(std::vector< Ipv6Address > routersAddress)
Set the vector of routers' address.
Definition
ipv6-extension-header.cc:575
ns3::Ipv6ExtensionLooseRoutingHeader::VectorIpv6Address_t
std::vector< Ipv6Address > VectorIpv6Address_t
A vector of IPv6 Address.
Definition
ipv6-extension-header.h:602
ns3::Ipv6ExtensionLooseRoutingHeader::m_routersAddress
VectorIpv6Address_t m_routersAddress
The vector of Routers' IPv6 Address.
Definition
ipv6-extension-header.h:607
ns3::Ipv6ExtensionLooseRoutingHeader::GetRouterAddress
Ipv6Address GetRouterAddress(uint8_t index) const
Get a Router IPv6 Address.
Definition
ipv6-extension-header.cc:593
ns3::Ipv6ExtensionLooseRoutingHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:553
ns3::Ipv6ExtensionLooseRoutingHeader::~Ipv6ExtensionLooseRoutingHeader
~Ipv6ExtensionLooseRoutingHeader() override
Destructor.
Definition
ipv6-extension-header.cc:563
ns3::Ipv6ExtensionLooseRoutingHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:614
ns3::Ipv6ExtensionLooseRoutingHeader::SetRouterAddress
void SetRouterAddress(uint8_t index, Ipv6Address addr)
Set a Router IPv6 Address.
Definition
ipv6-extension-header.cc:587
ns3::Ipv6ExtensionLooseRoutingHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:620
ns3::Ipv6ExtensionLooseRoutingHeader::SetNumberAddress
void SetNumberAddress(uint8_t n)
Set the number of routers' address.
Definition
ipv6-extension-header.cc:568
ns3::Ipv6ExtensionRoutingHeader
Header of IPv6 Extension Routing.
Definition
ipv6-extension-header.h:426
ns3::Ipv6ExtensionRoutingHeader::SetTypeRouting
void SetTypeRouting(uint8_t typeRouting)
Set the "Type of Routing" field.
Definition
ipv6-extension-header.cc:479
ns3::Ipv6ExtensionRoutingHeader::m_typeRouting
uint8_t m_typeRouting
Type of routing.
Definition
ipv6-extension-header.h:503
ns3::Ipv6ExtensionRoutingHeader::GetTypeRouting
uint8_t GetTypeRouting() const
Get the field "Type of Routing".
Definition
ipv6-extension-header.cc:485
ns3::Ipv6ExtensionRoutingHeader::GetSegmentsLeft
uint8_t GetSegmentsLeft() const
Get the field "Segments left".
Definition
ipv6-extension-header.cc:497
ns3::Ipv6ExtensionRoutingHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
ipv6-extension-header.cc:453
ns3::Ipv6ExtensionRoutingHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
ipv6-extension-header.cc:528
ns3::Ipv6ExtensionRoutingHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
ipv6-extension-header.cc:517
ns3::Ipv6ExtensionRoutingHeader::SetSegmentsLeft
void SetSegmentsLeft(uint8_t segmentsLeft)
Set the "Segments left" field.
Definition
ipv6-extension-header.cc:491
ns3::Ipv6ExtensionRoutingHeader::m_segmentsLeft
uint8_t m_segmentsLeft
Number of left segments.
Definition
ipv6-extension-header.h:508
ns3::Ipv6ExtensionRoutingHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
ipv6-extension-header.cc:503
ns3::Ipv6ExtensionRoutingHeader::Ipv6ExtensionRoutingHeader
Ipv6ExtensionRoutingHeader()
Constructor.
Definition
ipv6-extension-header.cc:468
ns3::Ipv6ExtensionRoutingHeader::~Ipv6ExtensionRoutingHeader
~Ipv6ExtensionRoutingHeader() override
Destructor.
Definition
ipv6-extension-header.cc:474
ns3::Ipv6ExtensionRoutingHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
ipv6-extension-header.cc:463
ns3::Ipv6ExtensionRoutingHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:511
ns3::Ipv6OptionHeader
Header for IPv6 Option.
Definition
ipv6-option-header.h:25
ns3::OptionField
Option field for an IPv6ExtensionHeader.
Definition
ipv6-extension-header.h:134
ns3::OptionField::GetSerializedSize
uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Definition
ipv6-extension-header.cc:140
ns3::OptionField::CalculatePad
uint32_t CalculatePad(Ipv6OptionHeader::Alignment alignment) const
Calculate padding.
Definition
ipv6-extension-header.cc:202
ns3::OptionField::Serialize
void Serialize(Buffer::Iterator start) const
Serialize all added options.
Definition
ipv6-extension-header.cc:146
ns3::OptionField::GetOptionsOffset
uint32_t GetOptionsOffset() const
Get the offset where the options begin, measured from the start of the extension header.
Definition
ipv6-extension-header.cc:208
ns3::OptionField::Deserialize
uint32_t Deserialize(Buffer::Iterator start, uint32_t length)
Deserialize the packet.
Definition
ipv6-extension-header.cc:165
ns3::OptionField::GetOptionBuffer
Buffer GetOptionBuffer()
Get the buffer.
Definition
ipv6-extension-header.cc:214
ns3::OptionField::m_optionData
Buffer m_optionData
Data payload.
Definition
ipv6-extension-header.h:197
ns3::OptionField::OptionField
OptionField(uint32_t optionsOffset)
Constructor.
Definition
ipv6-extension-header.cc:129
ns3::OptionField::~OptionField
~OptionField()
Destructor.
Definition
ipv6-extension-header.cc:135
ns3::OptionField::m_optionsOffset
uint32_t m_optionsOffset
Offset.
Definition
ipv6-extension-header.h:202
ns3::OptionField::AddOption
void AddOption(const Ipv6OptionHeader &option)
Serialize the option, prepending pad1 or padn option as necessary.
Definition
ipv6-extension-header.cc:177
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ipv6-option-header.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Ipv6OptionHeader::Alignment
represents the alignment requirements of an option header
Definition
ipv6-option-header.h:35
src
internet
model
ipv6-extension-header.h
Generated on Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0