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