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_RouteEntry * | routes_ |
MRS_RouteEntry * | tail_ |
HopCountMetric ** | m_ |
Definition at line 52 of file mrcl-routing-static.h.
int MrclRoutingStatic::command | ( | int | argc, | |
const char *const * | argv | |||
) | [virtual] |
TCL command interpreter. It implements the following OTcl methods:
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) |
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
p | pointer to the received packet |
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.
a | Pointer to the address of the node which can be reached | |
m | [out] reference to a ponter of metric returned by the method |
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
p | pointer to the received packet |
Implements MrclRouting.
Definition at line 314 of file mrcl-routing-static.cc.
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().