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
dsr-option-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Yufei Cheng
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Yufei Cheng <yfcheng@ittc.ku.edu>
7
*
8
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
9
* ResiliNets Research Group https://resilinets.org/
10
* Information and Telecommunication Technology Center (ITTC)
11
* and Department of Electrical Engineering and Computer Science
12
* The University of Kansas Lawrence, KS USA.
13
*
14
* Work supported in part by NSF FIND (Future Internet Design) Program
15
* under grant CNS-0626918 (Postmodern Internet Architecture),
16
* NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
17
* US Department of Defense (DoD), and ITTC at The University of Kansas.
18
*/
19
20
#ifndef DSR_OPTION_HEADER_H
21
#define DSR_OPTION_HEADER_H
22
23
#include "ns3/header.h"
24
#include "ns3/ipv4-address.h"
25
#include "ns3/simulator.h"
26
27
#include <algorithm>
28
#include <ostream>
29
30
namespace
ns3
31
{
32
33
class
Time
;
34
35
namespace
dsr
36
{
37
/**
38
* @ingroup dsr
39
* @brief header for Dsr Options.
40
*/
41
class
DsrOptionHeader
:
public
Header
42
{
43
public
:
44
/**
45
* @struct Alignment
46
* @brief Represents the alignment requirements of an option header
47
*/
48
struct
Alignment
49
{
50
uint8_t
factor
;
/**< Factor */
51
uint8_t
offset
;
/**< Offset */
52
};
53
54
/**
55
* @brief Get the type identificator.
56
* @return type identificator
57
*/
58
static
TypeId
GetTypeId
();
59
/**
60
* @brief Get the instance type ID.
61
* @return instance type ID
62
*/
63
TypeId
GetInstanceTypeId
()
const override
;
64
/**
65
* @brief Constructor.
66
*/
67
DsrOptionHeader
();
68
/**
69
* @brief Destructor.
70
*/
71
~DsrOptionHeader
()
override
;
72
/**
73
* @brief Set the type of the option.
74
* @param type the type of the option
75
*/
76
void
SetType
(uint8_t type);
77
/**
78
* @brief Get the type of the option.
79
* @return the type of the option
80
*/
81
uint8_t
GetType
()
const
;
82
/**
83
* @brief Set the option length.
84
* @param length the option length
85
*/
86
void
SetLength
(uint8_t length);
87
/**
88
* @brief Get the option length.
89
* @return the option length
90
*/
91
uint8_t
GetLength
()
const
;
92
/**
93
* @brief Print some information about the packet.
94
* @param os output stream
95
*/
96
void
Print
(std::ostream& os)
const override
;
97
/**
98
* @brief Get the serialized size of the packet.
99
* @return size
100
*/
101
uint32_t
GetSerializedSize
()
const override
;
102
/**
103
* @brief Serialize the packet.
104
* @param start Buffer iterator
105
*/
106
void
Serialize
(
Buffer::Iterator
start)
const override
;
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
* @brief Get the Alignment requirement of this option header
115
* @return The required alignment
116
*
117
* Subclasses should only implement this method, if special alignment is
118
* required. Default is no alignment (1n+0).
119
*/
120
virtual
Alignment
GetAlignment
()
const
;
121
122
private
:
123
/**
124
* @brief The type of the option.
125
*/
126
uint8_t
m_type
;
127
/**
128
* @brief The option length.
129
*/
130
uint8_t
m_length
;
131
/**
132
* @brief The anonymous data of this option
133
*/
134
Buffer
m_data
;
135
};
136
137
/**
138
* @ingroup dsr
139
* @brief Header of Dsr Option Pad1
140
*/
141
class
DsrOptionPad1Header
:
public
DsrOptionHeader
142
{
143
public
:
144
/**
145
* @brief Get the type identificator.
146
* @return type identificator
147
*/
148
static
TypeId
GetTypeId
();
149
/**
150
* @brief Get the instance type ID.
151
* @return instance type ID
152
*/
153
TypeId
GetInstanceTypeId
()
const override
;
154
/**
155
* @brief Constructor.
156
*/
157
DsrOptionPad1Header
();
158
/**
159
* @brief Destructor.
160
*/
161
~DsrOptionPad1Header
()
override
;
162
/**
163
* @brief Print some information about the packet.
164
* @param os output stream
165
*/
166
void
Print
(std::ostream& os)
const override
;
167
/**
168
* @brief Get the serialized size of the packet.
169
* @return size
170
*/
171
uint32_t
GetSerializedSize
()
const override
;
172
/**
173
* @brief Serialize the packet.
174
* @param start Buffer iterator
175
*/
176
void
Serialize
(
Buffer::Iterator
start)
const override
;
177
/**
178
* @brief Deserialize the packet.
179
* @param start Buffer iterator
180
* @return size of the packet
181
*/
182
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
183
};
184
185
/**
186
* @ingroup dsr
187
* @brief Header of Dsr Option Padn
188
*/
189
class
DsrOptionPadnHeader
:
public
DsrOptionHeader
190
{
191
public
:
192
/**
193
* @brief Get the type identificator.
194
* @return type identificator
195
*/
196
static
TypeId
GetTypeId
();
197
/**
198
* @brief Get the instance type ID.
199
* @return instance type ID
200
*/
201
TypeId
GetInstanceTypeId
()
const override
;
202
/**
203
* @brief Constructor.
204
* @param pad Number of bytes to pad (>=2)
205
*/
206
DsrOptionPadnHeader
(
uint32_t
pad = 2);
207
/**
208
* @brief Destructor.
209
*/
210
~DsrOptionPadnHeader
()
override
;
211
/**
212
* @brief Print some information about the packet.
213
* @param os output stream
214
*/
215
void
Print
(std::ostream& os)
const override
;
216
/**
217
* @brief Get the serialized size of the packet.
218
* @return size
219
*/
220
uint32_t
GetSerializedSize
()
const override
;
221
/**
222
* @brief Serialize the packet.
223
* @param start Buffer iterator
224
*/
225
void
Serialize
(
Buffer::Iterator
start)
const override
;
226
/**
227
* @brief Deserialize the packet.
228
* @param start Buffer iterator
229
* @return size of the packet
230
*/
231
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
232
};
233
234
/**
235
* @ingroup dsr
236
* @brief Header of Dsr Option Route Request
237
*
238
* @verbatim
239
Route Request (RREQ) Message Format
240
241
| 0 | 1 | 2 | 3 |
242
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
243
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
244
| Option Type | Opt Data Len | Identification |
245
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
246
| Target Address |
247
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
248
| Address[1] |
249
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
250
| Address[2] |
251
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
252
| ... |
253
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
254
| Address[n] |
255
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
256
\endverbatim
257
*/
258
class
DsrOptionRreqHeader
:
public
DsrOptionHeader
259
{
260
public
:
261
/**
262
* @brief Get the type identificator.
263
* @return type identificator
264
*/
265
static
TypeId
GetTypeId
();
266
/**
267
* @brief Get the instance type ID.
268
* @return instance type ID
269
*/
270
TypeId
GetInstanceTypeId
()
const override
;
271
/**
272
* @brief Constructor.
273
*/
274
DsrOptionRreqHeader
();
275
/**
276
* @brief Destructor.
277
*/
278
~DsrOptionRreqHeader
()
override
;
279
/**
280
* @brief Set the number of ipv4 address.
281
* @param n the number of ipv4 address
282
*/
283
void
SetNumberAddress
(uint8_t n);
284
/**
285
* @brief Get the target ipv4 address.
286
* @return target the target packet
287
*/
288
Ipv4Address
GetTarget
();
289
/**
290
* @brief Set the target ipv4 address.
291
* @param target the target packet
292
*/
293
void
SetTarget
(
Ipv4Address
target);
294
/**
295
* @brief Set the vector of ipv4 address
296
* @param ipv4Address the vector of ipv4 address
297
*/
298
void
SetNodesAddress
(std::vector<Ipv4Address> ipv4Address);
299
/**
300
* @brief Get the vector of ipv4 address
301
* @return the vector of ipv4 address
302
*/
303
std::vector<Ipv4Address>
GetNodesAddresses
()
const
;
304
/**
305
* @brief Get the number of nodes
306
* @return the number of nodes
307
*/
308
uint32_t
GetNodesNumber
()
const
;
309
/**
310
* @brief Add one node address
311
* @param ipv4 The ip address to add
312
*/
313
void
AddNodeAddress
(
Ipv4Address
ipv4);
314
/**
315
* @brief Set a Node IPv4 Address.
316
* @param index the index of the IPv4 Address
317
* @param addr the new IPv4 Address
318
*/
319
void
SetNodeAddress
(uint8_t index,
Ipv4Address
addr);
320
/**
321
* @brief Get a Node IPv4 Address.
322
* @param index the index of the IPv4 Address
323
* @return the router IPv4 Address
324
*/
325
Ipv4Address
GetNodeAddress
(uint8_t index)
const
;
326
/**
327
* @brief Set the request id number.
328
* @param identification the identification number
329
*/
330
void
SetId
(uint16_t identification);
331
/**
332
* @brief Set the request id number.
333
* @return request id number
334
*/
335
uint16_t
GetId
()
const
;
336
/**
337
* @brief Print some information about the packet.
338
* @param os output stream
339
*/
340
void
Print
(std::ostream& os)
const override
;
341
/**
342
* @brief Get the serialized size of the packet.
343
* @return size
344
*/
345
uint32_t
GetSerializedSize
()
const override
;
346
/**
347
* @brief Serialize the packet.
348
* @param start Buffer iterator
349
*/
350
void
Serialize
(
Buffer::Iterator
start)
const override
;
351
/**
352
* @brief Deserialize the packet.
353
* @param start Buffer iterator
354
* @return size of the packet
355
*/
356
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
357
/**
358
* @brief Get the Alignment requirement of this option header
359
* @return The required alignment
360
*/
361
Alignment
GetAlignment
()
const override
;
362
363
private
:
364
/**
365
* @brief Identifier of the packet.
366
*/
367
uint16_t
m_identification
;
368
/**
369
* Ipv4 address of target node
370
*/
371
Ipv4Address
m_target
;
372
/**
373
* Ipv4 address to write when deserializing the packet
374
*/
375
Ipv4Address
m_address
;
376
/**
377
* @brief A vector of IPv4 Address.
378
*/
379
typedef
std::vector<Ipv4Address>
VectorIpv4Address_t
;
380
/**
381
* @brief The vector of Nodes' IPv4 Address.
382
*/
383
VectorIpv4Address_t
m_ipv4Address
;
384
};
385
386
/**
387
* @ingroup dsr
388
* @brief Header of Dsr Option Route Reply
389
*
390
* @verbatim
391
Standard Route Reply (RREP) Message Format
392
393
| 0 | 1 | 2 | 3 |
394
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
395
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
396
| Option Type | Opt Data Len |L| Reserved |
397
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
398
| Address[1] |
399
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
400
| Address[2] |
401
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
402
| ... |
403
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
404
| Address[n] |
405
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
406
\endverbatim
407
*
408
* The Route Reply header modified for ns-3 implementation:
409
*
410
* @verbatim
411
ns-3 Route Reply (RREP) Message Format
412
413
| 0 | 1 | 2 | 3 |
414
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
415
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
416
| Option Type | Opt Data Len |L| Reserved | Reserved |
417
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
418
| Address[1] |
419
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
420
| Address[2] |
421
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
422
| ... |
423
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
424
| Address[n] |
425
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
426
\endverbatim
427
*/
428
class
DsrOptionRrepHeader
:
public
DsrOptionHeader
429
{
430
public
:
431
/**
432
* @brief Get the type identificator.
433
* @return type identificator
434
*/
435
static
TypeId
GetTypeId
();
436
/**
437
* @brief Get the instance type ID.
438
* @return instance type ID
439
*/
440
TypeId
GetInstanceTypeId
()
const override
;
441
/**
442
* @brief Constructor.
443
*/
444
DsrOptionRrepHeader
();
445
/**
446
* @brief Destructor.
447
*/
448
~DsrOptionRrepHeader
()
override
;
449
/**
450
* @brief Set the number of ipv4 address.
451
* @param n the number of ipv4 address
452
*/
453
void
SetNumberAddress
(uint8_t n);
454
/**
455
* @brief Set the vector of ipv4 address
456
* @param ipv4Address the vector of ipv4 address
457
*/
458
void
SetNodesAddress
(std::vector<Ipv4Address> ipv4Address);
459
/**
460
* @brief Get the vector of ipv4 address
461
* @return the vector of ipv4 address
462
*/
463
std::vector<Ipv4Address>
GetNodesAddress
()
const
;
464
/**
465
* @brief Get the target node Ip address
466
* @param ipv4Address target address
467
* @return the target address
468
*/
469
Ipv4Address
GetTargetAddress
(std::vector<Ipv4Address> ipv4Address)
const
;
470
/**
471
* @brief Set a Node IPv4 Address.
472
* @param index the index of the IPv4 Address
473
* @param addr the new IPv4 Address
474
*/
475
void
SetNodeAddress
(uint8_t index,
Ipv4Address
addr);
476
/**
477
* @brief Get a Node IPv4 Address.
478
* @param index the index of the IPv4 Address
479
* @return the router IPv4 Address
480
*/
481
Ipv4Address
GetNodeAddress
(uint8_t index)
const
;
482
/**
483
* @brief Print some information about the packet.
484
* @param os output stream
485
*/
486
void
Print
(std::ostream& os)
const override
;
487
/**
488
* @brief Get the serialized size of the packet.
489
* @return size
490
*/
491
uint32_t
GetSerializedSize
()
const override
;
492
/**
493
* @brief Serialize the packet.
494
* @param start Buffer iterator
495
*/
496
void
Serialize
(
Buffer::Iterator
start)
const override
;
497
/**
498
* @brief Deserialize the packet.
499
* @param start Buffer iterator
500
* @return size of the packet
501
*/
502
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
503
/**
504
* @brief Get the Alignment requirement of this option header
505
* @return The required alignment
506
*/
507
Alignment
GetAlignment
()
const override
;
508
509
private
:
510
/**
511
* The Ip address to write to when deserialize the packet
512
*/
513
Ipv4Address
m_address
;
514
/**
515
* @brief typedef for a vector of IPv4 Addresses.
516
*/
517
typedef
std::vector<Ipv4Address>
VectorIpv4Address_t
;
518
/**
519
* @brief The vector of Nodes' IPv4 Address.
520
*/
521
VectorIpv4Address_t
m_ipv4Address
;
522
};
523
524
/**
525
* @ingroup dsr
526
* @brief Header of Dsr Option Source Route
527
*
528
* @verbatim
529
Source Route (SR) Message Format
530
531
| 0 | 1 | 2 | 3 |
532
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
533
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
534
| Option Type | Opt Data Len |F|L|Reservd|Salvage| Segs Left |
535
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
536
| Address[1] |
537
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
538
| Address[2] |
539
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
540
| ... |
541
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
542
| Address[n] |
543
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
544
\endverbatim
545
*/
546
class
DsrOptionSRHeader
:
public
DsrOptionHeader
547
{
548
public
:
549
/**
550
* @brief Get the type identificator.
551
* @return type identificator
552
*/
553
static
TypeId
GetTypeId
();
554
/**
555
* @brief Get the instance type ID.
556
* @return instance type ID
557
*/
558
TypeId
GetInstanceTypeId
()
const override
;
559
/**
560
* @brief Constructor.
561
*/
562
DsrOptionSRHeader
();
563
/**
564
* @brief Destructor.
565
*/
566
~DsrOptionSRHeader
()
override
;
567
/**
568
* @brief Set the number of segments left to send
569
* @param segmentsLeft The segments left
570
*/
571
void
SetSegmentsLeft
(uint8_t segmentsLeft);
572
/**
573
* @brief Get the number of segments left to send
574
* @return The segments left
575
*/
576
uint8_t
GetSegmentsLeft
()
const
;
577
/**
578
* @brief Set the number of ipv4 address.
579
* @param n the number of ipv4' address
580
*/
581
void
SetNumberAddress
(uint8_t n);
582
/**
583
* @brief Set the vector of ipv4 address
584
* @param ipv4Address the vector of ipv4 address
585
*/
586
void
SetNodesAddress
(std::vector<Ipv4Address> ipv4Address);
587
/**
588
* @brief Get the vector of ipv4 address
589
* @return the vector of ipv4 address
590
*/
591
std::vector<Ipv4Address>
GetNodesAddress
()
const
;
592
/**
593
* @brief Get the node list size which is the number of ip address of the route
594
* @return the node list size
595
*/
596
uint8_t
GetNodeListSize
()
const
;
597
/**
598
* @brief Set a Node IPv4 Address.
599
* @param index the index of the IPv4 Address
600
* @param addr the new IPv4 Address
601
*/
602
void
SetNodeAddress
(uint8_t index,
Ipv4Address
addr);
603
/**
604
* @brief Get a Node IPv4 Address.
605
* @param index the index of the IPv4 Address
606
* @return the router IPv4 Address
607
*/
608
Ipv4Address
GetNodeAddress
(uint8_t index)
const
;
609
/**
610
* @brief Set the salvage value for a packet
611
* @param salvage The salvage value of the packet
612
*/
613
void
SetSalvage
(uint8_t salvage);
614
/**
615
* @brief Get the salvage value for a packet
616
* @return The salvage value of the packet
617
*/
618
uint8_t
GetSalvage
()
const
;
619
/**
620
* @brief Print some information about the packet.
621
* @param os output stream
622
*/
623
void
Print
(std::ostream& os)
const override
;
624
/**
625
* @brief Get the serialized size of the packet.
626
* @return size
627
*/
628
uint32_t
GetSerializedSize
()
const override
;
629
/**
630
* @brief Serialize the packet.
631
* @param start Buffer iterator
632
*/
633
void
Serialize
(
Buffer::Iterator
start)
const override
;
634
/**
635
* @brief Deserialize the packet.
636
* @param start Buffer iterator
637
* @return size of the packet
638
*/
639
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
640
/**
641
* @brief Get the Alignment requirement of this option header
642
* @return The required alignment
643
*/
644
Alignment
GetAlignment
()
const override
;
645
646
/**
647
* TracedCallback signature for DsrOptionSrHeader.
648
*
649
* @param [in] header The DsrOptionsSRHeader
650
*/
651
typedef
void (*
TracedCallback
)(
const
DsrOptionSRHeader
& header);
652
653
private
:
654
/**
655
* @brief The ip address header deserialize to
656
*/
657
Ipv4Address
m_address
;
658
/**
659
* @brief Number of left segments.
660
*/
661
uint8_t
m_segmentsLeft
;
662
/**
663
* @brief Number of salvage times for a packet.
664
*/
665
uint8_t
m_salvage
;
666
/**
667
* @brief A vector of IPv4 Address.
668
*/
669
typedef
std::vector<Ipv4Address>
VectorIpv4Address_t
;
670
/**
671
* @brief The vector of Nodes' IPv4 Address.
672
*/
673
VectorIpv4Address_t
m_ipv4Address
;
674
};
675
676
/**
677
* @ingroup dsr
678
* @enum ErrorType
679
* @brief Error type used in several DSR Option Headers
680
*/
681
enum
ErrorType
682
{
683
NODE_UNREACHABLE
= 1,
// !< NODE_UNREACHABLE
684
FLOW_STATE_NOT_SUPPORTED
= 2,
// !< FLOW_STATE_NOT_SUPPORTED
685
OPTION_NOT_SUPPORTED
= 3,
// !< OPTION_NOT_SUPPORTED
686
};
687
688
/**
689
* @ingroup dsr
690
* @brief Header of Dsr Option Route Error
691
*
692
* @verbatim
693
Route Error (RERR) Message Format
694
695
| 0 | 1 | 2 | 3 |
696
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
697
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
698
| Option Type | Opt Data Len | Error Type |Reservd| Salvage|
699
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
700
| Error Source Address |
701
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
702
| Error Destination Address |
703
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
704
. .
705
. Type-Specific Information .
706
. .
707
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
708
\endverbatim
709
*
710
* The type-specific information field varies by type of error,
711
* as detailed in the derived classes.
712
*/
713
class
DsrOptionRerrHeader
:
public
DsrOptionHeader
714
{
715
public
:
716
/**
717
* @brief Get the type identificator.
718
* @return type identificator
719
*/
720
static
TypeId
GetTypeId
();
721
/**
722
* @brief Get the instance type ID.
723
* @return instance type ID
724
*/
725
TypeId
GetInstanceTypeId
()
const override
;
726
/**
727
* @brief Constructor.
728
*/
729
DsrOptionRerrHeader
();
730
/**
731
* @brief Destructor.
732
*/
733
~DsrOptionRerrHeader
()
override
;
734
/**
735
* @brief Set the route error type
736
* @param errorType The error type
737
*/
738
void
SetErrorType
(uint8_t errorType);
739
/**
740
* @brief Get the route error type
741
* @return The error type
742
*/
743
uint8_t
GetErrorType
()
const
;
744
/**
745
* @brief Set the route error source address
746
* @param errorSrcAddress The error source address
747
*/
748
virtual
void
SetErrorSrc
(
Ipv4Address
errorSrcAddress);
749
/**
750
* @brief Get the route error source address
751
* @return The error source address
752
*/
753
virtual
Ipv4Address
GetErrorSrc
()
const
;
754
/**
755
* @brief Set the salvage value of the packet
756
* @param salvage The salvage value of the packet
757
*/
758
virtual
void
SetSalvage
(uint8_t salvage);
759
/**
760
* @brief Get the salvage value of the packet
761
* @return The salvage value of the packet
762
*/
763
virtual
uint8_t
GetSalvage
()
const
;
764
/**
765
* @brief Set the error destination ip address
766
* @param errorDstAddress The error destination address
767
*/
768
virtual
void
SetErrorDst
(
Ipv4Address
errorDstAddress);
769
/**
770
* @brief Get the error destination ip address
771
* @return The error destination address
772
*/
773
virtual
Ipv4Address
GetErrorDst
()
const
;
774
/**
775
* @brief Print some information about the packet.
776
* @param os output stream
777
*/
778
void
Print
(std::ostream& os)
const override
;
779
/**
780
* @brief Get the serialized size of the packet.
781
* @return size
782
*/
783
uint32_t
GetSerializedSize
()
const override
;
784
/**
785
* @brief Serialize the packet.
786
* @param start Buffer iterator
787
*/
788
void
Serialize
(
Buffer::Iterator
start)
const override
;
789
/**
790
* @brief Deserialize the packet.
791
* @param start Buffer iterator
792
* @return size of the packet
793
*/
794
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
795
/**
796
* @brief Get the Alignment requirement of this option header
797
* @return The required alignment
798
*/
799
Alignment
GetAlignment
()
const override
;
800
801
private
:
802
/**
803
* @brief The error type or route error option
804
*/
805
uint8_t
m_errorType
;
806
/**
807
* @brief The salvage field
808
*/
809
uint8_t
m_salvage
;
810
/**
811
* @brief The specific error message length
812
*/
813
uint16_t
m_errorLength
;
814
/**
815
* @brief The error source address
816
*/
817
Ipv4Address
m_errorSrcAddress
;
818
/**
819
* @brief The error destination address
820
*/
821
Ipv4Address
m_errorDstAddress
;
822
/**
823
* @brief The anonymous data of this option
824
*/
825
Buffer
m_errorData
;
826
};
827
828
/**
829
* @ingroup dsr
830
* @brief Route Error (RERR) Unreachable node address option Message Format
831
*
832
* @verbatim
833
Route Error Unreachable type-specific info field
834
835
| 0 | 1 | 2 | 3 |
836
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
837
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
838
| Unreachable Node Address |
839
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
840
\endverbatim
841
*/
842
class
DsrOptionRerrUnreachHeader
:
public
DsrOptionRerrHeader
843
{
844
public
:
845
/**
846
* @brief Get the type identificator.
847
* @return type identificator
848
*/
849
static
TypeId
GetTypeId
();
850
/**
851
* @brief Get the instance type ID.
852
* @return instance type ID
853
*/
854
TypeId
GetInstanceTypeId
()
const override
;
855
/**
856
* @brief Constructor.
857
*/
858
DsrOptionRerrUnreachHeader
();
859
/**
860
* @brief Destructor.
861
*/
862
~DsrOptionRerrUnreachHeader
()
override
;
863
/**
864
* @brief Set the route error source address
865
* @param errorSrcAddress The error source address
866
*/
867
void
SetErrorSrc
(
Ipv4Address
errorSrcAddress)
override
;
868
/**
869
* @brief Get the route error source address
870
* @return The error source address
871
*/
872
Ipv4Address
GetErrorSrc
()
const override
;
873
/**
874
* @brief Set the salvage value of the packet
875
* @param salvage The salvage value of the packet
876
*/
877
void
SetSalvage
(uint8_t salvage)
override
;
878
/**
879
* @brief Get the salvage value of the packet
880
* @return The salvage value of the packet
881
*/
882
uint8_t
GetSalvage
()
const override
;
883
/**
884
* @brief Set the error destination ip address
885
* @param errorDstAddress The error destination address
886
*/
887
void
SetErrorDst
(
Ipv4Address
errorDstAddress)
override
;
888
/**
889
* @brief Get the error destination ip address
890
* @return The error destination address
891
*/
892
Ipv4Address
GetErrorDst
()
const override
;
893
/**
894
* @brief Set the unreachable node ip address
895
* @param unreachNode The unreachable ip address
896
*/
897
void
SetUnreachNode
(
Ipv4Address
unreachNode);
898
/**
899
* @brief Get the unreachable node ip address
900
* @return The unreachable ip address
901
*/
902
Ipv4Address
GetUnreachNode
()
const
;
903
/**
904
* @brief Set the unreachable node ip address
905
* @param originalDst The unreachable ip address
906
*/
907
void
SetOriginalDst
(
Ipv4Address
originalDst);
908
/**
909
* @brief Get the unreachable node ip address
910
* @return The unreachable ip address
911
*/
912
Ipv4Address
GetOriginalDst
()
const
;
913
/**
914
* @brief Print some information about the packet.
915
* @param os output stream
916
*/
917
void
Print
(std::ostream& os)
const override
;
918
/**
919
* @brief Get the serialized size of the packet.
920
* @return size
921
*/
922
uint32_t
GetSerializedSize
()
const override
;
923
/**
924
* @brief Serialize the packet.
925
* @param start Buffer iterator
926
*/
927
void
Serialize
(
Buffer::Iterator
start)
const override
;
928
/**
929
* @brief Deserialize the packet.
930
* @param start Buffer iterator
931
* @return size of the packet
932
*/
933
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
934
/**
935
* @brief Get the Alignment requirement of this option header
936
* @return The required alignment
937
*/
938
Alignment
GetAlignment
()
const override
;
939
940
private
:
941
/**
942
* @brief The error type or route error option
943
*/
944
uint8_t
m_errorType
;
945
/**
946
* @brief The salvage field
947
*/
948
uint8_t
m_salvage
;
949
/**
950
* @brief The error source address
951
*/
952
Ipv4Address
m_errorSrcAddress
;
953
/**
954
* @brief The error destination address
955
*/
956
Ipv4Address
m_errorDstAddress
;
957
/**
958
* @brief The unreachable node address
959
*/
960
Ipv4Address
m_unreachNode
;
961
/**
962
* @brief The original destination address
963
*/
964
Ipv4Address
m_originalDst
;
965
};
966
967
/**
968
* @ingroup dsr
969
* @brief Route Error (RERR) Unsupported option Message Format
970
*
971
* The type-specific info field of DsrOptionRerrHeader contains
972
*
973
* @verbatim
974
Route Error Unsupported type-specific info field
975
976
| 0 |
977
0 1 2 3 4 5 6 7
978
+-+-+-+-+-+-+-+-+
979
|Unsupported Opt|
980
+-+-+-+-+-+-+-+-+
981
\endverbatim
982
*/
983
class
DsrOptionRerrUnsupportedHeader
:
public
DsrOptionRerrHeader
984
{
985
public
:
986
/**
987
* @brief Get the type identificator.
988
* @return type identificator
989
*/
990
static
TypeId
GetTypeId
();
991
/**
992
* @brief Get the instance type ID.
993
* @return instance type ID
994
*/
995
TypeId
GetInstanceTypeId
()
const override
;
996
/**
997
* @brief Constructor.
998
*/
999
DsrOptionRerrUnsupportedHeader
();
1000
/**
1001
* @brief Destructor.
1002
*/
1003
~DsrOptionRerrUnsupportedHeader
()
override
;
1004
/**
1005
* @brief Set the route error source address
1006
* @param errorSrcAddress The error source address
1007
*/
1008
void
SetErrorSrc
(
Ipv4Address
errorSrcAddress)
override
;
1009
/**
1010
* @brief Get the route error source address
1011
* @return The error source address
1012
*/
1013
Ipv4Address
GetErrorSrc
()
const override
;
1014
/**
1015
* @brief Set the salvage value of the packet
1016
* @param salvage the salvage value
1017
*/
1018
void
SetSalvage
(uint8_t salvage)
override
;
1019
/**
1020
* @brief Get the salvage value of the packet
1021
* @return The salvage value of the packet
1022
*/
1023
uint8_t
GetSalvage
()
const override
;
1024
/**
1025
* @brief Set the error destination ip address
1026
* @param errorDstAddress The error destination address
1027
*/
1028
void
SetErrorDst
(
Ipv4Address
errorDstAddress)
override
;
1029
/**
1030
* @brief Get the error destination ip address
1031
* @return The error destination address
1032
*/
1033
Ipv4Address
GetErrorDst
()
const override
;
1034
/**
1035
* @brief Set the unsupported option type value
1036
* @param optionType The unsupported option type value
1037
*/
1038
void
SetUnsupported
(uint16_t optionType);
1039
/**
1040
* @brief Get the unsupported option type value
1041
* @return The unsupported option type value
1042
*/
1043
uint16_t
GetUnsupported
()
const
;
1044
/**
1045
* @brief Print some information about the packet.
1046
* @param os output stream
1047
*/
1048
void
Print
(std::ostream& os)
const override
;
1049
/**
1050
* @brief Get the serialized size of the packet.
1051
* @return size
1052
*/
1053
uint32_t
GetSerializedSize
()
const override
;
1054
/**
1055
* @brief Serialize the packet.
1056
* @param start Buffer iterator
1057
*/
1058
void
Serialize
(
Buffer::Iterator
start)
const override
;
1059
/**
1060
* @brief Deserialize the packet.
1061
* @param start Buffer iterator
1062
* @return size of the packet
1063
*/
1064
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
1065
/**
1066
* @brief Get the Alignment requirement of this option header
1067
* @return The required alignment
1068
*/
1069
Alignment
GetAlignment
()
const override
;
1070
1071
private
:
1072
/**
1073
* @brief The error type or route error option
1074
*/
1075
uint8_t
m_errorType
;
1076
/**
1077
* @brief The salvage field
1078
*/
1079
uint8_t
m_salvage
;
1080
/**
1081
* @brief The error source address
1082
*/
1083
Ipv4Address
m_errorSrcAddress
;
1084
/**
1085
* @brief The error destination address
1086
*/
1087
Ipv4Address
m_errorDstAddress
;
1088
/**
1089
* @brief The unsupported option
1090
*/
1091
uint16_t
m_unsupported
;
1092
};
1093
1094
/**
1095
* @ingroup dsr
1096
* @brief Header of Dsr Option ack request
1097
*
1098
* @verbatim
1099
Acknowledgement Request (ACK_RREQ) Message Format
1100
1101
| 0 | 1 | 2 | 3 |
1102
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
1103
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1104
| Option Type | Opt Data Len | Identification |
1105
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1106
\endverbatim
1107
*/
1108
class
DsrOptionAckReqHeader
:
public
DsrOptionHeader
1109
{
1110
public
:
1111
/**
1112
* @brief Get the type identificator.
1113
* @return type identificator
1114
*/
1115
static
TypeId
GetTypeId
();
1116
/**
1117
* @brief Get the instance type ID.
1118
* @return instance type ID
1119
*/
1120
TypeId
GetInstanceTypeId
()
const override
;
1121
/**
1122
* @brief Constructor.
1123
*/
1124
DsrOptionAckReqHeader
();
1125
/**
1126
* @brief Destructor.
1127
*/
1128
~DsrOptionAckReqHeader
()
override
;
1129
/**
1130
* @brief Set the Ack request id number.
1131
* @param identification the identification number
1132
*/
1133
void
SetAckId
(uint16_t identification);
1134
/**
1135
* @brief Set the Ack request id number.
1136
* @return request id number
1137
*/
1138
uint16_t
GetAckId
()
const
;
1139
/**
1140
* @brief Print some information about the packet.
1141
* @param os output stream
1142
*/
1143
void
Print
(std::ostream& os)
const override
;
1144
/**
1145
* @brief Get the serialized size of the packet.
1146
* @return size
1147
*/
1148
uint32_t
GetSerializedSize
()
const override
;
1149
/**
1150
* @brief Serialize the packet.
1151
* @param start Buffer iterator
1152
*/
1153
void
Serialize
(
Buffer::Iterator
start)
const override
;
1154
/**
1155
* @brief Deserialize the packet.
1156
* @param start Buffer iterator
1157
* @return size of the packet
1158
*/
1159
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
1160
/**
1161
* @brief Get the Alignment requirement of this option header
1162
* @return The required alignment
1163
*/
1164
Alignment
GetAlignment
()
const override
;
1165
1166
private
:
1167
/**
1168
* The identification field
1169
*/
1170
uint16_t
m_identification
;
1171
};
1172
1173
/**
1174
* @ingroup dsr
1175
* @brief Header of Dsr Option ack
1176
*
1177
* @verbatim
1178
Acknowledgement (ACK) Message Format
1179
1180
| 0 | 1 | 2 | 3 |
1181
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
1182
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1183
| Option Type | Opt Data Len | Identification |
1184
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1185
| ACK Source Address |
1186
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1187
| ACK Destination Address |
1188
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1189
\endverbatim
1190
*/
1191
class
DsrOptionAckHeader
:
public
DsrOptionHeader
1192
{
1193
public
:
1194
/**
1195
* @brief Get the type identificator.
1196
* @return type identificator
1197
*/
1198
static
TypeId
GetTypeId
();
1199
/**
1200
* @brief Get the instance type ID.
1201
* @return instance type ID
1202
*/
1203
TypeId
GetInstanceTypeId
()
const override
;
1204
/**
1205
* @brief Constructor.
1206
*/
1207
DsrOptionAckHeader
();
1208
/**
1209
* @brief Destructor.
1210
*/
1211
~DsrOptionAckHeader
()
override
;
1212
/**
1213
* @brief Set the Ack id number.
1214
* @param identification the identification number
1215
*/
1216
void
SetAckId
(uint16_t identification);
1217
/**
1218
* @brief Set the Ack id number.
1219
* @return request id number
1220
*/
1221
uint16_t
GetAckId
()
const
;
1222
/**
1223
* @brief Set Error source ip address.
1224
* @param realSrcAddress The real source address
1225
*/
1226
void
SetRealSrc
(
Ipv4Address
realSrcAddress);
1227
/**
1228
* @brief Get Error source ip address.
1229
* @return The real source address
1230
*/
1231
Ipv4Address
GetRealSrc
()
const
;
1232
/**
1233
* @brief Set Error source ip address.
1234
* @param realDstAddress The real dst address
1235
*/
1236
void
SetRealDst
(
Ipv4Address
realDstAddress);
1237
/**
1238
* @brief Get Error source ip address.
1239
* @return The real dst address
1240
*/
1241
Ipv4Address
GetRealDst
()
const
;
1242
/**
1243
* @brief Print some information about the packet.
1244
* @param os output stream
1245
*/
1246
void
Print
(std::ostream& os)
const override
;
1247
/**
1248
* @brief Get the serialized size of the packet.
1249
* @return size
1250
*/
1251
uint32_t
GetSerializedSize
()
const override
;
1252
/**
1253
* @brief Serialize the packet.
1254
* @param start Buffer iterator
1255
*/
1256
void
Serialize
(
Buffer::Iterator
start)
const override
;
1257
/**
1258
* @brief Deserialize the packet.
1259
* @param start Buffer iterator
1260
* @return size of the packet
1261
*/
1262
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
1263
/**
1264
* @brief Get the Alignment requirement of this option header
1265
* @return The required alignment
1266
*/
1267
Alignment
GetAlignment
()
const override
;
1268
1269
private
:
1270
/**
1271
* @brief Identification field
1272
*/
1273
uint16_t
m_identification
;
1274
/**
1275
* @brief Ack source address
1276
*/
1277
Ipv4Address
m_realSrcAddress
;
1278
/**
1279
* @brief Ack destination address
1280
*/
1281
Ipv4Address
m_realDstAddress
;
1282
};
1283
1284
[[maybe_unused]]
static
inline
std::ostream&
1285
operator<<
(std::ostream& os,
const
DsrOptionSRHeader
& sr)
1286
{
1287
sr.
Print
(os);
1288
return
os;
1289
}
1290
1291
}
// namespace dsr
1292
}
// namespace ns3
1293
1294
#endif
/* DSR_OPTION_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::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition
ipv4-address.h:31
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition
traced-callback.h:43
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::dsr::DsrOptionAckHeader
Header of Dsr Option ack.
Definition
dsr-option-header.h:1192
ns3::dsr::DsrOptionAckHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:1219
ns3::dsr::DsrOptionAckHeader::SetAckId
void SetAckId(uint16_t identification)
Set the Ack id number.
Definition
dsr-option-header.cc:1236
ns3::dsr::DsrOptionAckHeader::GetAckId
uint16_t GetAckId() const
Set the Ack id number.
Definition
dsr-option-header.cc:1242
ns3::dsr::DsrOptionAckHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:1298
ns3::dsr::DsrOptionAckHeader::m_identification
uint16_t m_identification
Identification field.
Definition
dsr-option-header.h:1273
ns3::dsr::DsrOptionAckHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:1209
ns3::dsr::DsrOptionAckHeader::SetRealSrc
void SetRealSrc(Ipv4Address realSrcAddress)
Set Error source ip address.
Definition
dsr-option-header.cc:1248
ns3::dsr::DsrOptionAckHeader::SetRealDst
void SetRealDst(Ipv4Address realDstAddress)
Set Error source ip address.
Definition
dsr-option-header.cc:1260
ns3::dsr::DsrOptionAckHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:1286
ns3::dsr::DsrOptionAckHeader::m_realDstAddress
Ipv4Address m_realDstAddress
Ack destination address.
Definition
dsr-option-header.h:1281
ns3::dsr::DsrOptionAckHeader::GetRealDst
Ipv4Address GetRealDst() const
Get Error source ip address.
Definition
dsr-option-header.cc:1266
ns3::dsr::DsrOptionAckHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:1312
ns3::dsr::DsrOptionAckHeader::DsrOptionAckHeader
DsrOptionAckHeader()
Constructor.
Definition
dsr-option-header.cc:1224
ns3::dsr::DsrOptionAckHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:1280
ns3::dsr::DsrOptionAckHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:1272
ns3::dsr::DsrOptionAckHeader::m_realSrcAddress
Ipv4Address m_realSrcAddress
Ack source address.
Definition
dsr-option-header.h:1277
ns3::dsr::DsrOptionAckHeader::GetRealSrc
Ipv4Address GetRealSrc() const
Get Error source ip address.
Definition
dsr-option-header.cc:1254
ns3::dsr::DsrOptionAckHeader::~DsrOptionAckHeader
~DsrOptionAckHeader() override
Destructor.
Definition
dsr-option-header.cc:1231
ns3::dsr::DsrOptionAckReqHeader
Header of Dsr Option ack request.
Definition
dsr-option-header.h:1109
ns3::dsr::DsrOptionAckReqHeader::~DsrOptionAckReqHeader
~DsrOptionAckReqHeader() override
Destructor.
Definition
dsr-option-header.cc:1148
ns3::dsr::DsrOptionAckReqHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:1178
ns3::dsr::DsrOptionAckReqHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:1165
ns3::dsr::DsrOptionAckReqHeader::DsrOptionAckReqHeader
DsrOptionAckReqHeader()
Constructor.
Definition
dsr-option-header.cc:1140
ns3::dsr::DsrOptionAckReqHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:1188
ns3::dsr::DsrOptionAckReqHeader::SetAckId
void SetAckId(uint16_t identification)
Set the Ack request id number.
Definition
dsr-option-header.cc:1153
ns3::dsr::DsrOptionAckReqHeader::m_identification
uint16_t m_identification
The identification field.
Definition
dsr-option-header.h:1170
ns3::dsr::DsrOptionAckReqHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:1172
ns3::dsr::DsrOptionAckReqHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:1200
ns3::dsr::DsrOptionAckReqHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:1135
ns3::dsr::DsrOptionAckReqHeader::GetAckId
uint16_t GetAckId() const
Set the Ack request id number.
Definition
dsr-option-header.cc:1159
ns3::dsr::DsrOptionAckReqHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:1125
ns3::dsr::DsrOptionHeader
header for Dsr Options.
Definition
dsr-option-header.h:42
ns3::dsr::DsrOptionHeader::GetAlignment
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:131
ns3::dsr::DsrOptionHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:41
ns3::dsr::DsrOptionHeader::m_data
Buffer m_data
The anonymous data of this option.
Definition
dsr-option-header.h:134
ns3::dsr::DsrOptionHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:113
ns3::dsr::DsrOptionHeader::GetType
uint8_t GetType() const
Get the type of the option.
Definition
dsr-option-header.cc:73
ns3::dsr::DsrOptionHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:103
ns3::dsr::DsrOptionHeader::~DsrOptionHeader
~DsrOptionHeader() override
Destructor.
Definition
dsr-option-header.cc:62
ns3::dsr::DsrOptionHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:51
ns3::dsr::DsrOptionHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:91
ns3::dsr::DsrOptionHeader::SetType
void SetType(uint8_t type)
Set the type of the option.
Definition
dsr-option-header.cc:67
ns3::dsr::DsrOptionHeader::m_length
uint8_t m_length
The option length.
Definition
dsr-option-header.h:130
ns3::dsr::DsrOptionHeader::m_type
uint8_t m_type
The type of the option.
Definition
dsr-option-header.h:126
ns3::dsr::DsrOptionHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:97
ns3::dsr::DsrOptionHeader::DsrOptionHeader
DsrOptionHeader()
Constructor.
Definition
dsr-option-header.cc:56
ns3::dsr::DsrOptionHeader::SetLength
void SetLength(uint8_t length)
Set the option length.
Definition
dsr-option-header.cc:79
ns3::dsr::DsrOptionHeader::GetLength
uint8_t GetLength() const
Get the option length.
Definition
dsr-option-header.cc:85
ns3::dsr::DsrOptionPad1Header
Header of Dsr Option Pad1.
Definition
dsr-option-header.h:142
ns3::dsr::DsrOptionPad1Header::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:185
ns3::dsr::DsrOptionPad1Header::~DsrOptionPad1Header
~DsrOptionPad1Header() override
Destructor.
Definition
dsr-option-header.cc:160
ns3::dsr::DsrOptionPad1Header::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:177
ns3::dsr::DsrOptionPad1Header::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:165
ns3::dsr::DsrOptionPad1Header::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:171
ns3::dsr::DsrOptionPad1Header::DsrOptionPad1Header
DsrOptionPad1Header()
Constructor.
Definition
dsr-option-header.cc:155
ns3::dsr::DsrOptionPad1Header::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:150
ns3::dsr::DsrOptionPad1Header::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:140
ns3::dsr::DsrOptionPadnHeader
Header of Dsr Option Padn.
Definition
dsr-option-header.h:190
ns3::dsr::DsrOptionPadnHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:250
ns3::dsr::DsrOptionPadnHeader::DsrOptionPadnHeader
DsrOptionPadnHeader(uint32_t pad=2)
Constructor.
Definition
dsr-option-header.cc:212
ns3::dsr::DsrOptionPadnHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:230
ns3::dsr::DsrOptionPadnHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:207
ns3::dsr::DsrOptionPadnHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:224
ns3::dsr::DsrOptionPadnHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:197
ns3::dsr::DsrOptionPadnHeader::~DsrOptionPadnHeader
~DsrOptionPadnHeader() override
Destructor.
Definition
dsr-option-header.cc:219
ns3::dsr::DsrOptionPadnHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:236
ns3::dsr::DsrOptionRerrHeader
Header of Dsr Option Route Error.
Definition
dsr-option-header.h:714
ns3::dsr::DsrOptionRerrHeader::GetErrorType
uint8_t GetErrorType() const
Get the route error type.
Definition
dsr-option-header.cc:750
ns3::dsr::DsrOptionRerrHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:820
ns3::dsr::DsrOptionRerrHeader::m_errorData
Buffer m_errorData
The anonymous data of this option.
Definition
dsr-option-header.h:825
ns3::dsr::DsrOptionRerrHeader::SetSalvage
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
Definition
dsr-option-header.cc:756
ns3::dsr::DsrOptionRerrHeader::GetErrorSrc
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
Definition
dsr-option-header.cc:774
ns3::dsr::DsrOptionRerrHeader::SetErrorType
void SetErrorType(uint8_t errorType)
Set the route error type.
Definition
dsr-option-header.cc:744
ns3::dsr::DsrOptionRerrHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:800
ns3::dsr::DsrOptionRerrHeader::m_errorSrcAddress
Ipv4Address m_errorSrcAddress
The error source address.
Definition
dsr-option-header.h:817
ns3::dsr::DsrOptionRerrHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:715
ns3::dsr::DsrOptionRerrHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:806
ns3::dsr::DsrOptionRerrHeader::m_salvage
uint8_t m_salvage
The salvage field.
Definition
dsr-option-header.h:809
ns3::dsr::DsrOptionRerrHeader::DsrOptionRerrHeader
DsrOptionRerrHeader()
Constructor.
Definition
dsr-option-header.cc:730
ns3::dsr::DsrOptionRerrHeader::~DsrOptionRerrHeader
~DsrOptionRerrHeader() override
Destructor.
Definition
dsr-option-header.cc:739
ns3::dsr::DsrOptionRerrHeader::SetErrorDst
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
Definition
dsr-option-header.cc:780
ns3::dsr::DsrOptionRerrHeader::GetErrorDst
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
Definition
dsr-option-header.cc:786
ns3::dsr::DsrOptionRerrHeader::m_errorDstAddress
Ipv4Address m_errorDstAddress
The error destination address.
Definition
dsr-option-header.h:821
ns3::dsr::DsrOptionRerrHeader::m_errorLength
uint16_t m_errorLength
The specific error message length.
Definition
dsr-option-header.h:813
ns3::dsr::DsrOptionRerrHeader::m_errorType
uint8_t m_errorType
The error type or route error option.
Definition
dsr-option-header.h:805
ns3::dsr::DsrOptionRerrHeader::GetSalvage
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
Definition
dsr-option-header.cc:762
ns3::dsr::DsrOptionRerrHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:842
ns3::dsr::DsrOptionRerrHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:792
ns3::dsr::DsrOptionRerrHeader::SetErrorSrc
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
Definition
dsr-option-header.cc:768
ns3::dsr::DsrOptionRerrHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:725
ns3::dsr::DsrOptionRerrUnreachHeader
Route Error (RERR) Unreachable node address option Message Format.
Definition
dsr-option-header.h:843
ns3::dsr::DsrOptionRerrUnreachHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:861
ns3::dsr::DsrOptionRerrUnreachHeader::SetOriginalDst
void SetOriginalDst(Ipv4Address originalDst)
Set the unreachable node ip address.
Definition
dsr-option-header.cc:927
ns3::dsr::DsrOptionRerrUnreachHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:954
ns3::dsr::DsrOptionRerrUnreachHeader::GetErrorSrc
Ipv4Address GetErrorSrc() const override
Get the route error source address.
Definition
dsr-option-header.cc:897
ns3::dsr::DsrOptionRerrUnreachHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:851
ns3::dsr::DsrOptionRerrUnreachHeader::SetErrorDst
void SetErrorDst(Ipv4Address errorDstAddress) override
Set the error destination ip address.
Definition
dsr-option-header.cc:903
ns3::dsr::DsrOptionRerrUnreachHeader::SetErrorSrc
void SetErrorSrc(Ipv4Address errorSrcAddress) override
Set the route error source address.
Definition
dsr-option-header.cc:891
ns3::dsr::DsrOptionRerrUnreachHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:948
ns3::dsr::DsrOptionRerrUnreachHeader::GetSalvage
uint8_t GetSalvage() const override
Get the salvage value of the packet.
Definition
dsr-option-header.cc:885
ns3::dsr::DsrOptionRerrUnreachHeader::m_unreachNode
Ipv4Address m_unreachNode
The unreachable node address.
Definition
dsr-option-header.h:960
ns3::dsr::DsrOptionRerrUnreachHeader::GetOriginalDst
Ipv4Address GetOriginalDst() const
Get the unreachable node ip address.
Definition
dsr-option-header.cc:933
ns3::dsr::DsrOptionRerrUnreachHeader::~DsrOptionRerrUnreachHeader
~DsrOptionRerrUnreachHeader() override
Destructor.
Definition
dsr-option-header.cc:874
ns3::dsr::DsrOptionRerrUnreachHeader::DsrOptionRerrUnreachHeader
DsrOptionRerrUnreachHeader()
Constructor.
Definition
dsr-option-header.cc:866
ns3::dsr::DsrOptionRerrUnreachHeader::SetUnreachNode
void SetUnreachNode(Ipv4Address unreachNode)
Set the unreachable node ip address.
Definition
dsr-option-header.cc:915
ns3::dsr::DsrOptionRerrUnreachHeader::SetSalvage
void SetSalvage(uint8_t salvage) override
Set the salvage value of the packet.
Definition
dsr-option-header.cc:879
ns3::dsr::DsrOptionRerrUnreachHeader::m_errorType
uint8_t m_errorType
The error type or route error option.
Definition
dsr-option-header.h:944
ns3::dsr::DsrOptionRerrUnreachHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:986
ns3::dsr::DsrOptionRerrUnreachHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:939
ns3::dsr::DsrOptionRerrUnreachHeader::m_errorSrcAddress
Ipv4Address m_errorSrcAddress
The error source address.
Definition
dsr-option-header.h:952
ns3::dsr::DsrOptionRerrUnreachHeader::m_salvage
uint8_t m_salvage
The salvage field.
Definition
dsr-option-header.h:948
ns3::dsr::DsrOptionRerrUnreachHeader::m_originalDst
Ipv4Address m_originalDst
The original destination address.
Definition
dsr-option-header.h:964
ns3::dsr::DsrOptionRerrUnreachHeader::m_errorDstAddress
Ipv4Address m_errorDstAddress
The error destination address.
Definition
dsr-option-header.h:956
ns3::dsr::DsrOptionRerrUnreachHeader::GetUnreachNode
Ipv4Address GetUnreachNode() const
Get the unreachable node ip address.
Definition
dsr-option-header.cc:921
ns3::dsr::DsrOptionRerrUnreachHeader::GetErrorDst
Ipv4Address GetErrorDst() const override
Get the error destination ip address.
Definition
dsr-option-header.cc:909
ns3::dsr::DsrOptionRerrUnreachHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:969
ns3::dsr::DsrOptionRerrUnsupportedHeader
Route Error (RERR) Unsupported option Message Format.
Definition
dsr-option-header.h:984
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetErrorDst
Ipv4Address GetErrorDst() const override
Get the error destination ip address.
Definition
dsr-option-header.cc:1053
ns3::dsr::DsrOptionRerrUnsupportedHeader::SetErrorSrc
void SetErrorSrc(Ipv4Address errorSrcAddress) override
Set the route error source address.
Definition
dsr-option-header.cc:1035
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetUnsupported
uint16_t GetUnsupported() const
Get the unsupported option type value.
Definition
dsr-option-header.cc:1065
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:995
ns3::dsr::DsrOptionRerrUnsupportedHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:1086
ns3::dsr::DsrOptionRerrUnsupportedHeader::m_errorType
uint8_t m_errorType
The error type or route error option.
Definition
dsr-option-header.h:1075
ns3::dsr::DsrOptionRerrUnsupportedHeader::SetSalvage
void SetSalvage(uint8_t salvage) override
Set the salvage value of the packet.
Definition
dsr-option-header.cc:1023
ns3::dsr::DsrOptionRerrUnsupportedHeader::m_errorDstAddress
Ipv4Address m_errorDstAddress
The error destination address.
Definition
dsr-option-header.h:1087
ns3::dsr::DsrOptionRerrUnsupportedHeader::~DsrOptionRerrUnsupportedHeader
~DsrOptionRerrUnsupportedHeader() override
Destructor.
Definition
dsr-option-header.cc:1018
ns3::dsr::DsrOptionRerrUnsupportedHeader::SetUnsupported
void SetUnsupported(uint16_t optionType)
Set the unsupported option type value.
Definition
dsr-option-header.cc:1059
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:1080
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:1005
ns3::dsr::DsrOptionRerrUnsupportedHeader::m_salvage
uint8_t m_salvage
The salvage field.
Definition
dsr-option-header.h:1079
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:1116
ns3::dsr::DsrOptionRerrUnsupportedHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:1100
ns3::dsr::DsrOptionRerrUnsupportedHeader::SetErrorDst
void SetErrorDst(Ipv4Address errorDstAddress) override
Set the error destination ip address.
Definition
dsr-option-header.cc:1047
ns3::dsr::DsrOptionRerrUnsupportedHeader::DsrOptionRerrUnsupportedHeader
DsrOptionRerrUnsupportedHeader()
Constructor.
Definition
dsr-option-header.cc:1010
ns3::dsr::DsrOptionRerrUnsupportedHeader::m_errorSrcAddress
Ipv4Address m_errorSrcAddress
The error source address.
Definition
dsr-option-header.h:1083
ns3::dsr::DsrOptionRerrUnsupportedHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:1071
ns3::dsr::DsrOptionRerrUnsupportedHeader::m_unsupported
uint16_t m_unsupported
The unsupported option.
Definition
dsr-option-header.h:1091
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetErrorSrc
Ipv4Address GetErrorSrc() const override
Get the route error source address.
Definition
dsr-option-header.cc:1041
ns3::dsr::DsrOptionRerrUnsupportedHeader::GetSalvage
uint8_t GetSalvage() const override
Get the salvage value of the packet.
Definition
dsr-option-header.cc:1029
ns3::dsr::DsrOptionRrepHeader
Header of Dsr Option Route Reply.
Definition
dsr-option-header.h:429
ns3::dsr::DsrOptionRrepHeader::GetTargetAddress
Ipv4Address GetTargetAddress(std::vector< Ipv4Address > ipv4Address) const
Get the target node Ip address.
Definition
dsr-option-header.cc:485
ns3::dsr::DsrOptionRrepHeader::DsrOptionRrepHeader
DsrOptionRrepHeader()
Constructor.
Definition
dsr-option-header.cc:441
ns3::dsr::DsrOptionRrepHeader::m_address
Ipv4Address m_address
The Ip address to write to when deserialize the packet.
Definition
dsr-option-header.h:513
ns3::dsr::DsrOptionRrepHeader::SetNodeAddress
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
Definition
dsr-option-header.cc:473
ns3::dsr::DsrOptionRrepHeader::SetNumberAddress
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
Definition
dsr-option-header.cc:453
ns3::dsr::DsrOptionRrepHeader::GetNodesAddress
std::vector< Ipv4Address > GetNodesAddress() const
Get the vector of ipv4 address.
Definition
dsr-option-header.cc:467
ns3::dsr::DsrOptionRrepHeader::~DsrOptionRrepHeader
~DsrOptionRrepHeader() override
Destructor.
Definition
dsr-option-header.cc:448
ns3::dsr::DsrOptionRrepHeader::m_ipv4Address
VectorIpv4Address_t m_ipv4Address
The vector of Nodes' IPv4 Address.
Definition
dsr-option-header.h:521
ns3::dsr::DsrOptionRrepHeader::GetNodeAddress
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
Definition
dsr-option-header.cc:479
ns3::dsr::DsrOptionRrepHeader::VectorIpv4Address_t
std::vector< Ipv4Address > VectorIpv4Address_t
typedef for a vector of IPv4 Addresses.
Definition
dsr-option-header.h:517
ns3::dsr::DsrOptionRrepHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:426
ns3::dsr::DsrOptionRrepHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:549
ns3::dsr::DsrOptionRrepHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:528
ns3::dsr::DsrOptionRrepHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:436
ns3::dsr::DsrOptionRrepHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:510
ns3::dsr::DsrOptionRrepHeader::SetNodesAddress
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
Definition
dsr-option-header.cc:460
ns3::dsr::DsrOptionRrepHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:504
ns3::dsr::DsrOptionRrepHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:491
ns3::dsr::DsrOptionRreqHeader
Header of Dsr Option Route Request.
Definition
dsr-option-header.h:259
ns3::dsr::DsrOptionRreqHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:263
ns3::dsr::DsrOptionRreqHeader::SetNodesAddress
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
Definition
dsr-option-header.cc:316
ns3::dsr::DsrOptionRreqHeader::m_target
Ipv4Address m_target
Ipv4 address of target node.
Definition
dsr-option-header.h:371
ns3::dsr::DsrOptionRreqHeader::SetNumberAddress
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
Definition
dsr-option-header.cc:290
ns3::dsr::DsrOptionRreqHeader::m_address
Ipv4Address m_address
Ipv4 address to write when deserializing the packet.
Definition
dsr-option-header.h:375
ns3::dsr::DsrOptionRreqHeader::SetNodeAddress
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
Definition
dsr-option-header.cc:335
ns3::dsr::DsrOptionRreqHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:273
ns3::dsr::DsrOptionRreqHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:378
ns3::dsr::DsrOptionRreqHeader::~DsrOptionRreqHeader
~DsrOptionRreqHeader() override
Destructor.
Definition
dsr-option-header.cc:285
ns3::dsr::DsrOptionRreqHeader::GetNodeAddress
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
Definition
dsr-option-header.cc:341
ns3::dsr::DsrOptionRreqHeader::VectorIpv4Address_t
std::vector< Ipv4Address > VectorIpv4Address_t
A vector of IPv4 Address.
Definition
dsr-option-header.h:379
ns3::dsr::DsrOptionRreqHeader::m_identification
uint16_t m_identification
Identifier of the packet.
Definition
dsr-option-header.h:367
ns3::dsr::DsrOptionRreqHeader::SetTarget
void SetTarget(Ipv4Address target)
Set the target ipv4 address.
Definition
dsr-option-header.cc:303
ns3::dsr::DsrOptionRreqHeader::GetTarget
Ipv4Address GetTarget()
Get the target ipv4 address.
Definition
dsr-option-header.cc:297
ns3::dsr::DsrOptionRreqHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:417
ns3::dsr::DsrOptionRreqHeader::DsrOptionRreqHeader
DsrOptionRreqHeader()
Constructor.
Definition
dsr-option-header.cc:278
ns3::dsr::DsrOptionRreqHeader::GetNodesAddresses
std::vector< Ipv4Address > GetNodesAddresses() const
Get the vector of ipv4 address.
Definition
dsr-option-header.cc:323
ns3::dsr::DsrOptionRreqHeader::m_ipv4Address
VectorIpv4Address_t m_ipv4Address
The vector of Nodes' IPv4 Address.
Definition
dsr-option-header.h:383
ns3::dsr::DsrOptionRreqHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:359
ns3::dsr::DsrOptionRreqHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:372
ns3::dsr::DsrOptionRreqHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:396
ns3::dsr::DsrOptionRreqHeader::GetNodesNumber
uint32_t GetNodesNumber() const
Get the number of nodes.
Definition
dsr-option-header.cc:329
ns3::dsr::DsrOptionRreqHeader::AddNodeAddress
void AddNodeAddress(Ipv4Address ipv4)
Add one node address.
Definition
dsr-option-header.cc:309
ns3::dsr::DsrOptionRreqHeader::GetId
uint16_t GetId() const
Set the request id number.
Definition
dsr-option-header.cc:353
ns3::dsr::DsrOptionRreqHeader::SetId
void SetId(uint16_t identification)
Set the request id number.
Definition
dsr-option-header.cc:347
ns3::dsr::DsrOptionSRHeader
Header of Dsr Option Source Route.
Definition
dsr-option-header.h:547
ns3::dsr::DsrOptionSRHeader::GetNodeAddress
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
Definition
dsr-option-header.cc:636
ns3::dsr::DsrOptionSRHeader::m_segmentsLeft
uint8_t m_segmentsLeft
Number of left segments.
Definition
dsr-option-header.h:661
ns3::dsr::DsrOptionSRHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition
dsr-option-header.cc:667
ns3::dsr::DsrOptionSRHeader::GetNodesAddress
std::vector< Ipv4Address > GetNodesAddress() const
Get the vector of ipv4 address.
Definition
dsr-option-header.cc:624
ns3::dsr::DsrOptionSRHeader::m_address
Ipv4Address m_address
The ip address header deserialize to.
Definition
dsr-option-header.h:657
ns3::dsr::DsrOptionSRHeader::SetNumberAddress
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
Definition
dsr-option-header.cc:610
ns3::dsr::DsrOptionSRHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition
dsr-option-header.cc:558
ns3::dsr::DsrOptionSRHeader::SetSalvage
void SetSalvage(uint8_t salvage)
Set the salvage value for a packet.
Definition
dsr-option-header.cc:598
ns3::dsr::DsrOptionSRHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition
dsr-option-header.cc:648
ns3::dsr::DsrOptionSRHeader::m_ipv4Address
VectorIpv4Address_t m_ipv4Address
The vector of Nodes' IPv4 Address.
Definition
dsr-option-header.h:673
ns3::dsr::DsrOptionSRHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition
dsr-option-header.cc:661
ns3::dsr::DsrOptionSRHeader::SetNodeAddress
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
Definition
dsr-option-header.cc:630
ns3::dsr::DsrOptionSRHeader::SetSegmentsLeft
void SetSegmentsLeft(uint8_t segmentsLeft)
Set the number of segments left to send.
Definition
dsr-option-header.cc:586
ns3::dsr::DsrOptionSRHeader::VectorIpv4Address_t
std::vector< Ipv4Address > VectorIpv4Address_t
A vector of IPv4 Address.
Definition
dsr-option-header.h:669
ns3::dsr::DsrOptionSRHeader::GetSalvage
uint8_t GetSalvage() const
Get the salvage value for a packet.
Definition
dsr-option-header.cc:604
ns3::dsr::DsrOptionSRHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the packet.
Definition
dsr-option-header.cc:685
ns3::dsr::DsrOptionSRHeader::GetNodeListSize
uint8_t GetNodeListSize() const
Get the node list size which is the number of ip address of the route.
Definition
dsr-option-header.cc:642
ns3::dsr::DsrOptionSRHeader::m_salvage
uint8_t m_salvage
Number of salvage times for a packet.
Definition
dsr-option-header.h:665
ns3::dsr::DsrOptionSRHeader::DsrOptionSRHeader
DsrOptionSRHeader()
Constructor.
Definition
dsr-option-header.cc:573
ns3::dsr::DsrOptionSRHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition
dsr-option-header.cc:706
ns3::dsr::DsrOptionSRHeader::SetNodesAddress
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
Definition
dsr-option-header.cc:617
ns3::dsr::DsrOptionSRHeader::GetSegmentsLeft
uint8_t GetSegmentsLeft() const
Get the number of segments left to send.
Definition
dsr-option-header.cc:592
ns3::dsr::DsrOptionSRHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition
dsr-option-header.cc:568
ns3::dsr::DsrOptionSRHeader::~DsrOptionSRHeader
~DsrOptionSRHeader() override
Destructor.
Definition
dsr-option-header.cc:581
uint32_t
ns3::dsr::ErrorType
ErrorType
Error type used in several DSR Option Headers.
Definition
dsr-option-header.h:682
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition
nstime.h:864
ns3::dsr::operator<<
static std::ostream & operator<<(std::ostream &os, const DsrRoutingHeader &dsr)
Definition
dsr-fs-header.h:312
ns3::dsr::FLOW_STATE_NOT_SUPPORTED
@ FLOW_STATE_NOT_SUPPORTED
Definition
dsr-option-header.h:684
ns3::dsr::NODE_UNREACHABLE
@ NODE_UNREACHABLE
Definition
dsr-option-header.h:683
ns3::dsr::OPTION_NOT_SUPPORTED
@ OPTION_NOT_SUPPORTED
Definition
dsr-option-header.h:685
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::dsr::DsrOptionHeader::Alignment
Represents the alignment requirements of an option header.
Definition
dsr-option-header.h:49
ns3::dsr::DsrOptionHeader::Alignment::factor
uint8_t factor
Factor.
Definition
dsr-option-header.h:50
ns3::dsr::DsrOptionHeader::Alignment::offset
uint8_t offset
Offset.
Definition
dsr-option-header.h:51
src
dsr
model
dsr-option-header.h
Generated on Fri Dec 13 2024 18:20:39 for ns-3 by
1.11.0