OverSim
BaseRpc Class Reference

Base class for RPCs. More...

#include <BaseRpc.h>

Inheritance diagram for BaseRpc:
RpcListener BaseApp BaseOverlay ALMTest BootstrapList CBRDHT DHT DHTTestApp GIASearchApp I3 KBRTestApp Landmark MyApplication NeighborCache P2pns RealWorldTestApp Scribe SimMud SimpleGameClient TCPExampleApp TierDummy XmlRpcInterface BasePastry Broose Gia Kademlia MyOverlay NTree OverlayDummy oversim::Chord oversim::Nice PubSubLobby PubSubMMOG Quon Vast

Public Member Functions

 BaseRpc ()
const NodeHandlegetThisNode ()
 Returns the NodeHandle of this node.
simtime_t getUdpTimeout ()
- Public Member Functions inherited from RpcListener
virtual ~RpcListener ()
 destructor

Protected Member Functions

virtual bool internalHandleRpcCall (BaseCallMessage *msg)
 Handles internal rpc requests.
virtual void internalHandleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 Handles rpc responses internal in base classes

virtual void internalHandleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey)
 Handles rpc timeouts internal in base classes

void initRpcs ()
 Initializes Remote-Procedure state.
void finishRpcs ()
 Deinitializes Remote-Procedure state.
virtual void internalHandleRpcMessage (BaseRpcMessage *msg)
 Handles incoming rpc messages and delegates them to the corresponding listeners or handlers.
