aodv_rtable Class Reference

#include <aodv_rtable.h>


Detailed Description

Definition at line 147 of file aodv_rtable.h.

Public Member Functions

 aodv_rtable ()
aodv_rt_entryhead ()
aodv_rt_entryrt_add (nsaddr_t id)
void rt_delete (nsaddr_t id)
aodv_rt_entryrt_lookup (nsaddr_t id)

Private Member Functions

 LIST_HEAD (aodv_rthead, aodv_rt_entry) rthead


Constructor & Destructor Documentation

aodv_rtable::aodv_rtable  )  [inline]
 

Definition at line 149 of file aodv_rtable.h.

References LIST_INIT.

00149 { LIST_INIT(&rthead); }


Member Function Documentation

aodv_rt_entry* aodv_rtable::head  )  [inline]
 

Definition at line 151 of file aodv_rtable.h.

Referenced by AODV::handle_link_failure(), and AODV::rt_purge().

00151 { return rthead.lh_first; }

aodv_rtable::LIST_HEAD aodv_rthead  ,
aodv_rt_entry 
[private]
 

aodv_rt_entry * aodv_rtable::rt_add nsaddr_t  id  ) 
 

Definition at line 202 of file aodv_rtable.cc.

References LIST_INSERT_HEAD, aodv_rt_entry::rt_dst, and rt_lookup().

Referenced by AODV::recvReply(), AODV::recvRequest(), and AODV::rt_resolve().

00203 {
00204 aodv_rt_entry *rt;
00205 
00206  assert(rt_lookup(id) == 0);
00207  rt = new aodv_rt_entry;
00208  assert(rt);
00209  rt->rt_dst = id;
00210  LIST_INSERT_HEAD(&rthead, rt, rt_link);
00211  return rt;
00212 }

Here is the call graph for this function:

void aodv_rtable::rt_delete nsaddr_t  id  ) 
 

Definition at line 190 of file aodv_rtable.cc.

References LIST_REMOVE, and rt_lookup().

00191 {
00192 aodv_rt_entry *rt = rt_lookup(id);
00193 
00194  if(rt) {
00195    LIST_REMOVE(rt, rt_link);
00196    delete rt;
00197  }
00198 
00199 }

Here is the call graph for this function:

aodv_rt_entry * aodv_rtable::rt_lookup nsaddr_t  id  ) 
 

Definition at line 177 of file aodv_rtable.cc.

References aodv_rt_entry::rt_dst.

Referenced by LocalRepairTimer::handle(), AODV::recvError(), AODV::recvReply(), AODV::recvRequest(), rt_add(), rt_delete(), AODV::rt_resolve(), AODV::sendReply(), and AODV::sendRequest().

00178 {
00179 aodv_rt_entry *rt = rthead.lh_first;
00180 
00181  for(; rt; rt = rt->rt_link.le_next) {
00182    if(rt->rt_dst == id)
00183      break;
00184  }
00185  return rt;
00186 
00187 }


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:03:00 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6