LocalRepairTimer Class Reference

#include <aodv.h>

Inheritance diagram for LocalRepairTimer:

Handler Collaboration diagram for LocalRepairTimer:

Collaboration graph
[legend]

Detailed Description

Definition at line 164 of file aodv.h.

Public Member Functions

void handle (Event *)
 LocalRepairTimer (AODV *a)

Private Attributes

AODVagent
Event intr


Constructor & Destructor Documentation

LocalRepairTimer::LocalRepairTimer AODV a  )  [inline]
 

Definition at line 166 of file aodv.h.

00166 : agent(a) {}


Member Function Documentation

void LocalRepairTimer::handle Event  )  [virtual]
 

Implements Handler.

Definition at line 189 of file aodv.cc.

References agent, hdr_ip::daddr(), Packet::free(), HDR_IP, AODV::rt_down(), aodv_rt_entry::rt_flags, aodv_rtable::rt_lookup(), AODV::rtable, and RTF_UP.

00189                                   {  // SRD: 5/4/99
00190 aodv_rt_entry *rt;
00191 struct hdr_ip *ih = HDR_IP( (Packet *)p);
00192 
00193    /* you get here after the timeout in a local repair attempt */
00194    /*   fprintf(stderr, "%s\n", __FUNCTION__); */
00195 
00196 
00197     rt = agent->rtable.rt_lookup(ih->daddr());
00198     
00199     if (rt && rt->rt_flags != RTF_UP) {
00200     // route is yet to be repaired
00201     // I will be conservative and bring down the route
00202     // and send route errors upstream.
00203     /* The following assert fails, not sure why */
00204     /* assert (rt->rt_flags == RTF_IN_REPAIR); */
00205         
00206       //rt->rt_seqno++;
00207       agent->rt_down(rt);
00208       // send RERR
00209 #ifdef DEBUG
00210       fprintf(stderr,"Node %d: Dst - %d, failed local repair\n",index, rt->rt_dst);
00211 #endif      
00212     }
00213     Packet::free((Packet *)p);
00214 }

Here is the call graph for this function:


Field Documentation

AODV* LocalRepairTimer::agent [private]
 

Definition at line 169 of file aodv.h.

Referenced by handle().

Event LocalRepairTimer::intr [private]
 

Definition at line 170 of file aodv.h.


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