uint32_t sendRouteRpcCall (CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Routes a Remote-Procedure-Call message to an OverlayKey.
uint32_t sendRouteRpcCall (CompType destComp, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Routes a Remote-Procedure-Call message to an OverlayKey.
uint32_t sendRouteRpcCall (CompType destComp, const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Sends a Remote-Procedure-Call message using the overlay's UDP port
This replaces ROUTE_DIRECT calls!
uint32_t sendUdpRpcCall (const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Sends a Remote-Procedure-Call message to the underlay

uint32_t sendInternalRpcCall (CompType destComp, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Sends an internal Remote-Procedure-Call between two tiers

void cancelRpcMessage (uint32_t nonce)
 Cancels a Remote-Procedure-Call.
void cancelAllRpcs ()
 Cancels all RPCs.
void sendRpcResponse (TransportType transportType, CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *call, BaseResponseMessage *response)
 Send Remote-Procedure response message and deletes call message.
void sendRpcResponse (BaseCallMessage *call, BaseResponseMessage *response)
 Send Remote-Procedure response message to UDP and deletes call message.
int pingNode (const TransportAddress &dest, simtime_t timeout=-1, int retries=0, cPolymorphic *context=NULL, const char *caption="PING", RpcListener *rpcListener=NULL, int rpcId=-1, TransportType transportType=INVALID_TRANSPORT)
 ping a node by its TransportAddress
virtual bool handleRpcCall (BaseCallMessage *msg)
 Processes Remote-Procedure-Call invocation messages.
virtual CompType getThisCompType ()=0
 Return the component type of this module.
virtual void sendMessageToUDP (const TransportAddress &addr, cPacket *message, simtime_t delay=SIMTIME_ZERO)
virtual void pingResponse (PingResponse *pingResponse, cPolymorphic *context, int rpcId, simtime_t rtt)
virtual void pingTimeout (PingCall *pingCall, const TransportAddress &dest, cPolymorphic *context, int rpcId)
bool internalHandleMessage (cMessage *msg)
- Protected Member Functions inherited from RpcListener
virtual void handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 This method is called if an RPC response has been received.
virtual void handleRpcResponse (BaseResponseMessage *msg, const RpcState &rpcState, simtime_t rtt)
 This method is called if an RPC response has been received.
virtual void handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey)
 This method is called if an RPC timeout has been reached.
virtual void handleRpcTimeout (const RpcState &rpcState)
 This method is called if an RPC timeout has been reached.

Protected Attributes

NodeHandle thisNode
 NodeHandle to this node.
BaseOverlayoverlay
bool debugOutput
 debug output ?
GlobalStatisticsglobalStatistics
 pointer to GlobalStatistics module in this node
CompType thisCompType
NeighborCacheneighborCache
 pointer to the neighbor cache
CryptoModulecryptoModule
 pointer to CryptoModule
int numPingSent
int bytesPingSent
int numPingResponseSent
int bytesPingResponseSent

Private Types

typedef UNORDERED_MAP< int,
RpcState
RpcStates

Private Member Functions

virtual void handleTimerEvent (cMessage *msg)
uint32_t sendRpcCall (TransportType transportType, CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context, RoutingType routingType, simtime_t timeout, int retries, int rpcId, RpcListener *rpcListener)
 Sends a Remote-Procedure-Call message to the underlay.
void sendRpcMessageWithTransport (TransportType transportType, CompType destComp, RoutingType routingType, const std::vector< TransportAddress > &sourceRoute, const OverlayKey &destKey, BaseRpcMessage *message)
virtual void internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType)=0
virtual void internalSendRpcResponse (BaseCallMessage *call, BaseResponseMessage *response)=0
void pingRpcCall (PingCall *call)
void pingRpcResponse (PingResponse *response, cPolymorphic *context, int rpcId, simtime_t rtt)
void pingRpcTimeout (PingCall *pingCall, const TransportAddress &dest, cPolymorphic *context, int rpcId)

Private Attributes

int rpcsPending
RpcListenerdefaultRpcListener
RpcStates rpcStates
simtime_t rpcUdpTimeout
simtime_t rpcKeyTimeout
bool optimizeTimeouts
bool rpcExponentialBackoff

Detailed Description

Base class for RPCs.

Base class for RPCs.

Author
Sebastian Mies
Ingmar Baumgart
Bernhard Heep
Gregoire Menuel

Definition at line 59 of file BaseRpc.h.

Member Typedef Documentation

Definition at line 520 of file BaseRpc.h.

Constructor & Destructor Documentation

BaseRpc::BaseRpc ( )

Definition at line 52 of file BaseRpc.cc.

{
neighborCache = NULL;
cryptoModule = NULL;
}

Member Function Documentation

void BaseRpc::cancelAllRpcs ( )
protected

Cancels all RPCs.

Definition at line 158 of file BaseRpc.cc.

Referenced by BasePastry::baseChangeState(), Pastry::changeState(), and finishRpcs().

{
// stop all rpcs
for (RpcStates::iterator i = rpcStates.begin();
i != rpcStates.end(); i++) {
cancelAndDelete(i->second.callMsg);
cancelAndDelete(i->second.timeoutMsg);
delete i->second.dest;
i->second.dest = NULL;
delete i->second.context;
i->second.context = NULL;
}
rpcStates.clear();
}
void BaseRpc::cancelRpcMessage ( uint32_t  nonce)
protected

Cancels a Remote-Procedure-Call.

Parameters
nonceThe nonce of the RPC

Definition at line 278 of file BaseRpc.cc.

Referenced by RecursiveLookup::abortLookup(), IterativeLookup::abortLookup(), IterativeLookup::checkStop(), and IterativeLookup::stop().

{
if (rpcStates.count(nonce)==0)
return;
RpcState state = rpcStates[nonce];
rpcStates.erase(nonce);
cancelAndDelete(state.callMsg);
cancelAndDelete(state.timeoutMsg);
delete state.dest;
state.dest = NULL;
delete state.context;
state.context = NULL;
}
void BaseRpc::finishRpcs ( )
protected

Deinitializes Remote-Procedure state.

Definition at line 147 of file BaseRpc.cc.

{
// delete default rpc listener
if (defaultRpcListener != NULL) {
}
}
virtual CompType BaseRpc::getThisCompType ( )
protectedpure virtual

Return the component type of this module.

This method is overloaded by BaseOverlay/BaseApp and returns the appropriate component type of this module.

Returns
the component type of this module

Implemented in BaseOverlay, BaseApp, NeighborCache, and BootstrapList.

Referenced by initRpcs(), pingNode(), sendRpcCall(), and sendRpcMessageWithTransport().

const NodeHandle& BaseRpc::getThisNode ( )
inline

Returns the NodeHandle of this node.

Returns
the NodeHandle of this node.

Reimplemented in SimpleGameClient.

Definition at line 71 of file BaseRpc.h.

Referenced by TreeManagement::addChildNode(), IterativeLookup::addSibling(), TreeManagement::checkParentValid(), GlobalViewBuilder::cleanup(), TreeManagement::connectToParent(), TreeManagement::debugChildren(), RealWorldTestApp::deliver(), KBRTestApp::deliver(), PastryLeafSet::failedNode(), KBRTestApp::forward(), PastryLeafSet::getBiggestNode(), NeighborCache::getOverlayThisNode(), NeighborCache::getProx(), TreeManagement::getResponsibleDomainKey(), PastryLeafSet::getSmallestNode(), oversim::Nice::handleAppMessage(), Kademlia::handleBucketRefreshTimerExpired(), GlobalViewBuilder::handleCoordinateRpcCall(), GlobalViewBuilder::handleCoordSendTimer(), KBRTestApp::handleLookupResponse(), GIASearchApp::handleLowerMessage(), Kademlia::handleNodeGracefulLeaveNotification(), TreeManagement::handleParentRequestRpcCall(), TreeManagement::handleParentRequestRpcResponse(), NeighborCache::handleReadyMessage(), IterativePathLookup::handleResponse(), DiscoveryMode::handleRpcResponse(), KBRTestApp::handleRpcResponse(), Kademlia::handleRpcResponse(), TreeManagement::handleRpcTimeout(), KBRTestApp::handleRpcTimeout(), SimpleGameClient::handleTimerEvent(), GIASearchApp::handleTimerEvent(), Landmark::initializeApp(), SimpleGameClient::initializeApp(), BrooseBucket::initializeBucket(), PastryLeafSet::insertLeaf(), TreeManagement::isRoot(), BrooseBucket::keyInRange(), IterativeLookup::lookup(), PastryLeafSet::mergeNode(), BrooseBucket::output(), TreeManagement::removeParentConnection(), Kademlia::routingAdd(), Kademlia::routingBucketIndex(), DiscoveryMode::sendNewRequest(), IterativePathLookup::sendRpc(), sendRpcCall(), sendRpcResponse(), Nps::setOwnLayer(), GlobalViewBuilder::spreadGlobalView(), DiscoveryMode::start(), IterativeLookup::start(), DiscoveryMode::stop(), IterativeLookup::stop(), and NeighborCache::updateNode().

{ return thisNode; };
simtime_t BaseRpc::getUdpTimeout ( )
inline

Definition at line 73 of file BaseRpc.h.

{ return rpcUdpTimeout; };
bool BaseRpc::handleRpcCall ( BaseCallMessage msg)
protectedvirtual

Processes Remote-Procedure-Call invocation messages.


This method should be overloaded when the overlay provides RPC functionality.

Returns
true, if rpc has been handled

Reimplemented in NeighborCache, oversim::Chord, BasePastry, oversim::Koorde, Kademlia, Scribe, CBRDHT, Broose, Pastry, SimMud, NTree, PubSubLobby, and PubSubMMOG.

Definition at line 527 of file BaseRpc.cc.

Referenced by internalHandleRpcMessage().

{
return false;
}
void BaseRpc::handleTimerEvent ( cMessage *  msg)
privatevirtual
void BaseRpc::initRpcs ( )
protected

Initializes Remote-Procedure state.

Definition at line 92 of file BaseRpc.cc.

{
// set friend modules
rpcUdpTimeout = par("rpcUdpTimeout");
rpcKeyTimeout = par("rpcKeyTimeout");
optimizeTimeouts = par("optimizeTimeouts");
rpcExponentialBackoff = par("rpcExponentialBackoff");
rpcStates.clear();
//set ping cache
WATCH(numPingSent);
WATCH(bytesPingSent);
// set overlay pointer
// register component
// get pointer to the neighborCache
cModule *mod = getParentModule();
while (neighborCache == NULL) {
neighborCache = (NeighborCache*)mod->getSubmodule("neighborCache");
mod = mod->getParentModule();
if (!mod)
throw cRuntimeError("BaseRpc::initRpc: "
"Module type contains no NeighborCache!");
}
// get pointer to the cryptoModule
mod = getParentModule();
cryptoModule = NULL;
while (cryptoModule == NULL) {
cryptoModule = (CryptoModule*)mod->getSubmodule("cryptoModule");
mod = mod->getParentModule();
if (!mod)
throw cRuntimeError("BaseRpc::initRpc: CryptoModule not found!");
}
}
bool BaseRpc::internalHandleMessage ( cMessage *  msg)
protected

Definition at line 59 of file BaseRpc.cc.

{
// process self-messages and RPC-timeouts
if (msg->isSelfMessage()) {
// process rpc self-messages
BaseRpcMessage* rpcMessage = dynamic_cast<BaseRpcMessage*>(msg);
if (rpcMessage != NULL) {
return true;
}
// process all other self-messages
return true;
}
// process RPC messages
BaseRpcMessage* rpcMessage = dynamic_cast<BaseRpcMessage*>(msg);
if (rpcMessage != NULL) {
return true;
}
// other messages are processed by derived classes
// (e.g. BaseOverlay / BaseApp)
return false;
}
bool BaseRpc::internalHandleRpcCall ( BaseCallMessage msg)
protectedvirtual

Handles internal rpc requests.


This method is used to implement basic functionality in the BaseRpc.

Parameters
msgThe call message
Returns
bool true, if call has been handled.

Reimplemented in BaseOverlay, and BaseApp.

Definition at line 492 of file BaseRpc.cc.

Referenced by BaseApp::internalHandleRpcCall(), BaseOverlay::internalHandleRpcCall(), and internalHandleRpcMessage().

void BaseRpc::internalHandleRpcMessage ( BaseRpcMessage msg)
protectedvirtual

Handles incoming rpc messages and delegates them to the corresponding listeners or handlers.

Parameters
msgThe message to handle.

Definition at line 293 of file BaseRpc.cc.

Referenced by internalHandleMessage().

{
// check if this is a rpc call message
BaseCallMessage* rpCall = dynamic_cast<BaseCallMessage*>(msg);
if (rpCall != NULL) {
// verify the message signature
//cryptoModule->verifyMessage(msg);
OverlayCtrlInfo* overlayCtrlInfo =
dynamic_cast<OverlayCtrlInfo*>(msg->getControlInfo());
if (overlayCtrlInfo && overlayCtrlInfo->getSrcRoute().isUnspecified() &&
(!overlayCtrlInfo->getLastHop().isUnspecified())) {
overlayCtrlInfo->setSrcRoute(NodeHandle(msg->getSrcNode().getKey(),
overlayCtrlInfo->getLastHop()));
}
bool rpcHandled = true;
if (!handleRpcCall(rpCall)) rpcHandled = internalHandleRpcCall(rpCall);
if (!rpcHandled) {
EV << "[BaseRpc::internalHandleRpcMessage() @ " << thisNode.getIp()
<< " (" << thisNode.getKey().toString(16) << ")]\n"
<< " Error: RPC '" << msg->getFullName()<< "' was not handled"
<< endl;
delete msg;
}
return;
}
// get nonce
int nonce = msg->getNonce();
// nonce known? no -> delete message and return
if (rpcStates.count(nonce)==0) {
EV << "[BaseRpc::internalHandleRpcMessage() @ " << thisNode.getIp()
<< " " << thisNode.getKey().toString(16) << ")]\n"
<< " RPC: Nonce Unknown"
<< endl;
delete msg;
return;
}
// get state and remove from map
RpcState state = rpcStates[nonce];
rpcStates.erase(nonce);
// is timeout message?
if (msg->isSelfMessage() &&
(dynamic_cast<RpcTimeoutMessage*>(msg) != NULL)) {
// yes-> inform listener
// retry?
state.retries--;
if (state.retries>=0) {
// TODO: cleanup code to have only one type for source routes
std::vector<TransportAddress> sourceRoute;
sourceRoute.push_back(*state.dest);
if (state.dest->getSourceRouteSize() > 0) {
sourceRoute.insert(sourceRoute.begin(),
state.dest->getSourceRoute().rend(),
state.dest->getSourceRoute().rbegin());
// remove the original source route from the destination
sourceRoute.back().clearSourceRoute();
}
state.routingType,
sourceRoute,
state.destKey,
dynamic_cast<BaseCallMessage*>
(state.callMsg->dup()));
state.rto *= 2;
}
if (state.rto!=0)
scheduleAt(simTime() + state.rto, msg);
state.timeSent = simTime();
rpcStates[nonce] = state;
return;
}
EV << "[BaseRpc::internalHandleRpcMessage() @ " << thisNode.getIp()
<< " " << thisNode.getKey().toString(16) << ")]\n"
<< " RPC to " << state.dest->getIp()
<< " timeout (" << state.callMsg->getName() << ")"
<< endl;
// inform neighborcache
if (state.transportType == UDP_TRANSPORT ||
(!state.dest->isUnspecified() && state.destKey.isUnspecified())) {
}
// inform listener
if (state.listener != NULL)
state.listener->handleRpcTimeout(state);
// inform overlay
state.id, state.destKey);
} else { // no-> handle rpc response
// verify the message signature
//cryptoModule->verifyMessage(msg);
OverlayCtrlInfo* overlayCtrlInfo =
dynamic_cast<OverlayCtrlInfo*>(msg->getControlInfo());
if (overlayCtrlInfo && overlayCtrlInfo->getSrcRoute().isUnspecified() &&
(!overlayCtrlInfo->getLastHop().isUnspecified())) {
overlayCtrlInfo->setSrcRoute(NodeHandle(msg->getSrcNode().getKey(),
overlayCtrlInfo->getLastHop()));
}
// drop responses with wrong source key
if (state.destKey.isUnspecified()) {
const NodeHandle* stateHandle =
dynamic_cast<const NodeHandle*>(state.dest);
if (stateHandle != NULL &&
stateHandle->getKey() != msg->getSrcNode().getKey()) {
EV << "[BaseRpc::internalHandleRpcMessage() @ "
<< " " << thisNode.getKey().toString(16) << ")]\n"
<< " Dropping RPC: Invalid source key"
<< endl;
// restore state to trigger timeout message
rpcStates[nonce] = state;
delete msg;
return;
}
}
// get parameters
simtime_t rtt = simTime() - state.timeSent;
= dynamic_cast<BaseResponseMessage*>(msg);
//if (state.transportType == UDP_TRANSPORT)
// globalStatistics->recordOutVector("BaseRpc: UDP Round Trip Time",
// rtt);
// neighborCache/ncs stuff
if (state.transportType == UDP_TRANSPORT ||
response->getCallHopCount() == 1)) {
unsigned int ncsArraySize = response->getNcsInfoArraySize();
if (ncsArraySize > 0) {
std::vector<double> tempCoords(ncsArraySize);
for (uint8_t i = 0; i < ncsArraySize; i++) {
tempCoords[i] = response->getNcsInfo(i);
}
OverlayCtrlInfo* ctrlInfo =
dynamic_cast<OverlayCtrlInfo*>(response->getControlInfo());
neighborCache->updateNode(response->getSrcNode(), rtt,
(ctrlInfo ?
ctrlInfo->getSrcRoute() :
coords);
} else {
neighborCache->updateNode(response->getSrcNode(), rtt);
}
}
// inform listener
if (state.listener != NULL)
state.listener->handleRpcResponse(response, state, rtt);
// inform overlay
internalHandleRpcResponse(response, state.context, state.id, rtt);
handleRpcResponse(response, state, rtt);
// delete response
delete response->removeControlInfo();
delete response;
}
// delete messages
delete state.callMsg;
cancelAndDelete(state.timeoutMsg);
delete state.dest;
// clean up pointers
state.dest = NULL;
state.context = NULL;
state.callMsg = NULL;
state.timeoutMsg = NULL;
}
void BaseRpc::internalHandleRpcResponse ( BaseResponseMessage msg,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
)
protectedvirtual

