A Discrete-Event Network Simulator
API
aodv-routing-protocol.h
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 #ifndef AODVROUTINGPROTOCOL_H
29 #define AODVROUTINGPROTOCOL_H
30 
31 #include "aodv-rtable.h"
32 #include "aodv-rqueue.h"
33 #include "aodv-packet.h"
34 #include "aodv-neighbor.h"
35 #include "aodv-dpd.h"
36 #include "ns3/node.h"
37 #include "ns3/random-variable-stream.h"
38 #include "ns3/output-stream-wrapper.h"
39 #include "ns3/ipv4-routing-protocol.h"
40 #include "ns3/ipv4-interface.h"
41 #include "ns3/ipv4-l3-protocol.h"
42 #include <map>
43 
44 namespace ns3 {
45 
46 class WifiMacQueueItem;
47 enum WifiMacDropReason : uint8_t; // opaque enum declaration
48 
49 namespace aodv {
56 {
57 public:
62  static TypeId GetTypeId (void);
63  static const uint32_t AODV_PORT;
64 
66  RoutingProtocol ();
67  virtual ~RoutingProtocol ();
68  virtual void DoDispose ();
69 
70  // Inherited from Ipv4RoutingProtocol
72  bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
75  virtual void NotifyInterfaceUp (uint32_t interface);
76  virtual void NotifyInterfaceDown (uint32_t interface);
77  virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address);
78  virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
79  virtual void SetIpv4 (Ptr<Ipv4> ipv4);
80  virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit unit = Time::S) const;
81 
82  // Handle protocol parameters
88  {
89  return m_maxQueueTime;
90  }
95  void SetMaxQueueTime (Time t);
100  uint32_t GetMaxQueueLen () const
101  {
102  return m_maxQueueLen;
103  }
108  void SetMaxQueueLen (uint32_t len);
114  {
115  return m_destinationOnly;
116  }
122  {
124  }
130  {
131  return m_gratuitousReply;
132  }
138  {
140  }
145  void SetHelloEnable (bool f)
146  {
147  m_enableHello = f;
148  }
153  bool GetHelloEnable () const
154  {
155  return m_enableHello;
156  }
161  void SetBroadcastEnable (bool f)
162  {
164  }
169  bool GetBroadcastEnable () const
170  {
171  return m_enableBroadcast;
172  }
173 
182  int64_t AssignStreams (int64_t stream);
183 
184 protected:
185  virtual void DoInitialize (void);
186 private:
194 
195  // Protocol parameters.
196  uint32_t m_rreqRetries;
197  uint16_t m_ttlStart;
198  uint16_t m_ttlIncrement;
199  uint16_t m_ttlThreshold;
200  uint16_t m_timeoutBuffer;
201  uint16_t m_rreqRateLimit;
202  uint16_t m_rerrRateLimit;
204  uint32_t m_netDiameter;
205 
213 
219 
226  uint32_t m_maxQueueLen;
232  //\}
233 
237  std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketAddresses;
242 
248  uint32_t m_requestId;
250  uint32_t m_seqNo;
258  uint16_t m_rreqCount;
260  uint16_t m_rerrCount;
261 
262 private:
264  void Start ();
289  void ScheduleRreqRetry (Ipv4Address dst);
296  bool UpdateRouteLifeTime (Ipv4Address addr, Time lt);
302  void UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver);
308  bool IsMyOwnAddress (Ipv4Address src);
329  void ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiverIfaceAddr);
337  Ptr<Ipv4Route> LoopbackRoute (const Ipv4Header & header, Ptr<NetDevice> oif) const;
338 
340  //\{
345  void RecvAodv (Ptr<Socket> socket);
352  void RecvRequest (Ptr<Packet> p, Ipv4Address receiver, Ipv4Address src);
359  void RecvReply (Ptr<Packet> p, Ipv4Address my, Ipv4Address src);
364  void RecvReplyAck (Ipv4Address neighbor);
370  void RecvError (Ptr<Packet> p, Ipv4Address src);
372  //\}
373 
375  //\{
382  void SendHello ();
386  void SendRequest (Ipv4Address dst);
391  void SendReply (RreqHeader const & rreqHeader, RoutingTableEntry const & toOrigin);
397  void SendReplyByIntermediateNode (RoutingTableEntry & toDst, RoutingTableEntry & toOrigin, bool gratRep);
401  void SendReplyAck (Ipv4Address neighbor);
410  void SendRerrMessage (Ptr<Packet> packet, std::vector<Ipv4Address> precursors);
417  void SendRerrWhenNoRouteToForward (Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin);
419 
426  void SendTo (Ptr<Socket> socket, Ptr<Packet> packet, Ipv4Address destination);
427 
431  void HelloTimerExpire ();
435  void RreqRateLimitTimerExpire ();
439  void RerrRateLimitTimerExpire ();
441  std::map<Ipv4Address, Timer> m_addressReqTimer;
453  void AckTimerExpire (Ipv4Address neighbor, Time blacklistTimeout);
454 
459 };
460 
461 } //namespace aodv
462 } //namespace ns3
463 
464 #endif /* AODVROUTINGPROTOCOL_H */
ns3::aodv::RoutingProtocol::RouteOutput
Ptr< Ipv4Route > RouteOutput(Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet.
Definition: aodv-routing-protocol.cc:378
ns3::aodv::RoutingProtocol::m_socketAddresses
std::map< Ptr< Socket >, Ipv4InterfaceAddress > m_socketAddresses
Raw unicast socket per each IP interface, map socket -> iface address (IP + mask)
Definition: aodv-routing-protocol.h:237
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::aodv::RoutingProtocol::RerrRateLimitTimerExpire
void RerrRateLimitTimerExpire()
Reset RERR count and schedule RERR rate limit timer with delay 1 sec.
Definition: aodv-routing-protocol.cc:1827
ns3::aodv::RoutingProtocol::GetMaxQueueLen
uint32_t GetMaxQueueLen() const
Get the maximum queue length.
Definition: aodv-routing-protocol.h:100
ns3::aodv::RoutingProtocol::RecvRequest
void RecvRequest(Ptr< Packet > p, Ipv4Address receiver, Ipv4Address src)
Receive RREQ.
Definition: aodv-routing-protocol.cc:1227
aodv-neighbor.h
ns3::aodv::RoutingProtocol::Start
void Start()
Start protocol operation.
Definition: aodv-routing-protocol.cc:360
ns3::aodv::RoutingProtocol::FindSocketWithInterfaceAddress
Ptr< Socket > FindSocketWithInterfaceAddress(Ipv4InterfaceAddress iface) const
Find unicast socket with local interface address iface.
Definition: aodv-routing-protocol.cc:2085
ns3::aodv::RoutingProtocol::RecvReply
void RecvReply(Ptr< Packet > p, Ipv4Address my, Ipv4Address src)
Receive RREP.
Definition: aodv-routing-protocol.cc:1514
ns3::aodv::RoutingProtocol::RouteRequestTimerExpire
void RouteRequestTimerExpire(Ipv4Address dst)
Handle route discovery process.
Definition: aodv-routing-protocol.cc:1759
ns3::aodv::RoutingProtocol::m_ttlThreshold
uint16_t m_ttlThreshold
Maximum TTL value for expanding ring search, TTL = NetDiameter is used beyond this value.
Definition: aodv-routing-protocol.h:199
ns3::aodv::RoutingProtocol::ScheduleRreqRetry
void ScheduleRreqRetry(Ipv4Address dst)
Repeated attempts by a source node at route discovery for a single destination use the expanding ring...
Definition: aodv-routing-protocol.cc:1090
ns3::Socket::SocketErrno
SocketErrno
Enumeration of the possible errors returned by a socket.
Definition: socket.h:82
ns3::WifiMacDropReason
WifiMacDropReason
The reason why an MPDU was dropped.
Definition: wifi-mac.h:55
ns3::Callback
Callback template class.
Definition: callback.h:1279
ns3::aodv::RoutingProtocol::GetGratuitousReplyFlag
bool GetGratuitousReplyFlag() const
Get gratuitous reply flag.
Definition: aodv-routing-protocol.h:129
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::aodv::RoutingProtocol::m_nb
Neighbors m_nb
Handle neighbors.
Definition: aodv-routing-protocol.h:256
ns3::aodv::RoutingProtocol::SetIpv4
virtual void SetIpv4(Ptr< Ipv4 > ipv4)
Definition: aodv-routing-protocol.cc:648
ns3::aodv::RoutingProtocol::m_activeRouteTimeout
Time m_activeRouteTimeout
Period of time during which the route is considered to be valid.
Definition: aodv-routing-protocol.h:203
ns3::aodv::RoutingProtocol::RreqRateLimitTimerExpire
void RreqRateLimitTimerExpire()
Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec.
Definition: aodv-routing-protocol.cc:1819
ns3::aodv::RoutingProtocol::m_enableBroadcast
bool m_enableBroadcast
Indicates whether a a broadcast data packets forwarding enable.
Definition: aodv-routing-protocol.h:231
ns3::aodv::RoutingProtocol::m_uniformRandomVariable
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables.
Definition: aodv-routing-protocol.h:456
ns3::aodv::RoutingProtocol::Forwarding
bool Forwarding(Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb)
If route exists and is valid, forward packet.
Definition: aodv-routing-protocol.cc:592
ns3::aodv::RoutingProtocol::NotifyTxError
void NotifyTxError(WifiMacDropReason reason, Ptr< const WifiMacQueueItem > mpdu)
Notify that an MPDU was dropped.
Definition: aodv-routing-protocol.cc:733
ns3::aodv::RoutingProtocol::m_rerrRateLimit
uint16_t m_rerrRateLimit
Maximum number of REER per second.
Definition: aodv-routing-protocol.h:202
ns3::aodv::RoutingProtocol::m_lo
Ptr< NetDevice > m_lo
Loopback device used to defer RREQ until packet will be fully formed.
Definition: aodv-routing-protocol.h:241
ns3::aodv::DuplicatePacketDetection
Helper class used to remember already seen packets and detect duplicates.
Definition: aodv-dpd.h:42
ns3::aodv::RoutingProtocol::m_rreqRateLimit
uint16_t m_rreqRateLimit
Maximum number of RREQ per second.
Definition: aodv-routing-protocol.h:201
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::aodv::RoutingProtocol::m_allowedHelloLoss
uint32_t m_allowedHelloLoss
Number of hello messages which may be loss for valid link.
Definition: aodv-routing-protocol.h:218
ns3::aodv::IdCache
Unique packets identification cache used for simple duplicate detection.
Definition: aodv-id-cache.h:44
ns3::aodv::RoutingProtocol::AODV_PORT
static const uint32_t AODV_PORT
UDP Port for AODV control traffic.
Definition: aodv-routing-protocol.h:63
ns3::aodv::RoutingProtocol::DeferredRouteOutput
void DeferredRouteOutput(Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb)
Queue packet and send route request.
Definition: aodv-routing-protocol.cc:428
ns3::aodv::RoutingProtocol::m_maxQueueLen
uint32_t m_maxQueueLen
The maximum number of packets that we allow a routing protocol to buffer.
Definition: aodv-routing-protocol.h:226
ns3::aodv::RoutingProtocol::NotifyInterfaceDown
virtual void NotifyInterfaceDown(uint32_t interface)
Definition: aodv-routing-protocol.cc:739
ns3::aodv::RoutingProtocol::SendPacketFromQueue
void SendPacketFromQueue(Ipv4Address dst, Ptr< Ipv4Route > route)
Forward packet from route request queue.
Definition: aodv-routing-protocol.cc:1880
ns3::aodv::RoutingProtocol::SendReplyByIntermediateNode
void SendReplyByIntermediateNode(RoutingTableEntry &toDst, RoutingTableEntry &toOrigin, bool gratRep)
Send RREP by intermediate node.
Definition: aodv-routing-protocol.cc:1441
ns3::aodv::RoutingTableEntry
Routing table entry.
Definition: aodv-rtable.h:60
ns3::aodv::RoutingProtocol::m_queue
RequestQueue m_queue
A "drop-front" queue used by the routing layer to buffer packets to which it does not have a route.
Definition: aodv-routing-protocol.h:246
ns3::aodv::RoutingProtocol::m_htimer
Timer m_htimer
Hello timer.
Definition: aodv-routing-protocol.h:429
ns3::aodv::RoutingProtocol::SetDestinationOnlyFlag
void SetDestinationOnlyFlag(bool f)
Set destination only flag.
Definition: aodv-routing-protocol.h:121
ns3::aodv::RoutingProtocol::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition: aodv-routing-protocol.cc:2121
ns3::aodv::RoutingProtocol::m_enableHello
bool m_enableHello
Indicates whether a hello messages enable.
Definition: aodv-routing-protocol.h:230
ns3::Timer
A simple virtual Timer class.
Definition: timer.h:74
ns3::aodv::RoutingProtocol::SetBroadcastEnable
void SetBroadcastEnable(bool f)
Set broadcast enable flag.
Definition: aodv-routing-protocol.h:161
ns3::aodv::RoutingProtocol::m_requestId
uint32_t m_requestId
Broadcast ID.
Definition: aodv-routing-protocol.h:248
aodv-rqueue.h
ns3::aodv::RoutingProtocol::GetDestinationOnlyFlag
bool GetDestinationOnlyFlag() const
Get destination only flag.
Definition: aodv-routing-protocol.h:113
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::aodv::RoutingProtocol::SendRerrWhenNoRouteToForward
void SendRerrWhenNoRouteToForward(Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin)
Send RERR message when no route to forward input packet.
Definition: aodv-routing-protocol.cc:1959
ns3::aodv::RoutingProtocol::m_timeoutBuffer
uint16_t m_timeoutBuffer
Provide a buffer for the timeout.
Definition: aodv-routing-protocol.h:200
ns3::aodv::RoutingProtocol::m_rerrCount
uint16_t m_rerrCount
Number of RERRs used for RERR rate control.
Definition: aodv-routing-protocol.h:260
ns3::aodv::RreqHeader
Route Request (RREQ) Message Format.
Definition: aodv-packet.h:132
ns3::aodv::RoutingProtocol::m_ttlIncrement
uint16_t m_ttlIncrement
TTL increment for each attempt using the expanding ring search for RREQ dissemination.
Definition: aodv-routing-protocol.h:198
ns3::aodv::RoutingProtocol::SendHello
void SendHello()
Send hello.
Definition: aodv-routing-protocol.cc:1842
ns3::aodv::RoutingProtocol::RecvError
void RecvError(Ptr< Packet > p, Ipv4Address src)
Receive RERR.
Definition: aodv-routing-protocol.cc:1699
ns3::aodv::RoutingProtocol::SendRequest
void SendRequest(Ipv4Address dst)
Send RREQ.
Definition: aodv-routing-protocol.cc:967
aodv-rtable.h
ns3::aodv::RoutingProtocol::m_deletePeriod
Time m_deletePeriod
DeletePeriod is intended to provide an upper bound on the time for which an upstream node A can have ...
Definition: aodv-routing-protocol.h:223
ns3::Ipv4InterfaceAddress
a class to store IPv4 address information on an interface
Definition: ipv4-interface-address.h:44
ns3::aodv::RoutingProtocol::SetGratuitousReplyFlag
void SetGratuitousReplyFlag(bool f)
Set gratuitous reply flag.
Definition: aodv-routing-protocol.h:137
aodv-dpd.h
ns3::aodv::RoutingProtocol::NotifyAddAddress
virtual void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
Definition: aodv-routing-protocol.cc:782
ns3::aodv::RoutingProtocol::m_myRouteTimeout
Time m_myRouteTimeout
Value of lifetime field in RREP generating by this node.
Definition: aodv-routing-protocol.h:212
ns3::aodv::RoutingProtocol::m_rreqIdCache
IdCache m_rreqIdCache
Handle duplicated RREQ.
Definition: aodv-routing-protocol.h:252
ns3::aodv::RoutingProtocol::SendRerrWhenBreaksLinkToNextHop
void SendRerrWhenBreaksLinkToNextHop(Ipv4Address nextHop)
Initiate RERR.
Definition: aodv-routing-protocol.cc:1904
ns3::aodv::RoutingProtocol::m_destinationOnly
bool m_destinationOnly
Indicates only the destination may respond to this RREQ.
Definition: aodv-routing-protocol.h:228
ns3::aodv::RequestQueue
AODV route request queue.
Definition: aodv-rqueue.h:181
ns3::aodv::RoutingProtocol::m_ipv4
Ptr< Ipv4 > m_ipv4
IP protocol.
Definition: aodv-routing-protocol.h:235
ns3::aodv::RoutingProtocol::m_lastBcastTime
Time m_lastBcastTime
Keep track of the last bcast time.
Definition: aodv-routing-protocol.h:458
ns3::aodv::RoutingProtocol::IsMyOwnAddress
bool IsMyOwnAddress(Ipv4Address src)
Test whether the provided address is assigned to an interface on this node.
Definition: aodv-routing-protocol.cc:903
first.address
address
Definition: first.py:44
ns3::aodv::RoutingProtocol::SendTo
void SendTo(Ptr< Socket > socket, Ptr< Packet > packet, Ipv4Address destination)
Send packet to destination scoket.
Definition: aodv-routing-protocol.cc:1084
ns3::aodv::RoutingProtocol::FindSubnetBroadcastSocketWithInterfaceAddress
Ptr< Socket > FindSubnetBroadcastSocketWithInterfaceAddress(Ipv4InterfaceAddress iface) const
Find subnet directed broadcast socket with local interface address iface.
Definition: aodv-routing-protocol.cc:2103
ns3::aodv::RoutingProtocol::LoopbackRoute
Ptr< Ipv4Route > LoopbackRoute(const Ipv4Header &header, Ptr< NetDevice > oif) const
Create loopback route for given header.
Definition: aodv-routing-protocol.cc:919
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::aodv::RoutingProtocol::m_rreqRetries
uint32_t m_rreqRetries
Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route.
Definition: aodv-routing-protocol.h:196
ns3::aodv::RoutingProtocol::m_nextHopWait
Time m_nextHopWait
Period of our waiting for the neighbour's RREP_ACK.
Definition: aodv-routing-protocol.h:224
ns3::aodv::RoutingProtocol::m_routingTable
RoutingTable m_routingTable
Routing table.
Definition: aodv-routing-protocol.h:244
ns3::aodv::RoutingProtocol::m_ttlStart
uint16_t m_ttlStart
Initial TTL value for RREQ.
Definition: aodv-routing-protocol.h:197
ns3::aodv::RoutingProtocol::m_helloInterval
Time m_helloInterval
Every HelloInterval the node checks whether it has sent a broadcast within the last HelloInterval.
Definition: aodv-routing-protocol.h:217
ns3::aodv::RoutingProtocol::m_addressReqTimer
std::map< Ipv4Address, Timer > m_addressReqTimer
Map IP address + RREQ timer.
Definition: aodv-routing-protocol.h:441
ns3::aodv::RoutingProtocol::NotifyInterfaceUp
virtual void NotifyInterfaceUp(uint32_t interface)
Definition: aodv-routing-protocol.cc:670
ns3::aodv::RoutingProtocol::SendReply
void SendReply(RreqHeader const &rreqHeader, RoutingTableEntry const &toOrigin)
Send RREP.
Definition: aodv-routing-protocol.cc:1415
ns3::aodv::RoutingProtocol::~RoutingProtocol
virtual ~RoutingProtocol()
Definition: aodv-routing-protocol.cc:316
ns3::aodv::RoutingProtocol::UpdateRouteToNeighbor
void UpdateRouteToNeighbor(Ipv4Address sender, Ipv4Address receiver)
Update neighbor record.
Definition: aodv-routing-protocol.cc:1196
ns3::Ipv4RoutingProtocol
Abstract base class for IPv4 routing protocols.
Definition: ipv4-routing-protocol.h:57
ns3::aodv::RoutingProtocol::GetHelloEnable
bool GetHelloEnable() const
Get hello enable flag.
Definition: aodv-routing-protocol.h:153
ns3::aodv::RoutingProtocol::m_netTraversalTime
Time m_netTraversalTime
Estimate of the average net traversal time.
Definition: aodv-routing-protocol.h:210
ns3::aodv::RoutingProtocol::SendReplyAck
void SendReplyAck(Ipv4Address neighbor)
Send RREP_ACK.
Definition: aodv-routing-protocol.cc:1495
ns3::aodv::RrepHeader
Route Reply (RREP) Message Format.
Definition: aodv-packet.h:336
ns3::aodv::RoutingProtocol::SendRerrMessage
void SendRerrMessage(Ptr< Packet > packet, std::vector< Ipv4Address > precursors)
Forward RERR.
Definition: aodv-routing-protocol.cc:2016
ns3::aodv::RoutingProtocol::AssignStreams
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition: aodv-routing-protocol.cc:352
ns3::aodv::RoutingProtocol::UpdateRouteLifeTime
bool UpdateRouteLifeTime(Ipv4Address addr, Time lt)
Set lifetime field in routing table entry to the maximum of existing lifetime and lt,...
Definition: aodv-routing-protocol.cc:1177
ns3::aodv::RoutingProtocol::RecvAodv
void RecvAodv(Ptr< Socket > socket)
Receive and process control packet.
Definition: aodv-routing-protocol.cc:1120
ns3::aodv::RoutingProtocol::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: aodv-routing-protocol.cc:321
ns3::Time::S
@ S
second
Definition: nstime.h:115
ns3::aodv::RoutingProtocol::m_socketSubnetBroadcastAddresses
std::map< Ptr< Socket >, Ipv4InterfaceAddress > m_socketSubnetBroadcastAddresses
Raw subnet directed broadcast socket per each IP interface, map socket -> iface address (IP + mask)
Definition: aodv-routing-protocol.h:239
ns3::aodv::RoutingProtocol::SetMaxQueueLen
void SetMaxQueueLen(uint32_t len)
Set the maximum queue length.
Definition: aodv-routing-protocol.cc:304
f
double f(double x, void *params)
Definition: 80211b.c:70
ns3::aodv::RoutingProtocol::m_pathDiscoveryTime
Time m_pathDiscoveryTime
Estimate of maximum time needed to find route in network.
Definition: aodv-routing-protocol.h:211
ns3::aodv::RoutingProtocol::SetHelloEnable
void SetHelloEnable(bool f)
Set hello enable.
Definition: aodv-routing-protocol.h:145
ns3::aodv::RoutingTable
The Routing table used by AODV protocol.
Definition: aodv-rtable.h:390
ns3::aodv::RoutingProtocol::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: aodv-routing-protocol.cc:183
ns3::aodv::RoutingProtocol::m_nodeTraversalTime
Time m_nodeTraversalTime
NodeTraversalTime is a conservative estimate of the average one hop traversal time for packets and sh...
Definition: aodv-routing-protocol.h:209
ns3::aodv::RoutingProtocol
AODV routing protocol.
Definition: aodv-routing-protocol.h:56
ns3::aodv::RoutingProtocol::GetMaxQueueTime
Time GetMaxQueueTime() const
Get maximum queue time.
Definition: aodv-routing-protocol.h:87
ns3::aodv::RoutingProtocol::ProcessHello
void ProcessHello(RrepHeader const &rrepHeader, Ipv4Address receiverIfaceAddr)
Process hello message.
Definition: aodv-routing-protocol.cc:1663
ns3::aodv::RoutingProtocol::NotifyRemoveAddress
virtual void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
Definition: aodv-routing-protocol.cc:837
ns3::aodv::RoutingProtocol::GetBroadcastEnable
bool GetBroadcastEnable() const
Get broadcast enable flag.
Definition: aodv-routing-protocol.h:169
ns3::aodv::RoutingProtocol::m_rerrRateLimitTimer
Timer m_rerrRateLimitTimer
RERR rate limit timer.
Definition: aodv-routing-protocol.h:437
ns3::aodv::RoutingProtocol::PrintRoutingTable
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) const
Print the Routing Table entries.
Definition: aodv-routing-protocol.cc:340
ns3::aodv::RoutingProtocol::m_rreqCount
uint16_t m_rreqCount
Number of RREQs used for RREQ rate control.
Definition: aodv-routing-protocol.h:258
ns3::aodv::RoutingProtocol::m_dpd
DuplicatePacketDetection m_dpd
Handle duplicated broadcast/multicast packets.
Definition: aodv-routing-protocol.h:254
aodv-packet.h
ns3::aodv::RoutingProtocol::m_gratuitousReply
bool m_gratuitousReply
Indicates whether a gratuitous RREP should be unicast to the node originated route discovery.
Definition: aodv-routing-protocol.h:229
ns3::aodv::RoutingProtocol::m_maxQueueTime
Time m_maxQueueTime
The maximum period of time that a routing protocol is allowed to buffer a packet for.
Definition: aodv-routing-protocol.h:227
ns3::aodv::RoutingProtocol::m_rreqRateLimitTimer
Timer m_rreqRateLimitTimer
RREQ rate limit timer.
Definition: aodv-routing-protocol.h:433
ns3::aodv::RoutingProtocol::RecvReplyAck
void RecvReplyAck(Ipv4Address neighbor)
Receive RREP_ACK.
Definition: aodv-routing-protocol.cc:1650
ns3::aodv::Neighbors
maintain list of active neighbors
Definition: aodv-neighbor.h:52
ns3::aodv::RoutingProtocol::m_blackListTimeout
Time m_blackListTimeout
Time for which the node is put into the blacklist.
Definition: aodv-routing-protocol.h:225
ns3::aodv::RoutingProtocol::RouteInput
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
Route an input packet (to be forwarded or locally delivered)
Definition: aodv-routing-protocol.cc:450
ns3::aodv::RoutingProtocol::AckTimerExpire
void AckTimerExpire(Ipv4Address neighbor, Time blacklistTimeout)
Mark link to neighbor node as unidirectional for blacklistTimeout.
Definition: aodv-routing-protocol.cc:1835
ns3::Time::Unit
Unit
The unit to use to interpret a number representing time.
Definition: nstime.h:110
ns3::aodv::RoutingProtocol::HelloTimerExpire
void HelloTimerExpire()
Schedule next send of hello message.
Definition: aodv-routing-protocol.cc:1799
ns3::aodv::RoutingProtocol::m_netDiameter
uint32_t m_netDiameter
Net diameter measures the maximum possible number of hops between two nodes in the network.
Definition: aodv-routing-protocol.h:204
ns3::aodv::RoutingProtocol::SetMaxQueueTime
void SetMaxQueueTime(Time t)
Set the maximum queue time.
Definition: aodv-routing-protocol.cc:310
ns3::aodv::RoutingProtocol::m_seqNo
uint32_t m_seqNo
Request sequence number.
Definition: aodv-routing-protocol.h:250
ns3::aodv::RoutingProtocol::RoutingProtocol
RoutingProtocol()
constructor
Definition: aodv-routing-protocol.cc:141