A Discrete-Event Network Simulator
API
aodv-packet.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 IITP RAS
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Based on
19  * NS-2 AODV model developed by the CMU/MONARCH group and optimized and
20  * tuned by Samir Das and Mahesh Marina, University of Cincinnati;
21  *
22  * AODV-UU implementation by Erik Nordström of Uppsala University
23  * http://core.it.uu.se/core/index.php/AODV-UU
24  *
25  * Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
26  * Pavel Boyko <boyko@iitp.ru>
27  */
28 #include "aodv-packet.h"
29 #include "ns3/address-utils.h"
30 #include "ns3/packet.h"
31 
32 namespace ns3
33 {
34 namespace aodv
35 {
36 
37 NS_OBJECT_ENSURE_REGISTERED (TypeHeader);
38 
40  m_type (t), m_valid (true)
41 {
42 }
43 
44 TypeId
46 {
47  static TypeId tid = TypeId ("ns3::aodv::TypeHeader")
48  .SetParent<Header> ()
49  .SetGroupName("Aodv")
50  .AddConstructor<TypeHeader> ()
51  ;
52  return tid;
53 }
54 
55 TypeId
57 {
58  return GetTypeId ();
59 }
60 
61 uint32_t
63 {
64  return 1;
65 }
66 
67 void
69 {
70  i.WriteU8 ((uint8_t) m_type);
71 }
72 
73 uint32_t
75 {
77  uint8_t type = i.ReadU8 ();
78  m_valid = true;
79  switch (type)
80  {
81  case AODVTYPE_RREQ:
82  case AODVTYPE_RREP:
83  case AODVTYPE_RERR:
84  case AODVTYPE_RREP_ACK:
85  {
86  m_type = (MessageType) type;
87  break;
88  }
89  default:
90  m_valid = false;
91  }
92  uint32_t dist = i.GetDistanceFrom (start);
93  NS_ASSERT (dist == GetSerializedSize ());
94  return dist;
95 }
96 
97 void
98 TypeHeader::Print (std::ostream &os) const
99 {
100  switch (m_type)
101  {
102  case AODVTYPE_RREQ:
103  {
104  os << "RREQ";
105  break;
106  }
107  case AODVTYPE_RREP:
108  {
109  os << "RREP";
110  break;
111  }
112  case AODVTYPE_RERR:
113  {
114  os << "RERR";
115  break;
116  }
117  case AODVTYPE_RREP_ACK:
118  {
119  os << "RREP_ACK";
120  break;
121  }
122  default:
123  os << "UNKNOWN_TYPE";
124  }
125 }
126 
127 bool
129 {
130  return (m_type == o.m_type && m_valid == o.m_valid);
131 }
132 
133 std::ostream &
134 operator<< (std::ostream & os, TypeHeader const & h)
135 {
136  h.Print (os);
137  return os;
138 }
139 
140 //-----------------------------------------------------------------------------
141 // RREQ
142 //-----------------------------------------------------------------------------
143 RreqHeader::RreqHeader (uint8_t flags, uint8_t reserved, uint8_t hopCount, uint32_t requestID, Ipv4Address dst,
144  uint32_t dstSeqNo, Ipv4Address origin, uint32_t originSeqNo) :
145  m_flags (flags), m_reserved (reserved), m_hopCount (hopCount), m_requestID (requestID), m_dst (dst),
146  m_dstSeqNo (dstSeqNo), m_origin (origin), m_originSeqNo (originSeqNo)
147 {
148 }
149 
151 
152 TypeId
154 {
155  static TypeId tid = TypeId ("ns3::aodv::RreqHeader")
156  .SetParent<Header> ()
157  .SetGroupName("Aodv")
158  .AddConstructor<RreqHeader> ()
159  ;
160  return tid;
161 }
162 
163 TypeId
165 {
166  return GetTypeId ();
167 }
168 
169 uint32_t
171 {
172  return 23;
173 }
174 
175 void
177 {
178  i.WriteU8 (m_flags);
179  i.WriteU8 (m_reserved);
180  i.WriteU8 (m_hopCount);
182  WriteTo (i, m_dst);
184  WriteTo (i, m_origin);
186 }
187 
188 uint32_t
190 {
192  m_flags = i.ReadU8 ();
193  m_reserved = i.ReadU8 ();
194  m_hopCount = i.ReadU8 ();
195  m_requestID = i.ReadNtohU32 ();
196  ReadFrom (i, m_dst);
197  m_dstSeqNo = i.ReadNtohU32 ();
198  ReadFrom (i, m_origin);
199  m_originSeqNo = i.ReadNtohU32 ();
200 
201  uint32_t dist = i.GetDistanceFrom (start);
202  NS_ASSERT (dist == GetSerializedSize ());
203  return dist;
204 }
205 
206 void
207 RreqHeader::Print (std::ostream &os) const
208 {
209  os << "RREQ ID " << m_requestID << " destination: ipv4 " << m_dst
210  << " sequence number " << m_dstSeqNo << " source: ipv4 "
211  << m_origin << " sequence number " << m_originSeqNo
212  << " flags:" << " Gratuitous RREP " << (*this).GetGratiousRrep ()
213  << " Destination only " << (*this).GetDestinationOnly ()
214  << " Unknown sequence number " << (*this).GetUnknownSeqno ();
215 }
216 
217 std::ostream &
218 operator<< (std::ostream & os, RreqHeader const & h)
219 {
220  h.Print (os);
221  return os;
222 }
223 
224 void
226 {
227  if (f)
228  m_flags |= (1 << 5);
229  else
230  m_flags &= ~(1 << 5);
231 }
232 
233 bool
235 {
236  return (m_flags & (1 << 5));
237 }
238 
239 void
241 {
242  if (f)
243  m_flags |= (1 << 4);
244  else
245  m_flags &= ~(1 << 4);
246 }
247 
248 bool
250 {
251  return (m_flags & (1 << 4));
252 }
253 
254 void
256 {
257  if (f)
258  m_flags |= (1 << 3);
259  else
260  m_flags &= ~(1 << 3);
261 }
262 
263 bool
265 {
266  return (m_flags & (1 << 3));
267 }
268 
269 bool
271 {
272  return (m_flags == o.m_flags && m_reserved == o.m_reserved &&
274  m_dst == o.m_dst && m_dstSeqNo == o.m_dstSeqNo &&
276 }
277 
278 //-----------------------------------------------------------------------------
279 // RREP
280 //-----------------------------------------------------------------------------
281 
282 RrepHeader::RrepHeader (uint8_t prefixSize, uint8_t hopCount, Ipv4Address dst,
283  uint32_t dstSeqNo, Ipv4Address origin, Time lifeTime) :
284  m_flags (0), m_prefixSize (prefixSize), m_hopCount (hopCount),
285  m_dst (dst), m_dstSeqNo (dstSeqNo), m_origin (origin)
286 {
287  m_lifeTime = uint32_t (lifeTime.GetMilliSeconds ());
288 }
289 
291 
292 TypeId
294 {
295  static TypeId tid = TypeId ("ns3::aodv::RrepHeader")
296  .SetParent<Header> ()
297  .SetGroupName("Aodv")
298  .AddConstructor<RrepHeader> ()
299  ;
300  return tid;
301 }
302 
303 TypeId
305 {
306  return GetTypeId ();
307 }
308 
309 uint32_t
311 {
312  return 19;
313 }
314 
315 void
317 {
318  i.WriteU8 (m_flags);
319  i.WriteU8 (m_prefixSize);
320  i.WriteU8 (m_hopCount);
321  WriteTo (i, m_dst);
323  WriteTo (i, m_origin);
325 }
326 
327 uint32_t
329 {
331 
332  m_flags = i.ReadU8 ();
333  m_prefixSize = i.ReadU8 ();
334  m_hopCount = i.ReadU8 ();
335  ReadFrom (i, m_dst);
336  m_dstSeqNo = i.ReadNtohU32 ();
337  ReadFrom (i, m_origin);
338  m_lifeTime = i.ReadNtohU32 ();
339 
340  uint32_t dist = i.GetDistanceFrom (start);
341  NS_ASSERT (dist == GetSerializedSize ());
342  return dist;
343 }
344 
345 void
346 RrepHeader::Print (std::ostream &os) const
347 {
348  os << "destination: ipv4 " << m_dst << " sequence number " << m_dstSeqNo;
349  if (m_prefixSize != 0)
350  {
351  os << " prefix size " << m_prefixSize;
352  }
353  os << " source ipv4 " << m_origin << " lifetime " << m_lifeTime
354  << " acknowledgment required flag " << (*this).GetAckRequired ();
355 }
356 
357 void
359 {
361 }
362 
363 Time
365 {
367  return t;
368 }
369 
370 void
372 {
373  if (f)
374  m_flags |= (1 << 6);
375  else
376  m_flags &= ~(1 << 6);
377 }
378 
379 bool
381 {
382  return (m_flags & (1 << 6));
383 }
384 
385 void
387 {
388  m_prefixSize = sz;
389 }
390 
391 uint8_t
393 {
394  return m_prefixSize;
395 }
396 
397 bool
399 {
400  return (m_flags == o.m_flags && m_prefixSize == o.m_prefixSize &&
401  m_hopCount == o.m_hopCount && m_dst == o.m_dst && m_dstSeqNo == o.m_dstSeqNo &&
402  m_origin == o.m_origin && m_lifeTime == o.m_lifeTime);
403 }
404 
405 void
406 RrepHeader::SetHello (Ipv4Address origin, uint32_t srcSeqNo, Time lifetime)
407 {
408  m_flags = 0;
409  m_prefixSize = 0;
410  m_hopCount = 0;
411  m_dst = origin;
412  m_dstSeqNo = srcSeqNo;
413  m_origin = origin;
414  m_lifeTime = lifetime.GetMilliSeconds ();
415 }
416 
417 std::ostream &
418 operator<< (std::ostream & os, RrepHeader const & h)
419 {
420  h.Print (os);
421  return os;
422 }
423 
424 //-----------------------------------------------------------------------------
425 // RREP-ACK
426 //-----------------------------------------------------------------------------
427 
429  m_reserved (0)
430 {
431 }
432 
434 
435 TypeId
437 {
438  static TypeId tid = TypeId ("ns3::aodv::RrepAckHeader")
439  .SetParent<Header> ()
440  .SetGroupName("Aodv")
441  .AddConstructor<RrepAckHeader> ()
442  ;
443  return tid;
444 }
445 
446 TypeId
448 {
449  return GetTypeId ();
450 }
451 
452 uint32_t
454 {
455  return 1;
456 }
457 
458 void
460 {
461  i.WriteU8 (m_reserved);
462 }
463 
464 uint32_t
466 {
468  m_reserved = i.ReadU8 ();
469  uint32_t dist = i.GetDistanceFrom (start);
470  NS_ASSERT (dist == GetSerializedSize ());
471  return dist;
472 }
473 
474 void
475 RrepAckHeader::Print (std::ostream &os ) const
476 {
477 }
478 
479 bool
481 {
482  return m_reserved == o.m_reserved;
483 }
484 
485 std::ostream &
486 operator<< (std::ostream & os, RrepAckHeader const & h )
487 {
488  h.Print (os);
489  return os;
490 }
491 
492 //-----------------------------------------------------------------------------
493 // RERR
494 //-----------------------------------------------------------------------------
496  m_flag (0), m_reserved (0)
497 {
498 }
499 
501 
502 TypeId
504 {
505  static TypeId tid = TypeId ("ns3::aodv::RerrHeader")
506  .SetParent<Header> ()
507  .SetGroupName("Aodv")
508  .AddConstructor<RerrHeader> ()
509  ;
510  return tid;
511 }
512 
513 TypeId
515 {
516  return GetTypeId ();
517 }
518 
519 uint32_t
521 {
522  return (3 + 8 * GetDestCount ());
523 }
524 
525 void
527 {
528  i.WriteU8 (m_flag);
529  i.WriteU8 (m_reserved);
530  i.WriteU8 (GetDestCount ());
531  std::map<Ipv4Address, uint32_t>::const_iterator j;
532  for (j = m_unreachableDstSeqNo.begin (); j != m_unreachableDstSeqNo.end (); ++j)
533  {
534  WriteTo (i, (*j).first);
535  i.WriteHtonU32 ((*j).second);
536  }
537 }
538 
539 uint32_t
541 {
543  m_flag = i.ReadU8 ();
544  m_reserved = i.ReadU8 ();
545  uint8_t dest = i.ReadU8 ();
546  m_unreachableDstSeqNo.clear ();
548  uint32_t seqNo;
549  for (uint8_t k = 0; k < dest; ++k)
550  {
551  ReadFrom (i, address);
552  seqNo = i.ReadNtohU32 ();
553  m_unreachableDstSeqNo.insert (std::make_pair (address, seqNo));
554  }
555 
556  uint32_t dist = i.GetDistanceFrom (start);
557  NS_ASSERT (dist == GetSerializedSize ());
558  return dist;
559 }
560 
561 void
562 RerrHeader::Print (std::ostream &os ) const
563 {
564  os << "Unreachable destination (ipv4 address, seq. number):";
565  std::map<Ipv4Address, uint32_t>::const_iterator j;
566  for (j = m_unreachableDstSeqNo.begin (); j != m_unreachableDstSeqNo.end (); ++j)
567  {
568  os << (*j).first << ", " << (*j).second;
569  }
570  os << "No delete flag " << (*this).GetNoDelete ();
571 }
572 
573 void
575 {
576  if (f)
577  m_flag |= (1 << 0);
578  else
579  m_flag &= ~(1 << 0);
580 }
581 
582 bool
584 {
585  return (m_flag & (1 << 0));
586 }
587 
588 bool
590 {
591  if (m_unreachableDstSeqNo.find (dst) != m_unreachableDstSeqNo.end ())
592  return true;
593 
594  NS_ASSERT (GetDestCount () < 255); // can't support more than 255 destinations in single RERR
595  m_unreachableDstSeqNo.insert (std::make_pair (dst, seqNo));
596  return true;
597 }
598 
599 bool
600 RerrHeader::RemoveUnDestination (std::pair<Ipv4Address, uint32_t> & un )
601 {
602  if (m_unreachableDstSeqNo.empty ())
603  return false;
604  std::map<Ipv4Address, uint32_t>::iterator i = m_unreachableDstSeqNo.begin ();
605  un = *i;
606  m_unreachableDstSeqNo.erase (i);
607  return true;
608 }
609 
610 void
612 {
613  m_unreachableDstSeqNo.clear ();
614  m_flag = 0;
615  m_reserved = 0;
616 }
617 
618 bool
620 {
621  if (m_flag != o.m_flag || m_reserved != o.m_reserved || GetDestCount () != o.GetDestCount ())
622  return false;
623 
624  std::map<Ipv4Address, uint32_t>::const_iterator j = m_unreachableDstSeqNo.begin ();
625  std::map<Ipv4Address, uint32_t>::const_iterator k = o.m_unreachableDstSeqNo.begin ();
626  for (uint8_t i = 0; i < GetDestCount (); ++i)
627  {
628  if ((j->first != k->first) || (j->second != k->second))
629  return false;
630 
631  j++;
632  k++;
633  }
634  return true;
635 }
636 
637 std::ostream &
638 operator<< (std::ostream & os, RerrHeader const & h )
639 {
640  h.Print (os);
641  return os;
642 }
643 }
644 }
Protocol header serialization and deserialization.
Definition: header.h:42
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
static TypeId GetTypeId()
Definition: aodv-packet.cc:503
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition: aodv-packet.cc:56
bool GetUnknownSeqno() const
Definition: aodv-packet.cc:264
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition: aodv-packet.cc:447
bool GetAckRequired() const
Definition: aodv-packet.cc:380
Route Error (RERR) Message Format.
Definition: aodv-packet.h:272
static TypeId GetTypeId()
Definition: aodv-packet.cc:153
void Serialize(Buffer::Iterator i) const
Definition: aodv-packet.cc:526
void SetNoDelete(bool f)
Definition: aodv-packet.cc:574
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.
def start()
Definition: core.py:1482
uint32_t m_requestID
RREQ ID.
Definition: aodv-packet.h:144
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:903
uint32_t m_lifeTime
Lifetime (in milliseconds)
Definition: aodv-packet.h:216
bool operator==(RrepHeader const &o) const
Definition: aodv-packet.cc:398
Route Request (RREQ) Message Format.
Definition: aodv-packet.h:100
AODVTYPE_RERR.
Definition: aodv-packet.h:45
uint32_t ReadNtohU32(void)
Definition: buffer.h:969
uint32_t Deserialize(Buffer::Iterator start)
Definition: aodv-packet.cc:465
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:783
iterator in a Buffer instance
Definition: buffer.h:98
static TypeId GetTypeId()
Definition: aodv-packet.cc:436
uint32_t GetSerializedSize() const
Definition: aodv-packet.cc:520
void Print(std::ostream &os) const
Definition: aodv-packet.cc:207
uint32_t Deserialize(Buffer::Iterator start)
Definition: aodv-packet.cc:540
void Serialize(Buffer::Iterator start) const
Definition: aodv-packet.cc:68
RrepHeader(uint8_t prefixSize=0, uint8_t hopCount=0, Ipv4Address dst=Ipv4Address(), uint32_t dstSeqNo=0, Ipv4Address origin=Ipv4Address(), Time lifetime=MilliSeconds(0))
c-tor
Definition: aodv-packet.cc:282
void Clear()
Clear header.
Definition: aodv-packet.cc:611
uint32_t Deserialize(Buffer::Iterator start)
Definition: aodv-packet.cc:74
uint32_t m_originSeqNo
Source Sequence Number.
Definition: aodv-packet.h:148
Ipv4Address m_origin
Source IP Address.
Definition: aodv-packet.h:215
void SetPrefixSize(uint8_t sz)
Definition: aodv-packet.cc:386
bool GetGratiousRrep() const
Definition: aodv-packet.cc:234
uint32_t Deserialize(Buffer::Iterator start)
Definition: aodv-packet.cc:328
uint8_t GetDestCount() const
Return number of unreachable destinations in RERR message.
Definition: aodv-packet.h:302
bool AddUnDestination(Ipv4Address dst, uint32_t seqNo)
Add unreachable node address and its sequence number in RERR header.
Definition: aodv-packet.cc:589
uint8_t m_flag
No delete flag.
Definition: aodv-packet.h:305
void Print(std::ostream &os) const
Definition: aodv-packet.cc:346
void Print(std::ostream &os) const
Definition: aodv-packet.cc:98
Ipv4Address m_origin
Originator IP Address.
Definition: aodv-packet.h:147
void SetDestinationOnly(bool f)
Definition: aodv-packet.cc:240
void Serialize(Buffer::Iterator start) const
Definition: aodv-packet.cc:316
uint8_t m_reserved
Not used.
Definition: aodv-packet.h:306
AODVTYPE_RREP.
Definition: aodv-packet.h:44
Route Reply (RREP) Message Format.
Definition: aodv-packet.h:172
uint8_t GetPrefixSize() const
Definition: aodv-packet.cc:392
bool operator==(RrepAckHeader const &o) const
Definition: aodv-packet.cc:480
uint8_t m_flags
A - acknowledgment required flag.
Definition: aodv-packet.h:210
static TypeId GetTypeId()
Definition: aodv-packet.cc:293
Ipv4Address m_dst
Destination IP Address.
Definition: aodv-packet.h:213
double f(double x, void *params)
Definition: 80211b.c:60
void Serialize(Buffer::Iterator start) const
Definition: aodv-packet.cc:176
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetHello(Ipv4Address src, uint32_t srcSeqNo, Time lifetime)
Configure RREP to be a Hello message.
Definition: aodv-packet.cc:406
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)
c-tor
Definition: aodv-packet.cc:143
void Serialize(Buffer::Iterator start) const
Definition: aodv-packet.cc:459
void Print(std::ostream &os) const
Definition: aodv-packet.cc:475
bool operator==(TypeHeader const &o) const
Definition: aodv-packet.cc:128
AODVTYPE_RREP_ACK.
Definition: aodv-packet.h:46
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:600
uint32_t m_dstSeqNo
Destination Sequence Number.
Definition: aodv-packet.h:214
TypeHeader(MessageType t=AODVTYPE_RREQ)
c-tor
Definition: aodv-packet.cc:39
std::map< Ipv4Address, uint32_t > m_unreachableDstSeqNo
List of Unreachable destination: IP addresses and sequence numbers.
Definition: aodv-packet.h:309
uint32_t GetSerializedSize() const
Definition: aodv-packet.cc:453
void WriteHtonU32(uint32_t data)
Definition: buffer.h:923
Time GetLifeTime() const
Definition: aodv-packet.cc:364
AODVTYPE_RREQ.
Definition: aodv-packet.h:43
uint32_t GetSerializedSize() const
Definition: aodv-packet.cc:310
Route Reply Acknowledgment (RREP-ACK) Message Format.
Definition: aodv-packet.h:232
uint8_t m_hopCount
Hop Count.
Definition: aodv-packet.h:143
uint32_t Deserialize(Buffer::Iterator start)
Definition: aodv-packet.cc:189
void Print(std::ostream &os) const
Definition: aodv-packet.cc:562
MessageType m_type
Definition: aodv-packet.h:73
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
uint32_t GetSerializedSize() const
Definition: aodv-packet.cc:170
void WriteU8(uint8_t data)
Definition: buffer.h:868
Ipv4Address m_dst
Destination IP Address.
Definition: aodv-packet.h:145
uint32_t GetSerializedSize() const
Definition: aodv-packet.cc:62
static TypeId GetTypeId()
Definition: aodv-packet.cc:45
std::ostream & operator<<(std::ostream &os, TypeHeader const &h)
Definition: aodv-packet.cc:134
void SetAckRequired(bool f)
Definition: aodv-packet.cc:371
uint8_t ReadU8(void)
Definition: buffer.h:1020
bool GetDestinationOnly() const
Definition: aodv-packet.cc:249
bool operator==(RerrHeader const &o) const
Definition: aodv-packet.cc:619
uint8_t m_hopCount
Hop Count.
Definition: aodv-packet.h:212
uint8_t m_reserved
Not used.
Definition: aodv-packet.h:142
void SetGratiousRrep(bool f)
Definition: aodv-packet.cc:225
tuple address
Definition: first.py:37
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition: aodv-packet.cc:514
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition: aodv-packet.cc:164
bool operator==(RreqHeader const &o) const
Definition: aodv-packet.cc:270
a unique identifier for an interface.
Definition: type-id.h:58
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:345
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:904
void SetUnknownSeqno(bool f)
Definition: aodv-packet.cc:255
uint8_t m_flags
|J|R|G|D|U| bit flags, see RFC
Definition: aodv-packet.h:141
bool GetNoDelete() const
Definition: aodv-packet.cc:583
void SetLifeTime(Time t)
Definition: aodv-packet.cc:358
uint8_t m_prefixSize
Prefix Size.
Definition: aodv-packet.h:211
uint32_t m_dstSeqNo
Destination Sequence Number.
Definition: aodv-packet.h:146
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition: aodv-packet.cc:304