A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
aodv-routing-protocol.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 AODVROUTINGPROTOCOL_H
28#define AODVROUTINGPROTOCOL_H
29
30#include "aodv-dpd.h"
31#include "aodv-neighbor.h"
32#include "aodv-packet.h"
33#include "aodv-rqueue.h"
34#include "aodv-rtable.h"
35
36#include "ns3/ipv4-interface.h"
37#include "ns3/ipv4-l3-protocol.h"
38#include "ns3/ipv4-routing-protocol.h"
39#include "ns3/node.h"
40#include "ns3/output-stream-wrapper.h"
41#include "ns3/random-variable-stream.h"
42
43#include <map>
44
45namespace ns3
46{
47
48class WifiMpdu;
49enum WifiMacDropReason : uint8_t; // opaque enum declaration
50
51namespace aodv
52{
53/**
54 * \ingroup aodv
55 *
56 * \brief AODV routing protocol
57 */
59{
60 public:
61 /**
62 * \brief Get the type ID.
63 * \return the object TypeId
64 */
65 static TypeId GetTypeId();
66 static const uint32_t AODV_PORT;
67
68 /// constructor
70 ~RoutingProtocol() override;
71 void DoDispose() override;
72
73 // Inherited from Ipv4RoutingProtocol
75 const Ipv4Header& header,
77 Socket::SocketErrno& sockerr) override;
79 const Ipv4Header& header,
81 const UnicastForwardCallback& ucb,
82 const MulticastForwardCallback& mcb,
83 const LocalDeliverCallback& lcb,
84 const ErrorCallback& ecb) override;
85 void NotifyInterfaceUp(uint32_t interface) override;
86 void NotifyInterfaceDown(uint32_t interface) override;
87 void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address) override;
88 void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address) override;
89 void SetIpv4(Ptr<Ipv4> ipv4) override;
91 Time::Unit unit = Time::S) const override;
92
93 // Handle protocol parameters
94 /**
95 * Get maximum queue time
96 * \returns the maximum queue time
97 */
99 {
100 return m_maxQueueTime;
101 }
102
103 /**
104 * Set the maximum queue time
105 * \param t the maximum queue time
106 */
107 void SetMaxQueueTime(Time t);
108
109 /**
110 * Get the maximum queue length
111 * \returns the maximum queue length
112 */
114 {
115 return m_maxQueueLen;
116 }
117
118 /**
119 * Set the maximum queue length
120 * \param len the maximum queue length
121 */
122 void SetMaxQueueLen(uint32_t len);
123
124 /**
125 * Get destination only flag
126 * \returns the destination only flag
127 */
129 {
130 return m_destinationOnly;
131 }
132
133 /**
134 * Set destination only flag
135 * \param f the destination only flag
136 */
138 {
140 }
141
142 /**
143 * Get gratuitous reply flag
144 * \returns the gratuitous reply flag
145 */
147 {
148 return m_gratuitousReply;
149 }
150
151 /**
152 * Set gratuitous reply flag
153 * \param f the gratuitous reply flag
154 */
156 {
158 }
159
160 /**
161 * Set hello enable
162 * \param f the hello enable flag
163 */
164 void SetHelloEnable(bool f)
165 {
166 m_enableHello = f;
167 }
168
169 /**
170 * Get hello enable flag
171 * \returns the enable hello flag
172 */
173 bool GetHelloEnable() const
174 {
175 return m_enableHello;
176 }
177
178 /**
179 * Set broadcast enable flag
180 * \param f enable broadcast flag
181 */
183 {
185 }
186
187 /**
188 * Get broadcast enable flag
189 * \returns the broadcast enable flag
190 */
192 {
193 return m_enableBroadcast;
194 }
195
196 /**
197 * Assign a fixed random variable stream number to the random variables
198 * used by this model. Return the number of streams (possibly zero) that
199 * have been assigned.
200 *
201 * \param stream first stream index to use
202 * \return the number of stream indices assigned by this model
203 */
204 int64_t AssignStreams(int64_t stream);
205
206 protected:
207 void DoInitialize() override;
208
209 private:
210 /**
211 * Notify that an MPDU was dropped.
212 *
213 * \param reason the reason why the MPDU was dropped
214 * \param mpdu the dropped MPDU
215 */
217
218 // Protocol parameters.
219 uint32_t m_rreqRetries; ///< Maximum number of retransmissions of RREQ with TTL = NetDiameter to
220 ///< discover a route
221 uint16_t m_ttlStart; ///< Initial TTL value for RREQ.
222 uint16_t m_ttlIncrement; ///< TTL increment for each attempt using the expanding ring search for
223 ///< RREQ dissemination.
224 uint16_t m_ttlThreshold; ///< Maximum TTL value for expanding ring search, TTL = NetDiameter is
225 ///< used beyond this value.
226 uint16_t m_timeoutBuffer; ///< Provide a buffer for the timeout.
227 uint16_t m_rreqRateLimit; ///< Maximum number of RREQ per second.
228 uint16_t m_rerrRateLimit; ///< Maximum number of REER per second.
229 Time m_activeRouteTimeout; ///< Period of time during which the route is considered to be valid.
230 uint32_t m_netDiameter; ///< Net diameter measures the maximum possible number of hops between
231 ///< two nodes in the network
232 /**
233 * NodeTraversalTime is a conservative estimate of the average one hop traversal time for
234 * packets and should include queuing delays, interrupt processing times and transfer times.
235 */
237 Time m_netTraversalTime; ///< Estimate of the average net traversal time.
238 Time m_pathDiscoveryTime; ///< Estimate of maximum time needed to find route in network.
239 Time m_myRouteTimeout; ///< Value of lifetime field in RREP generating by this node.
240 /**
241 * Every HelloInterval the node checks whether it has sent a broadcast within the last
242 * HelloInterval. If it has not, it MAY broadcast a Hello message
243 */
245 uint32_t m_allowedHelloLoss; ///< Number of hello messages which may be loss for valid link
246 /**
247 * DeletePeriod is intended to provide an upper bound on the time for which an upstream node A
248 * can have a neighbor B as an active next hop for destination D, while B has invalidated the
249 * route to D.
250 */
252 Time m_nextHopWait; ///< Period of our waiting for the neighbour's RREP_ACK
253 Time m_blackListTimeout; ///< Time for which the node is put into the blacklist
254 uint32_t m_maxQueueLen; ///< The maximum number of packets that we allow a routing protocol to
255 ///< buffer.
256 Time m_maxQueueTime; ///< The maximum period of time that a routing protocol is allowed to
257 ///< buffer a packet for.
258 bool m_destinationOnly; ///< Indicates only the destination may respond to this RREQ.
259 bool m_gratuitousReply; ///< Indicates whether a gratuitous RREP should be unicast to the node
260 ///< originated route discovery.
261 bool m_enableHello; ///< Indicates whether a hello messages enable
262 bool m_enableBroadcast; ///< Indicates whether a a broadcast data packets forwarding enable
263
264 /// IP protocol
266 /// Raw unicast socket per each IP interface, map socket -> iface address (IP + mask)
268 /// Raw subnet directed broadcast socket per each IP interface, map socket -> iface address (IP
269 /// + mask)
271 /// Loopback device used to defer RREQ until packet will be fully formed
273
274 /// Routing table
276 /// A "drop-front" queue used by the routing layer to buffer packets to which it does not have a
277 /// route.
279 /// Broadcast ID
281 /// Request sequence number
283 /// Handle duplicated RREQ
285 /// Handle duplicated broadcast/multicast packets
287 /// Handle neighbors
289 /// Number of RREQs used for RREQ rate control
290 uint16_t m_rreqCount;
291 /// Number of RERRs used for RERR rate control
292 uint16_t m_rerrCount;
293
294 private:
295 /// Start protocol operation
296 void Start();
297 /**
298 * Queue packet and send route request
299 *
300 * \param p the packet to route
301 * \param header the IP header
302 * \param ucb the UnicastForwardCallback function
303 * \param ecb the ErrorCallback function
304 */
306 const Ipv4Header& header,
308 ErrorCallback ecb);
309 /**
310 * If route exists and is valid, forward packet.
311 *
312 * \param p the packet to route
313 * \param header the IP header
314 * \param ucb the UnicastForwardCallback function
315 * \param ecb the ErrorCallback function
316 * \returns true if forwarded
317 */
319 const Ipv4Header& header,
321 ErrorCallback ecb);
322 /**
323 * Repeated attempts by a source node at route discovery for a single destination
324 * use the expanding ring search technique.
325 * \param dst the destination IP address
326 */
328 /**
329 * Set lifetime field in routing table entry to the maximum of existing lifetime and lt, if the
330 * entry exists
331 * \param addr destination address
332 * \param lt proposed time for lifetime field in routing table entry for destination with
333 * address addr.
334 * \return true if route to destination address addr exist
335 */
336 bool UpdateRouteLifeTime(Ipv4Address addr, Time lt);
337 /**
338 * Update neighbor record.
339 * \param receiver is supposed to be my interface
340 * \param sender is supposed to be IP address of my neighbor.
341 */
342 void UpdateRouteToNeighbor(Ipv4Address sender, Ipv4Address receiver);
343 /**
344 * Test whether the provided address is assigned to an interface on this node
345 * \param src the source IP address
346 * \returns true if the IP address is the node's IP address
347 */
348 bool IsMyOwnAddress(Ipv4Address src);
349 /**
350 * Find unicast socket with local interface address iface
351 *
352 * \param iface the interface
353 * \returns the socket associated with the interface
354 */
356 /**
357 * Find subnet directed broadcast socket with local interface address iface
358 *
359 * \param iface the interface
360 * \returns the socket associated with the interface
361 */
363 /**
364 * Process hello message
365 *
366 * \param rrepHeader RREP message header
367 * \param receiverIfaceAddr receiver interface IP address
368 */
369 void ProcessHello(const RrepHeader& rrepHeader, Ipv4Address receiverIfaceAddr);
370 /**
371 * Create loopback route for given header
372 *
373 * \param header the IP header
374 * \param oif the output interface net device
375 * \returns the route
376 */
377 Ptr<Ipv4Route> LoopbackRoute(const Ipv4Header& header, Ptr<NetDevice> oif) const;
378
379 /**
380 * \name Receive control packets
381 * @{
382 */
383 /**
384 * Receive and process control packet
385 * \param socket input socket
386 */
387 void RecvAodv(Ptr<Socket> socket);
388 /**
389 * Receive RREQ
390 * \param p packet
391 * \param receiver receiver address
392 * \param src sender address
393 */
394 void RecvRequest(Ptr<Packet> p, Ipv4Address receiver, Ipv4Address src);
395 /**
396 * Receive RREP
397 * \param p packet
398 * \param my destination address
399 * \param src sender address
400 */
402 /**
403 * Receive RREP_ACK
404 * \param neighbor neighbor address
405 */
406 void RecvReplyAck(Ipv4Address neighbor);
407 /**
408 * Receive RERR
409 * \param p packet
410 * \param src sender address
411 */
412 /// Receive from node with address src
413 void RecvError(Ptr<Packet> p, Ipv4Address src);
414 /** @} */
415
416 /**
417 * \name Send
418 * @{
419 */
420 /** Forward packet from route request queue
421 * \param dst destination address
422 * \param route route to use
423 */
425 /// Send hello
426 void SendHello();
427 /** Send RREQ
428 * \param dst destination address
429 */
430 void SendRequest(Ipv4Address dst);
431 /** Send RREP
432 * \param rreqHeader route request header
433 * \param toOrigin routing table entry to originator
434 */
435 void SendReply(const RreqHeader& rreqHeader, const RoutingTableEntry& toOrigin);
436 /** Send RREP by intermediate node
437 * \param toDst routing table entry to destination
438 * \param toOrigin routing table entry to originator
439 * \param gratRep indicates whether a gratuitous RREP should be unicast to destination
440 */
442 RoutingTableEntry& toOrigin,
443 bool gratRep);
444 /** Send RREP_ACK
445 * \param neighbor neighbor address
446 */
447 void SendReplyAck(Ipv4Address neighbor);
448 /** Initiate RERR
449 * \param nextHop next hop address
450 */
452 /** Forward RERR
453 * \param packet packet
454 * \param precursors list of addresses of the visited nodes
455 */
456 void SendRerrMessage(Ptr<Packet> packet, std::vector<Ipv4Address> precursors);
457 /**
458 * Send RERR message when no route to forward input packet. Unicast if there is reverse route to
459 * originating node, broadcast otherwise.
460 * \param dst destination node IP address
461 * \param dstSeqNo destination node sequence number
462 * \param origin originating node IP address
463 */
465 /** @} */
466
467 /**
468 * Send packet to destination socket
469 * \param socket destination node socket
470 * \param packet packet to send
471 * \param destination destination node IP address
472 */
473 void SendTo(Ptr<Socket> socket, Ptr<Packet> packet, Ipv4Address destination);
474
475 /// Hello timer
477 /// Schedule next send of hello message
478 void HelloTimerExpire();
479 /// RREQ rate limit timer
481 /// Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec.
483 /// RERR rate limit timer
485 /// Reset RERR count and schedule RERR rate limit timer with delay 1 sec.
487 /// Map IP address + RREQ timer.
488 std::map<Ipv4Address, Timer> m_addressReqTimer;
489 /**
490 * Handle route discovery process
491 * \param dst the destination IP address
492 */
494 /**
495 * Mark link to neighbor node as unidirectional for blacklistTimeout
496 *
497 * \param neighbor the IP address of the neighbor node
498 * \param blacklistTimeout the black list timeout time
499 */
500 void AckTimerExpire(Ipv4Address neighbor, Time blacklistTimeout);
501
502 /// Provides uniform random variables.
504 /// Keep track of the last bcast time
506};
507
508} // namespace aodv
509} // namespace ns3
510
511#endif /* AODVROUTINGPROTOCOL_H */
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
Packet header for IPv4.
Definition: ipv4-header.h:34
a class to store IPv4 address information on an interface
Abstract base class for IPv4 routing protocols.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
SocketErrno
Enumeration of the possible errors returned by a socket.
Definition: socket.h:84
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Unit
The unit to use to interpret a number representing time.
Definition: nstime.h:111
@ S
second
Definition: nstime.h:116
A simple virtual Timer class.
Definition: timer.h:78
a unique identifier for an interface.
Definition: type-id.h:59
Helper class used to remember already seen packets and detect duplicates.
Definition: aodv-dpd.h:45
Unique packets identification cache used for simple duplicate detection.
Definition: aodv-id-cache.h:46
maintain list of active neighbors
Definition: aodv-neighbor.h:54
AODV route request queue.
Definition: aodv-rqueue.h:197
Ptr< Ipv4Route > LoopbackRoute(const Ipv4Header &header, Ptr< NetDevice > oif) const
Create loopback route for given header.
uint32_t m_requestId
Broadcast ID.
void RecvAodv(Ptr< Socket > socket)
Receive and process control packet.
void UpdateRouteToNeighbor(Ipv4Address sender, Ipv4Address receiver)
Update neighbor record.
Timer m_rerrRateLimitTimer
RERR rate limit timer.
Time m_lastBcastTime
Keep track of the last bcast time.
void RecvReply(Ptr< Packet > p, Ipv4Address my, Ipv4Address src)
Receive RREP.
bool m_enableBroadcast
Indicates whether a a broadcast data packets forwarding enable.
bool GetBroadcastEnable() const
Get broadcast enable flag.
bool UpdateRouteLifeTime(Ipv4Address addr, Time lt)
Set lifetime field in routing table entry to the maximum of existing lifetime and lt,...
void RerrRateLimitTimerExpire()
Reset RERR count and schedule RERR rate limit timer with delay 1 sec.
Time m_blackListTimeout
Time for which the node is put into the blacklist.
void RecvReplyAck(Ipv4Address neighbor)
Receive RREP_ACK.
std::map< Ptr< Socket >, Ipv4InterfaceAddress > m_socketSubnetBroadcastAddresses
Raw subnet directed broadcast socket per each IP interface, map socket -> iface address (IP.
Time m_maxQueueTime
The maximum period of time that a routing protocol is allowed to buffer a packet for.
Time m_activeRouteTimeout
Period of time during which the route is considered to be valid.
std::map< Ipv4Address, Timer > m_addressReqTimer
Map IP address + RREQ timer.
uint32_t GetMaxQueueLen() const
Get the maximum queue length.
void DeferredRouteOutput(Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb)
Queue packet and send route request.
void SendTo(Ptr< Socket > socket, Ptr< Packet > packet, Ipv4Address destination)
Send packet to destination socket.
DuplicatePacketDetection m_dpd
Handle duplicated broadcast/multicast packets.
Time m_netTraversalTime
Estimate of the average net traversal time.
void DoDispose() override
Destructor implementation.
void SendRequest(Ipv4Address dst)
Send RREQ.
Time m_pathDiscoveryTime
Estimate of maximum time needed to find route in network.
bool m_gratuitousReply
Indicates whether a gratuitous RREP should be unicast to the node originated route discovery.
uint16_t m_rerrCount
Number of RERRs used for RERR rate control.
void HelloTimerExpire()
Schedule next send of hello message.
void NotifyTxError(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
Notify that an MPDU was dropped.
RoutingTable m_routingTable
Routing table.
uint16_t m_rreqRateLimit
Maximum number of RREQ per second.
Ptr< NetDevice > m_lo
Loopback device used to defer RREQ until packet will be fully formed.
uint32_t m_netDiameter
Net diameter measures the maximum possible number of hops between two nodes in the network.
uint32_t m_maxQueueLen
The maximum number of packets that we allow a routing protocol to buffer.
uint16_t m_ttlThreshold
Maximum TTL value for expanding ring search, TTL = NetDiameter is used beyond this value.
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables.
void SetMaxQueueTime(Time t)
Set the maximum queue time.
uint16_t m_ttlIncrement
TTL increment for each attempt using the expanding ring search for RREQ dissemination.
Time m_myRouteTimeout
Value of lifetime field in RREP generating by this node.
uint16_t m_timeoutBuffer
Provide a buffer for the timeout.
void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) const override
Print the Routing Table entries.
Ptr< Socket > FindSocketWithInterfaceAddress(Ipv4InterfaceAddress iface) const
Find unicast socket with local interface address iface.
void NotifyInterfaceDown(uint32_t interface) override
void SetBroadcastEnable(bool f)
Set broadcast enable flag.
void SendPacketFromQueue(Ipv4Address dst, Ptr< Ipv4Route > route)
Forward packet from route request queue.
uint32_t m_allowedHelloLoss
Number of hello messages which may be loss for valid link.
bool IsMyOwnAddress(Ipv4Address src)
Test whether the provided address is assigned to an interface on this node.
void SetMaxQueueLen(uint32_t len)
Set the maximum queue length.
void ScheduleRreqRetry(Ipv4Address dst)
Repeated attempts by a source node at route discovery for a single destination use the expanding ring...
void SendReplyByIntermediateNode(RoutingTableEntry &toDst, RoutingTableEntry &toOrigin, bool gratRep)
Send RREP by intermediate node.
std::map< Ptr< Socket >, Ipv4InterfaceAddress > m_socketAddresses
Raw unicast socket per each IP interface, map socket -> iface address (IP + mask)
void SetGratuitousReplyFlag(bool f)
Set gratuitous reply flag.
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, const UnicastForwardCallback &ucb, const MulticastForwardCallback &mcb, const LocalDeliverCallback &lcb, const ErrorCallback &ecb) override
Route an input packet (to be forwarded or locally delivered)
void Start()
Start protocol operation.
uint16_t m_rreqCount
Number of RREQs used for RREQ rate control.
IdCache m_rreqIdCache
Handle duplicated RREQ.
Time m_deletePeriod
DeletePeriod is intended to provide an upper bound on the time for which an upstream node A can have ...
void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address) override
void SendRerrWhenNoRouteToForward(Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin)
Send RERR message when no route to forward input packet.
Time m_helloInterval
Every HelloInterval the node checks whether it has sent a broadcast within the last HelloInterval.
void AckTimerExpire(Ipv4Address neighbor, Time blacklistTimeout)
Mark link to neighbor node as unidirectional for blacklistTimeout.
void SetHelloEnable(bool f)
Set hello enable.
bool m_destinationOnly
Indicates only the destination may respond to this RREQ.
void SetIpv4(Ptr< Ipv4 > ipv4) override
static TypeId GetTypeId()
Get the type ID.
void SetDestinationOnlyFlag(bool f)
Set destination only flag.
bool GetDestinationOnlyFlag() const
Get destination only flag.
void SendRerrMessage(Ptr< Packet > packet, std::vector< Ipv4Address > precursors)
Forward RERR.
uint16_t m_ttlStart
Initial TTL value for RREQ.
uint32_t m_rreqRetries
Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route.
uint32_t m_seqNo
Request sequence number.
bool m_enableHello
Indicates whether a hello messages enable.
Neighbors m_nb
Handle neighbors.
bool Forwarding(Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb)
If route exists and is valid, forward packet.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
static const uint32_t AODV_PORT
UDP Port for AODV control traffic.
Timer m_rreqRateLimitTimer
RREQ rate limit timer.
Time GetMaxQueueTime() const
Get maximum queue time.
void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address) override
Time m_nodeTraversalTime
NodeTraversalTime is a conservative estimate of the average one hop traversal time for packets and sh...
uint16_t m_rerrRateLimit
Maximum number of REER per second.
void RecvRequest(Ptr< Packet > p, Ipv4Address receiver, Ipv4Address src)
Receive RREQ.
Ptr< Socket > FindSubnetBroadcastSocketWithInterfaceAddress(Ipv4InterfaceAddress iface) const
Find subnet directed broadcast socket with local interface address iface.
void DoInitialize() override
Initialize() implementation.
bool GetHelloEnable() const
Get hello enable flag.
void SendRerrWhenBreaksLinkToNextHop(Ipv4Address nextHop)
Initiate RERR.
void RouteRequestTimerExpire(Ipv4Address dst)
Handle route discovery process.
void NotifyInterfaceUp(uint32_t interface) override
bool GetGratuitousReplyFlag() const
Get gratuitous reply flag.
void RecvError(Ptr< Packet > p, Ipv4Address src)
Receive RERR.
Ptr< Ipv4Route > RouteOutput(Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr) override
Query routing cache for an existing route, for an outbound packet.
Time m_nextHopWait
Period of our waiting for the neighbour's RREP_ACK.
void SendReplyAck(Ipv4Address neighbor)
Send RREP_ACK.
Ptr< Ipv4 > m_ipv4
IP protocol.
void RreqRateLimitTimerExpire()
Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec.
void ProcessHello(const RrepHeader &rrepHeader, Ipv4Address receiverIfaceAddr)
Process hello message.
void SendReply(const RreqHeader &rreqHeader, const RoutingTableEntry &toOrigin)
Send RREP.
RequestQueue m_queue
A "drop-front" queue used by the routing layer to buffer packets to which it does not have a route.
Routing table entry.
Definition: aodv-rtable.h:62
The Routing table used by AODV protocol.
Definition: aodv-rtable.h:424
Route Reply (RREP) Message Format.
Definition: aodv-packet.h:358
Route Request (RREQ) Message Format.
Definition: aodv-packet.h:138
WifiMacDropReason
The reason why an MPDU was dropped.
Definition: wifi-mac.h:80
Every class exported by the ns3 library is enclosed in the ns3 namespace.