AodvModule Class Reference

Inheritance diagram for AodvModule:

Inheritance graph
[legend]
Collaboration diagram for AodvModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AodvModule ()
virtual ~AodvModule ()
virtual int command (int argc, const char *const *argv)
void rt_ll_failed (Packet *p)
void handle_link_failure (char *id)
void local_rt_repair (Aodv_rt_entry *rt, Packet *p)

Protected Member Functions

virtual int controlPacket (Packet *p)
virtual void forward (Packet *p)
virtual void resolve (Packet *p)
virtual void forward (Packet *p, Aodv_rt_entry *re, double delay=0.0)
virtual char * getNextHop (Packet *p)
virtual int canIReach (char *a, Metric ***m)
virtual void recvAodv (Packet *p)
virtual void recvRequest (Packet *p)
virtual void recvReply (Packet *p)
virtual void recvError (Packet *p)
virtual void recvHello (Packet *p)
virtual void sendHello ()
virtual void sendReply (char *dst, int hop_count, char *rp_dst, int rpseq, int lifetime, double timestamp)
virtual void sendRequest (char *dst)
virtual void sendError (Packet *p, int jitter=1)
int id_lookup (char *addr, int bid)
void id_insert (char *addr, int bid)
void id_delete (AddrList *a)
void id_purge (void)
void rt_update (Aodv_rt_entry *rt, int seqnum, int metric, char *nexthop, double expire_time)
void rt_down (Aodv_rt_entry *rt)
void rt_purge ()
Aodv_rt_entryrtable_lookup (char *addr)
void nb_insert (char *id)
AddrListnb_lookup (char *id)
void nb_delete (char *id)
void nb_delete (AddrList *a)
void nb_purge ()
double perHopTime (Aodv_rt_entry *rt)
double minHelloInterval ()
double maxHelloInterval ()
double routeCacheFrequency ()
int debug ()

Protected Attributes

HopCountMetric ** m_
AddrListncache_
AddrListbcache_
RoutingQueue rqueue_
Aodv_rtable rtable_
PriQueue * ifqueue_
MrclAddressbroadcastAddr_
int seqno_
int RREQ_GRAT_RREP
int bid_
int AODV_LINK_LAYER_DETECTION
int AODV_LOCAL_REPAIR
int AODV_MIRACLE_ROUTING
MrclBroadcastTimer btimer
MrclHelloTimer htimer
MrclNeighborTimer ntimer
MrclRouteCacheTimer rtimer
MrclLocalRepairTimer lrtimer
double minHelloIntervalRatio_
double maxHelloIntervalRatio_
double helloInterval_
double routeCacheFrequency_
int debugout

Friends

class MrclBroadcastTimer
class MrclHelloTimer
class MrclNeighborTimer
class MrclRouteCacheTimer
class MrclLocalRepairTimer

Detailed Description

Definition at line 148 of file module-aodv.h.


Member Function Documentation

int AodvModule::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL command interpreter. It implements the following OTcl methods:

Parameters:
argc number of arguments in argv
argv array of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns:
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no
See also:
Module

Reimplemented from MrclRouting.

Definition at line 152 of file module-aodv.cc.

References AODV_LINK_LAYER_DETECTION, AODV_MIRACLE_ROUTING, broadcastAddr_, btimer, MrclRouting::command(), MrclRouteCacheTimer::handle(), MrclNeighborTimer::handle(), MrclHelloTimer::handle(), MrclBroadcastTimer::handle(), htimer, ifqueue_, MrclRouting::nAddresses(), ntimer, rtimer, MrclAddress::strlen(), and MrclAddress::toString().

Here is the call graph for this function:

int AodvModule::controlPacket ( Packet *  p  )  [protected, virtual]

Abstract method to be extended by the specific routing algorithm in order to get all the info it needed from its control packets

Parameters:
p pointer to the received packet
Returns:
TRUE when the packet pointed by *p is a control packet

Implements MrclRouting.

Definition at line 473 of file module-aodv.cc.

References recvAodv().

Here is the call graph for this function:

char * AodvModule::getNextHop ( Packet *  p  )  [protected, virtual]

Abstract method used to solve the routing of the packet as function of the specific routing algorithm

Parameters:
p pointer to the received packet
Returns:
The address of the next hop node

Implements MrclRouting.

Definition at line 1666 of file module-aodv.cc.

References RoutingHdr::daddr(), Aodv_rt_entry::getExpire(), Aodv_rt_entry::getNexthop(), HDR_ROUTING, Aodv_rtable::rt_lookup(), and rtable_.

Here is the call graph for this function:

int AodvModule::canIReach ( char *  a,
Metric ***  m 
) [protected, virtual]

This method is called by isReachable and it say if a particular destination can be reach by the current module.

Parameters:
a Pointer to the address of the node which can be reached
m [out] reference to a ponter of metric returned by the method
Returns:
The number of returned metrics
Remarks:
The returned metrics have not to be dellocated

Implements MrclRouting.

Definition at line 1686 of file module-aodv.cc.

References Aodv_rt_entry::getExpire(), Aodv_rt_entry::getFlags(), Aodv_rt_entry::getHops(), m_, Aodv_rtable::rt_lookup(), rtable_, and HopCountMetric::setHopCount().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:48:19 2008 for NS-MIRACLE library by  doxygen 1.5.2