Handles rpc responses internal in base classes

This method is used to implement basic functionality in the BaseRpc.

Parameters
msgThe call message
contextPointer to an optional state object. The object has to be handled/deleted by the internalHandleRpcResponse() code
rpcIdThe ID of the call
rttthe time between sending the call and receiving the response

Reimplemented in BaseOverlay, and BaseApp.

Definition at line 501 of file BaseRpc.cc.

Referenced by internalHandleRpcMessage(), BaseApp::internalHandleRpcResponse(), and BaseOverlay::internalHandleRpcResponse().

{
// call rpc stubs
RPC_ON_RESPONSE( Ping ) {
pingRpcResponse(_PingResponse, context, rpcId, rtt);
}
}
void BaseRpc::internalHandleRpcTimeout ( BaseCallMessage msg,
const TransportAddress dest,
cPolymorphic *  context,
int  rpcId,
const OverlayKey destKey 
)
protectedvirtual

Handles rpc timeouts internal in base classes

This method is used to implement basic functionality in the BaseRpc.

Parameters
msgThe call message
destThe node that did not response
contextPointer to an optional state object. The object has to be handled/deleted by the internalHandleRpcResponse() code
rpcIdThe ID of the call
destKeyThe key of the call if used
Returns
bool true, if call has been handled.
Todo:
return bool?

