#include <aodv_rtable.h>
Collaboration diagram for aodv_rt_entry:

Public Member Functions | |
| aodv_rt_entry () | |
| ~aodv_rt_entry () | |
| void | nb_insert (nsaddr_t id) |
| AODV_Neighbor * | nb_lookup (nsaddr_t id) |
| void | pc_insert (nsaddr_t id) |
| AODV_Precursor * | pc_lookup (nsaddr_t id) |
| void | pc_delete (nsaddr_t id) |
| void | pc_delete (void) |
| bool | pc_empty (void) |
Public Attributes | |
| double | rt_req_timeout |
| u_int8_t | rt_req_cnt |
Protected Member Functions | |
| LIST_ENTRY (aodv_rt_entry) rt_link | |
Protected Attributes | |
| nsaddr_t | rt_dst |
| u_int32_t | rt_seqno |
| u_int16_t | rt_hops |
| int | rt_last_hop_count |
| nsaddr_t | rt_nexthop |
| aodv_precursors | rt_pclist |
| double | rt_expire |
| u_int8_t | rt_flags |
| double | rt_disc_latency [MAX_HISTORY] |
| char | hist_indx |
| int | rt_req_last_ttl |
| aodv_ncache | rt_nblist |
Friends | |
| class | aodv_rtable |
| class | AODV |
| class | LocalRepairTimer |
|
|
Definition at line 40 of file aodv_rtable.cc. References hist_indx, INFINITY2, LIST_INIT, MAX_HISTORY, rt_disc_latency, rt_dst, rt_expire, rt_flags, rt_hops, rt_last_hop_count, rt_nblist, rt_nexthop, rt_pclist, rt_req_cnt, rt_req_last_ttl, rt_req_timeout, rt_seqno, and RTF_DOWN.
00041 {
00042 int i;
00043
00044 rt_req_timeout = 0.0;
00045 rt_req_cnt = 0;
00046
00047 rt_dst = 0;
00048 rt_seqno = 0;
00049 rt_hops = rt_last_hop_count = INFINITY2;
00050 rt_nexthop = 0;
00051 LIST_INIT(&rt_pclist);
00052 rt_expire = 0.0;
00053 rt_flags = RTF_DOWN;
00054
00055 /*
00056 rt_errors = 0;
00057 rt_error_time = 0.0;
00058 */
00059
00060
00061 for (i=0; i < MAX_HISTORY; i++) {
00062 rt_disc_latency[i] = 0.0;
00063 }
00064 hist_indx = 0;
00065 rt_req_last_ttl = 0;
00066
00067 LIST_INIT(&rt_nblist);
00068
00069 };
|
|
|
Definition at line 72 of file aodv_rtable.cc. References LIST_REMOVE, rt_nblist, and rt_pclist.
00073 {
00074 AODV_Neighbor *nb;
00075
00076 while((nb = rt_nblist.lh_first)) {
00077 LIST_REMOVE(nb, nb_link);
00078 delete nb;
00079 }
00080
00081 AODV_Precursor *pc;
00082
00083 while((pc = rt_pclist.lh_first)) {
00084 LIST_REMOVE(pc, pc_link);
00085 delete pc;
00086 }
00087
00088 }
|
|
|
|
|
|
Definition at line 92 of file aodv_rtable.cc. References LIST_INSERT_HEAD, AODV_Neighbor::nb_expire, and rt_nblist.
00093 {
00094 AODV_Neighbor *nb = new AODV_Neighbor(id);
00095
00096 assert(nb);
00097 nb->nb_expire = 0;
00098 LIST_INSERT_HEAD(&rt_nblist, nb, nb_link);
00099
00100 }
|
|
|
Definition at line 104 of file aodv_rtable.cc. References AODV_Neighbor::nb_addr, and rt_nblist.
00105 {
00106 AODV_Neighbor *nb = rt_nblist.lh_first;
00107
00108 for(; nb; nb = nb->nb_link.le_next) {
00109 if(nb->nb_addr == id)
00110 break;
00111 }
00112 return nb;
00113
00114 }
|
|
|
Definition at line 157 of file aodv_rtable.cc. References LIST_REMOVE, and rt_pclist.
00157 {
00158 AODV_Precursor *pc;
00159
00160 while((pc = rt_pclist.lh_first)) {
00161 LIST_REMOVE(pc, pc_link);
00162 delete pc;
00163 }
00164 }
|
|
|
Definition at line 143 of file aodv_rtable.cc. References LIST_REMOVE, AODV_Precursor::pc_addr, and rt_pclist. Referenced by AODV::handle_link_failure(), and AODV::recvError().
00143 {
00144 AODV_Precursor *pc = rt_pclist.lh_first;
00145
00146 for(; pc; pc = pc->pc_link.le_next) {
00147 if(pc->pc_addr == id) {
00148 LIST_REMOVE(pc,pc_link);
00149 delete pc;
00150 break;
00151 }
00152 }
00153
00154 }
|
|
|
Definition at line 167 of file aodv_rtable.cc. References rt_pclist. Referenced by AODV::recvError().
00167 {
00168 AODV_Precursor *pc;
00169
00170 if ((pc = rt_pclist.lh_first)) return false;
00171 else return true;
00172 }
|
|
|
Definition at line 118 of file aodv_rtable.cc. References LIST_INSERT_HEAD, pc_lookup(), and rt_pclist. Referenced by AODV::recvReply(), and AODV::recvRequest().
00119 {
00120 if (pc_lookup(id) == NULL) {
00121 AODV_Precursor *pc = new AODV_Precursor(id);
00122
00123 assert(pc);
00124 LIST_INSERT_HEAD(&rt_pclist, pc, pc_link);
00125 }
00126 }
|
Here is the call graph for this function:

