IterativeLookup Class Reference

#include <IterativeLookup.h>

Inheritance diagram for IterativeLookup:

RpcListener AbstractLookup Comparator< OverlayKey >

List of all members.


Detailed Description

This class implements a basic greedy lookup strategy.

It uses the standard metric for greedy behaviour. If another metric is needed, the distance function can be replaced by overriding the distance method.

Author:
Sebastian Mies

Public Member Functions

 IterativeLookup (BaseOverlay *overlay, RoutingType routingType, const IterativeLookupConfiguration &config, const cObject *findNodeExt=NULL, bool appLookup=false)
virtual ~IterativeLookup ()
void lookup (const OverlayKey &key, int numSiblings=1, int hopCountMax=0, int retries=0, LookupListener *listener=NULL)
 Lookup siblings for a key.
const NodeVectorgetResult () const
 Returns the result of the lookup.
bool isValid () const
 Returns true, if the lookup was successful.
void abortLookup ()
 Aborts a running lookup.
uint getAccumulatedHops () const
 Returns the total number of hops for all lookup paths.

Protected Types

typedef UNORDERED_MAP
< TransportAddress,
RpcInfoVector,
TransportAddress::hashFcn
RpcInfoMap

Protected Member Functions

virtual IterativePathLookupcreatePathLookup ()
 This method creates a new path lookup.
virtual FindNodeCall * createInitialRpcCall ()
 This method creates the initial FindNode RPC call message used to query the local findNode() method.
int compare (const OverlayKey &lhs, const OverlayKey &rhs) const
 compares two OverlayKeys and indicates which one is closer to the key to look up
bool addSibling (const NodeHandle &handle)
 adds a node to the siblings NodeVector
void setVisited (const TransportAddress &addr, bool visitedFlag=true)
 adds/deletes visited nodes to/from the visited TransportAddress::Set
bool getVisited (const TransportAddress &addr)
 indicates if the specified node has been visited before
void setDead (const TransportAddress &addr)
 add a dead node to the dead node list
bool getDead (const TransportAddress &addr)
 check if a node seems to be dead
void handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 This method is called if an RPC response has been received.
void handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey=OverlayKey::UNSPECIFIED_KEY)
 This method is called if an RPC timeout has been reached.
void sendRpc (const NodeHandle &handle, FindNodeCall *call, IterativePathLookup *listener, int rpcId)
void start ()
void stop ()
void checkStop ()

Protected Attributes

OverlayKey key
 key to lookup
BaseOverlayoverlay
 ptr to overlay
LookupListenerlistener
 lookup listener
std::vector
< IterativePathLookup * > 
paths
 parallel paths
RoutingType routingType
 RoutingType for this lookup.
IterativeLookupConfiguration config
 lookup configuration
cObject * firstCallExt
 additional info for first findNode()
uint finishedPaths
 number of finished paths
uint successfulPaths
 number of successful paths
uint accumulatedHops
 total number of hops (for all paths)
bool finished
 true, if lookup is finished
bool success
 true, if lookup was successful
bool running
 true, if lookup is running
int retries
 number of retries, if lookup fails
bool appLookup
NodeVector siblings
 closest nodes
TransportAddress::Set visited
 nodes already visited
TransportAddress::Set dead
 nodes which seem to be dead
int numSiblings
 number of siblings
int hopCountMax
 maximum hop count
RpcInfoMap rpcs

Friends

class IterativePathLookup
class BaseOverlay

Classes

class  RpcInfo
class  RpcInfoVector

Member Typedef Documentation


Constructor & Destructor Documentation

IterativeLookup::IterativeLookup ( BaseOverlay overlay,
RoutingType  routingType,
const IterativeLookupConfiguration config,
const cObject *  findNodeExt = NULL,
bool  appLookup = false 
)

00073                                                  :
00074 overlay(overlay),
00075 routingType(routingType),
00076 config(config),
00077 firstCallExt(NULL),
00078 finished(false),
00079 success(false),
00080 running(false),
00081 appLookup(appLookup)
00082 {
00083     if (findNodeExt) firstCallExt = static_cast<cObject*>(findNodeExt->dup());
00084 
00085     if (config.secure) {
00086         throw new cRuntimeError("IterativeLookup::IterativeLookup(): "
00087                                 "Secure IterativeLookup not implemented yet!");
00088     }
00089 
00090     if ((config.parallelPaths > 1) && (!config.merge)) {
00091         throw new cRuntimeError("IterativeLookup::IterativeLookup(): "
00092                                 "config.merge must be enabled for "
00093                                 "using parallel paths!");
00094     }
00095 
00096     if ((config.useAllParallelResponses) && (!config.merge)) {
00097         throw new cRuntimeError("IterativeLookup::IterativeLookup(): "
00098                                 "config.merge must be enabled if "
00099                                 "config.useAllParallelResponses is true!");
00100     }
00101 }