Reimplemented in BaseOverlay.

Definition at line 513 of file BaseRpc.cc.

Referenced by internalHandleRpcMessage(), and BaseOverlay::internalHandleRpcTimeout().

{
RPC_ON_CALL( Ping ) {
pingRpcTimeout(_PingCall, dest, context, rpcId);
}
}
}
virtual void BaseRpc::internalSendRouteRpc ( BaseRpcMessage message,
const OverlayKey destKey,
const std::vector< TransportAddress > &  sourceRoute,
RoutingType  routingType 
)
privatepure virtual

Implemented in BaseOverlay, and BaseApp.

Referenced by sendRpcMessageWithTransport().

virtual void BaseRpc::internalSendRpcResponse ( BaseCallMessage call,
BaseResponseMessage response 
)
privatepure virtual

Referenced by sendRpcResponse().

int BaseRpc::pingNode ( const TransportAddress dest,
simtime_t  timeout = -1,
int  retries = 0,
cPolymorphic *  context = NULL,
const char *  caption = "PING",
RpcListener rpcListener = NULL,
int  rpcId = -1,
TransportType  transportType = INVALID_TRANSPORT 
)
protected

ping a node by its TransportAddress

Statistics are collected by this method.

Parameters
destthe node to ping
timeoutRPC timeout
retrieshow often to retry after timeout
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
captionspecial name for the ping call (instead of "PING")
rpcListenerRPC Listener
rpcIdRPC id
transportTypeThe transport used for this RPC
Returns
the nonce of the sent ping call

Definition at line 702 of file BaseRpc.cc.

Referenced by IterativeLookup::addSibling(), Pastry::changeState(), Pastry::handleRequestLeafSetResponse(), Pastry::handleRequestRoutingRowResponse(), KBRTestApp::handleTimerEvent(), Kademlia::handleTimerEvent(), Kademlia::joinOverlay(), NeighborCache::queryProx(), and Kademlia::routingAdd().

{
PingCall* call = new PingCall(caption);
call->setBitLength(PINGCALL_L(call));
RECORD_STATS(numPingSent++; bytesPingSent += call->getByteLength());
if (transportType == UDP_TRANSPORT ||
(transportType != ROUTE_TRANSPORT &&
return sendUdpRpcCall(dest, call, context, timeout, retries, rpcId,
rpcListener);
} else {
return sendRouteRpcCall(getThisCompType(), dest, call, context,
DEFAULT_ROUTING, timeout, retries, rpcId,
rpcListener);
}
}
void BaseRpc::pingResponse ( PingResponse pingResponse,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
)
protectedvirtual

Reimplemented in oversim::Chord, Broose, BootstrapList, and Pastry.

Definition at line 659 of file BaseRpc.cc.

Referenced by pingRpcResponse().

{
}
void BaseRpc::pingRpcCall ( PingCall call)
private

Definition at line 669 of file BaseRpc.cc.

Referenced by internalHandleRpcCall().

{
std::string pongName(call->getName());
if (pongName == "PING")
pongName = "PONG";
else {
pongName = "PONG: [ ";
pongName += call->getName();
pongName += " ]";
}
PingResponse* response = new PingResponse(pongName.c_str());
response->setBitLength(PINGRESPONSE_L(response));
response->getByteLength());
sendRpcResponse(call, response );
}
void BaseRpc::pingRpcResponse ( PingResponse response,
cPolymorphic *  context,
int  rpcId,
simtime_t  rtt 
)
private

Definition at line 688 of file BaseRpc.cc.

Referenced by internalHandleRpcResponse().

{
pingResponse(response, context, rpcId, rtt);
}
void BaseRpc::pingRpcTimeout ( PingCall pingCall,
const TransportAddress dest,
cPolymorphic *  context,
int  rpcId 
)
private

Definition at line 694 of file BaseRpc.cc.

Referenced by internalHandleRpcTimeout().

{
pingTimeout(pingCall, dest, context, rpcId);
}
void BaseRpc::pingTimeout ( PingCall pingCall,
const TransportAddress dest,
cPolymorphic *  context,
int  rpcId 
)
protectedvirtual