|
|
Definition at line 130 of file aodv_rtable.cc. References AODV_Precursor::pc_addr, and rt_pclist. Referenced by pc_insert().
00131 {
00132 AODV_Precursor *pc = rt_pclist.lh_first;
00133
00134 for(; pc; pc = pc->pc_link.le_next) {
00135 if(pc->pc_addr == id)
00136 return pc;
00137 }
00138 return NULL;
00139
00140 }
|
|
|
Definition at line 85 of file aodv_rtable.h. |
|
|
Definition at line 84 of file aodv_rtable.h. |
|
|
Definition at line 86 of file aodv_rtable.h. |
|
|
Definition at line 132 of file aodv_rtable.h. Referenced by aodv_rt_entry(), and AODV::recvReply(). |
|
|
Definition at line 131 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::PerHopTime(), and AODV::recvReply(). |
|
|
Definition at line 106 of file aodv_rtable.h. Referenced by aodv_rt_entry(), LocalRepairTimer::handle(), AODV::handle_link_failure(), AODV::local_rt_repair(), AODV::recvError(), AODV::recvReply(), AODV::recvRequest(), aodv_rtable::rt_add(), aodv_rtable::rt_lookup(), AODV::rt_purge(), AODV::rt_resolve(), and AODV::sendRequest(). |
|
|
Definition at line 114 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::forward(), AODV::recvRequest(), AODV::rt_down(), AODV::rt_purge(), AODV::rt_update(), and AODV::sendRequest(). |
|
|
Definition at line 115 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::forward(), LocalRepairTimer::handle(), AODV::handle_link_failure(), AODV::local_rt_repair(), AODV::recvError(), AODV::recvReply(), AODV::recvRequest(), AODV::rt_down(), AODV::rt_purge(), AODV::rt_resolve(), AODV::rt_update(), and AODV::sendRequest(). |
|
|
Definition at line 109 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::handle_link_failure(), AODV::recvError(), AODV::recvReply(), AODV::recvRequest(), AODV::rt_down(), AODV::rt_ll_failed(), AODV::rt_purge(), AODV::rt_resolve(), AODV::rt_update(), and AODV::sendRequest(). |
|
|
Definition at line 110 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::rt_down(), and AODV::sendRequest(). |
|
|
Definition at line 141 of file aodv_rtable.h. Referenced by aodv_rt_entry(), nb_insert(), nb_lookup(), and ~aodv_rt_entry(). |
|
|
Definition at line 111 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::forward(), AODV::handle_link_failure(), AODV::recvError(), AODV::recvReply(), AODV::recvRequest(), AODV::rt_down(), AODV::rt_update(), and AODV::sendReply(). |
|
|
Definition at line 113 of file aodv_rtable.h. Referenced by aodv_rt_entry(), pc_delete(), pc_empty(), pc_insert(), pc_lookup(), and ~aodv_rt_entry(). |
|
|
Definition at line 101 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::recvReply(), AODV::recvRequest(), and AODV::sendRequest(). |
|
|
Definition at line 133 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::recvReply(), AODV::recvRequest(), and AODV::sendRequest(). |
|
|
Definition at line 100 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::local_rt_repair(), AODV::recvReply(), AODV::recvRequest(), and AODV::sendRequest(). |
|
|
Definition at line 107 of file aodv_rtable.h. Referenced by aodv_rt_entry(), AODV::handle_link_failure(), AODV::recvError(), AODV::recvReply(), AODV::recvRequest(), AODV::rt_purge(), AODV::rt_resolve(), AODV::rt_update(), and AODV::sendRequest(). |
1.3.3