#include <aodv_rtable.h>
Public Member Functions | |
| aodv_rtable () | |
| aodv_rt_entry * | head () |
| aodv_rt_entry * | rt_add (nsaddr_t id) |
| void | rt_delete (nsaddr_t id) |
| aodv_rt_entry * | rt_lookup (nsaddr_t id) |
Private Member Functions | |
| LIST_HEAD (aodv_rthead, aodv_rt_entry) rthead | |
|
|
Definition at line 151 of file aodv_rtable.h. References LIST_INIT.
00151 { LIST_INIT(&rthead); }
|
|
|
Definition at line 153 of file aodv_rtable.h. Referenced by AODV::handle_link_failure(), and AODV::rt_purge().
00153 { return rthead.lh_first; }
|
|
||||||||||||
|
|
|
|
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:

|
|
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:

|
|
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 }
|
1.3.3