Reimplemented in oversim::Chord, Broose, and BootstrapList.

Definition at line 664 of file BaseRpc.cc.

Referenced by pingRpcTimeout().

{
}
uint32_t BaseRpc::sendInternalRpcCall ( CompType  destComp,
BaseCallMessage msg,
cPolymorphic *  context = NULL,
simtime_t  timeout = -1,
int  retries = 0,
int  rpcId = -1,
RpcListener rpcListener = NULL 
)
inlineprotected

Sends an internal Remote-Procedure-Call between two tiers

If no timeout is provided, a default value of globalParameters.rpcUdpTimeout for underlay and globalParameters.rpcKeyTimeout for a overlay rpc is used. After a timeout the message gets retransmitted for at maximum retries times. The destKey attribute is kept untouched.

Parameters
destCompDestination component
msgRPC Call Message
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
timeoutRPC timeout in seconds (-1=use default value, 0=no timeout)
retriesHow often we try to resent rpc call, if it gets lost
rpcIdRPC id
rpcListenerRPC Listener
Returns
The nonce of the RPC

Definition at line 326 of file BaseRpc.h.

Referenced by KBRTestApp::handleTimerEvent().

{
return sendRpcCall(INTERNAL_TRANSPORT, destComp,
NO_OVERLAY_ROUTING, timeout, retries, rpcId,
rpcListener);
}
virtual void BaseRpc::sendMessageToUDP ( const TransportAddress addr,
cPacket *  message,
simtime_t  delay = SIMTIME_ZERO 
)
inlineprotectedvirtual

Reimplemented in BaseOverlay, and BaseApp.

Definition at line 429 of file BaseRpc.h.

Referenced by sendRpcMessageWithTransport().

{
throw cRuntimeError("sendMessageToUDP() not implemented");
};
uint32_t BaseRpc::sendRouteRpcCall ( CompType  destComp,
const TransportAddress dest,
const OverlayKey destKey,
BaseCallMessage msg,
cPolymorphic *  context = NULL,
RoutingType  routingType = DEFAULT_ROUTING,
simtime_t  timeout = -1,
int  retries = 0,
int  rpcId = -1,
RpcListener rpcListener = NULL 
)
inlineprotected

Routes a Remote-Procedure-Call message to an OverlayKey.


If no timeout is provided, a default value of globalParameters.rpcUdpTimeout for underlay and globalParameters.rpcKeyTimeout for a overlay rpc is used. After a timeout the message gets retransmitted for at maximum retries times. The destKey attribute is kept untouched.

