MrclRoutingStatic Class Reference

Inheritance diagram for MrclRoutingStatic:

Inheritance graph
[legend]
Collaboration diagram for MrclRoutingStatic:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MrclRoutingStatic ()
 ~MrclRoutingStatic ()
virtual int command (int argc, const char *const *argv)
virtual char * getNextHop (Packet *p)
virtual int canIReach (char *a, Metric ***m)
virtual void forward (Packet *p)
virtual int controlPacket (Packet *p)
virtual void resolve (Packet *p)

Protected Attributes

MRS_RouteEntryroutes_
MRS_RouteEntrytail_
HopCountMetric ** m_

Detailed Description

Definition at line 52 of file mrcl-routing-static.h.


Member Function Documentation

int MrclRoutingStatic::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 58 of file mrcl-routing-static.cc.

References MrclRouting::command(), MRS_RouteEntry::mask, MRS_RouteEntry::module, MRS_RouteEntry::net, MRS_RouteEntry::next, MRS_RouteEntry::next_hop, routes_, IPAddress::strlen(), tail_, and IPAddress::toString().

Here is the call graph for this function:

char * MrclRoutingStatic::getNextHop ( Packet *  p  )  [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 139 of file mrcl-routing-static.cc.

References RoutingHdr::daddr(), Module::drop(), HDR_ROUTING, MRS_RouteEntry::next, and routes_.

Referenced by resolve().

Here is the call graph for this function:

int MrclRoutingStatic::canIReach ( char *  a,
Metric ***  m 
) [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 177 of file mrcl-routing-static.cc.

References m_, MRS_RouteEntry::next, and routes_.

int MrclRoutingStatic::controlPacket ( Packet *  p  )  [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 314 of file mrcl-routing-static.cc.


Member Data Documentation

MRS_RouteEntry* MrclRoutingStatic::routes_ [protected]

Last computed routes

Reimplemented from MrclRouting.

Definition at line 66 of file mrcl-routing-static.h.

Referenced by canIReach(), command(), getNextHop(), and resolve().


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