A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dsr-routing.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Yufei Cheng
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Yufei Cheng <yfcheng@ittc.ku.edu>
7 *
8 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
9 * ResiliNets Research Group https://resilinets.org/
10 * Information and Telecommunication Technology Center (ITTC)
11 * and Department of Electrical Engineering and Computer Science
12 * The University of Kansas Lawrence, KS USA.
13 *
14 * Work supported in part by NSF FIND (Future Internet Design) Program
15 * under grant CNS-0626918 (Postmodern Internet Architecture),
16 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
17 * US Department of Defense (DoD), and ITTC at The University of Kansas.
18 */
19
20#ifndef DSR_ROUTING_H
21#define DSR_ROUTING_H
22
23#include "dsr-errorbuff.h"
24#include "dsr-fs-header.h"
26#include "dsr-maintain-buff.h"
27#include "dsr-network-queue.h"
28#include "dsr-option-header.h"
29#include "dsr-passive-buff.h"
30#include "dsr-rcache.h"
31#include "dsr-rreq-table.h"
32#include "dsr-rsendbuff.h"
33
34#include "ns3/buffer.h"
35#include "ns3/callback.h"
36#include "ns3/event-garbage-collector.h"
37#include "ns3/icmpv4-l4-protocol.h"
38#include "ns3/ip-l4-protocol.h"
39#include "ns3/ipv4-address.h"
40#include "ns3/ipv4-header.h"
41#include "ns3/ipv4-interface.h"
42#include "ns3/ipv4-l3-protocol.h"
43#include "ns3/ipv4-route.h"
44#include "ns3/ipv4.h"
45#include "ns3/net-device.h"
46#include "ns3/node.h"
47#include "ns3/object.h"
48#include "ns3/output-stream-wrapper.h"
49#include "ns3/packet.h"
50#include "ns3/ptr.h"
51#include "ns3/random-variable-stream.h"
52#include "ns3/socket.h"
53#include "ns3/test.h"
54#include "ns3/timer.h"
55#include "ns3/traced-callback.h"
56#include "ns3/wifi-mac.h"
57
58#include <cassert>
59#include <list>
60#include <map>
61#include <stdint.h>
62#include <sys/types.h>
63#include <vector>
64
65namespace ns3
66{
67
68class Packet;
69class Node;
70class Ipv4;
71class Ipv4Address;
72class Ipv4Header;
73class Ipv4Interface;
74class Ipv4L3Protocol;
75class Time;
76
77namespace dsr
78{
79
80class DsrOptions;
81
82/**
83 * @defgroup dsr Dynamic Source Routing (DSR)
84 *
85 * This section documents the API of the Dynamic Source Routing Protocol based on RFC 4728
86 * with some modifications. For a generic functional description, please refer to the ns-3
87 * model library document.
88 */
89
90/**
91 * @ingroup dsr
92 *
93 * @class DsrRouting
94 * @brief Dsr Routing base
95 */
97{
98 public:
99 /**
100 * @brief Get the type identificator.
101 * @return type identificator
102 */
103 static TypeId GetTypeId();
104 /**
105 * @brief Define the dsr protocol number.
106 */
107 static const uint8_t PROT_NUMBER;
108 /**
109 * @brief Constructor.
110 */
111 DsrRouting();
112 /**
113 * @brief Destructor.
114 */
115 ~DsrRouting() override;
116 /**
117 * @brief Get the node.
118 * @return the node
119 */
120 Ptr<Node> GetNode() const;
121 /**
122 * @brief Set the node.
123 * @param node the node to set
124 */
125 void SetNode(Ptr<Node> node);
126 /**
127 * @brief Set the route cache.
128 * @param r the route cache to set
129 */
131 /**
132 * @brief Get the route cache.
133 * @return the route cache
134 */
136 /**
137 * @brief Set the node.
138 * @param r the request table to set
139 */
141 /**
142 * @brief Get the request table.
143 * @return the request table
144 */
146 /**
147 * @brief Set the node.
148 * @param r the passive buffer to set
149 */
151 /**
152 * @brief Get the passive buffer
153 * @return the passive buffer
154 */
156
157 /**
158 * @brief Checks if the link is cached in the route cache
159 * See also DsrRouteCache::IsLinkCache
160 *
161 * @return true if the link is cached
162 */
163 bool IsLinkCache();
164
165 /**
166 * @brief Extends the lifetime of a route cache entry.
167 * See also DsrRouteCache::UseExtends
168 *
169 * @param rt the route to extend
170 */
172
173 /**
174 * @brief Lookup route cache entry with destination address dst
175 * See also DsrRouteCache::LookupRoute
176 *
177 * @param id destination address
178 * @param rt entry with destination address id, if exists
179 * @return true on success
180 */
182
183 /**
184 * @brief dd route link to cache
185 * See also DsrRouteCache::AddRoute_Link
186 *
187 * @param nodelist vector of nodes
188 * @param source ip address of node to add
189 * @return true if the link is cached
190 */
192
193 /**
194 * @brief Add route cache entry if it doesn't yet exist in route cache
195 * See also DsrRouteCache::AddRoute
196 *
197 * @param rt route cache entry
198 * @return true on success
199 */
201
202 /**
203 * @brief Delete all the routes which includes the link from next hop address that has just been
204 * notified as unreachable. See also DsrRouteCache::DeleteAllRoutesIncludeLink
205 *
206 * @param errorSrc The error source address
207 * @param unreachNode The unreachable node
208 * @param node This node's ip address
209 */
211 Ipv4Address unreachNode,
212 Ipv4Address node);
213
214 /**
215 * @brief Update route cache entry if it has been recently used and successfully delivered the
216 * data packet. See also DsrRouteCache::UpdateRouteEntry
217 *
218 * @param dst destination address of the route
219 * @return true in success
220 */
222
223 /**
224 * Find the source request entry in the route request queue, return false if not found.
225 * See also DsrRreqTable::FindSourceEntry
226 *
227 * @param src the source address we just received the source request
228 * @param dst the destination address the request is targeted at
229 * @param id the identification number for this request
230 * @return true if found, false otherwise
231 */
232 bool FindSourceEntry(Ipv4Address src, Ipv4Address dst, uint16_t id);
233
234 /**
235 * @brief Get the netdevice from the context.
236 * @param context context
237 * @return the netdevice we are looking for
238 */
239 Ptr<NetDevice> GetNetDeviceFromContext(std::string context);
240 /**
241 * @brief Get the elements from the tracing context.
242 * @param context context
243 * @return the elements we are looking for
244 */
245 std::vector<std::string> GetElementsFromContext(std::string context);
246 /**
247 * @brief Get the node id from ip address.
248 * @param address IPv4 address
249 * @return the node id
250 */
251 uint16_t GetIDfromIP(Ipv4Address address);
252 /**
253 * @brief Get the ip address from id.
254 * @param id unique ID
255 * @return the ip address for the id
256 */
257 Ipv4Address GetIPfromID(uint16_t id);
258 /**
259 * @brief Get the Ip address from mac address.
260 * @param address Mac48Address
261 * @return the ip address
262 */
264 /**
265 * @brief Get the node with give ip address.
266 * @param ipv4Address IPv4 address
267 * @return the node associated with the ip address
268 */
270 /**
271 * @brief Print the route vector.
272 * @param vec the vector to print.
273 */
274 void PrintVector(std::vector<Ipv4Address>& vec);
275 /**
276 * @brief Get the next hop of the route.
277 * @param ipv4Address
278 * @param vec Route
279 * @return the next hop address of the route
280 */
281 Ipv4Address SearchNextHop(Ipv4Address ipv4Address, std::vector<Ipv4Address>& vec);
282 /**
283 * @brief Get the dsr protocol number.
284 * @return protocol number
285 */
286 int GetProtocolNumber() const override;
287 /**
288 * @brief The send buffer timer expire.
289 */
290 void SendBuffTimerExpire();
291 /**
292 * @brief Check the send buffer of packets with route when send buffer timer expire.
293 */
294 void CheckSendBuffer();
295 /**
296 * @brief When route vector corrupted, originate a new packet, normally not happening.
297 * @param packet to route
298 * @param source address
299 * @param destination address
300 * @param protocol number
301 */
302 void PacketNewRoute(Ptr<Packet> packet,
303 Ipv4Address source,
304 Ipv4Address destination,
305 uint8_t protocol);
306 /**
307 * @brief Set the route to use for data packets,
308 * used by the option headers when sending data/control packets
309 * @param nextHop next hop IPv4 address
310 * @param srcAddress IPv4 address of the source
311 * @return the route
312 */
313 Ptr<Ipv4Route> SetRoute(Ipv4Address nextHop, Ipv4Address srcAddress);
314 /**
315 * @brief Set the priority of the packet in network queue
316 * @param messageType Message type
317 * @return the priority value
318 */
320 /**
321 * @brief This function is responsible for sending error packets in case of break link to next
322 * hop
323 * @param unreachNode unreachable node
324 * @param destination address
325 * @param originalDst address
326 * @param salvage packet flag
327 * @param protocol number
328 */
329 void SendUnreachError(Ipv4Address unreachNode,
330 Ipv4Address destination,
331 Ipv4Address originalDst,
332 uint8_t salvage,
333 uint8_t protocol);
334
335 /**
336 * @brief This function is responsible for forwarding error packets along the route
337 * @param rerr unreachable header
338 * @param sourceRoute source routing header
339 * @param nextHop IP address of next hop
340 * @param protocol number
341 * @param route IP route
342 */
344 DsrOptionSRHeader& sourceRoute,
345 Ipv4Address nextHop,
346 uint8_t protocol,
347 Ptr<Ipv4Route> route);
348 /**
349 * @brief This function is called by higher layer protocol when sending packets
350 * @param packet to send
351 * @param source IP address
352 * @param destination IP address
353 * @param protocol number
354 * @param route IP route
355 */
356 void Send(Ptr<Packet> packet,
357 Ipv4Address source,
358 Ipv4Address destination,
359 uint8_t protocol,
360 Ptr<Ipv4Route> route);
361 /**
362 * @brief This function is called to add ack request header for network acknowledgement
363 * @param packet for ack req
364 * @param nextHop IP address of the next hop
365 * @return ack ID
366 */
367 uint16_t AddAckReqHeader(Ptr<Packet>& packet, Ipv4Address nextHop);
368 /**
369 * @brief This function is called by when really sending out the packet
370 * @param packet to send
371 * @param source IP address
372 * @param nextHop IP address
373 * @param protocol number
374 */
375 void SendPacket(Ptr<Packet> packet, Ipv4Address source, Ipv4Address nextHop, uint8_t protocol);
376 /**
377 * @brief This function is called to schedule sending packets from the network queue
378 * @param priority for sending
379 */
380 void Scheduler(uint32_t priority);
381 /**
382 * @brief This function is called to schedule sending packets from the network queue by priority
383 * @param priority schedule
384 * @param continueWithFirst use all priorities
385 */
386 void PriorityScheduler(uint32_t priority, bool continueWithFirst);
387 /**
388 * @brief This function is called to increase the retransmission timer for data packet in the
389 * network queue
390 */
392 /**
393 * @brief This function is called to send packets down stack
394 * @param newEntry queue entry
395 * @return true if success
396 */
397 bool SendRealDown(DsrNetworkQueueEntry& newEntry);
398 /**
399 * @brief This function is responsible for sending out data packets when have route, if no route
400 * found, it will cache the packet and send out route requests
401 * @param sourceRoute source route
402 * @param nextHop next hop IP address
403 * @param protocol number
404 */
405 void SendPacketFromBuffer(const DsrOptionSRHeader& sourceRoute,
406 Ipv4Address nextHop,
407 uint8_t protocol);
408 /**
409 * @brief Find the same passive entry
410 * @param packet to process
411 * @param source IP address
412 * @param destination IP address
413 * @param segsLeft segments left
414 * @param fragmentOffset
415 * @param identification
416 * @param saveEntry
417 * @return true if passive buffer entry
418 */
419 bool PassiveEntryCheck(Ptr<Packet> packet,
420 Ipv4Address source,
421 Ipv4Address destination,
422 uint8_t segsLeft,
423 uint16_t fragmentOffset,
424 uint16_t identification,
425 bool saveEntry);
426
427 /**
428 * @brief Cancel all the packet timers
429 * @param mb maintain buffer entry
430 */
432 /**
433 * @brief Cancel the passive timer
434 * @param packet to process
435 * @param source IP address
436 * @param destination IP address
437 * @param segsLeft segments left
438 * @return
439 */
441 Ipv4Address source,
442 Ipv4Address destination,
443 uint8_t segsLeft);
444 /**
445 * @brief Call the cancel packet retransmission timer function
446 * @param ackId acknowledge ID
447 * @param ipv4Header header
448 * @param realSrc source IP address
449 * @param realDst destination IP address
450 */
451 void CallCancelPacketTimer(uint16_t ackId,
452 const Ipv4Header& ipv4Header,
453 Ipv4Address realSrc,
454 Ipv4Address realDst);
455 /**
456 * @brief Cancel the network packet retransmission timer for a specific maintenance entry
457 * @param mb maintain buffer entry
458 */
460 /**
461 * @brief Cancel the passive packet retransmission timer for a specific maintenance entry
462 * @param mb maintain buffer entry
463 */
465 /**
466 * @brief Cancel the link packet retransmission timer for a specific maintenance entry
467 * @param mb maintain buffer entry
468 */
470 /**
471 * @brief Cancel the packet retransmission timer for a all maintenance entries with nextHop
472 * address
473 * @param nextHop next hop IP address
474 * @param protocol number
475 */
476 void CancelPacketTimerNextHop(Ipv4Address nextHop, uint8_t protocol);
477 /**
478 * @brief Salvage the packet which has been transmitted for 3 times
479 * @param packet to process
480 * @param source IP address
481 * @param dst destination IP address
482 * @param protocol number
483 */
485 Ipv4Address source,
486 Ipv4Address dst,
487 uint8_t protocol);
488 /**
489 * @brief Schedule the packet retransmission based on link-layer acknowledgment
490 * @param mb maintenance buffer entry
491 * @param protocol the protocol number
492 */
493 void ScheduleLinkPacketRetry(DsrMaintainBuffEntry& mb, uint8_t protocol);
494 /**
495 * @brief Schedule the packet retransmission based on passive acknowledgment
496 * @param mb maintenance buffer entry
497 * @param protocol the protocol number
498 */
499 void SchedulePassivePacketRetry(DsrMaintainBuffEntry& mb, uint8_t protocol);
500 /**
501 * @brief Schedule the packet retransmission based on network layer acknowledgment
502 * @param mb maintenance buffer entry
503 * @param isFirst see if this is the first packet retry or not
504 * @param protocol the protocol number
505 */
506 void ScheduleNetworkPacketRetry(DsrMaintainBuffEntry& mb, bool isFirst, uint8_t protocol);
507 /**
508 * @brief This function deals with packet retransmission timer expire using link acknowledgment
509 * @param mb maintenance buffer entry
510 * @param protocol the protocol number
511 */
512 void LinkScheduleTimerExpire(DsrMaintainBuffEntry& mb, uint8_t protocol);
513 /**
514 * @brief This function deals with packet retransmission timer expire using network
515 * acknowledgment
516 * @param mb maintenance buffer entry
517 * @param protocol the protocol number
518 */
519 void NetworkScheduleTimerExpire(DsrMaintainBuffEntry& mb, uint8_t protocol);
520 /**
521 * @brief This function deals with packet retransmission timer expire using passive
522 * acknowledgment
523 * @param mb maintenance buffer entry
524 * @param protocol the protocol number
525 */
526 void PassiveScheduleTimerExpire(DsrMaintainBuffEntry& mb, uint8_t protocol);
527 /**
528 * @brief Forward the packet using the route saved in the source route option header
529 * @param packet The packet
530 * @param sourceRoute Source route saved in option header
531 * @param ipv4Header IPv4 Header
532 * @param source source address
533 * @param destination destination address
534 * @param targetAddress target address
535 * @param protocol protocol number
536 * @param route route
537 */
539 DsrOptionSRHeader& sourceRoute,
540 const Ipv4Header& ipv4Header,
541 Ipv4Address source,
542 Ipv4Address destination,
543 Ipv4Address targetAddress,
544 uint8_t protocol,
545 Ptr<Ipv4Route> route);
546 /**
547 * @brief Broadcast the route request packet in subnet
548 * @param source source address
549 * @param destination destination address
550 * @param protocol protocol number
551 */
552 void SendInitialRequest(Ipv4Address source, Ipv4Address destination, uint8_t protocol);
553 /**
554 * @brief Send the error request packet
555 * @param rerr the route error header
556 * @param protocol the protocol number
557 */
558 void SendErrorRequest(DsrOptionRerrUnreachHeader& rerr, uint8_t protocol);
559 /**
560 * @brief Forward the route request if the node is not the destination
561 * @param packet the original packet
562 * @param source address
563 */
564 void SendRequest(Ptr<Packet> packet, Ipv4Address source);
565 /**
566 * @brief Schedule the intermediate route request
567 * @param packet the original packet
568 */
570 /**
571 * @brief Send the gratuitous reply
572 * @param replyTo The destination address to send the reply to
573 * @param replyFrom The source address sending the reply
574 * @param nodeList Route
575 * @param protocol the protocol number
576 */
577 void SendGratuitousReply(Ipv4Address replyTo,
578 Ipv4Address replyFrom,
579 std::vector<Ipv4Address>& nodeList,
580 uint8_t protocol);
581 /**
582 * Send the route reply back to the request originator with the cumulated route
583 *
584 * @param packet the original packet
585 * @param source IPv4 address of the source (i.e. request originator)
586 * @param nextHop IPv4 address of the next hop
587 * @param route Route
588 */
589 void SendReply(Ptr<Packet> packet,
590 Ipv4Address source,
591 Ipv4Address nextHop,
592 Ptr<Ipv4Route> route);
593 /**
594 * this is a generating the initial route reply from the destination address, a random delay
595 * time [0, m_broadcastJitter] is used before unicasting back the route reply packet
596 *
597 * @param packet the original packet
598 * @param source IPv4 address of the source (i.e. request originator)
599 * @param nextHop IPv4 address of the next hop
600 * @param route Route
601 */
603 Ipv4Address source,
604 Ipv4Address nextHop,
605 Ptr<Ipv4Route> route);
606 /**
607 * Schedule the cached reply to a random start time to avoid possible route reply storm
608 *
609 * @param packet the original packet
610 * @param source IPv4 address of the source (i.e. request originator)
611 * @param destination IPv4 address of the destination
612 * @param route Route
613 * @param hops number of hops
614 */
616 Ipv4Address source,
617 Ipv4Address destination,
618 Ptr<Ipv4Route> route,
619 double hops);
620 /**
621 * Send network layer acknowledgment back to the earlier hop to notify the receipt of data
622 * packet
623 *
624 * @param ackId ACK ID
625 * @param destination IPv4 address of the immediate ACK receiver
626 * @param realSrc IPv4 address of the real source
627 * @param realDst IPv4 address of the real destination
628 * @param protocol the protocol number
629 * @param route Route
630 */
631 void SendAck(uint16_t ackId,
632 Ipv4Address destination,
633 Ipv4Address realSrc,
634 Ipv4Address realDst,
635 uint8_t protocol,
636 Ptr<Ipv4Route> route);
637 /**
638 * @param p packet to forward up
639 * @param header IPv4 Header information
640 * @param incomingInterface the Ipv4Interface on which the packet arrived
641 * @return receive status
642 *
643 * Called from lower-level layers to send the packet up
644 * in the stack.
645 */
647 const Ipv4Header& header,
648 Ptr<Ipv4Interface> incomingInterface) override;
649
650 /**
651 * @param p packet to forward up
652 * @param header IPv6 Header information
653 * @param incomingInterface the Ipv6Interface on which the packet arrived
654 * @return receive status
655 *
656 * Called from lower-level layers to send the packet up
657 * in the stack. Not implemented (IPv6).
658 */
660 const Ipv6Header& header,
661 Ptr<Ipv6Interface> incomingInterface) override;
662
663 void SetDownTarget(IpL4Protocol::DownTargetCallback callback) override;
667 /**
668 * @brief Process method
669 * Called from Ipv4L3Protocol::Receive.
670 *
671 * @param packet the packet
672 * @param ipv4Header IPv4 header of the packet
673 * @param dst destination address of the packet received (i.e. us)
674 * @param nextHeader the next header
675 * @param protocol the protocol number
676 * @param isDropped if the packet must be dropped
677 * @return the size processed
678 */
679 uint8_t Process(Ptr<Packet>& packet,
680 const Ipv4Header& ipv4Header,
681 Ipv4Address dst,
682 uint8_t* nextHeader,
683 uint8_t protocol,
684 bool& isDropped);
685 /**
686 * @brief Insert a new Dsr Option.
687 * @param option the option to insert
688 */
689 void Insert(Ptr<dsr::DsrOptions> option);
690 /**
691 * @brief Get the option corresponding to optionNumber.
692 * @param optionNumber the option number of the option to retrieve
693 * @return a matching Dsr option
694 */
695 Ptr<dsr::DsrOptions> GetOption(int optionNumber);
696 /**
697 * @brief Cancel the route request timer.
698 * @param dst The dst address of the route request timer
699 * @param isRemove whether to remove the route request entry or not
700 */
701 void CancelRreqTimer(Ipv4Address dst, bool isRemove);
702 /**
703 * @brief Schedule the route request retry.
704 * @param packet the original packet
705 * @param address List of IPv4 addresses
706 * @param nonProp flag if RREQ is non-propagating
707 * @param requestId Unique request ID
708 * @param protocol the protocol number
709 */
710 void ScheduleRreqRetry(Ptr<Packet> packet,
711 std::vector<Ipv4Address> address,
712 bool nonProp,
713 uint32_t requestId,
714 uint8_t protocol);
715 /**
716 * Handle route discovery timer
717 *
718 * @param packet the original packet
719 * @param address List of IPv4 addresses
720 * @param requestId Unique request ID
721 * @param protocol the protocol number
722 */
724 std::vector<Ipv4Address> address,
725 uint32_t requestId,
726 uint8_t protocol);
727
728 /**
729 * Assign a fixed random variable stream number to the random variables
730 * used by this model. Return the number of streams (possibly zero) that
731 * have been assigned.
732 *
733 * @param stream first stream index to use
734 * @return the number of stream indices assigned by this model
735 */
736 int64_t AssignStreams(int64_t stream);
737
738 protected:
739 /*
740 * * This function will notify other components connected to the node that a new stack member
741 * is now connected
742 * * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect
743 * them together.
744 * */
745 void NotifyNewAggregate() override;
746 /**
747 * @brief Drop trace callback.
748 */
749 void DoDispose() override;
750 /**
751 * The trace for drop, receive and send data packets
752 */
753 TracedCallback<Ptr<const Packet>> m_dropTrace; ///< packet drop trace callback
755
756 private:
757 void Start();
758 /**
759 * @brief Send the route error message when the link breaks to the next hop.
760 * @param nextHop next hop address
761 * @param protocol protocol number
762 */
763 void SendRerrWhenBreaksLinkToNextHop(Ipv4Address nextHop, uint8_t protocol);
764 /**
765 * @brief Promiscuous receive data packets destined to some other node.
766 * @param device The network device
767 * @param packet Data packet we just received
768 * @param protocol The protocol we receive, need to verify it is dsr protocol
769 * @param from The from address we received the packet
770 * @param to The address this packet is destined for
771 * @param packetType The dsr packet type, 0 is for control packet, 1 for data packet
772 * @return true if the packet was processed, false otherwise
773 */
774 bool PromiscReceive(Ptr<NetDevice> device,
775 Ptr<const Packet> packet,
776 uint16_t protocol,
777 const Address& from,
778 const Address& to,
779 NetDevice::PacketType packetType);
780 /**
781 * @brief Define the list to hold DSR options.
782 */
783 typedef std::list<Ptr<DsrOptions>> DsrOptionList_t;
784 /**
785 * @brief List of DSR Options supported.
786 */
788
789 Ptr<Ipv4L3Protocol> m_ipv4; ///< Ipv4l3Protocol
790
792
793 Ptr<Ipv4> m_ip; ///< The ip ptr
794
795 Ptr<Node> m_node; ///< The node ptr
796
797 Ipv4Address m_mainAddress; ///< Our own Ip address
798
799 uint8_t segsLeft; ///< The segment left value from SR header
800
801 IpL4Protocol::DownTargetCallback m_downTarget; ///< The callback for down layer
802
803 uint32_t m_maxNetworkSize; ///< Maximum network queue size
804
805 Time m_maxNetworkDelay; ///< Maximum network delay
806
807 uint32_t m_discoveryHopLimit; ///< Maximum hops to go for route request
808
809 uint8_t m_maxSalvageCount; ///< Maximum # times to salvage a packet
810
811 Time m_requestPeriod; ///< The base time interval between route requests
812
813 Time m_nonpropRequestTimeout; ///< The non-propagation request timeout
814
815 uint32_t m_sendRetries; ///< # of retries have been sent for network acknowledgment
816
817 uint32_t m_passiveRetries; ///< # of retries have been sent for passive acknowledgment
818
819 uint32_t m_linkRetries; ///< # of retries have been sent for link acknowledgment
820
821 uint32_t m_rreqRetries; ///< Maximum number of retransmissions of RREQ with TTL = NetDiameter to
822 ///< discover a route
823
824 uint32_t m_maxMaintRexmt; ///< Maximum number of retransmissions of data packets
825
826 Time m_nodeTraversalTime; ///< Time estimated for packet to travel between two nodes
827
828 uint32_t m_maxSendBuffLen; ///< The maximum number of packets that we allow a routing protocol
829 ///< to buffer.
830
831 Time m_sendBufferTimeout; ///< The maximum period of time that a routing protocol is allowed to
832 ///< buffer a packet for.
833
834 DsrSendBuffer m_sendBuffer; ///< The send buffer
835
836 DsrErrorBuffer m_errorBuffer; ///< The error buffer to save the error messages
837
838 uint32_t m_maxMaintainLen; ///< Max # of entries for maintenance buffer
839
840 Time m_maxMaintainTime; ///< Time out for maintenance buffer
841
842 uint32_t m_maxCacheLen; ///< Max # of cache entries for route cache
843
844 Time m_maxCacheTime; ///< Max time for caching the route cache entry
845
846 Time m_maxRreqTime; ///< Max time for caching the route request entry
847
848 uint32_t m_maxEntriesEachDst; ///< Max number of route entries to save for each destination
849
850 DsrMaintainBuffer m_maintainBuffer; ///< The declaration of maintain buffer
851
852 uint32_t m_requestId; ///< The id assigned to each route request
853
854 uint16_t m_ackId; ///< The ack id assigned to each acknowledge
855
856 uint32_t m_requestTableSize; ///< The max size of the request table size
857
858 uint32_t m_requestTableIds; ///< The request table identifiers
859
860 uint32_t m_maxRreqId; ///< The max number of request ids for a single destination
861
862 Time m_blacklistTimeout; ///< The black list time out
863
864 Ipv4Address m_broadcast; ///< The broadcast IP address
865
866 uint32_t m_broadcastJitter; ///< The max time to delay route request broadcast.
867
868 Time m_passiveAckTimeout; ///< The timeout value for passive acknowledge
869
871 m_tryPassiveAcks; ///< Maximum number of packet transmission using passive acknowledgment
872
873 Time m_linkAckTimeout; ///< The timeout value for link acknowledge
874
875 uint32_t m_tryLinkAcks; ///< Maximum number of packet transmission using link acknowledgment
876
877 Timer m_sendBuffTimer; ///< The send buffer timer
878
879 Time m_sendBuffInterval; ///< how often to check send buffer
880
881 Time m_gratReplyHoldoff; ///< The max gratuitous reply hold off time
882
883 Time m_maxRequestPeriod; ///< The max request period
884
885 uint32_t m_graReplyTableSize; ///< Set the gratuitous reply table size
886
887 std::string m_cacheType; ///< The type of route cache
888
889 std::string m_routeSortType; ///< The type of route sort methods
890
891 uint32_t m_stabilityDecrFactor; ///< The initial decrease factor for link cache
892
893 uint32_t m_stabilityIncrFactor; ///< The initial increase factor for link cache
894
895 Time m_initStability; ///< The initial stability value for link cache
896
897 Time m_minLifeTime; ///< The min life time
898
899 Time m_useExtends; ///< The use extension of the life time for link cache
900
901 bool m_subRoute; ///< Whether to save sub route or not
902
903 Time m_retransIncr; ///< the increase time for retransmission timer when face network congestion
904
905 std::vector<Ipv4Address> m_finalRoute; ///< The route cache
906
907 std::map<Ipv4Address, Timer> m_addressReqTimer; ///< Map IP address + RREQ timer.
908
909 std::map<Ipv4Address, Timer> m_nonPropReqTimer; ///< Map IP address + RREQ timer.
910
911 std::map<NetworkKey, Timer> m_addressForwardTimer; ///< Map network key + forward timer.
912
913 std::map<NetworkKey, uint32_t> m_addressForwardCnt; ///< Map network key + forward counts.
914
915 std::map<PassiveKey, uint32_t> m_passiveCnt; ///< Map packet key + passive forward counts.
916
917 std::map<PassiveKey, Timer> m_passiveAckTimer; ///< The timer for passive acknowledgment
918
919 std::map<LinkKey, uint32_t> m_linkCnt; ///< Map packet key + link forward counts.
920
921 std::map<LinkKey, Timer> m_linkAckTimer; ///< The timer for link acknowledgment
922
924 m_routeCache; ///< A "drop-front" queue used by the routing layer to cache routes found.
925
926 Ptr<dsr::DsrRreqTable> m_rreqTable; ///< A "drop-front" queue used by the routing layer to cache
927 ///< route request sent.
928
929 Ptr<dsr::DsrPassiveBuffer> m_passiveBuffer; ///< A "drop-front" queue used by the routing layer
930 ///< to cache route request sent.
931
932 uint32_t m_numPriorityQueues; ///< The number of priority queues used
933
934 bool m_linkAck; ///< define if we use link acknowledgement or not
935
936 std::map<uint32_t, Ptr<dsr::DsrNetworkQueue>> m_priorityQueue; ///< priority queues
937
938 DsrGraReply m_graReply; ///< The gratuitous route reply.
939
940 DsrNetworkQueue m_networkQueue; ///< The network queue.
941
942 std::vector<Ipv4Address> m_clearList; ///< The node that is clear to send packet to
943
944 std::vector<Ipv4Address> m_addresses; ///< The bind ipv4 addresses with next hop, src,
945 ///< destination address in sequence
946
947 std::map<std::string, uint32_t> m_macToNodeIdMap; ///< The map of mac address to node id
948
949 Ptr<UniformRandomVariable> m_uniformRandomVariable; ///< Provides uniform random variables.
950};
951} /* namespace dsr */
952} /* namespace ns3 */
953
954#endif /* DSR_ROUTING_H */
a polymophic address class
Definition address.h:90
L4 Protocol abstract base class.
RxStatus
Rx status codes.
Ipv4 addresses are stored in host order in this class.
Packet header for IPv4.
Definition ipv4-header.h:23
Packet header for IPv6.
Definition ipv6-header.h:24
an EUI-48 address
PacketType
Packet types are used as they are in Linux.
Definition net-device.h:289
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
A simple virtual Timer class.
Definition timer.h:67
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:49
maintain the gratuitous reply
DSR Maintain Buffer Entry.
DSR Network Queue Entry.
Introspection did not find any typical Config paths.
Route Error (RERR) Unreachable node address option Message Format.
Header of Dsr Option Source Route.
DsrRouteCacheEntry class for entries in the route cache.
Definition dsr-rcache.h:218
std::vector< Ipv4Address > IP_VECTOR
Define the vector to hold Ip address.
Definition dsr-rcache.h:220
Dsr Routing base.
Definition dsr-routing.h:97
Ptr< dsr::DsrRreqTable > GetRequestTable() const
Get the request table.
std::string m_routeSortType
The type of route sort methods.
void ScheduleInterRequest(Ptr< Packet > packet)
Schedule the intermediate route request.
void CheckSendBuffer()
Check the send buffer of packets with route when send buffer timer expire.
Ptr< Ipv4 > m_ip
The ip ptr.
void ScheduleRreqRetry(Ptr< Packet > packet, std::vector< Ipv4Address > address, bool nonProp, uint32_t requestId, uint8_t protocol)
Schedule the route request retry.
void NotifyNewAggregate() override
Notify all Objects aggregated to this one of a new Object being aggregated.
Time m_blacklistTimeout
The black list time out.
void SendRerrWhenBreaksLinkToNextHop(Ipv4Address nextHop, uint8_t protocol)
Send the route error message when the link breaks to the next hop.
std::string m_cacheType
The type of route cache.
std::map< Ipv4Address, Timer > m_nonPropReqTimer
Map IP address + RREQ timer.
IpL4Protocol::DownTargetCallback GetDownTarget() const override
This method allows a caller to get the current down target callback set for this L4 protocol (IPv4 ca...
void SetNode(Ptr< Node > node)
Set the node.
void SendBuffTimerExpire()
The send buffer timer expire.
void SetPassiveBuffer(Ptr< dsr::DsrPassiveBuffer > r)
Set the node.
std::vector< std::string > GetElementsFromContext(std::string context)
Get the elements from the tracing context.
void UseExtends(DsrRouteCacheEntry::IP_VECTOR rt)
Extends the lifetime of a route cache entry.
uint32_t m_maxRreqId
The max number of request ids for a single destination.
bool SendRealDown(DsrNetworkQueueEntry &newEntry)
This function is called to send packets down stack.
Time m_sendBufferTimeout
The maximum period of time that a routing protocol is allowed to buffer a packet for.
uint8_t segsLeft
The segment left value from SR header.
void SendRequest(Ptr< Packet > packet, Ipv4Address source)
Forward the route request if the node is not the destination.
void CancelPacketTimerNextHop(Ipv4Address nextHop, uint8_t protocol)
Cancel the packet retransmission timer for a all maintenance entries with nextHop address.
bool m_linkAck
define if we use link acknowledgement or not
void PrintVector(std::vector< Ipv4Address > &vec)
Print the route vector.
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables.
void ForwardErrPacket(DsrOptionRerrUnreachHeader &rerr, DsrOptionSRHeader &sourceRoute, Ipv4Address nextHop, uint8_t protocol, Ptr< Ipv4Route > route)
This function is responsible for forwarding error packets along the route.
bool CancelPassiveTimer(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t segsLeft)
Cancel the passive timer.
IpL4Protocol::RxStatus Receive(Ptr< Packet > p, const Ipv4Header &header, Ptr< Ipv4Interface > incomingInterface) override
void PassiveScheduleTimerExpire(DsrMaintainBuffEntry &mb, uint8_t protocol)
This function deals with packet retransmission timer expire using passive acknowledgment.
std::vector< Ipv4Address > m_addresses
The bind ipv4 addresses with next hop, src, destination address in sequence.
bool AddRoute_Link(DsrRouteCacheEntry::IP_VECTOR nodelist, Ipv4Address source)
dd route link to cache See also DsrRouteCache::AddRoute_Link
uint16_t m_ackId
The ack id assigned to each acknowledge.
DsrRouting()
Constructor.
void CancelLinkPacketTimer(DsrMaintainBuffEntry &mb)
Cancel the link packet retransmission timer for a specific maintenance entry.
Time m_nonpropRequestTimeout
The non-propagation request timeout.
Time m_gratReplyHoldoff
The max gratuitous reply hold off time.
std::list< Ptr< DsrOptions > > DsrOptionList_t
Define the list to hold DSR options.
uint16_t GetIDfromIP(Ipv4Address address)
Get the node id from ip address.
std::map< uint32_t, Ptr< dsr::DsrNetworkQueue > > m_priorityQueue
priority queues
uint32_t m_maxEntriesEachDst
Max number of route entries to save for each destination.
std::map< Ipv4Address, Timer > m_addressReqTimer
Map IP address + RREQ timer.
Time m_retransIncr
the increase time for retransmission timer when face network congestion
std::map< NetworkKey, Timer > m_addressForwardTimer
Map network key + forward timer.
DsrNetworkQueue m_networkQueue
The network queue.
uint32_t m_stabilityDecrFactor
The initial decrease factor for link cache.
Time m_nodeTraversalTime
Time estimated for packet to travel between two nodes.
uint32_t m_requestId
The id assigned to each route request.
std::map< NetworkKey, uint32_t > m_addressForwardCnt
Map network key + forward counts.
Ptr< NetDevice > GetNetDeviceFromContext(std::string context)
Get the netdevice from the context.
bool FindSourceEntry(Ipv4Address src, Ipv4Address dst, uint16_t id)
Find the source request entry in the route request queue, return false if not found.
Ipv4Address m_broadcast
The broadcast IP address.
Ptr< dsr::DsrPassiveBuffer > GetPassiveBuffer() const
Get the passive buffer.
Ipv4Address GetIPfromMAC(Mac48Address address)
Get the Ip address from mac address.
Ptr< dsr::DsrRouteCache > GetRouteCache() const
Get the route cache.
Time m_maxNetworkDelay
Maximum network delay.
Ptr< dsr::DsrOptions > GetOption(int optionNumber)
Get the option corresponding to optionNumber.
uint32_t m_maxSendBuffLen
The maximum number of packets that we allow a routing protocol to buffer.
Time m_passiveAckTimeout
The timeout value for passive acknowledge.
void SetRequestTable(Ptr< dsr::DsrRreqTable > r)
Set the node.
uint32_t m_maxMaintainLen
Max # of entries for maintenance buffer.
static const uint8_t PROT_NUMBER
Define the dsr protocol number.
uint32_t GetPriority(DsrMessageType messageType)
Set the priority of the packet in network queue.
void SendReply(Ptr< Packet > packet, Ipv4Address source, Ipv4Address nextHop, Ptr< Ipv4Route > route)
Send the route reply back to the request originator with the cumulated route.
void ScheduleNetworkPacketRetry(DsrMaintainBuffEntry &mb, bool isFirst, uint8_t protocol)
Schedule the packet retransmission based on network layer acknowledgment.
Ipv4Address m_mainAddress
Our own Ip address.
void SendInitialRequest(Ipv4Address source, Ipv4Address destination, uint8_t protocol)
Broadcast the route request packet in subnet.
uint8_t Process(Ptr< Packet > &packet, const Ipv4Header &ipv4Header, Ipv4Address dst, uint8_t *nextHeader, uint8_t protocol, bool &isDropped)
Process method Called from Ipv4L3Protocol::Receive.
Timer m_sendBuffTimer
The send buffer timer.
Time m_maxCacheTime
Max time for caching the route cache entry.
void SendGratuitousReply(Ipv4Address replyTo, Ipv4Address replyFrom, std::vector< Ipv4Address > &nodeList, uint8_t protocol)
Send the gratuitous reply.
void DeleteAllRoutesIncludeLink(Ipv4Address errorSrc, Ipv4Address unreachNode, Ipv4Address node)
Delete all the routes which includes the link from next hop address that has just been notified as un...
DsrOptionList_t m_options
List of DSR Options supported.
std::map< PassiveKey, uint32_t > m_passiveCnt
Map packet key + passive forward counts.
DsrErrorBuffer m_errorBuffer
The error buffer to save the error messages.
void SalvagePacket(Ptr< const Packet > packet, Ipv4Address source, Ipv4Address dst, uint8_t protocol)
Salvage the packet which has been transmitted for 3 times.
bool m_subRoute
Whether to save sub route or not.
void SendPacket(Ptr< Packet > packet, Ipv4Address source, Ipv4Address nextHop, uint8_t protocol)
This function is called by when really sending out the packet.
void SetDownTarget(IpL4Protocol::DownTargetCallback callback) override
This method allows a caller to set the current down target callback set for this L4 protocol (IPv4 ca...
bool IsLinkCache()
Checks if the link is cached in the route cache See also DsrRouteCache::IsLinkCache.
std::map< LinkKey, uint32_t > m_linkCnt
Map packet key + link forward counts.
~DsrRouting() override
Destructor.
DsrSendBuffer m_sendBuffer
The send buffer.
uint32_t m_rreqRetries
Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route.
uint8_t m_maxSalvageCount
Maximum # times to salvage a packet.
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.
uint16_t AddAckReqHeader(Ptr< Packet > &packet, Ipv4Address nextHop)
This function is called to add ack request header for network acknowledgement.
Time m_maxRreqTime
Max time for caching the route request entry.
uint32_t m_requestTableSize
The max size of the request table size.
DsrGraReply m_graReply
The gratuitous route reply.
void ScheduleLinkPacketRetry(DsrMaintainBuffEntry &mb, uint8_t protocol)
Schedule the packet retransmission based on link-layer acknowledgment.
bool PromiscReceive(Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType)
Promiscuous receive data packets destined to some other node.
Time m_sendBuffInterval
how often to check send buffer
TracedCallback< const DsrOptionSRHeader & > m_txPacketTrace
packet trace callback
void ScheduleInitialReply(Ptr< Packet > packet, Ipv4Address source, Ipv4Address nextHop, Ptr< Ipv4Route > route)
this is a generating the initial route reply from the destination address, a random delay time [0,...
bool LookupRoute(Ipv4Address id, DsrRouteCacheEntry &rt)
Lookup route cache entry with destination address dst See also DsrRouteCache::LookupRoute.
Time m_initStability
The initial stability value for link cache.
uint32_t m_stabilityIncrFactor
The initial increase factor for link cache.
void SetDownTarget6(IpL4Protocol::DownTargetCallback6 callback) override
This method allows a caller to set the current down target callback set for this L4 protocol (IPv6 ca...
Time m_useExtends
The use extension of the life time for link cache.
uint32_t m_numPriorityQueues
The number of priority queues used.
Ipv4Address SearchNextHop(Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Get the next hop of the route.
IpL4Protocol::DownTargetCallback m_downTarget
The callback for down layer.
uint32_t m_graReplyTableSize
Set the gratuitous reply table size.
bool PassiveEntryCheck(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t segsLeft, uint16_t fragmentOffset, uint16_t identification, bool saveEntry)
Find the same passive entry.
Ptr< Node > GetNodeWithAddress(Ipv4Address ipv4Address)
Get the node with give ip address.
Ptr< Ipv4L3Protocol > m_ipv4
Ipv4l3Protocol.
void Scheduler(uint32_t priority)
This function is called to schedule sending packets from the network queue.
void RouteRequestTimerExpire(Ptr< Packet > packet, std::vector< Ipv4Address > address, uint32_t requestId, uint8_t protocol)
Handle route discovery timer.
void NetworkScheduleTimerExpire(DsrMaintainBuffEntry &mb, uint8_t protocol)
This function deals with packet retransmission timer expire using network acknowledgment.
uint32_t m_requestTableIds
The request table identifiers.
TracedCallback< Ptr< const Packet > > m_dropTrace
The trace for drop, receive and send data packets.
void SendPacketFromBuffer(const DsrOptionSRHeader &sourceRoute, Ipv4Address nextHop, uint8_t protocol)
This function is responsible for sending out data packets when have route, if no route found,...
uint32_t m_tryPassiveAcks
Maximum number of packet transmission using passive acknowledgment.
std::map< std::string, uint32_t > m_macToNodeIdMap
The map of mac address to node id.
void LinkScheduleTimerExpire(DsrMaintainBuffEntry &mb, uint8_t protocol)
This function deals with packet retransmission timer expire using link acknowledgment.
bool UpdateRouteEntry(Ipv4Address dst)
Update route cache entry if it has been recently used and successfully delivered the data packet.
uint32_t m_maxNetworkSize
Maximum network queue size.
Ptr< Ipv4Route > m_ipv4Route
Ipv4 Route.
Ptr< Node > GetNode() const
Get the node.
Ipv4Address GetIPfromID(uint16_t id)
Get the ip address from id.
Time m_maxRequestPeriod
The max request period.
void SchedulePassivePacketRetry(DsrMaintainBuffEntry &mb, uint8_t protocol)
Schedule the packet retransmission based on passive acknowledgment.
Ptr< dsr::DsrPassiveBuffer > m_passiveBuffer
A "drop-front" queue used by the routing layer to cache route request sent.
Ptr< Node > m_node
The node ptr.
Ptr< dsr::DsrRouteCache > m_routeCache
A "drop-front" queue used by the routing layer to cache routes found.
std::map< PassiveKey, Timer > m_passiveAckTimer
The timer for passive acknowledgment.
bool AddRoute(DsrRouteCacheEntry &rt)
Add route cache entry if it doesn't yet exist in route cache See also DsrRouteCache::AddRoute.
Time m_maxMaintainTime
Time out for maintenance buffer.
DsrMaintainBuffer m_maintainBuffer
The declaration of maintain buffer.
uint32_t m_maxMaintRexmt
Maximum number of retransmissions of data packets.
void CallCancelPacketTimer(uint16_t ackId, const Ipv4Header &ipv4Header, Ipv4Address realSrc, Ipv4Address realDst)
Call the cancel packet retransmission timer function.
Time m_requestPeriod
The base time interval between route requests.
Time m_linkAckTimeout
The timeout value for link acknowledge.
void SendUnreachError(Ipv4Address unreachNode, Ipv4Address destination, Ipv4Address originalDst, uint8_t salvage, uint8_t protocol)
This function is responsible for sending error packets in case of break link to next hop.
uint32_t m_tryLinkAcks
Maximum number of packet transmission using link acknowledgment.
uint32_t m_discoveryHopLimit
Maximum hops to go for route request.
void CancelRreqTimer(Ipv4Address dst, bool isRemove)
Cancel the route request timer.
std::map< LinkKey, Timer > m_linkAckTimer
The timer for link acknowledgment.
IpL4Protocol::DownTargetCallback6 GetDownTarget6() const override
This method allows a caller to get the current down target callback set for this L4 protocol (IPv6 ca...
Time m_minLifeTime
The min life time.
void ForwardPacket(Ptr< const Packet > packet, DsrOptionSRHeader &sourceRoute, const Ipv4Header &ipv4Header, Ipv4Address source, Ipv4Address destination, Ipv4Address targetAddress, uint8_t protocol, Ptr< Ipv4Route > route)
Forward the packet using the route saved in the source route option header.
static TypeId GetTypeId()
Get the type identificator.
std::vector< Ipv4Address > m_clearList
The node that is clear to send packet to.
void SendErrorRequest(DsrOptionRerrUnreachHeader &rerr, uint8_t protocol)
Send the error request packet.
void DoDispose() override
Drop trace callback.
int GetProtocolNumber() const override
Get the dsr protocol number.
void PacketNewRoute(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t protocol)
When route vector corrupted, originate a new packet, normally not happening.
Ptr< dsr::DsrRreqTable > m_rreqTable
A "drop-front" queue used by the routing layer to cache route request sent.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void IncreaseRetransTimer()
This function is called to increase the retransmission timer for data packet in the network queue.
void CancelPassivePacketTimer(DsrMaintainBuffEntry &mb)
Cancel the passive packet retransmission timer for a specific maintenance entry.
void CancelNetworkPacketTimer(DsrMaintainBuffEntry &mb)
Cancel the network packet retransmission timer for a specific maintenance entry.
void PriorityScheduler(uint32_t priority, bool continueWithFirst)
This function is called to schedule sending packets from the network queue by priority.
void ScheduleCachedReply(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, Ptr< Ipv4Route > route, double hops)
Schedule the cached reply to a random start time to avoid possible route reply storm.
void SendAck(uint16_t ackId, Ipv4Address destination, Ipv4Address realSrc, Ipv4Address realDst, uint8_t protocol, Ptr< Ipv4Route > route)
Send network layer acknowledgment back to the earlier hop to notify the receipt of data packet.
void SetRouteCache(Ptr< dsr::DsrRouteCache > r)
Set the route cache.
void Send(Ptr< Packet > packet, Ipv4Address source, Ipv4Address destination, uint8_t protocol, Ptr< Ipv4Route > route)
This function is called by higher layer protocol when sending packets.
void Insert(Ptr< dsr::DsrOptions > option)
Insert a new Dsr Option.
std::vector< Ipv4Address > m_finalRoute
The route cache.
void CancelPacketAllTimer(DsrMaintainBuffEntry &mb)
Cancel all the packet timers.
uint32_t m_broadcastJitter
The max time to delay route request broadcast.
uint32_t m_maxCacheLen
Max # of cache entries for route cache.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:865
Every class exported by the ns3 library is enclosed in the ns3 namespace.