Parameters
destCompThe destination component
destDestination node handle (if specified, used as first hop)
destKeyDestination OverlayKey (if unspecified, the message will be sent to dest using the overlay's UDP port)
msgRPC Call Message
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
routingTypeKBR routing type
timeoutRPC timeout in seconds (-1=use default value, 0=no timeout)
retriesHow often we try to resent rpc call, if it gets lost
rpcIdRPC id
rpcListenerRPC Listener
Returns
The nonce of the RPC

Definition at line 178 of file BaseRpc.h.

Referenced by Bamboo::changeState(), Pastry::changeState(), TreeManagement::checkTreeChildNodes(), MyOverlay::getNeighbors(), TreeManagement::handleRpcTimeout(), KBRTestApp::handleTimerEvent(), RecursiveLookup::lookup(), pingNode(), TreeManagement::registerAtParent(), GlobalViewBuilder::sendCapRequest(), TreeManagement::sendChildReleaseCall(), Nps::sendCoordsReqCall(), TreeManagement::sendMessageToChildren(), TreeManagement::sendMessageToParent(), DiscoveryMode::sendNewRequest(), and DiscoveryMode::start().

{
if (dest.isUnspecified() && destKey.isUnspecified())
opp_error("BaseRpc::sendRouteRpcCall() with both key and "
"transportAddress unspecified!");
return sendRpcCall(ROUTE_TRANSPORT, destComp, dest, destKey, msg,
context, routingType, timeout, retries,
rpcId, rpcListener);
}
uint32_t BaseRpc::sendRouteRpcCall ( CompType  destComp,
const OverlayKey destKey,
BaseCallMessage msg,
cPolymorphic *  context = NULL,
RoutingType  routingType = DEFAULT_ROUTING,
simtime_t  timeout = -1,
int  retries = 0,
int  rpcId = -1,
RpcListener rpcListener = NULL 
)
inlineprotected

Routes a Remote-Procedure-Call message to an OverlayKey.


If no timeout is provided, a default value of globalParameters.rpcUdpTimeout for underlay and globalParameters.rpcKeyTimeout for a overlay rpc is used. After a timeout the message gets retransmitted for at maximum retries times. The destKey attribute is kept untouched.

Parameters
destCompThe destination component
destKeyDestination OverlayKey
msgRPC Call Message
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
routingTypeKBR routing type
timeoutRPC timeout in seconds (-1=use default value, 0=no timeout)
retriesHow often we try to resent rpc call, if it gets lost
rpcIdRPC id
rpcListenerRPC Listener
Returns
The nonce of the RPC

Definition at line 219 of file BaseRpc.h.

{
return sendRpcCall(ROUTE_TRANSPORT, destComp,
destKey, msg, context, routingType, timeout,
retries, rpcId, rpcListener);
}
uint32_t BaseRpc::sendRouteRpcCall ( CompType  destComp,
const TransportAddress dest,
BaseCallMessage msg,
cPolymorphic *  context = NULL,
RoutingType  routingType = DEFAULT_ROUTING,
simtime_t  timeout = -1,
int  retries = 0,
int  rpcId = -1,
RpcListener rpcListener = NULL 
)
inlineprotected

Sends a Remote-Procedure-Call message using the overlay's UDP port
This replaces ROUTE_DIRECT calls!

If no timeout is provided, a default value of globalParameters.rpcUdpTimeout for underlay and globalParameters.rpcKeyTimeout for a overlay rpc is used. After a timeout the message gets retransmitted for at maximum retries times. The destKey attribute is kept untouched.

Parameters
destCompThe destination component
destDestination node handle (may contain a source route)
msgRPC Call Message
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
routingTypeKBR routing type
timeoutRPC timeout
retriesHow often we try to resent rpc call, if it gets lost
rpcIdRPC id
rpcListenerRPC Listener
Returns
The nonce of the RPC

Definition at line 258 of file BaseRpc.h.

{
return sendRpcCall(ROUTE_TRANSPORT, destComp, dest,
routingType, timeout, retries, rpcId, rpcListener);
}
uint32_t BaseRpc::sendRpcCall ( TransportType  transportType,
CompType  destComp,
const TransportAddress dest,
const OverlayKey destKey,
BaseCallMessage msg,
cPolymorphic *  context,
RoutingType  routingType,
simtime_t  timeout,
int  retries,
int  rpcId,
RpcListener rpcListener 
)
private

Sends a Remote-Procedure-Call message to the underlay.


USE ONE OF THE WRAPPER FUNCTIONS INSTEAD:
sendRouteRpcCall(), sendInternalRpcCall(), or sendUdpRpcCall()

If no timeout is provided, a default value of globalParameters.rpcUdpTimeout for underlay and globalParameters.rpcKeyTimeout for a overlay rpc is used. Internal RPCs don't have a default timeout. After a timeout the message gets retransmitted for at maximum retries times. The destKey attribute is kept untouched.

Parameters
transportTypeThe type of transport
destCompThe destination component
destDestination node handle (may contain a source route)
destKeyroute the RPC to the node that is responsible for destkey
msgRPC Call Message
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
routingTypeKBR routing type
timeoutRPC timeout in seconds (-1=use default value, 0=no timeout)
retriesHow often we try to resent rpc call, if it gets lost
rpcIdRPC id
rpcListenerRPC Listener (callback handler)
Returns
The nonce of the RPC

Definition at line 173 of file BaseRpc.cc.

Referenced by sendInternalRpcCall(), sendRouteRpcCall(), and sendUdpRpcCall().

{
// create nonce, timeout and set default parameters
uint32_t nonce;
do {
nonce = intuniform(1, 2147483647);
} while (rpcStates.count(nonce) > 0);
if (timeout == -1) {
switch (transportType) {
timeout = 0;
break;
timeout = neighborCache->getNodeTimeout(dest);
if (timeout == -1) timeout = rpcUdpTimeout;
} else timeout = rpcUdpTimeout;
break;
timeout = (destKey.isUnspecified() ?
break;
default:
throw cRuntimeError("BaseRpc::sendRpcMessage(): "
"Unknown RpcTransportType!");
}
}
if (rpcListener == NULL)
rpcListener = defaultRpcListener;
// create state
RpcState state;
state.id = rpcId;
state.timeSent = simTime();
state.dest = dest.dup();
state.destKey = destKey;
state.destComp = destComp;
state.listener = rpcListener;
state.timeoutMsg->setNonce(nonce);
state.retries = retries;
state.rto = timeout;
state.transportType = transportType;
//state.transportType = (destKey.isUnspecified() && (dest.getSourceRouteSize() == 0)
// ? UDP_TRANSPORT : transportType); //test
state.routingType = routingType;
state.context = context;
if (rpcStates.count(nonce) > 0)
throw cRuntimeError("RPC nonce collision");
// set message parameters
msg->setNonce(nonce);
if (transportType == ROUTE_TRANSPORT)
else
msg->setType(RPC);
// sign the message
// if (transportType != INTERNAL_TRANSPORT) cryptoModule->signMessage(msg);
// save copy of call message in RpcState
state.callMsg = dynamic_cast<BaseCallMessage*>(msg->dup());
assert(!msg->getEncapsulatedPacket() || !msg->getEncapsulatedPacket()->getControlInfo());
// register state
rpcStates[nonce] = state;
// schedule timeout message
if (state.rto != 0)
scheduleAt(simTime() + state.rto, state.timeoutMsg);
// TODO: cleanup code to have only one type for source routes
std::vector<TransportAddress> sourceRoute;
sourceRoute.push_back(dest);
if (dest.getSourceRouteSize() > 0) {
state.transportType = transportType = ROUTE_TRANSPORT;
sourceRoute.insert(sourceRoute.begin(), dest.getSourceRoute().rend(),
dest.getSourceRoute().rbegin());
// remove the original source route from the destination
sourceRoute.back().clearSourceRoute();
}
sendRpcMessageWithTransport(transportType, destComp, routingType,
sourceRoute, destKey, msg);
return nonce;
}
void BaseRpc::sendRpcMessageWithTransport ( TransportType  transportType,
CompType  destComp,
RoutingType  routingType,
const std::vector< TransportAddress > &  sourceRoute,
const OverlayKey destKey,
BaseRpcMessage message 
)
private

Definition at line 620 of file BaseRpc.cc.

Referenced by internalHandleRpcMessage(), sendRpcCall(), and sendRpcResponse().

{
switch (transportType) {
case UDP_TRANSPORT: {
sendMessageToUDP(sourceRoute[0], message);
break;
}
internalSendRouteRpc(message, destKey,
sourceRoute, routingType);
break;
}
cGate *destCompGate = overlay->getCompRpcGate(destComp);
if (destCompGate == NULL) {
throw cRuntimeError("BaseRpc::sendRpcMessageWithTransport():"
" INTERNAL_RPC to unknown RpcCompType!");
}
OverlayCtrlInfo *overlayCtrlInfo = new OverlayCtrlInfo();
overlayCtrlInfo->setSrcComp(getThisCompType());
overlayCtrlInfo->setDestComp(destComp);
message->setControlInfo(overlayCtrlInfo);
sendDirect(message, destCompGate);
break;
}
default:
throw cRuntimeError("BaseRpc::sendRpcMessageWithTransport: "
"invalid transportType!");
break;
}
}
void BaseRpc::sendRpcResponse ( TransportType  transportType,
CompType  destComp,
const TransportAddress dest,
const OverlayKey destKey,
BaseCallMessage call,
BaseResponseMessage response 
)
protected

Send Remote-Procedure response message and deletes call message.

Parameters
transportTypeThe transport used for this RPC
destCompDestination component
destThe TransportAddress of the destination (hint for ROUTE_TRANSPORT)
destKeyThe destination key for a ROUTE_TRANSPORT
callThe corresponding call message to the response
responseThe response message

Definition at line 532 of file BaseRpc.cc.