IterativeLookup::~IterativeLookup (  )  [virtual]

00104 {
00105     stop();
00106     delete firstCallExt;
00107     overlay->removeLookup(this);
00108 
00109 //    std::cout << "time: " << simulation.simTime() << "deleting " << this << endl;
00110 }


Member Function Documentation

IterativePathLookup * IterativeLookup::createPathLookup (  )  [protected, virtual]

This method creates a new path lookup.

It may be overloaded to enhance IterativePathLookup with some new information/features.

Returns:
The new path lookup
00297 {
00298     return new IterativePathLookup(this);
00299 }

FindNodeCall * IterativeLookup::createInitialRpcCall (  )  [protected, virtual]

This method creates the initial FindNode RPC call message used to query the local findNode() method.

It may be overridden to allow additional information being attached before the lookup procedure actually starts

Returns:
newly allocated FindNodeCall message

Referenced by start().

00302 {
00303     FindNodeCall* call = new FindNodeCall("FindNodeCall");
00304     if (appLookup) {
00305         call->setStatType(APP_LOOKUP_STAT);
00306     } else {
00307         call->setStatType(MAINTENANCE_STAT);
00308     }
00309 
00310     if (firstCallExt) {
00311         call->addObject(static_cast<cObject*>(firstCallExt->dup()));
00312     }
00313 
00314     return call;
00315 }

int IterativeLookup::compare ( const OverlayKey lhs,
const OverlayKey rhs 
) const [protected, virtual]

compares two OverlayKeys and indicates which one is closer to the key to look up

Parameters:
lhs the first OverlayKey
rhs the second OverlayKey
Returns:
-1 if rhs is closer, 0 if lhs and rhs are equal and 1 if rhs is farther away to the key to lookup

Reimplemented from Comparator< OverlayKey >.

00322 {
00323     return overlay->distance(lhs, key).compareTo(overlay->distance(rhs, key));
00324 }

bool IterativeLookup::addSibling ( const NodeHandle handle  )  [protected]

adds a node to the siblings NodeVector

Parameters:
handle NodeHandle of the node to add
Returns:
true if operation was succesfull, false otherwise

Referenced by IterativePathLookup::handleResponse(), IterativePathLookup::sendRpc(), and start().

00331 {
00332     bool result = false;
00333 
00334     if (numSiblings == 0) {
00335         if (handle.key == key) {
00336             siblings.clear();
00337             siblings.push_back( handle );
00338             result = true;
00339         }
00340     } else {
00341         if (config.parallelPaths == 1) {
00342             result = true;
00343             if (!siblings.isFull()) {
00344                 siblings.push_back(handle);
00345             }
00346         } else {
00347             if (this->siblings.add(handle) >= 0) {
00348                 result = true;
00349             }
00350         }
00351     }
00352 
00353     return result;
00354 }

void IterativeLookup::setVisited ( const TransportAddress addr,
bool  visitedFlag = true 
) [protected]

adds/deletes visited nodes to/from the visited TransportAddress::Set

Parameters:
addr TransportAddress of the node to add
visitedFlag if true node is added, else node is erased

Referenced by IterativePathLookup::handleFailedNodeResponse(), IterativePathLookup::handleResponse(), and start().

00357 {
00358     if (visitedFlag)
00359         this->visited.insert(addr);
00360     else
00361         this->visited.erase(addr);
00362 }

bool IterativeLookup::getVisited ( const TransportAddress addr  )  [protected]

indicates if the specified node has been visited before

Parameters:
addr TransportAddress of the node
Returns:
false if addr is not in visited, true otherwise

Referenced by IterativePathLookup::sendRpc().

00365 {
00366     return (visited.count(addr) != 0);
00367 }

void IterativeLookup::setDead ( const TransportAddress addr  )  [protected]

add a dead node to the dead node list

Parameters:
addr TransportAddress of the node to add

Referenced by handleRpcTimeout().

00370 {
00371     dead.insert(addr);
00372 }

bool IterativeLookup::getDead ( const TransportAddress addr  )  [protected]

check if a node seems to be dead

