A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
aodv-packet.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
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
* Based on
18
* NS-2 AODV model developed by the CMU/MONARCH group and optimized and
19
* tuned by Samir Das and Mahesh Marina, University of Cincinnati;
20
*
21
* AODV-UU implementation by Erik Nordström of Uppsala University
22
* https://web.archive.org/web/20100527072022/http://core.it.uu.se/core/index.php/AODV-UU
23
*
24
* Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
25
* Pavel Boyko <boyko@iitp.ru>
26
*/
27
#ifndef AODVPACKET_H
28
#define AODVPACKET_H
29
30
#include "ns3/enum.h"
31
#include "ns3/header.h"
32
#include "ns3/ipv4-address.h"
33
#include "ns3/nstime.h"
34
35
#include <iostream>
36
#include <map>
37
38
namespace
ns3
39
{
40
namespace
aodv
41
{
42
47
enum
MessageType
48
{
49
AODVTYPE_RREQ
= 1,
50
AODVTYPE_RREP
= 2,
51
AODVTYPE_RERR
= 3,
52
AODVTYPE_RREP_ACK
= 4
53
};
54
59
class
TypeHeader
:
public
Header
60
{
61
public
:
66
TypeHeader
(
MessageType
t =
AODVTYPE_RREQ
);
67
72
static
TypeId
GetTypeId
();
73
TypeId
GetInstanceTypeId
()
const override
;
74
uint32_t
GetSerializedSize
()
const override
;
75
void
Serialize
(
Buffer::Iterator
start
)
const override
;
76
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
77
void
Print
(std::ostream& os)
const override
;
78
82
MessageType
Get
()
const
83
{
84
return
m_type
;
85
}
86
91
bool
IsValid
()
const
92
{
93
return
m_valid
;
94
}
95
101
bool
operator==
(
const
TypeHeader
& o)
const
;
102
103
private
:
104
MessageType
m_type
;
105
bool
m_valid
;
106
};
107
113
std::ostream&
operator<<
(std::ostream& os,
const
TypeHeader
& h);
114
136
class
RreqHeader
:
public
Header
137
{
138
public
:
151
RreqHeader
(uint8_t flags = 0,
152
uint8_t reserved = 0,
153
uint8_t hopCount = 0,
154
uint32_t
requestID = 0,
155
Ipv4Address
dst =
Ipv4Address
(),
156
uint32_t
dstSeqNo = 0,
157
Ipv4Address
origin =
Ipv4Address
(),
158
uint32_t
originSeqNo = 0);
159
164
static
TypeId
GetTypeId
();
165
TypeId
GetInstanceTypeId
()
const override
;
166
uint32_t
GetSerializedSize
()
const override
;
167
void
Serialize
(
Buffer::Iterator
start
)
const override
;
168
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
169
void
Print
(std::ostream& os)
const override
;
170
171
// Fields
176
void
SetHopCount
(uint8_t count)
177
{
178
m_hopCount
= count;
179
}
180
185
uint8_t
GetHopCount
()
const
186
{
187
return
m_hopCount
;
188
}
189
194
void
SetId
(
uint32_t
id
)
195
{
196
m_requestID
= id;
197
}
198
203
uint32_t
GetId
()
const
204
{
205
return
m_requestID
;
206
}
207
212
void
SetDst
(
Ipv4Address
a)
213
{
214
m_dst
= a;
215
}
216
221
Ipv4Address
GetDst
()
const
222
{
223
return
m_dst
;
224
}
225
230
void
SetDstSeqno
(
uint32_t
s)
231
{
232
m_dstSeqNo
= s;
233
}
234
239
uint32_t
GetDstSeqno
()
const
240
{
241
return
m_dstSeqNo
;
242
}
243
248
void
SetOrigin
(
Ipv4Address
a)
249
{
250
m_origin
= a;
251
}
252
257
Ipv4Address
GetOrigin
()
const
258
{
259
return
m_origin
;
260
}
261
266
void
SetOriginSeqno
(
uint32_t
s)
267
{
268
m_originSeqNo
= s;
269
}
270
275
uint32_t
GetOriginSeqno
()
const
276
{
277
return
m_originSeqNo
;
278
}
279
280
// Flags
285
void
SetGratuitousRrep
(
bool
f
);
290
bool
GetGratuitousRrep
()
const
;
295
void
SetDestinationOnly
(
bool
f
);
300
bool
GetDestinationOnly
()
const
;
305
void
SetUnknownSeqno
(
bool
f
);
310
bool
GetUnknownSeqno
()
const
;
311
317
bool
operator==
(
const
RreqHeader
& o)
const
;
318
319
private
:
320
uint8_t
m_flags
;
321
uint8_t
m_reserved
;
322
uint8_t
m_hopCount
;
323
uint32_t
m_requestID
;
324
Ipv4Address
m_dst
;
325
uint32_t
m_dstSeqNo
;
326
Ipv4Address
m_origin
;
327
uint32_t
m_originSeqNo
;
328
};
329
335
std::ostream&
operator<<
(std::ostream& os,
const
RreqHeader
&);
336
356
class
RrepHeader
:
public
Header
357
{
358
public
:
369
RrepHeader
(uint8_t prefixSize = 0,
370
uint8_t hopCount = 0,
371
Ipv4Address
dst =
Ipv4Address
(),
372
uint32_t
dstSeqNo = 0,
373
Ipv4Address
origin =
Ipv4Address
(),
374
Time
lifetime =
MilliSeconds
(0));
379
static
TypeId
GetTypeId
();
380
TypeId
GetInstanceTypeId
()
const override
;
381
uint32_t
GetSerializedSize
()
const override
;
382
void
Serialize
(
Buffer::Iterator
start
)
const override
;
383
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
384
void
Print
(std::ostream& os)
const override
;
385
386
// Fields
391
void
SetHopCount
(uint8_t count)
392
{
393
m_hopCount
= count;
394
}
395
400
uint8_t
GetHopCount
()
const
401
{
402
return
m_hopCount
;
403
}
404
409
void
SetDst
(
Ipv4Address
a)
410
{
411
m_dst
= a;
412
}
413
418
Ipv4Address
GetDst
()
const
419
{
420
return
m_dst
;
421
}
422
427
void
SetDstSeqno
(
uint32_t
s)
428
{
429
m_dstSeqNo
= s;
430
}
431
436
uint32_t
GetDstSeqno
()
const
437
{
438
return
m_dstSeqNo
;
439
}
440
445
void
SetOrigin
(
Ipv4Address
a)
446
{
447
m_origin
= a;
448
}
449
454
Ipv4Address
GetOrigin
()
const
455
{
456
return
m_origin
;
457
}
458
463
void
SetLifeTime
(
Time
t);
468
Time
GetLifeTime
()
const
;
469
470
// Flags
475
void
SetAckRequired
(
bool
f
);
480
bool
GetAckRequired
()
const
;
485
void
SetPrefixSize
(uint8_t sz);
490
uint8_t
GetPrefixSize
()
const
;
491
499
void
SetHello
(
Ipv4Address
src,
uint32_t
srcSeqNo,
Time
lifetime);
500
506
bool
operator==
(
const
RrepHeader
& o)
const
;
507
508
private
:
509
uint8_t
m_flags
;
510
uint8_t
m_prefixSize
;
511
uint8_t
m_hopCount
;
512
Ipv4Address
m_dst
;
513
uint32_t
m_dstSeqNo
;
514
Ipv4Address
m_origin
;
515
uint32_t
m_lifeTime
;
516
};
517
523
std::ostream&
operator<<
(std::ostream& os,
const
RrepHeader
&);
524
536
class
RrepAckHeader
:
public
Header
537
{
538
public
:
540
RrepAckHeader
();
541
546
static
TypeId
GetTypeId
();
547
TypeId
GetInstanceTypeId
()
const override
;
548
uint32_t
GetSerializedSize
()
const override
;
549
void
Serialize
(
Buffer::Iterator
start
)
const override
;
550
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
551
void
Print
(std::ostream& os)
const override
;
552
558
bool
operator==
(
const
RrepAckHeader
& o)
const
;
559
560
private
:
561
uint8_t
m_reserved
;
562
};
563
569
std::ostream&
operator<<
(std::ostream& os,
const
RrepAckHeader
&);
570
590
class
RerrHeader
:
public
Header
591
{
592
public
:
594
RerrHeader
();
595
600
static
TypeId
GetTypeId
();
601
TypeId
GetInstanceTypeId
()
const override
;
602
uint32_t
GetSerializedSize
()
const override
;
603
void
Serialize
(
Buffer::Iterator
i)
const override
;
604
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
605
void
Print
(std::ostream& os)
const override
;
606
607
// No delete flag
612
void
SetNoDelete
(
bool
f
);
617
bool
GetNoDelete
()
const
;
618
625
bool
AddUnDestination
(
Ipv4Address
dst,
uint32_t
seqNo);
632
bool
RemoveUnDestination
(std::pair<Ipv4Address, uint32_t>& un);
634
void
Clear
();
635
639
uint8_t
GetDestCount
()
const
640
{
641
return
(uint8_t)
m_unreachableDstSeqNo
.size();
642
}
643
649
bool
operator==
(
const
RerrHeader
& o)
const
;
650
651
private
:
652
uint8_t
m_flag
;
653
uint8_t
m_reserved
;
654
656
std::map<Ipv4Address, uint32_t>
m_unreachableDstSeqNo
;
657
};
658
664
std::ostream&
operator<<
(std::ostream& os,
const
RerrHeader
&);
665
666
}
// namespace aodv
667
}
// namespace ns3
668
669
#endif
/* AODVPACKET_H */
f
double f(double x, void *params)
Definition:
80211b.c:71
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
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:43
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3::aodv::RerrHeader
Route Error (RERR) Message Format.
Definition:
aodv-packet.h:591
ns3::aodv::RerrHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition:
aodv-packet.cc:566
ns3::aodv::RerrHeader::GetDestCount
uint8_t GetDestCount() const
Definition:
aodv-packet.h:639
ns3::aodv::RerrHeader::Clear
void Clear()
Clear header.
Definition:
aodv-packet.cc:645
ns3::aodv::RerrHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
aodv-packet.cc:530
ns3::aodv::RerrHeader::m_reserved
uint8_t m_reserved
Not used (must be 0)
Definition:
aodv-packet.h:653
ns3::aodv::RerrHeader::GetNoDelete
bool GetNoDelete() const
Get the no delete flag.
Definition:
aodv-packet.cc:613
ns3::aodv::RerrHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
aodv-packet.cc:546
ns3::aodv::RerrHeader::RerrHeader
RerrHeader()
constructor
Definition:
aodv-packet.cc:521
ns3::aodv::RerrHeader::m_flag
uint8_t m_flag
No delete flag.
Definition:
aodv-packet.h:652
ns3::aodv::RerrHeader::operator==
bool operator==(const RerrHeader &o) const
Comparison operator.
Definition:
aodv-packet.cc:653
ns3::aodv::RerrHeader::Serialize
void Serialize(Buffer::Iterator i) const override
Definition:
aodv-packet.cc:552
ns3::aodv::RerrHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
aodv-packet.cc:540
ns3::aodv::RerrHeader::SetNoDelete
void SetNoDelete(bool f)
Set the no delete flag.
Definition:
aodv-packet.cc:600
ns3::aodv::RerrHeader::AddUnDestination
bool AddUnDestination(Ipv4Address dst, uint32_t seqNo)
Add unreachable node address and its sequence number in RERR header.
Definition:
aodv-packet.cc:619
ns3::aodv::RerrHeader::m_unreachableDstSeqNo
std::map< Ipv4Address, uint32_t > m_unreachableDstSeqNo
List of Unreachable destination: IP addresses and sequence numbers.
Definition:
aodv-packet.h:656
ns3::aodv::RerrHeader::Print
void Print(std::ostream &os) const override
Definition:
aodv-packet.cc:588
ns3::aodv::RerrHeader::RemoveUnDestination
bool RemoveUnDestination(std::pair< Ipv4Address, uint32_t > &un)
Delete pair (address + sequence number) from REER header, if the number of unreachable destinations >...
Definition:
aodv-packet.cc:632
ns3::aodv::RrepAckHeader
Route Reply Acknowledgment (RREP-ACK) Message Format.
Definition:
aodv-packet.h:537
ns3::aodv::RrepAckHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
aodv-packet.cc:473
ns3::aodv::RrepAckHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
aodv-packet.cc:485
ns3::aodv::RrepAckHeader::Print
void Print(std::ostream &os) const override
Definition:
aodv-packet.cc:501
ns3::aodv::RrepAckHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
aodv-packet.cc:463
ns3::aodv::RrepAckHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition:
aodv-packet.cc:491
ns3::aodv::RrepAckHeader::operator==
bool operator==(const RrepAckHeader &o) const
Comparison operator.
Definition:
aodv-packet.cc:506
ns3::aodv::RrepAckHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
aodv-packet.cc:479
ns3::aodv::RrepAckHeader::RrepAckHeader
RrepAckHeader()
constructor
Definition:
aodv-packet.cc:455
ns3::aodv::RrepAckHeader::m_reserved
uint8_t m_reserved
Not used (must be 0)
Definition:
aodv-packet.h:561
ns3::aodv::RrepHeader
Route Reply (RREP) Message Format.
Definition:
aodv-packet.h:357
ns3::aodv::RrepHeader::GetAckRequired
bool GetAckRequired() const
get the ack required flag
Definition:
aodv-packet.cc:407
ns3::aodv::RrepHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
aodv-packet.cc:327
ns3::aodv::RrepHeader::GetPrefixSize
uint8_t GetPrefixSize() const
Set the pefix size.
Definition:
aodv-packet.cc:419
ns3::aodv::RrepHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition:
aodv-packet.cc:351
ns3::aodv::RrepHeader::Print
void Print(std::ostream &os) const override
Definition:
aodv-packet.cc:369
ns3::aodv::RrepHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
aodv-packet.cc:339
ns3::aodv::RrepHeader::SetDstSeqno
void SetDstSeqno(uint32_t s)
Set the destination sequence number.
Definition:
aodv-packet.h:427
ns3::aodv::RrepHeader::GetOrigin
Ipv4Address GetOrigin() const
Get the origin address.
Definition:
aodv-packet.h:454
ns3::aodv::RrepHeader::SetHello
void SetHello(Ipv4Address src, uint32_t srcSeqNo, Time lifetime)
Configure RREP to be a Hello message.
Definition:
aodv-packet.cc:433
ns3::aodv::RrepHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
aodv-packet.cc:317
ns3::aodv::RrepHeader::GetHopCount
uint8_t GetHopCount() const
Get the hop count.
Definition:
aodv-packet.h:400
ns3::aodv::RrepHeader::SetOrigin
void SetOrigin(Ipv4Address a)
Set the origin address.
Definition:
aodv-packet.h:445
ns3::aodv::RrepHeader::SetHopCount
void SetHopCount(uint8_t count)
Set the hop count.
Definition:
aodv-packet.h:391
ns3::aodv::RrepHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
aodv-packet.cc:333
ns3::aodv::RrepHeader::m_dstSeqNo
uint32_t m_dstSeqNo
Destination Sequence Number.
Definition:
aodv-packet.h:513
ns3::aodv::RrepHeader::SetLifeTime
void SetLifeTime(Time t)
Set the lifetime.
Definition:
aodv-packet.cc:381
ns3::aodv::RrepHeader::SetAckRequired
void SetAckRequired(bool f)
Set the ack required flag.
Definition:
aodv-packet.cc:394
ns3::aodv::RrepHeader::SetPrefixSize
void SetPrefixSize(uint8_t sz)
Set the prefix size.
Definition:
aodv-packet.cc:413
ns3::aodv::RrepHeader::RrepHeader
RrepHeader(uint8_t prefixSize=0, uint8_t hopCount=0, Ipv4Address dst=Ipv4Address(), uint32_t dstSeqNo=0, Ipv4Address origin=Ipv4Address(), Time lifetime=MilliSeconds(0))
constructor
Definition:
aodv-packet.cc:298
ns3::aodv::RrepHeader::GetLifeTime
Time GetLifeTime() const
Get the lifetime.
Definition:
aodv-packet.cc:387
ns3::aodv::RrepHeader::SetDst
void SetDst(Ipv4Address a)
Set the destination address.
Definition:
aodv-packet.h:409
ns3::aodv::RrepHeader::m_dst
Ipv4Address m_dst
Destination IP Address.
Definition:
aodv-packet.h:512
ns3::aodv::RrepHeader::GetDstSeqno
uint32_t GetDstSeqno() const
Get the destination sequence number.
Definition:
aodv-packet.h:436
ns3::aodv::RrepHeader::m_flags
uint8_t m_flags
A - acknowledgment required flag.
Definition:
aodv-packet.h:509
ns3::aodv::RrepHeader::GetDst
Ipv4Address GetDst() const
Get the destination address.
Definition:
aodv-packet.h:418
ns3::aodv::RrepHeader::m_hopCount
uint8_t m_hopCount
Hop Count.
Definition:
aodv-packet.h:511
ns3::aodv::RrepHeader::m_prefixSize
uint8_t m_prefixSize
Prefix Size.
Definition:
aodv-packet.h:510
ns3::aodv::RrepHeader::operator==
bool operator==(const RrepHeader &o) const
Comparison operator.
Definition:
aodv-packet.cc:425
ns3::aodv::RrepHeader::m_origin
Ipv4Address m_origin
Source IP Address.
Definition:
aodv-packet.h:514
ns3::aodv::RrepHeader::m_lifeTime
uint32_t m_lifeTime
Lifetime (in milliseconds)
Definition:
aodv-packet.h:515
ns3::aodv::RreqHeader
Route Request (RREQ) Message Format.
Definition:
aodv-packet.h:137
ns3::aodv::RreqHeader::GetId
uint32_t GetId() const
Get the request ID.
Definition:
aodv-packet.h:203
ns3::aodv::RreqHeader::SetDst
void SetDst(Ipv4Address a)
Set the destination address.
Definition:
aodv-packet.h:212
ns3::aodv::RreqHeader::GetHopCount
uint8_t GetHopCount() const
Get the hop count.
Definition:
aodv-packet.h:185
ns3::aodv::RreqHeader::GetUnknownSeqno
bool GetUnknownSeqno() const
Get the unknown sequence number flag.
Definition:
aodv-packet.cc:281
ns3::aodv::RreqHeader::m_originSeqNo
uint32_t m_originSeqNo
Source Sequence Number.
Definition:
aodv-packet.h:327
ns3::aodv::RreqHeader::SetId
void SetId(uint32_t id)
Set the request ID.
Definition:
aodv-packet.h:194
ns3::aodv::RreqHeader::GetOriginSeqno
uint32_t GetOriginSeqno() const
Get the origin sequence number.
Definition:
aodv-packet.h:275
ns3::aodv::RreqHeader::RreqHeader
RreqHeader(uint8_t flags=0, uint8_t reserved=0, uint8_t hopCount=0, uint32_t requestID=0, Ipv4Address dst=Ipv4Address(), uint32_t dstSeqNo=0, Ipv4Address origin=Ipv4Address(), uint32_t originSeqNo=0)
constructor
Definition:
aodv-packet.cc:138
ns3::aodv::RreqHeader::m_hopCount
uint8_t m_hopCount
Hop Count.
Definition:
aodv-packet.h:322
ns3::aodv::RreqHeader::SetUnknownSeqno
void SetUnknownSeqno(bool f)
Set the unknown sequence number flag.
Definition:
aodv-packet.cc:268
ns3::aodv::RreqHeader::GetOrigin
Ipv4Address GetOrigin() const
Get the origin address.
Definition:
aodv-packet.h:257
ns3::aodv::RreqHeader::SetGratuitousRrep
void SetGratuitousRrep(bool f)
Set the gratuitous RREP flag.
Definition:
aodv-packet.cc:230
ns3::aodv::RreqHeader::SetDestinationOnly
void SetDestinationOnly(bool f)
Set the Destination only flag.
Definition:
aodv-packet.cc:249
ns3::aodv::RreqHeader::m_origin
Ipv4Address m_origin
Originator IP Address.
Definition:
aodv-packet.h:326
ns3::aodv::RreqHeader::GetDestinationOnly
bool GetDestinationOnly() const
Get the Destination only flag.
Definition:
aodv-packet.cc:262
ns3::aodv::RreqHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
aodv-packet.cc:176
ns3::aodv::RreqHeader::m_dst
Ipv4Address m_dst
Destination IP Address.
Definition:
aodv-packet.h:324
ns3::aodv::RreqHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
aodv-packet.cc:160
ns3::aodv::RreqHeader::m_requestID
uint32_t m_requestID
RREQ ID.
Definition:
aodv-packet.h:323
ns3::aodv::RreqHeader::SetHopCount
void SetHopCount(uint8_t count)
Set the hop count.
Definition:
aodv-packet.h:176
ns3::aodv::RreqHeader::SetDstSeqno
void SetDstSeqno(uint32_t s)
Set the destination sequence number.
Definition:
aodv-packet.h:230
ns3::aodv::RreqHeader::Print
void Print(std::ostream &os) const override
Definition:
aodv-packet.cc:213
ns3::aodv::RreqHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
aodv-packet.cc:170
ns3::aodv::RreqHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
aodv-packet.cc:182
ns3::aodv::RreqHeader::m_reserved
uint8_t m_reserved
Not used (must be 0)
Definition:
aodv-packet.h:321
ns3::aodv::RreqHeader::GetDstSeqno
uint32_t GetDstSeqno() const
Get the destination sequence number.
Definition:
aodv-packet.h:239
ns3::aodv::RreqHeader::GetDst
Ipv4Address GetDst() const
Get the destination address.
Definition:
aodv-packet.h:221
ns3::aodv::RreqHeader::SetOriginSeqno
void SetOriginSeqno(uint32_t s)
Set the origin sequence number.
Definition:
aodv-packet.h:266
ns3::aodv::RreqHeader::GetGratuitousRrep
bool GetGratuitousRrep() const
Get the gratuitous RREP flag.
Definition:
aodv-packet.cc:243
ns3::aodv::RreqHeader::m_dstSeqNo
uint32_t m_dstSeqNo
Destination Sequence Number.
Definition:
aodv-packet.h:325
ns3::aodv::RreqHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition:
aodv-packet.cc:195
ns3::aodv::RreqHeader::operator==
bool operator==(const RreqHeader &o) const
Comparison operator.
Definition:
aodv-packet.cc:287
ns3::aodv::RreqHeader::m_flags
uint8_t m_flags
|J|R|G|D|U| bit flags, see RFC
Definition:
aodv-packet.h:320
ns3::aodv::RreqHeader::SetOrigin
void SetOrigin(Ipv4Address a)
Set the origin address.
Definition:
aodv-packet.h:248
ns3::aodv::TypeHeader
AODV types.
Definition:
aodv-packet.h:60
ns3::aodv::TypeHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition:
aodv-packet.cc:74
ns3::aodv::TypeHeader::TypeHeader
TypeHeader(MessageType t=AODVTYPE_RREQ)
constructor
Definition:
aodv-packet.cc:39
ns3::aodv::TypeHeader::operator==
bool operator==(const TypeHeader &o) const
Comparison operator.
Definition:
aodv-packet.cc:123
ns3::aodv::TypeHeader::Print
void Print(std::ostream &os) const override
Definition:
aodv-packet.cc:97
ns3::aodv::TypeHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
aodv-packet.cc:56
ns3::aodv::TypeHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
aodv-packet.cc:68
ns3::aodv::TypeHeader::m_type
MessageType m_type
type of the message
Definition:
aodv-packet.h:104
ns3::aodv::TypeHeader::m_valid
bool m_valid
Indicates if the message is valid.
Definition:
aodv-packet.h:105
ns3::aodv::TypeHeader::IsValid
bool IsValid() const
Check that type if valid.
Definition:
aodv-packet.h:91
ns3::aodv::TypeHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
aodv-packet.cc:62
ns3::aodv::TypeHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
aodv-packet.cc:46
ns3::aodv::TypeHeader::Get
MessageType Get() const
Definition:
aodv-packet.h:82
uint32_t
ns3::aodv::MessageType
MessageType
MessageType enumeration.
Definition:
aodv-packet.h:48
ns3::aodv::AODVTYPE_RREP
@ AODVTYPE_RREP
AODVTYPE_RREP.
Definition:
aodv-packet.h:50
ns3::aodv::AODVTYPE_RREP_ACK
@ AODVTYPE_RREP_ACK
AODVTYPE_RREP_ACK.
Definition:
aodv-packet.h:52
ns3::aodv::AODVTYPE_RERR
@ AODVTYPE_RERR
AODVTYPE_RERR.
Definition:
aodv-packet.h:51
ns3::aodv::AODVTYPE_RREQ
@ AODVTYPE_RREQ
AODVTYPE_RREQ.
Definition:
aodv-packet.h:49
ns3::MilliSeconds
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition:
nstime.h:1350
ns3::aodv::operator<<
std::ostream & operator<<(std::ostream &os, const TypeHeader &h)
Stream output operator.
Definition:
aodv-packet.cc:129
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
visualizer.core.start
def start()
Definition:
core.py:1861
src
aodv
model
aodv-packet.h
Generated on Tue Nov 1 2022 22:59:43 for ns-3 by
1.9.3