Referenced by Nps::coordsReqRpc(), GlobalViewBuilder::handleCapReqRpcCall(), TreeManagement::handleChildCheckRpcCall(), GlobalViewBuilder::handleCoordinateRpcCall(), TreeManagement::handleParentRequestRpcCall(), Pastry::handlePastryJoinCall(), BasePastry::handleRequestLeafSetCall(), Pastry::handleRequestRepairCall(), BasePastry::handleRequestRoutingRowCall(), Pastry::handleRequestStateCall(), DiscoveryMode::handleRpcCall(), MyOverlay::handleRpcCall(), KBRTestApp::kbrTestCall(), pingRpcCall(), sendRpcResponse(), and KBRTestApp::underlayTestCall().

{
if (call == NULL || response == NULL) {
throw cRuntimeError("call or response = NULL!");
}
// vivaldi: set coordinates and error estimation in response
if (neighborCache->piggybackOwnCoords()) { //TODO only for directly sent msgs
std::vector<double> nodeCoord =
response->setNcsInfoArraySize(nodeCoord.size());
for (uint32_t i = 0; i < nodeCoord.size(); i++) {
response->setNcsInfo(i, nodeCoord[i]);
}
}
assert(transportType == INTERNAL_TRANSPORT ||
!dest.isUnspecified() ||
!destKey.isUnspecified());
if (transportType == ROUTE_TRANSPORT)
else
response->setSrcNode(thisNode);
response->setType(RPC);
response->setNonce(call->getNonce());
response->setStatType(call->getStatType());
OverlayCtrlInfo* overlayCtrlInfo = NULL;
if (dynamic_cast<OverlayCtrlInfo*>(call->getControlInfo())) {
overlayCtrlInfo =
static_cast<OverlayCtrlInfo*>(call->removeControlInfo());
response->setCallHopCount(overlayCtrlInfo->getHopCount());
} else {
delete call->removeControlInfo();
response->setCallHopCount(1); // one udp hop (?)
}
// source routing
std::vector<TransportAddress> sourceRoute;
if (overlayCtrlInfo && transportType == ROUTE_TRANSPORT) {
routingType =
static_cast<RoutingType>(overlayCtrlInfo->getRoutingType());
for (uint32_t i = overlayCtrlInfo->getVisitedHopsArraySize(); i > 0; --i) {
sourceRoute.push_back(overlayCtrlInfo->getVisitedHops(i - 1));
}
}
if (sourceRoute.size() == 0) {
// empty visited hops list => direct response
sourceRoute.push_back(dest);
}
sendRpcMessageWithTransport(transportType, compType,
routingType, sourceRoute,
destKey, response);
delete overlayCtrlInfo;
delete call;
}
void BaseRpc::sendRpcResponse ( BaseCallMessage call,
BaseResponseMessage response 
)
protected

Send Remote-Procedure response message to UDP and deletes call message.

Parameters
callThe corresponding call message to the response
responseThe response message

Definition at line 600 of file BaseRpc.cc.

{
const TransportAddress* destNode = &(call->getSrcNode());
const OverlayKey* destKey = &(call->getSrcNode().getKey());
OverlayCtrlInfo* overlayCtrlInfo =
dynamic_cast<OverlayCtrlInfo*>(call->getControlInfo());
// "magic" transportType selection: internal
if (overlayCtrlInfo &&
overlayCtrlInfo->getTransportType() == INTERNAL_TRANSPORT) {
static_cast<CompType>(overlayCtrlInfo->getSrcComp()),
*destNode, *destKey, call, response);
} else {
internalSendRpcResponse(call, response);
}
}
uint32_t BaseRpc::sendUdpRpcCall ( const TransportAddress dest,
BaseCallMessage msg,
cPolymorphic *  context = NULL,
simtime_t  timeout = -1,
int  retries = 0,
int  rpcId = -1,
RpcListener rpcListener = NULL 
)
inlineprotected

Sends a Remote-Procedure-Call message to the underlay

If no timeout is provided, a default value of globalParameters.rpcUdpTimeout for underlay and globalParameters.rpcKeyTimeout for a overlay rpc is used. After a timeout the message gets retransmitted for at maximum retries times. The destKey attribute is kept untouched.

Parameters
destDestination node handle (may contain a source route)
msgRPC Call Message
contexta pointer to an arbitrary cPolymorphic object, which can be used to store additional state
timeoutRPC timeout in seconds (-1=use default value, 0=no timeout)
retriesHow often we try to resent rpc call, if it gets lost
rpcIdRPC id
rpcListenerRPC Listener
Returns
The nonce of the RPC

Definition at line 293 of file BaseRpc.h.

Referenced by Pastry::changeState(), Pastry::checkProxCache(), Bamboo::doLeafsetMaintenance(), Bamboo::doLocalTuning(), Pastry::doRoutingTableMaintenance(), Pastry::doSecondStage(), Pastry::handleFailedNode(), Kademlia::handleNodeGracefulLeaveNotification(), Pastry::handleStateMessage(), IterativePathLookup::handleTimeout(), Pastry::handleTimerEvent(), KBRTestApp::handleTimerEvent(), pingNode(), IterativeLookup::sendRpc(), and Kademlia::sendSiblingFindNodeCall().

{
NO_OVERLAY_ROUTING, timeout, retries, rpcId,
rpcListener);
}

Member Data Documentation

int BaseRpc::bytesPingResponseSent
protected

Definition at line 451 of file BaseRpc.h.

Referenced by initRpcs(), and pingRpcCall().

int BaseRpc::bytesPingSent
protected

Definition at line 449 of file BaseRpc.h.

Referenced by initRpcs(), and pingNode().

CryptoModule* BaseRpc::cryptoModule
protected

pointer to CryptoModule

Definition at line 446 of file BaseRpc.h.

Referenced by BaseRpc(), and initRpcs().

bool BaseRpc::debugOutput
protected

debug output ?

Definition at line 83 of file BaseRpc.h.

RpcListener* BaseRpc::defaultRpcListener
private

Definition at line 523 of file BaseRpc.h.

Referenced by BaseRpc(), finishRpcs(), initRpcs(), and sendRpcCall().

int BaseRpc::numPingResponseSent
protected

Definition at line 450 of file BaseRpc.h.

Referenced by initRpcs(), and pingRpcCall().

int BaseRpc::numPingSent
protected

Definition at line 448 of file BaseRpc.h.

Referenced by initRpcs(), and pingNode().

bool BaseRpc::optimizeTimeouts
private

Definition at line 526 of file BaseRpc.h.

Referenced by initRpcs(), and sendRpcCall().

bool BaseRpc::rpcExponentialBackoff
private