Parameters:
addr TransportAddress of the node
Returns:
true, if the node seems to be dead

Referenced by IterativePathLookup::handleTimeout(), and IterativePathLookup::sendRpc().

00375 {
00376     return (dead.count(addr) != 0);
00377 }

void IterativeLookup::handleRpcResponse ( BaseResponseMessage *  msg,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
) [protected, virtual]

This method is called if an RPC response has been received.

Parameters:
msg The response message.
context Pointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code
rpcId The RPC id.
rtt The Round-Trip-Time of this RPC

Reimplemented from RpcListener.

00387 {
00388     // check flags
00389     if (finished || !running)
00390         return;
00391 
00392     // get source, cast messages and mark node as visited
00393     const TransportAddress& src = msg->getSrcNode();
00394     FindNodeResponse* findNodeResponse = dynamic_cast<FindNodeResponse*>(msg);
00395     PingResponse* pingResponse = dynamic_cast<PingResponse*>(msg);
00396     FailedNodeResponse* failedNodeResponse =
00397     dynamic_cast<FailedNodeResponse*>(msg);
00398 
00399     if (findNodeResponse != NULL || pingResponse != NULL) {
00400         // add authentificated sibling
00401         // addSibling( src );
00402     }
00403 
00404     // handle find node response
00405     if (findNodeResponse != NULL) {
00406 //      std::cout << "time: " << simulation.simTime() << " node: " << overlay->thisNode << " this: " << this << " received rpc with nonce: " << findNodeResponse->getNonce() << " from: " << findNodeResponse->getSrcNode() << endl;
00407 
00408         // check if rpc info is available, no -> exit
00409         if (rpcs.count(src) == 0)
00410             return;
00411 
00412         // get info
00413         RpcInfoVector infos = rpcs[src];
00414         rpcs.erase(src);
00415 
00416         // add to siblinglist if not secure
00417         //      if (!config.secure)
00418         //          for (uint i=0; i<findNodeResponse->getClosestNodesArraySize(); i++)
00419         //              addSibling( findNodeResponse->getClosestNodes(i) );
00420 
00421         // iterate
00422         bool rpcHandled = false;
00423 
00424         for (uint i=0; i<infos.size(); i++) {
00425             // get info
00426             const RpcInfo& info = infos[i];
00427 
00428             // do not handle finished paths
00429             if (info.path->finished)
00430                 continue;
00431 
00432             // check if path accepts the message
00433             // make an exception for responses with siblings==true
00434             if (!rpcHandled &&
00435                     (info.path->accepts(info.vrpcId) ||
00436                     ((routingType == EXHAUSTIVE_ITERATIVE_ROUTING)
00437                             || findNodeResponse->getSiblings()))) {
00438                 info.path->handleResponse(findNodeResponse);
00439                 rpcHandled = true;
00440             } else {
00441                 EV << "[IterativeLookup::handleRpcResponse()]\n"
00442                    << "    Path does not accept message with id " << info.vrpcId
00443                    << endl;
00444 
00445                 info.path->handleTimeout(NULL, findNodeResponse->getSrcNode(),
00446                                          info.vrpcId);
00447             }
00448 
00449             // count finished and successful paths
00450             if (info.path->finished) {
00451                 finishedPaths++;
00452 
00453                 // count total number of hops
00454                 accumulatedHops += info.path->hops;
00455 
00456                 if (info.path->success)
00457                     successfulPaths++;
00458             }
00459 
00460         }
00461     }
00462 
00463 
00464     // handle failed node response
00465     if (failedNodeResponse != NULL) {
00466         cMessage* findNodeExt = NULL;
00467         if (failedNodeResponse->hasObject("findNodeExt")) {
00468             findNodeExt =
00469                 (cMessage*)failedNodeResponse->removeObject("findNodeExt");
00470         }
00471 
00472         for (std::vector<IterativePathLookup*>::iterator i = paths.begin();
00473             i != paths.end(); i++) {
00474 
00475             (*i)->handleFailedNodeResponse(failedNodeResponse->getSrcNode(),
00476                                            findNodeExt,
00477                                            failedNodeResponse->getTryAgain());
00478         }
00479     }
00480 
00481     checkStop();
00482 }

void IterativeLookup::handleRpcTimeout ( BaseCallMessage *  msg,
const TransportAddress dest,
cPolymorphic *  context,
int  rpcId,
const OverlayKey destKey = OverlayKey::UNSPECIFIED_KEY 
) [protected, virtual]

This method is called if an RPC timeout has been reached.

