A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dsr-rcache.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Yufei Cheng
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Yufei Cheng <yfcheng@ittc.ku.edu>
19  * Song Luan <lsuper@mail.ustc.edu.cn> (Implemented Link Cache using dijsktra algorithm to get the best route)
20  *
21  * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
22  * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets
23  * Information and Telecommunication Technology Center (ITTC)
24  * and Department of Electrical Engineering and Computer Science
25  * The University of Kansas Lawrence, KS USA.
26  *
27  * Work supported in part by NSF FIND (Future Internet Design) Program
28  * under grant CNS-0626918 (Postmodern Internet Architecture),
29  * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
30  * US Department of Defense (DoD), and ITTC at The University of Kansas.
31  */
32 
33 #ifndef DSR_RCACHE_H
34 #define DSR_RCACHE_H
35 
36 #include <map>
37 #include <stdint.h>
38 #include <cassert>
39 #include <sys/types.h>
40 #include <iostream>
41 #include <vector>
42 
43 #include "ns3/simulator.h"
44 #include "ns3/timer.h"
45 #include "ns3/simple-ref-count.h"
46 #include "ns3/header.h"
47 #include "ns3/enum.h"
48 #include "ns3/ipv4-address.h"
49 #include "ns3/nstime.h"
50 #include "ns3/ipv4.h"
51 #include "ns3/ipv4-route.h"
52 #include "ns3/net-device.h"
53 #include "ns3/ipv4-l3-protocol.h"
54 #include "ns3/callback.h"
55 #include "ns3/wifi-mac-header.h"
56 #include "ns3/arp-cache.h"
57 #include "dsr-option-header.h"
58 
59 namespace ns3 {
60 class Time;
61 namespace dsr {
62 
86 struct Link
87 {
91  {
92  if (ip1 < ip2)
93  {
94  m_low = ip1;
95  m_high = ip2;
96  }
97  else
98  {
99  m_low = ip2;
100  m_high = ip1;
101  }
102  }
103  bool operator < (Link const& L) const
104  {
105  if (m_low < L.m_low)
106  {
107  return true;
108  }
109  else if (m_low == L.m_low)
110  {
111  return (m_high < L.m_high);
112  }
113  else
114  {
115  return false;
116  }
117  }
118  void Print () const;
119 };
120 
121 class LinkStab
122 {
123 public:
127  LinkStab (Time linkStab = Simulator::Now ());
131  virtual ~LinkStab ();
132 
136  void SetLinkStability (Time linkStab)
137  {
138  m_linkStability = linkStab + Simulator::Now ();
139  }
141  {
142  return m_linkStability - Simulator::Now ();
143  }
144 
145  void Print () const;
146 
147 private:
153 };
154 
155 class NodeStab
156 {
157 public:
158 
159  NodeStab (Time nodeStab = Simulator::Now ());
160  virtual ~NodeStab ();
161 
162  void SetNodeStability (Time nodeStab)
163  {
164  m_nodeStability = nodeStab + Simulator::Now ();
165  }
167  {
168  return m_nodeStability - Simulator::Now ();
169  }
170 private:
172 };
173 
175 {
176 public:
177  typedef std::vector<Ipv4Address> IP_VECTOR;
178  typedef std::vector<Ipv4Address>::iterator Iterator;
179 
180  RouteCacheEntry (IP_VECTOR const & ip = IP_VECTOR (), Ipv4Address dst = Ipv4Address (), Time exp = Simulator::Now ());
181  virtual ~RouteCacheEntry ();
182 
184  void Invalidate (Time badLinkLifetime);
186  // \{
187  void SetUnidirectional (bool u)
188  {
189  m_blackListState = u;
190  }
191  bool IsUnidirectional () const
192  {
193  return m_blackListState;
194  }
196  {
197  m_blackListTimeout = t;
198  }
200  {
201  return m_blackListTimeout;
202  }
204  {
205  return m_dst;
206  }
208  {
209  m_dst = d;
210  }
212  {
213  return m_path;
214  }
216  {
217  m_path = v;
218  }
219  void SetExpireTime (Time exp)
220  {
221  m_expire = exp + Simulator::Now ();
222  }
224  {
225  return m_expire - Simulator::Now ();
226  }
227  // \}
231  void Print (std::ostream & os) const;
236  bool operator== (RouteCacheEntry const & o) const
237  {
238  if (m_path.size () != o.m_path.size ())
239  {
240  NS_ASSERT (false);
241  return false;
242  }
243  IP_VECTOR::const_iterator j = o.m_path.begin ();
244  for (IP_VECTOR::const_iterator i = m_path.begin (); i
245  != m_path.end (); i++, j++)
246  {
247  /*
248  * Verify if neither the entry are not 0 and they equal to each other
249  */
250  if (((*i) == 0) || ((*j) == 0))
251  {
252  return false;
253  }
254  else if (!((*i) == (*j)) )
255  {
256  return false;
257  }
258  else
259  {
260  return true;
261  }
262  }
263  return false;
264  }
265  // \}
266 
267 private:
268 
274  uint8_t m_reqCount;
279 };
285 class RouteCache : public Object
286 {
287 public:
288 
289  static TypeId GetTypeId ();
290 
291  RouteCache ();
292  virtual ~RouteCache ();
293 
297  void RemoveLastEntry (std::list<RouteCacheEntry> & rtVector);
301  typedef std::list<RouteCacheEntry::IP_VECTOR> routeVector;
303  // \{
304  bool GetSubRoute () const
305  {
306  return m_subRoute;
307  }
308  void SetSubRoute (bool subRoute)
309  {
310  m_subRoute = subRoute;
311  }
312  uint32_t GetMaxCacheLen () const
313  {
314  return m_maxCacheLen;
315  }
316  void SetMaxCacheLen (uint32_t len)
317  {
318  m_maxCacheLen = len;
319  }
321  {
322  return RouteCacheTimeout;
323  }
325  {
326  RouteCacheTimeout = t;
327  }
328  uint32_t GetMaxEntriesEachDst () const
329  {
330  return m_maxEntriesEachDst;
331  }
332  void SetMaxEntriesEachDst (uint32_t entries)
333  {
334  m_maxEntriesEachDst = entries;
335  }
337  {
338  return m_badLinkLifetime;
339  }
341  {
342  m_badLinkLifetime = t;
343  }
344  uint64_t GetStabilityDecrFactor () const
345  {
346  return m_stabilityDecrFactor;
347  }
348  void SetStabilityDecrFactor (uint64_t decrFactor)
349  {
350  m_stabilityDecrFactor = decrFactor;
351  }
352  uint64_t GetStabilityIncrFactor () const
353  {
354  return m_stabilityIncrFactor;
355  }
356  void SetStabilityIncrFactor (uint64_t incrFactor)
357  {
358  m_stabilityIncrFactor = incrFactor;
359  }
361  {
362  return m_initStability;
363  }
364  void SetInitStability (Time initStability)
365  {
366  m_initStability = initStability;
367  }
369  {
370  return m_minLifeTime;
371  }
372  void SetMinLifeTime (Time minLifeTime)
373  {
374  m_minLifeTime = minLifeTime;
375  }
377  {
378  return m_useExtends;
379  }
380  void SetUseExtends (Time useExtends)
381  {
382  m_useExtends = useExtends;
383  }
384  // \}
390  bool UpdateRouteEntry (Ipv4Address dst);
396  bool AddRoute (RouteCacheEntry & rt);
403  bool LookupRoute (Ipv4Address id, RouteCacheEntry & rt);
408  void PrintVector (std::vector<Ipv4Address>& vec);
413  void PrintRouteVector (std::list<RouteCacheEntry> route);
419  bool FindSameRoute (RouteCacheEntry & rt, std::list<RouteCacheEntry> & rtVector);
424  bool DeleteRoute (Ipv4Address dst);
433  void DeleteAllRoutesIncludeLink (Ipv4Address errorSrc, Ipv4Address unreachNode, Ipv4Address node);
435  void Clear ()
436  {
438  }
440  void Purge ();
442  void Print (std::ostream &os);
443 
444  //------------------------------------------------------------------------------------------
448  uint16_t CheckUniqueAckId (Ipv4Address nextHop);
452  uint16_t GetAckSize ();
453 
454  // --------------------------------------------------------------------------------------------
458  struct Neighbor
460  {
464  bool close;
465 
467  : m_neighborAddress (ip),
468  m_hardwareAddress (mac),
469  m_expireTime (t),
470  close (false)
471  {
472  }
473 
474  Neighbor () {} // For Python bindings
475  };
483  bool IsNeighbor (Ipv4Address addr);
487  void UpdateNeighbor (std::vector<Ipv4Address> nodeList, Time expire);
491  void AddNeighbor (std::vector<Ipv4Address> nodeList, Ipv4Address ownAddress, Time expire);
495  void PurgeMac ();
499  void ScheduleTimer ();
503  void ClearMac ()
504  {
505  m_nb.clear ();
506  }
510  void AddArpCache (Ptr<ArpCache>);
514  void DelArpCache (Ptr<ArpCache>);
520  {
521  return m_txErrorCallback;
522  }
524  // \{
526  {
527  m_handleLinkFailure = cb;
528  }
530  {
531  return m_handleLinkFailure;
532  }
533  // \}
534 
535 private:
536  RouteCache & operator= (RouteCache const &);
538  uint32_t m_maxCacheLen;
541 
552  typedef std::list<RouteCacheEntry> routeEntryVector;
553 
554  std::map<Ipv4Address, routeEntryVector> m_sortedRoutes;
555 
557 
559 
560  std::map<Ipv4Address, uint16_t> m_ackIdCache;
561 
563 
564  bool m_subRoute;
565 
569  #define MAXWEIGHT 0xFFFF;
570 
575  std::map<Ipv4Address, std::map<Ipv4Address, uint32_t> > m_netGraph;
576 
577  std::map<Ipv4Address, RouteCacheEntry::IP_VECTOR> m_bestRoutesTable_link;
578  std::map<Link, LinkStab> m_linkCache;
579  std::map<Ipv4Address, NodeStab> m_nodeCache;
580 
590  bool IncStability (Ipv4Address node);
595  bool DecStability (Ipv4Address node);
596 
597 public:
603  void SetCacheType (std::string type);
604  bool IsLinkCache ();
610  void RebuildBestRouteTable (Ipv4Address source);
611  void PurgeLinkNode ();
622  void UpdateNetGraph ();
623  //---------------------------------------------------------------------------------------
628 
630 
632 
633  std::vector<Neighbor> m_nb;
634 
635  std::vector<Ptr<ArpCache> > m_arp;
636 
638 
640 
641  void ProcessTxError (WifiMacHeader const &);
642 };
643 } // namespace dsr
644 } // namespace ns3
645 #endif /* DSR_RCACHE_H */
void SetMinLifeTime(Time minLifeTime)
Definition: dsr-rcache.h:372
Time GetBlacklistTimeout() const
Definition: dsr-rcache.h:199
bool DeleteRoute(Ipv4Address dst)
Delete the route with certain destination address.
Definition: dsr-rcache.cc:758
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:79
void PurgeMac()
Remove all expired mac entries.
Definition: dsr-rcache.cc:1171
void Purge()
Delete all outdated entries and invalidate valid entry if Lifetime is expired.
Definition: dsr-rcache.cc:963
Callback template class.
Definition: callback.h:924
IP_VECTOR m_path
brief The IP address constructed route
Definition: dsr-rcache.h:271
void SetVector(IP_VECTOR v)
Definition: dsr-rcache.h:215
a simple Timer class
Definition: timer.h:45
Time GetNodeStability() const
Definition: dsr-rcache.h:166
void Clear()
Delete all entries from routing table.
Definition: dsr-rcache.h:435
bool IncStability(Ipv4Address node)
increase the stability of the node
Definition: dsr-rcache.cc:513
Ipv4Address m_dst
The destination Ip address.
Definition: dsr-rcache.h:270
Ipv4Address GetDestination() const
Definition: dsr-rcache.h:203
Ipv4InterfaceAddress m_iface
Output interface address.
Definition: dsr-rcache.h:273
void SetUnidirectional(bool u)
Definition: dsr-rcache.h:187
void SetCacheTimeout(Time t)
Definition: dsr-rcache.h:324
uint32_t GetMaxEntriesEachDst() const
Definition: dsr-rcache.h:328
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:61
Time RouteCacheTimeout
The maximum period of time that dsr is allowed to for an unused route.
Definition: dsr-rcache.h:539
bool AddRoute(RouteCacheEntry &rt)
Add route cache entry if it doesn't yet exist in route cache.
Definition: dsr-rcache.cc:655
void RebuildBestRouteTable(Ipv4Address source)
USE MAXWEIGHT TO REPRESENT MAX; USE BROADCAST ADDRESS TO REPRESENT NULL PRECEEDING ADDRESS...
Definition: dsr-rcache.cc:315
NodeStab(Time nodeStab=Simulator::Now())
Definition: dsr-rcache.cc:80
void Print(std::ostream &os)
Print route cache.
Definition: dsr-rcache.cc:1030
RouteCache & operator=(RouteCache const &)
bool LookupRoute_Link(Ipv4Address id, RouteCacheEntry &rt)
used by LookupRoute when LinkCache
Definition: dsr-rcache.cc:431
std::map< Ipv4Address, std::map< Ipv4Address, uint32_t > > m_netGraph
Current network graph state for this node, double is weight, which is calculated by the node informat...
Definition: dsr-rcache.h:575
void SetBadLinkLifetime(Time t)
Definition: dsr-rcache.h:340
void SetMaxCacheLen(uint32_t len)
Definition: dsr-rcache.h:316
uint32_t m_stabilityDecrFactor
Define the parameters for link cache type.
Definition: dsr-rcache.h:544
void SetInitStability(Time initStability)
Definition: dsr-rcache.h:364
void SetStabilityIncrFactor(uint64_t incrFactor)
Definition: dsr-rcache.h:356
std::map< Ipv4Address, uint16_t > m_ackIdCache
The id cache to ensure all the ids are unique.
Definition: dsr-rcache.h:560
Ptr< Ipv4 > m_ipv4
The Ipv4 layer 3.
Definition: dsr-rcache.h:278
bool operator==(RouteCacheEntry const &o) const
Compare the route cache entry.
Definition: dsr-rcache.h:236
void SetCacheType(std::string type)
Dijsktra algorithm to get the best route from m_netGraph and update the m_bestRoutesTable_link when c...
Definition: dsr-rcache.cc:289
void UseExtends(RouteCacheEntry::IP_VECTOR rt)
When a link from the Route Cache is used in routing a packet originated or salvaged by that node...
Definition: dsr-rcache.cc:609
RouteCacheEntry::IP_VECTOR m_vector
The route vector to save the ip addresses for intermediate nodes.
Definition: dsr-rcache.h:537
uint16_t CheckUniqueAckId(Ipv4Address nextHop)
Check for duplicate ids and save new entries if the id is not present in the table.
Definition: dsr-rcache.cc:1049
Time GetMinLifeTime() const
Definition: dsr-rcache.h:368
std::list< RouteCacheEntry::IP_VECTOR > routeVector
Define the vector of route entries.
Definition: dsr-rcache.h:301
void AddNeighbor(std::vector< Ipv4Address > nodeList, Ipv4Address ownAddress, Time expire)
Add to the neighbor list.
Definition: dsr-rcache.cc:1141
void ClearMac()
Remove all entries.
Definition: dsr-rcache.h:503
void UpdateNeighbor(std::vector< Ipv4Address > nodeList, Time expire)
Update expire time for entry with address addr, if it exists, else add new entry. ...
Definition: dsr-rcache.cc:1113
void ScheduleTimer()
Schedule m_ntimer.
Definition: dsr-rcache.cc:1197
std::vector< Ipv4Address > IP_VECTOR
Define the vector to hold Ip address.
Definition: dsr-rcache.h:177
bool m_subRoute
Check if save the sub route entries or not.
Definition: dsr-rcache.h:564
bool UpdateRouteEntry(Ipv4Address dst)
Update route cache entry if it has been recently used and successfully delivered the data packet...
Definition: dsr-rcache.cc:176
void Invalidate(Time badLinkLifetime)
Mark entry as "down" (i.e. disable it)
Definition: dsr-rcache.cc:121
void DelArpCache(Ptr< ArpCache >)
Don't use given ARP cache any more (interface is down)
Definition: dsr-rcache.cc:1210
RouteCacheEntry(IP_VECTOR const &ip=IP_VECTOR(), Ipv4Address dst=Ipv4Address(), Time exp=Simulator::Now())
Definition: dsr-rcache.cc:105
uint32_t m_maxCacheLen
The maximum number of packets that we allow a routing protocol to buffer.
Definition: dsr-rcache.h:538
Definition: dsr-rcache.h:174
void PrintRouteVector(std::list< RouteCacheEntry > route)
Print all the route vector elements from the route list.
Definition: dsr-rcache.cc:951
std::map< Link, LinkStab > m_linkCache
The data structure to store link info.
Definition: dsr-rcache.h:578
uint32_t GetMaxCacheLen() const
Definition: dsr-rcache.h:312
void SetSubRoute(bool subRoute)
Definition: dsr-rcache.h:308
virtual ~RouteCacheEntry()
Definition: dsr-rcache.cc:116
Callback< void, WifiMacHeader const & > m_txErrorCallback
TX error callback.
Definition: dsr-rcache.h:629
void ProcessTxError(WifiMacHeader const &)
Process layer 2 TX error notification.
Definition: dsr-rcache.cc:1233
uint32_t m_stabilityIncrFactor
Definition: dsr-rcache.h:545
Mac48Address LookupMacAddress(Ipv4Address)
Find MAC address by IP using list of ARP caches.
Definition: dsr-rcache.cc:1216
uint8_t m_reqCount
Number of route requests.
Definition: dsr-rcache.h:274
bool AddRoute_Link(RouteCacheEntry::IP_VECTOR nodelist, Ipv4Address node)
Definition: dsr-rcache.cc:560
void SetUseExtends(Time useExtends)
Definition: dsr-rcache.h:380
Time GetInitStability() const
Definition: dsr-rcache.h:360
std::list< RouteCacheEntry > routeEntryVector
Define the route cache data structure.
Definition: dsr-rcache.h:552
void RemoveLastEntry(std::list< RouteCacheEntry > &rtVector)
Remove the aged route cache entries when the route cache is full.
Definition: dsr-rcache.cc:168
Ptr< Ipv4Route > m_ipv4Route
The Ipv4 route.
Definition: dsr-rcache.h:277
void PrintVector(std::vector< Ipv4Address > &vec)
Print the route vector elements.
Definition: dsr-rcache.cc:930
void Print(std::ostream &os) const
Print necessary fields.
Definition: dsr-rcache.cc:128
Time GetUseExtends() const
Definition: dsr-rcache.h:376
Time GetBadLinkLifetime() const
Definition: dsr-rcache.h:336
static TypeId GetTypeId()
Definition: dsr-rcache.cc:136
an EUI-48 address
Definition: mac48-address.h:41
DSR route request queue Since DSR is an on demand routing we queue requests while looking for route...
Definition: dsr-rcache.h:285
void SetCallback(Callback< void, Ipv4Address, uint8_t > cb)
Definition: dsr-rcache.h:525
uint16_t GetAckSize()
Get the ack table size.
Definition: dsr-rcache.cc:1071
Time GetExpireTime() const
Definition: dsr-rcache.h:223
static Time Now(void)
Return the "current simulation time".
Definition: simulator.cc:180
IP_VECTOR GetVector() const
Definition: dsr-rcache.h:211
std::vector< Ptr< ArpCache > > m_arp
list of ARP cached to be used for layer 2 notifications processing
Definition: dsr-rcache.h:635
void SetExpireTime(Time exp)
Definition: dsr-rcache.h:219
Callback< void, Ipv4Address, uint8_t > GetCallback() const
Definition: dsr-rcache.h:529
bool LookupRoute(Ipv4Address id, RouteCacheEntry &rt)
Lookup route cache entry with destination address dst.
Definition: dsr-rcache.cc:206
uint64_t GetStabilityIncrFactor() const
Definition: dsr-rcache.h:352
void SetNodeStability(Time nodeStab)
Definition: dsr-rcache.h:162
bool m_blackListState
Indicate if this entry is in "blacklist".
Definition: dsr-rcache.h:275
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
uint32_t m_maxEntriesEachDst
number of entries for each destination
Definition: dsr-rcache.h:558
Timer m_ntimer
Timer for neighbor's list. Schedule Purge().
Definition: dsr-rcache.h:631
virtual ~NodeStab()
Definition: dsr-rcache.cc:85
Callback< void, WifiMacHeader const & > GetTxErrorCallback() const
Get callback to ProcessTxError, this callback is trying to use the wifi mac tx error header to notify...
Definition: dsr-rcache.h:519
Time GetCacheTimeout() const
Definition: dsr-rcache.h:320
std::map< Ipv4Address, RouteCacheEntry::IP_VECTOR > m_bestRoutesTable_link
for link route cache
Definition: dsr-rcache.h:577
a class to store IPv4 address information on an interface
std::map< Ipv4Address, routeEntryVector > m_sortedRoutes
Map the ipv4Address to route entry vector.
Definition: dsr-rcache.h:554
Time m_expire
Expire time for queue entry.
Definition: dsr-rcache.h:272
uint64_t GetStabilityDecrFactor() const
Definition: dsr-rcache.h:344
Time m_badLinkLifetime
The time for which the neighboring node is put into the blacklist.
Definition: dsr-rcache.h:540
void SetStabilityDecrFactor(uint64_t decrFactor)
Definition: dsr-rcache.h:348
Timer m_ackTimer
RREP_ACK timer.
Definition: dsr-rcache.h:269
void UpdateNetGraph()
Update the Net Graph for the link and node cache has changed.
Definition: dsr-rcache.cc:498
Callback< void, Ipv4Address, uint8_t > m_handleLinkFailure
The following code handles link-layer acks.
Definition: dsr-rcache.h:627
Time m_blackListTimeout
Time for which the node is put into the blacklist.
Definition: dsr-rcache.h:276
bool FindSameRoute(RouteCacheEntry &rt, std::list< RouteCacheEntry > &rtVector)
Find the same route in the route cache.
Definition: dsr-rcache.cc:725
a base class which provides memory management and object aggregation
Definition: object.h:64
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...
Definition: dsr-rcache.cc:772
bool DecStability(Ipv4Address node)
decrease the stability of the node
Definition: dsr-rcache.cc:537
Neighbor(Ipv4Address ip, Mac48Address mac, Time t)
Definition: dsr-rcache.h:466
bool GetSubRoute() const
Definition: dsr-rcache.h:304
void SetBlacklistTimeout(Time t)
Definition: dsr-rcache.h:195
std::vector< Neighbor > m_nb
vector of entries
Definition: dsr-rcache.h:633
routeEntryVector m_routeEntryVector
Define the route vector.
Definition: dsr-rcache.h:556
bool m_isLinkCache
Check if the route is using path cache or link cache.
Definition: dsr-rcache.h:562
a unique identifier for an interface.
Definition: type-id.h:49
bool IsNeighbor(Ipv4Address addr)
Check that node with address addr is neighbor.
Definition: dsr-rcache.cc:1081
Time GetExpireTime(Ipv4Address addr)
Return expire time for neighbor node with address addr, if exists, else return 0. ...
Definition: dsr-rcache.cc:1097
void SetDestination(Ipv4Address d)
Definition: dsr-rcache.h:207
Time m_delay
This timeout deals with the passive ack.
Definition: dsr-rcache.h:637
void SetMaxEntriesEachDst(uint32_t entries)
Definition: dsr-rcache.h:332
Implements the IEEE 802.11 MAC header.
void AddArpCache(Ptr< ArpCache >)
Add ARP cache to be used to allow layer 2 notifications processing.
Definition: dsr-rcache.cc:1204
std::vector< Ipv4Address >::iterator Iterator
Define the iterator.
Definition: dsr-rcache.h:178
bool IsUnidirectional() const
Definition: dsr-rcache.h:191
std::map< Ipv4Address, NodeStab > m_nodeCache
The data structure to store node info.
Definition: dsr-rcache.h:579