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