Parameters:
msg The original RPC message.
dest The destination node
context Pointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code
rpcId The RPC id.
destKey the destination OverlayKey

Reimplemented from RpcListener.

00489 {
00490     // check flags
00491     if (finished || !running)
00492         return;
00493 
00494     // check if rpc info is available
00495     if (rpcs.count(dest)==0) {
00496         cout << "IterativeLookup::handleRpcTimeout(): RPC Timeout, but node"
00497                  << " is not in rpcs structure!" << endl;
00498         return;
00499     }
00500 
00501     // mark the node as dead
00502     setDead(dest);
00503 
00504     RpcInfoVector infos = rpcs[dest];
00505     rpcs.erase(dest);
00506 
00507     // iterate
00508     for (uint i=0; i < infos.size(); i++) {
00509 
00510         const RpcInfo& info = infos[i];
00511 
00512         // do not handle finished paths
00513         if (info.path->finished)
00514             continue;
00515 
00516         // delegate timeout
00517         info.path->handleTimeout(msg, dest, info.vrpcId);
00518 
00519         // count total number of hops
00520         accumulatedHops += info.path->hops;
00521 
00522         // count finished and successful paths
00523         if (info.path->finished) {
00524             finishedPaths++;
00525             if (info.path->success)
00526                 successfulPaths++;
00527         }
00528     }
00529     checkStop();
00530 }

void IterativeLookup::sendRpc ( const NodeHandle handle,
FindNodeCall *  call,
IterativePathLookup listener,
int  rpcId 
) [protected]

Referenced by IterativePathLookup::sendRpc().

00534 {
00535     // check flags
00536     if (finished || !running) {
00537         delete call;
00538         return;
00539     }
00540 
00541     // create rpc info
00542     RpcInfo info;
00543     info.path = listener;
00544     info.vrpcId = rpcId;
00545 
00546     // send new message
00547     if (rpcs.count(handle) == 0) {
00548         RpcInfoVector newVector;
00549 
00550         if (overlay->globalStatistics->isMeasuring()) {
00551             overlay->numFindNodeSent++;
00552             overlay->bytesFindNodeSent += call->byteLength();
00553         }
00554 
00555         newVector.nonce = overlay->sendUdpRpcCall(handle, call, NULL,
00556                                                   -1, 0, -1, this);
00557 
00558         //      std::cout << "time: " << simulation.simTime() << " node: " << overlay->thisNode << " new rpc with nonce: " << newVector.nonce << " to: " << handle << endl;
00559         rpcs[handle] = newVector;
00560     } else {
00561         EV << "[IterativeLookup::sendRpc()]\n"
00562            << "    RPC already sent...not sent again"
00563            << endl;
00564         delete call;
00565     }
00566 
00567     // register info
00568     rpcs[handle].push_back(info);
00569 }

void IterativeLookup::start (  )  [protected]

Referenced by checkStop(), and lookup().