Definition at line 527 of file BaseRpc.h.

Referenced by initRpcs(), and internalHandleRpcMessage().

simtime_t BaseRpc::rpcKeyTimeout
private

Definition at line 525 of file BaseRpc.h.

Referenced by initRpcs(), and sendRpcCall().

int BaseRpc::rpcsPending
private

Definition at line 522 of file BaseRpc.h.

Referenced by initRpcs().

RpcStates BaseRpc::rpcStates
private
simtime_t BaseRpc::rpcUdpTimeout
private

Definition at line 525 of file BaseRpc.h.

Referenced by initRpcs(), and sendRpcCall().

CompType BaseRpc::thisCompType
protected

Definition at line 427 of file BaseRpc.h.

Referenced by initRpcs().

NodeHandle BaseRpc::thisNode
protected

NodeHandle to this node.

Definition at line 73 of file BaseRpc.h.

Referenced by Quon::addSite(), BasePastry::baseChangeState(), BasePastry::baseInit(), oversim::Nice::BasicJoinLayer(), MyOverlay::callbackNeighbors(), MyOverlay::callbackTimeout(), Gia::changeState(), Bamboo::changeState(), Quon::changeState(), oversim::Nice::changeState(), Pastry::changeState(), oversim::Nice::checkLeaderHeartbeatsForCollisions(), Pastry::checkProxCache(), oversim::Nice::cleanPeers(), oversim::Nice::ClusterMerge(), oversim::Nice::ClusterMergeRequest(), oversim::Nice::ClusterSplit(), Nps::coordsReqRpcResponse(), BasePastry::createStateMessage(), Quon::deleteSite(), MyApplication::deliver(), Bamboo::doGlobalTuning(), Pastry::doJoinUpdate(), Bamboo::doLocalTuning(), Pastry::doRoutingTableMaintenance(), Pastry::doSecondStage(), Pastry::endProcessingState(), MyOverlay::findNode(), BasePastry::findNode(), Kademlia::findNode(), BasePastry::finishOverlay(), oversim::Nice::getHighestLayer(), oversim::Nice::getHighestLeaderLayer(), oversim::Nice::getMaxDistance(), oversim::Nice::getMeanDistance(), MyOverlay::getNeighbors(), getThisNode(), oversim::Nice::gracefulLeave(), Quon::handleAppMessage(), oversim::Nice::handleAppMessage(), Pastry::handleFailedNode(), oversim::Nice::handleNiceClusterMergeRequest(), oversim::Nice::handleNiceHeartbeat(), oversim::Nice::handleNiceJoinCluster(), oversim::Nice::handleNiceJoineval(), oversim::Nice::handleNiceLeaderHeartbeat(), oversim::Nice::handleNiceLeaderTransfer(), oversim::Nice::handleNiceMulticast(), oversim::Nice::handleNicePingProbe(), oversim::Nice::handleNicePollRp(), oversim::Nice::handleNiceQuery(), oversim::Nice::handleNiceQueryResponse(), oversim::Nice::handleNiceRemove(), Pastry::handlePastryJoinCall(), Pastry::handlePastryJoinResponse(), NeighborCache::handleReadyMessage(), SimpleGameClient::handleRealworldPacket(), BasePastry::handleRequestLeafSetCall(), Bamboo::handleRequestLeafSetResponse(), Pastry::handleRequestLeafSetResponse(), BasePastry::handleRequestLeafSetResponse(), Pastry::handleRequestRepairCall(), Pastry::handleRequestRepairResponse(), BasePastry::handleRequestRoutingRowCall(), Pastry::handleRequestRoutingRowResponse(), BasePastry::handleRequestRoutingRowResponse(), Pastry::handleRequestStateCall(), Pastry::handleRequestStateResponse(), Pastry::handleRpcCall(), MyOverlay::handleRpcCall(), BasePastry::handleRpcCall(), Bamboo::handleRpcResponse(), Pastry::handleRpcResponse(), BasePastry::handleRpcResponse(), Pastry::handleRpcTimeout(), Kademlia::handleRpcTimeout(), BasePastry::handleRpcTimeout(), Pastry::handleStateMessage(), Bamboo::handleStateMessage(), MyApplication::handleTimerEvent(), Pastry::handleTimerEvent(), Bamboo::handleTimerEvent(), KBRTestApp::handleTimerEvent(), NeighborCache::handleTimerEvent(), Quon::handleUDPMessage(), MyApplication::handleUDPMessage(), Pastry::handleUDPMessage(), Landmark::initializeApp(), KBRTestApp::initializeApp(), Vast::initializeOverlay(), Quon::initializeOverlay(), MyOverlay::initializeOverlay(), oversim::Nice::initializeOverlay(), internalHandleRpcMessage(), MyOverlay::isSiblingFor(), BasePastry::isSiblingFor(), Kademlia::isSiblingFor(), oversim::Nice::JoinCluster(), MyOverlay::joinOverlay(), Kademlia::joinOverlay(), oversim::Nice::LeaderTransfer(), Bamboo::lookupFinished(), oversim::Nice::maintenance(), oversim::Nice::mergeNeeded(), Pastry::mergeState(), BasePastry::newLeafs(), BasePastry::pingNodes(), Pastry::pingResponse(), oversim::Nice::pollRP(), NeighborCache::prepareOverlay(), BasePastry::prePing(), Pastry::processState(), BasePastry::proxCallback(), Quon::purgeSites(), oversim::Nice::Query(), Pastry::recursiveRoutingHook(), Kademlia::recursiveRoutingHook(), oversim::Nice::Remove(), Kademlia::routingAdd(), Kademlia::routingInit(), oversim::Nice::sendDataToOverlay(), oversim::Nice::sendHeartbeats(), oversim::Nice::sendHeartbeatTo(), Quon::sendMessage(), oversim::Nice::sendRemoveTo(), sendRpcCall(), sendRpcResponse(), Kademlia::sendSiblingFindNodeCall(), Quon::sendToApp(), Kademlia::setBucketUsage(), NeighborCache::setCbrNodeId(), MyOverlay::setOwnNodeID(), oversim::Nice::splitNeeded(), NeighborCache::updateNcsInfo(), SimpleGameClient::updateNeighbors(), NeighborCache::updateNode(), Quon::updateThisSite(), BasePastry::updateTooltip(), Gia::updateTooltip(), Kademlia::updateTooltip(), and oversim::Nice::updateVisualization().


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