A Discrete-Event Network Simulator
API
dsr-options.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Yufei Cheng
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  * Author: Yufei Cheng <yfcheng@ittc.ku.edu>
19  *
20  * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
21  * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets
22  * Information and Telecommunication Technology Center (ITTC)
23  * and Department of Electrical Engineering and Computer Science
24  * The University of Kansas Lawrence, KS USA.
25  *
26  * Work supported in part by NSF FIND (Future Internet Design) Program
27  * under grant CNS-0626918 (Postmodern Internet Architecture),
28  * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
29  * US Department of Defense (DoD), and ITTC at The University of Kansas.
30  */
31 
32 #ifndef DSR_OPTION_H
33 #define DSR_OPTION_H
34 
35 #include <map>
36 #include <list>
37 
38 #include "ns3/buffer.h"
39 #include "ns3/packet.h"
40 #include "ns3/callback.h"
41 #include "ns3/ptr.h"
42 #include "ns3/udp-l4-protocol.h"
43 #include "ns3/ipv4.h"
44 #include "ns3/ipv4-route.h"
45 #include "ns3/object.h"
46 #include "ns3/node.h"
47 #include "ns3/ipv4-interface.h"
48 #include "ns3/ipv4-header.h"
49 #include "ns3/ipv4-address.h"
50 #include "ns3/traced-callback.h"
51 #include "ns3/output-stream-wrapper.h"
52 #include "ns3/timer.h"
53 
54 #include "dsr-rsendbuff.h"
55 #include "dsr-maintain-buff.h"
56 #include "dsr-option-header.h"
57 #include "dsr-rcache.h"
58 #include "dsr-routing.h"
60 
61 namespace ns3 {
62 
63 class Packet;
64 class NetDevice;
65 class Node;
66 class Ipv4Address;
67 class Ipv4Interface;
68 class Ipv4Route;
69 class Ipv4;
70 class Time;
71 
72 namespace dsr {
73 
74 class DsrOptions : public Object
75 {
76 public:
81  static TypeId GetTypeId (void);
85  DsrOptions ();
89  virtual ~DsrOptions ();
94  virtual uint8_t GetOptionNumber () const = 0;
99  void SetNode (Ptr<Node> node);
104  Ptr<Node> GetNode () const;
113  bool ContainAddressAfter (Ipv4Address ipv4Address, Ipv4Address destAddress, std::vector<Ipv4Address> &nodeList);
121  std::vector<Ipv4Address> CutRoute (Ipv4Address ipv4Address, std::vector<Ipv4Address> &nodeList);
130  virtual Ptr<Ipv4Route> SetRoute (Ipv4Address nextHop, Ipv4Address srcAddress);
137  bool ReverseRoutes (std::vector<Ipv4Address>& vec);
145  Ipv4Address SearchNextHop (Ipv4Address ipv4Address, std::vector<Ipv4Address>& vec);
153  Ipv4Address ReverseSearchNextHop (Ipv4Address ipv4Address, std::vector<Ipv4Address>& vec);
161  Ipv4Address ReverseSearchNextTwoHop (Ipv4Address ipv4Address, std::vector<Ipv4Address>& vec);
166  void PrintVector (std::vector<Ipv4Address>& vec);
174  bool IfDuplicates (std::vector<Ipv4Address>& vec, std::vector<Ipv4Address>& vec2);
182  bool CheckDuplicates (Ipv4Address ipv4Address, std::vector<Ipv4Address>& vec);
188  void RemoveDuplicates (std::vector<Ipv4Address>& vec);
196  void ScheduleReply (Ptr<Packet> &packet, std::vector<Ipv4Address> &nodeList, Ipv4Address &source, Ipv4Address &destination);
203  uint32_t GetIDfromIP (Ipv4Address address);
225  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) = 0;
226 
227 protected:
255  std::vector<Ipv4Address> m_ipv4Address;
259  std::vector<Ipv4Address> m_finalRoute;
268 
269 private:
271 };
272 
277 class DsrOptionPad1 : public DsrOptions
278 {
279 public:
283  static const uint8_t OPT_NUMBER = 224;
284 
289  static TypeId GetTypeId ();
290 
291  DsrOptionPad1 ();
292  virtual ~DsrOptionPad1 ();
293 
294  virtual uint8_t GetOptionNumber () const;
295  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
296 };
297 
302 class DsrOptionPadn : public DsrOptions
303 {
304 public:
308  static const uint8_t OPT_NUMBER = 0;
309 
314  static TypeId GetTypeId ();
315 
316  DsrOptionPadn ();
317  virtual ~DsrOptionPadn ();
318 
319  virtual uint8_t GetOptionNumber () const;
320  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
321 };
322 
327 class DsrOptionRreq : public DsrOptions
328 {
329 public:
333  static const uint8_t OPT_NUMBER = 1;
334 
339  static TypeId GetTypeId ();
344  virtual TypeId GetInstanceTypeId () const;
348  DsrOptionRreq ();
352  virtual ~DsrOptionRreq ();
353 
354  virtual uint8_t GetOptionNumber () const;
355  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
356 
357 private:
366 };
367 
372 class DsrOptionRrep : public DsrOptions
373 {
374 public:
378  static const uint8_t OPT_NUMBER = 2;
379 
384  static TypeId GetTypeId ();
389  virtual TypeId GetInstanceTypeId () const;
390 
391  DsrOptionRrep ();
392  virtual ~DsrOptionRrep ();
393 
394  virtual uint8_t GetOptionNumber () const;
395  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
396 
397 private:
406 };
407 
412 class DsrOptionSR : public DsrOptions
413 {
414 public:
418  static const uint8_t OPT_NUMBER = 96;
419 
424  static TypeId GetTypeId ();
429  virtual TypeId GetInstanceTypeId () const;
430 
431  DsrOptionSR ();
432  virtual ~DsrOptionSR ();
433 
434  virtual uint8_t GetOptionNumber () const;
435  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
436 
437 private:
442 };
443 
448 class DsrOptionRerr : public DsrOptions
449 {
450 public:
454  static const uint8_t OPT_NUMBER = 3;
455 
460  static TypeId GetTypeId ();
465  virtual TypeId GetInstanceTypeId () const;
466 
467  DsrOptionRerr ();
468  virtual ~DsrOptionRerr ();
469 
470  virtual uint8_t GetOptionNumber () const;
471  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
482  uint8_t DoSendError (Ptr<Packet> p, DsrOptionRerrUnreachHeader &rerr, uint32_t rerrSize, Ipv4Address ipv4Address, uint8_t protocol);
483 
484 private:
493 };
494 
500 {
501 public:
505  static const uint8_t OPT_NUMBER = 160;
506 
511  static TypeId GetTypeId ();
516  virtual TypeId GetInstanceTypeId () const;
517 
518  DsrOptionAckReq ();
519  virtual ~DsrOptionAckReq ();
520 
521  virtual uint8_t GetOptionNumber () const;
522  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
523 
524 private:
533 };
534 
539 class DsrOptionAck : public DsrOptions
540 {
541 public:
545  static const uint8_t OPT_NUMBER = 32;
546 
551  static TypeId GetTypeId ();
556  virtual TypeId GetInstanceTypeId () const;
557 
558  DsrOptionAck ();
559  virtual ~DsrOptionAck ();
560 
561  virtual uint8_t GetOptionNumber () const;
562  virtual uint8_t Process (Ptr<Packet> packet, Ptr<Packet> dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource);
563 
564 private:
573 };
574 } // namespace dsr
575 } // Namespace ns3
576 
577 #endif
ns3::dsr::DsrOptionPad1::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:408
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::Ipv4Header
Packet header for IPv4.
Definition: ipv4-header.h:34
ns3::dsr::DsrOptions::SetNode
void SetNode(Ptr< Node > node)
Set the node.
Definition: dsr-options.cc:99
ns3::dsr::DsrOptions::ReverseSearchNextHop
Ipv4Address ReverseSearchNextHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Reverse search for the next hop in the route.
Definition: dsr-options.cc:199
ns3::dsr::DsrOptionSR::m_ipv4
Ptr< Ipv4 > m_ipv4
The ip layer 3.
Definition: dsr-options.h:441
ns3::dsr::DsrOptionPadn::~DsrOptionPadn
virtual ~DsrOptionPadn()
Definition: dsr-options.cc:437
ns3::dsr::DsrOptions::m_routeCache
Ptr< dsr::DsrRouteCache > m_routeCache
The route cache table.
Definition: dsr-options.h:243
ns3::dsr::DsrOptionSR::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:1195
ns3::dsr::DsrOptionSR::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition: dsr-options.cc:1184
ns3::dsr::DsrOptions::CheckDuplicates
bool CheckDuplicates(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Check if the route already contains the node ip address.
Definition: dsr-options.cc:284
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
dsr-routing.h
ns3::dsr::DsrOptionPad1::DsrOptionPad1
DsrOptionPad1()
Definition: dsr-options.cc:391
ns3::dsr::DsrOptions::GetIDfromIP
uint32_t GetIDfromIP(Ipv4Address address)
Get the node id with Ipv4Address.
Definition: dsr-options.cc:346
ns3::dsr::DsrOptionPadn::DsrOptionPadn
DsrOptionPadn()
Definition: dsr-options.cc:432
ns3::dsr::DsrOptionAck::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:1643
ns3::dsr::DsrOptionRrep::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:995
ns3::dsr::DsrOptionRreq::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:463
ns3::dsr::DsrOptionRreq::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:495
ns3::dsr::DsrOptions::~DsrOptions
virtual ~DsrOptions()
Destructor.
Definition: dsr-options.cc:94
ns3::dsr::DsrOptionRrep::m_ipv4
Ptr< Ipv4 > m_ipv4
The ip layer 3.
Definition: dsr-options.h:405
ns3::dsr::DsrOptionAck::m_routeCache
Ptr< dsr::DsrRouteCache > m_routeCache
The route cache.
Definition: dsr-options.h:568
ns3::dsr::DsrOptionRerr::OPT_NUMBER
static const uint8_t OPT_NUMBER
Dsr Route Error option number.
Definition: dsr-options.h:454
ns3::dsr::DsrOptionRrep
Dsr Option Route Reply.
Definition: dsr-options.h:373
ns3::dsr::DsrOptionRerr::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:1437
ns3::dsr::DsrOptionAckReq::OPT_NUMBER
static const uint8_t OPT_NUMBER
Dsr ack request option number.
Definition: dsr-options.h:505
ns3::dsr::DsrOptionPad1::~DsrOptionPad1
virtual ~DsrOptionPad1()
Definition: dsr-options.cc:396
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::dsr::DsrOptionSR::DsrOptionSR
DsrOptionSR()
Definition: dsr-options.cc:1174
ns3::dsr::DsrOptions::GetNode
Ptr< Node > GetNode() const
Get the node.
Definition: dsr-options.cc:105
ns3::dsr::DsrOptions::m_rxPacketTrace
TracedCallback< const DsrOptionSRHeader & > m_rxPacketTrace
The receive trace back, only triggered when final destination receive data packet.
Definition: dsr-options.h:267
ns3::dsr::DsrOptionRrep::m_routeCache
Ptr< dsr::DsrRouteCache > m_routeCache
The route cache.
Definition: dsr-options.h:401
dsr-rsendbuff.h
ns3::dsr::DsrOptions::m_ipv4Route
Ptr< Ipv4Route > m_ipv4Route
The ipv4 route.
Definition: dsr-options.h:247
ns3::dsr::DsrOptionRerr::~DsrOptionRerr
virtual ~DsrOptionRerr()
Definition: dsr-options.cc:1421
ns3::dsr::DsrOptionRerr::DsrOptionRerr
DsrOptionRerr()
Definition: dsr-options.cc:1416
ns3::dsr::DsrOptions::IfDuplicates
bool IfDuplicates(std::vector< Ipv4Address > &vec, std::vector< Ipv4Address > &vec2)
Check if the two vectors contain duplicate or not.
Definition: dsr-options.cc:264
ns3::dsr::DsrOptions::m_ipv4Address
std::vector< Ipv4Address > m_ipv4Address
The vector of Ipv4 address.
Definition: dsr-options.h:255
ns3::dsr::DsrOptionAck::DsrOptionAck
DsrOptionAck()
Definition: dsr-options.cc:1653
ns3::dsr::DsrOptions::ReverseRoutes
bool ReverseRoutes(std::vector< Ipv4Address > &vec)
Reverse the routes.
Definition: dsr-options.cc:149
ns3::dsr::DsrOptions::RemoveDuplicates
void RemoveDuplicates(std::vector< Ipv4Address > &vec)
Remove the duplicates from the route.
Definition: dsr-options.cc:301
ns3::dsr::DsrOptionRreq::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:488
ns3::dsr::DsrOptions::CutRoute
std::vector< Ipv4Address > CutRoute(Ipv4Address ipv4Address, std::vector< Ipv4Address > &nodeList)
Cut the route from ipv4Address to the end of the route vector.
Definition: dsr-options.cc:127
ns3::dsr::DsrOptionRerr::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition: dsr-options.cc:1426
ns3::dsr::DsrOptions::GetOptionNumber
virtual uint8_t GetOptionNumber() const =0
Get the option number.
ns3::dsr::DsrOptionPadn::OPT_NUMBER
static const uint8_t OPT_NUMBER
PadN option number.
Definition: dsr-options.h:308
ns3::dsr::DsrOptions::ContainAddressAfter
bool ContainAddressAfter(Ipv4Address ipv4Address, Ipv4Address destAddress, std::vector< Ipv4Address > &nodeList)
Search for the ipv4 address in the node list.
Definition: dsr-options.cc:111
dsr-gratuitous-reply-table.h
ns3::dsr::DsrOptions::Broadcast
Ipv4Address Broadcast
The broadcast IP address.
Definition: dsr-options.h:235
ns3::dsr::DsrOptions::DsrOptions
DsrOptions()
Constructor.
Definition: dsr-options.cc:89
ns3::Ptr< Node >
ns3::dsr::DsrOptionAckReq::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:1612
ns3::dsr::DsrOptions::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)=0
Process method.
ns3::dsr::DsrOptionRerr::DoSendError
uint8_t DoSendError(Ptr< Packet > p, DsrOptionRerrUnreachHeader &rerr, uint32_t rerrSize, Ipv4Address ipv4Address, uint8_t protocol)
Do Send error message.
Definition: dsr-options.cc:1505
ns3::dsr::DsrOptions::ScheduleReply
void ScheduleReply(Ptr< Packet > &packet, std::vector< Ipv4Address > &nodeList, Ipv4Address &source, Ipv4Address &destination)
Schedule the intermediate node route request broadcast.
ns3::dsr::DsrOptionPad1::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:381
ns3::dsr::DsrOptionRreq
Dsr Option Rreq.
Definition: dsr-options.h:328
ns3::dsr::DsrOptionRreq::OPT_NUMBER
static const uint8_t OPT_NUMBER
Rreq option number.
Definition: dsr-options.h:333
ns3::dsr::DsrOptionPadn
IPv4 Option Padn.
Definition: dsr-options.h:303
ns3::dsr::DsrOptionRreq::~DsrOptionRreq
virtual ~DsrOptionRreq()
Destructor.
Definition: dsr-options.cc:483
ns3::dsr::DsrOptionPadn::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:442
ns3::dsr::DsrOptionAck::OPT_NUMBER
static const uint8_t OPT_NUMBER
The Dsr Ack option number.
Definition: dsr-options.h:545
ns3::dsr::DsrOptionSR::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:1164
ns3::dsr::DsrOptions::PrintVector
void PrintVector(std::vector< Ipv4Address > &vec)
Print out the elements in the route vector.
Definition: dsr-options.cc:244
ns3::dsr::DsrOptions::SearchNextHop
Ipv4Address SearchNextHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Search for the next hop in the route.
Definition: dsr-options.cc:167
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::dsr::DsrOptionPadn::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:448
ns3::dsr::DsrOptions::m_node
Ptr< Node > m_node
the node
Definition: dsr-options.h:270
ns3::dsr::DsrOptionPadn::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:422
ns3::dsr::DsrOptionRrep::DsrOptionRrep
DsrOptionRrep()
Definition: dsr-options.cc:973
first.address
address
Definition: first.py:44
ns3::dsr::DsrOptionAck::~DsrOptionAck
virtual ~DsrOptionAck()
Definition: dsr-options.cc:1658
ns3::dsr::DsrOptionAckReq
Dsr Option.
Definition: dsr-options.h:500
ns3::dsr::DsrOptionAck::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:1668
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::dsr::DsrOptions::m_rreqTable
Ptr< dsr::DsrRreqTable > m_rreqTable
The route request table.
Definition: dsr-options.h:239
ns3::dsr::DsrOptions::GetTypeId
static TypeId GetTypeId(void)
Get the type identificator.
Definition: dsr-options.cc:68
ns3::dsr::DsrOptionAck::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition: dsr-options.cc:1663
ns3::dsr::DsrOptionRerr::m_routeCache
Ptr< dsr::DsrRouteCache > m_routeCache
The route cache.
Definition: dsr-options.h:488
ns3::dsr::DsrOptions::m_ipv4
Ptr< Ipv4 > m_ipv4
The ipv4.
Definition: dsr-options.h:251
ns3::dsr::DsrOptionAckReq::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:1618
ns3::dsr::DsrOptionRrep::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:988
ns3::dsr::DsrOptionAckReq::m_routeCache
Ptr< dsr::DsrRouteCache > m_routeCache
The route cache.
Definition: dsr-options.h:528
ns3::dsr::DsrOptionRerr::m_ipv4
Ptr< Ipv4 > m_ipv4
The ipv4 layer 3.
Definition: dsr-options.h:492
ns3::dsr::DsrOptions::SetRoute
virtual Ptr< Ipv4Route > SetRoute(Ipv4Address nextHop, Ipv4Address srcAddress)
Set the route to use for data packets, used by the option headers when sending data/control packets.
Definition: dsr-options.cc:139
ns3::dsr::DsrOptions::m_finalRoute
std::vector< Ipv4Address > m_finalRoute
The vector of final Ipv4 address.
Definition: dsr-options.h:259
ns3::dsr::DsrOptionAck
Dsr Option Ack.
Definition: dsr-options.h:540
ns3::dsr::DsrOptionRrep::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition: dsr-options.cc:983
ns3::dsr::DsrOptionRerrUnreachHeader
Route Error (RERR) Unreachable node address option Message Format.
Definition: dsr-option-header.h:874
ns3::dsr::DsrOptionAckReq::m_ipv4
Ptr< Ipv4 > m_ipv4
The ipv4 layer 3.
Definition: dsr-options.h:532
ns3::dsr::DsrOptionAck::m_ipv4
Ptr< Ipv4 > m_ipv4
The ipv4 layer 3.
Definition: dsr-options.h:572
ns3::dsr::DsrOptions::ActiveRouteTimeout
Time ActiveRouteTimeout
The active route timeout value.
Definition: dsr-options.h:263
ns3::dsr::DsrOptionPad1
Dsr Option Pad1.
Definition: dsr-options.h:278
dsr-maintain-buff.h
dsr-rcache.h
ns3::dsr::DsrOptionPad1::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:401
ns3::dsr::DsrOptionSR::~DsrOptionSR
virtual ~DsrOptionSR()
Definition: dsr-options.cc:1179
ns3::dsr::DsrOptionAckReq::~DsrOptionAckReq
virtual ~DsrOptionAckReq()
Definition: dsr-options.cc:1602
ns3::dsr::DsrOptionRrep::OPT_NUMBER
static const uint8_t OPT_NUMBER
Router alert option number.
Definition: dsr-options.h:378
ns3::dsr::DsrOptionRerr::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:1431
ns3::dsr::DsrOptionSR::OPT_NUMBER
static const uint8_t OPT_NUMBER
Source Route option number.
Definition: dsr-options.h:418
ns3::dsr::DsrOptions::m_dropTrace
TracedCallback< Ptr< const Packet > > m_dropTrace
Drop trace callback.
Definition: dsr-options.h:231
ns3::dsr::DsrOptionRreq::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition: dsr-options.cc:473
ns3::dsr::DsrOptions::GetNodeWithAddress
Ptr< Node > GetNodeWithAddress(Ipv4Address ipv4Address)
Get the node object with Ipv4Address.
Definition: dsr-options.cc:362
ns3::dsr::DsrOptionRrep::~DsrOptionRrep
virtual ~DsrOptionRrep()
Definition: dsr-options.cc:978
ns3::dsr::DsrOptionAckReq::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition: dsr-options.cc:1607
ns3::dsr::DsrOptions
Introspection did not find any typical Config paths.
Definition: dsr-options.h:75
ns3::dsr::DsrOptionSR::GetOptionNumber
virtual uint8_t GetOptionNumber() const
Get the option number.
Definition: dsr-options.cc:1189
ns3::dsr::DsrOptionRrep::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:963
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:813
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition: traced-callback.h:53
ns3::dsr::DsrOptionRreq::m_routeCache
Ptr< dsr::DsrRouteCache > m_routeCache
The route cache.
Definition: dsr-options.h:361
ns3::dsr::DsrOptionRreq::DsrOptionRreq
DsrOptionRreq()
Constructor.
Definition: dsr-options.cc:478
ns3::dsr::DsrOptionRerr::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:1406
ns3::dsr::DsrOptionAckReq::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition: dsr-options.cc:1587
ns3::dsr::DsrOptionPad1::OPT_NUMBER
static const uint8_t OPT_NUMBER
Pad1 option number.
Definition: dsr-options.h:283
ns3::dsr::DsrOptionRreq::m_ipv4
Ptr< Ipv4 > m_ipv4
The ipv4.
Definition: dsr-options.h:365
ns3::dsr::DsrOptionAckReq::DsrOptionAckReq
DsrOptionAckReq()
Definition: dsr-options.cc:1597
ns3::dsr::DsrOptionAck::Process
virtual uint8_t Process(Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
Process method.
Definition: dsr-options.cc:1674
dsr-option-header.h
ns3::dsr::DsrOptions::ReverseSearchNextTwoHop
Ipv4Address ReverseSearchNextTwoHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Reverse search for the next two hop in the route.
Definition: dsr-options.cc:225
ns3::dsr::DsrOptionSR
Dsr Option Source Route.
Definition: dsr-options.h:413
ns3::dsr::DsrOptionRerr
Dsr Option Route Error.
Definition: dsr-options.h:449