00122 {
00123 //    std::cout << "time: " << simulation.simTime() << " start(): node: " << overlay->getThisNode() << " this: " << this  << " key: " << key << endl;
00124 
00125     // init params
00126     successfulPaths = 0;
00127     finishedPaths   = 0;
00128     accumulatedHops = 0;
00129 
00130     // init flags
00131     finished = false;
00132     success  = false;
00133     running  = true;
00134 
00135     // init siblings vector
00136     siblings = NodeVector(numSiblings == 0 ? 1 : numSiblings, this);
00137     visited.clear();
00138     dead.clear();
00139 
00140     // get local closest nodes
00141     FindNodeCall* call = createInitialRpcCall();
00142     NodeVector* nextHops = overlay->findNode(key, config.redundantNodes,
00143                                              numSiblings, call);
00144     bool err;
00145 
00146     setVisited(overlay->getThisNode());
00147 
00148     // if this node is new and no nodes are known -> stop lookup
00149     if (nextHops->size() == 0) {
00150         //std::cout << "IterativeLookup: No next hops known" << endl;
00151         finished = true;
00152         success = false;
00153     } else if ((numSiblings == 0)
00154             && overlay->isSiblingFor(overlay->getThisNode(),
00155                                      key, numSiblings,
00156                                      &err)) {
00157         if (overlay->getThisNode().key == key) {
00158             addSibling(overlay->getThisNode());
00159             success = true;
00160         } else {
00161             std::cout << "IterativeLookup: numSiblings==0 and no node with this id"
00162                       << endl;
00163             success = false;
00164         }
00165         finished = true;
00166     }
00167     // finish lookup if the key is local and siblings are needed
00168     else if (numSiblings != 0 &&
00169              overlay->isSiblingFor(overlay->getThisNode(), key,
00170                                    numSiblings, &err)
00171              && !config.secure) {
00172 
00173         for (uint i=0; i<nextHops->size(); i++) {
00174             addSibling(nextHops->at(i));
00175         }
00176 
00177         success = finished = true;
00178     }
00179 
00180     // if the key was local or belongs to one of our siblings we are finished
00181     if (finished) {
00182         // calls stop and finishes the lookup
00183         delete nextHops;
00184         delete call;
00185         delete this;
00186         return;
00187     }
00188 
00189     // extract find node extensions
00190     cMessage* findNodeExt = NULL;
00191     if (call->hasObject("findNodeExt"))
00192         findNodeExt = (cMessage*)call->removeObject("findNodeExt");
00193     delete call;
00194 
00195     // not enough nodes for all paths? -> reduce number of parallel paths
00196     if ((uint)config.parallelPaths > nextHops->size()) {
00197         config.parallelPaths = nextHops->size();
00198     }
00199 
00200     // create parallel paths and distribute nodes to paths
00201     for (int i = 0; i < config.parallelPaths; i++) {
00202 
00203         // create state
00204         IterativePathLookup* pathLookup = new IterativePathLookup(this);
00205         paths.push_back(pathLookup);
00206 
00207         // populate next hops
00208         for (uint k=0; (k * config.parallelPaths + i) < nextHops->size(); k++) {
00209             pathLookup->add(nextHops->at(k * config.parallelPaths + i));
00210         }
00211 
00212         // send initial rpcs
00213         pathLookup->sendRpc(config.parallelRpcs, findNodeExt);
00214     }
00215 
00216 
00217     //std::cout << "nextHops size: " << nextHops->size()
00218     //<< " numSiblings: " << numSiblings
00219     //<< " redundantNodes: " << config.redundantNodes
00220     //<< " thisNode " << overlay->getThisNode().ip
00221     //<< " nextHop " << nextHops->at(0).ip << endl;
00222 
00223     delete nextHops;
00224     delete findNodeExt;
00225 
00226     checkStop();
00227 }

void IterativeLookup::stop (  )  [protected]

Referenced by checkStop(), and ~IterativeLookup().

00230 {
00231     // only stop if running
00232     if (!running)
00233         return;
00234 
00235     // cancel pending rpcs
00236     for (RpcInfoMap::iterator i = rpcs.begin(); i != rpcs.end(); i++) {
00237 //      std::cout << "time: " << simulation.simTime()     << " node: " << overlay->thisNode       << " this: " << this << " first: " << i->first  << " nonce: " << i->second.nonce << endl;
00238         overlay->cancelRpcMessage(i->second.nonce);
00239     }
00240     rpcs.clear();
00241 
00242     // delete path lookups
00243     for (uint i=0; i<paths.size(); i++) {
00244         delete paths[i];
00245     }
00246     paths.clear();
00247 
00248     // reset running flag
00249     running  = false;
00250     finished = true;
00251 
00252     // inform listener
00253     if (listener != NULL) {
00254         listener->lookupFinished(this);
00255         listener = NULL;
00256     }
00257 }

void IterativeLookup::checkStop (  )  [inline, protected]

Referenced by handleRpcResponse(), handleRpcTimeout(), and start().

00260 {
00261     bool finishLookup = false;
00262 
00263     // check if there are rpcs pending or lookup finished
00264     if ((successfulPaths >= 1 && numSiblings == 0) ||
00265         (finishedPaths == (uint)config.parallelPaths && numSiblings > 0)) {
00266         for (uint i=0; i<paths.size(); i++)
00267             success |= paths[i]->success;
00268         finishLookup = true;
00269     } else if (rpcs.size() == 0) {
00270         finishLookup = true;
00271     }
00272 
00273     if (finishLookup == true) {
00274 
00275         if (success == false) {
00276             //cout << "failed: hops :" << accumulatedHops << endl;
00277         }
00278 
00279         if (success == false && retries > 0) {
00280             //      std::cout << "IterativeLookup::checkStop(): Retry..." << endl;
00281             retries--;
00282             LookupListener* oldListener = listener;
00283             listener = NULL;
00284             stop();
00285             listener = oldListener;
00286             start();
00287         } else {
00288             delete this;
00289         }
00290     }
00291 }

