Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

aodv_rtable Class Reference

#include <aodv_rtable.h>

List of all members.

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 151 of file aodv_rtable.h.

References LIST_INIT.

00151 { LIST_INIT(&rthead); }


Member Function Documentation

aodv_rt_entry* aodv_rtable::head  )  [inline]
 

Definition at line 153 of file aodv_rtable.h.

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

00153 { 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 204 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().

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

Here is the call graph for this function:

void aodv_rtable::rt_delete nsaddr_t  id  ) 
 

Definition at line 192 of file aodv_rtable.cc.

References LIST_REMOVE, and rt_lookup().

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

Here is the call graph for this function:

aodv_rt_entry * aodv_rtable::rt_lookup nsaddr_t  id  ) 
 

Definition at line 179 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_ll_failed(), AODV::rt_resolve(), AODV::sendReply(), and AODV::sendRequest().

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


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 12:32:52 2004 for NS2.26SourcesOriginal by doxygen 1.3.3