void IterativeLookup::lookup ( const OverlayKey key,
int  numSiblings = 1,
int  hopCountMax = 0,
int  retries = 0,
LookupListener listener = NULL 
) [virtual]

Lookup siblings for a key.

Parameters:
key The key to lookup
numSiblings Number of siblings to lookup
hopCountMax Maximum hop count
retries Number of retries if lookup fails
listener Listener to inform, when the lookup is done

Implements AbstractLookup.

00577 {
00578     EV << "[IterativeLookup::lookup() @ " << overlay->overlay->getThisNode().ip
00579        << " (" << overlay->overlay->getThisNode().key.toString(16) << ")]\n"
00580        << "    Lookup of key " << key
00581        << endl;
00582 
00583     // check flags
00584     if (finished || running)
00585         return;
00586 
00587     // set params
00588     this->key = key;
00589     this->numSiblings = numSiblings;
00590     this->hopCountMax = hopCountMax;
00591     this->listener = listener;
00592     this->retries = retries;
00593 
00594     if ((routingType == EXHAUSTIVE_ITERATIVE_ROUTING)
00595         && (numSiblings > config.redundantNodes)) {
00596         throw new cRuntimeError("IterativeLookup::lookup(): "
00597                   "With EXHAUSTIVE_ITERATIVE_ROUTING numRedundantNodes "
00598                   "must be >= numSiblings!");
00599     }
00600 
00601     // start lookup
00602     start();
00603 }

const NodeVector & IterativeLookup::getResult (  )  const [virtual]

Returns the result of the lookup.

Returns:
The result node vector.

Implements AbstractLookup.

00606 {
00607     // return sibling vector
00608     return siblings;
00609 }

bool IterativeLookup::isValid (  )  const [virtual]

Returns true, if the lookup was successful.

Returns:
true, if the lookup was successful.

Implements AbstractLookup.

00612 {
00613     return success && finished;
00614 }

void IterativeLookup::abortLookup (  )  [virtual]

Aborts a running lookup.

This method aborts a running lookup without calling the listener and delete the lookup object.

Implements AbstractLookup.

00113 {
00114     if (listener != NULL) {
00115         delete listener;
00116         listener = NULL;
00117     }
00118     delete this;
00119 }

uint IterativeLookup::getAccumulatedHops (  )  const [virtual]

Returns the total number of hops for all lookup paths.

Returns:
The accumulated number of hops.

Implements AbstractLookup.

00617 {
00618     return accumulatedHops;
00619 }


Friends And Related Function Documentation

friend class IterativePathLookup [friend]

Referenced by createPathLookup(), and start().

friend class BaseOverlay [friend]


Member Data Documentation

lookup listener

Referenced by abortLookup(), checkStop(), and stop().

std::vector<IterativePathLookup*> IterativeLookup::paths [protected]

parallel paths

Referenced by checkStop(), handleRpcResponse(), start(), and stop().

RoutingType IterativeLookup::routingType [protected]

cObject* IterativeLookup::firstCallExt [protected]

additional info for first findNode()

Referenced by createInitialRpcCall(), IterativeLookup(), and ~IterativeLookup().

number of finished paths

Referenced by checkStop(), handleRpcResponse(), handleRpcTimeout(), and start().

number of successful paths

Referenced by checkStop(), handleRpcResponse(), handleRpcTimeout(), and start().

total number of hops (for all paths)

Referenced by getAccumulatedHops(), handleRpcResponse(), handleRpcTimeout(), and start().

bool IterativeLookup::finished [protected]

true, if lookup is finished

Referenced by handleRpcResponse(), handleRpcTimeout(), isValid(), lookup(), sendRpc(), start(), and stop().

bool IterativeLookup::success [protected]

true, if lookup was successful

Referenced by checkStop(), isValid(), and start().

bool IterativeLookup::running [protected]

true, if lookup is running

Referenced by handleRpcResponse(), handleRpcTimeout(), lookup(), sendRpc(), start(), and stop().

int IterativeLookup::retries [protected]

number of retries, if lookup fails

Referenced by checkStop().

bool IterativeLookup::appLookup [protected]

closest nodes

Referenced by addSibling(), getResult(), and start().

nodes already visited

Referenced by getVisited(), setVisited(), and start().

nodes which seem to be dead

Referenced by getDead(), setDead(), and start().

maximum hop count

Referenced by IterativePathLookup::sendRpc().


The documentation for this class was generated from the following files:

Generated on Fri Sep 19 13:05:07 2008 for ITM OverSim by  doxygen 1.5.5