OverSim
|
QuON: An overlay network based on quadtrees. More...
#include <Quon.h>
Public Member Functions | |
~Quon () | |
void | initializeOverlay (int stage) |
Initializes derived-class-attributes. | |
void | finishOverlay () |
collects statistical data in derived class | |
void | handleUDPMessage (BaseOverlayMessage *msg) |
Processes messages from underlay. | |
void | handleTimerEvent (cMessage *msg) |
void | handleAppMessage (cMessage *msg) |
Processes "timer" self-messages. | |
void | handleNodeGracefulLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes. | |
QState | getState () |
double | getAOI () |
Vector2D | getPosition () |
double | getAreaDimension () |
OverlayKey | getKey () |
long | getSoftNeighborCount () |
Public Member Functions inherited from BaseOverlay | |
BaseOverlay () | |
virtual | ~BaseOverlay () |
Virtual destructor. | |
bool | isMalicious () |
Returns true, if node is malicious. | |
bool | isInSimpleMultiOverlayHost () |
Returns true if overlay is one in an array, inside a SimpleMultiOverlayHost. | |
const simtime_t & | getCreationTime () |
void | join (const OverlayKey &nodeID=OverlayKey::UNSPECIFIED_KEY) |
Join the overlay with a given nodeID. | |
virtual NodeVector * | local_lookup (const OverlayKey &key, int num, bool safe) |
finds nodes closest to the given OverlayKey | |
virtual NodeVector * | neighborSet (int num) |
virtual bool | isSiblingFor (const NodeHandle &node, const OverlayKey &key, int numSiblings, bool *err) |
Query if a node is among the siblings for a given key. | |
virtual int | getMaxNumSiblings () |
Query the maximum number of siblings (nodes close to a key) that are maintained by this overlay protocol. | |
virtual int | getMaxNumRedundantNodes () |
Query the maximum number of redundant next hop nodes that are returned by findNode(). | |
void | sendMessageToUDP (const TransportAddress &dest, cPacket *msg, simtime_t delay=SIMTIME_ZERO) |
Sends message to underlay. | |
void | sendToKey (const OverlayKey &key, BaseOverlayMessage *message, int numSiblings=1, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING) |
Sends a message to an overlay node, with the generic routing algorithm. | |
virtual OverlayKey | distance (const OverlayKey &x, const OverlayKey &y, bool useAlternative=false) const |
This method should implement the distance between two keys. | |
void | registerComp (CompType compType, cModule *module) |
cModule * | getCompModule (CompType compType) |
cGate * | getCompRpcGate (CompType compType) |
void | sendMessageToAllComp (cMessage *msg, CompType srcComp) |
bool | providesKbr () |
virtual uint8_t | getBitsPerDigit () |
bool | getMeasureAuthBlock () |
BootstrapList & | getBootstrapList () const |
virtual OverlayKey | estimateMeanDistance () |
returns mean distance between OverlayKeys in the network | |
virtual uint32_t | estimateOverlaySize () |
estimates the current number of nodes online | |
Public Member Functions inherited from BaseRpc | |
BaseRpc () | |
const NodeHandle & | getThisNode () |
Returns the NodeHandle of this node. | |
simtime_t | getUdpTimeout () |
Public Member Functions inherited from RpcListener | |
virtual | ~RpcListener () |
destructor | |
Public Member Functions inherited from BaseTcpSupport | |
virtual void | socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent) |
virtual void | socketEstablished (int connId, void *yourPtr) |
virtual void | socketPeerClosed (int connId, void *yourPtr) |
virtual void | socketFailure (int connId, void *yourPtr, int code) |
virtual void | socketStatusArrived (int connId, void *yourPtr, TCPStatusInfo *status) |
Public Member Functions inherited from TopologyVis | |
TopologyVis () | |
void | showOverlayNeighborArrow (const NodeHandle &neighbor, bool flush=true, const char *displayString=NULL) |
Draws an arrow from this node to neighbor. | |
void | deleteOverlayNeighborArrow (const NodeHandle &neighbor) |
Removes an arrow from this node to neighbor. |
Public Attributes | |
QuonSiteMap | Sites |
Additional Inherited Members | |
Public Types inherited from BaseOverlay | |
enum | States { INIT = 0, BOOTSTRAP = 1, DISCOVERY = 2, PREJOIN = 3, JOIN = 4, POSTJOIN = 5, READY = 6, REFRESH = 7, SHUTDOWN = 8, FAILED = 9, RSET = JOIN, BSET = POSTJOIN } |
Protected Types inherited from BaseOverlay | |
typedef UNORDERED_SET < AbstractLookup *, lookupHashFcn, lookupHashFcn > | LookupSet |
Protected Member Functions inherited from BaseOverlay | |
int | numInitStages () const |
Sets init stage. | |
void | bindToPort (int port) |
Tells UDP we want to get all packets arriving on the given port. | |
virtual void | route (const OverlayKey &key, CompType destComp, CompType srcComp, cPacket *msg, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING) |
Routes message through overlay. | |
void | callDeliver (BaseOverlayMessage *msg, const OverlayKey &destKey) |
Calls deliver function in application. | |
void | callForward (const OverlayKey &key, BaseRouteMessage *msg, const NodeHandle &nextHopNode) |
Calls forward function in application. | |
void | callUpdate (const NodeHandle &node, bool joined) |
Informs application about state changes of nodes or newly joined nodes. | |
void | handleMessage (cMessage *msg) |
Checks for message type and calls corresponding method. | |
void | handleBaseOverlayMessage (BaseOverlayMessage *msg, const OverlayKey &destKey=OverlayKey::UNSPECIFIED_KEY) |
Handles a BaseOverlayMessage | |
virtual void | receiveChangeNotification (int category, const cPolymorphic *details) |
callback-method for events at the NotificationBoard | |
virtual void | handleTransportAddressChangedNotification () |
This method gets call if the node has a new TransportAddress (IP address) because he changed his access network. | |
virtual void | handleNodeLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed. | |
virtual void | recordOverlaySentStats (BaseOverlayMessage *msg) |
Collect overlay specific sent messages statistics. | |
void | setOverlayReady (bool ready) |
Sets the overlay ready icon and register/deregisters the node at the GlobalNodeList. | |
virtual AbstractLookup * | createLookup (RoutingType routingType=DEFAULT_ROUTING, const BaseOverlayMessage *msg=NULL, const cPacket *findNodeExt=NULL, bool appLookup=false) |
Creates an abstract iterative lookup instance. | |
virtual void | removeLookup (AbstractLookup *lookup) |
Removes the abstract lookup instance. | |
virtual NodeVector * | findNode (const OverlayKey &key, int numRedundantNodes, int numSiblings, BaseOverlayMessage *msg=NULL) |
Implements the find node call. | |
virtual void | joinOverlay () |
Join the overlay with a given nodeID in thisNode.key. | |
virtual void | joinForeignPartition (const NodeHandle &node) |
Join another overlay partition with the given node as bootstrap node. | |
virtual bool | handleFailedNode (const TransportAddress &failed) |
Handles a failed node. | |
virtual void | lookupRpc (LookupCall *call) |
virtual void | nextHopRpc (NextHopCall *call) |
void | countFindNodeCall (const FindNodeCall *call) |
void | countFailedNodeCall (const FailedNodeCall *call) |
bool | internalHandleRpcCall (BaseCallMessage *msg) |
Handles internal rpc requests. | |
void | internalHandleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
Handles rpc responses internal in base classes | |
void | internalHandleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey) |
Handles rpc timeouts internal in base classes | |
void | internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType) |
CompType | getThisCompType () |
Return the component type of this module. | |
Protected Attributes inherited from BaseOverlay | |
int | numAppDataForwarded |
number of forwarded app data packets | |
int | bytesAppDataForwarded |
number of forwarded app data bytes at out-gate | |
int | numAppLookupForwarded |
number of forwarded app lookup packets | |
int | bytesAppLookupForwarded |
number of forwarded app lookup bytes at out-gate | |
int | numMaintenanceForwarded |
number of forwarded maintenance packets | |
int | bytesMaintenanceForwarded |
number of forwarded maintenance bytes at out-gate | |
int | numFindNodeSent |
int | bytesFindNodeSent |
int | numFindNodeResponseSent |
int | bytesFindNodeResponseSent |
int | numFailedNodeSent |
int | bytesFailedNodeSent |
int | numFailedNodeResponseSent |
int | bytesFailedNodeResponseSent |
std::vector< HopDelayRecord * > | singleHopDelays |
simtime_t | creationTime |
simtime when the node has been created | |
GlobalNodeList * | globalNodeList |
pointer to GlobalNodeList in this node | |
NotificationBoard * | notificationBoard |
pointer to NotificationBoard in this node | |
UnderlayConfigurator * | underlayConfigurator |
pointer to UnderlayConfigurator in this node | |
BootstrapList * | bootstrapList |
pointer to the BootstrapList module | |
GlobalParameters * | globalParameters |
pointer to the GlobalParameters module | |
uint32_t | overlayId |
identifies the overlay this node belongs to (used for multiple overlays) | |
bool | debugOutput |
debug output ? | |
RoutingType | defaultRoutingType |
bool | useCommonAPIforward |
forward messages to applications? | |
bool | collectPerHopDelay |
collect delay for single hops | |
bool | routeMsgAcks |
send ACK when receiving route message | |
uint32_t | recNumRedundantNodes |
numRedundantNodes for recursive routing | |
bool | recordRoute |
record visited hops on route | |
bool | drawOverlayTopology |
bool | rejoinOnFailure |
bool | sendRpcResponseToLastHop |
needed by KBR protocols for NAT support | |
bool | dropFindNodeAttack |
if node is malicious, it tries a findNode attack | |
bool | isSiblingAttack |
if node is malicious, it tries a isSibling attack | |
bool | invalidNodesAttack |
if node is malicious, it tries a invalidNode attack | |
bool | dropRouteMessageAttack |
if node is malicious, it drops all received BaseRouteMessages | |
int | localPort |
used UDP-port | |
int | hopCountMax |
maximum hop count | |
bool | measureAuthBlock |
if true, measure the overhead of signatures in rpc messages | |
bool | restoreContext |
if true, a node rejoins with its old nodeId and malicious state | |
int | numDropped |
number of dropped packets | |
int | bytesDropped |
number of dropped bytes | |
cOutVector | delayVector |
statistical output vector for packet-delays | |
cOutVector | hopCountVector |
statistical output vector for hop-counts | |
States | state |
IterativeLookupConfiguration | iterativeLookupConfig |
RecursiveLookupConfiguration | recursiveLookupConfig |
LookupSet | lookups |
bool | kbr |
set this to true, if the overlay provides KBR services |
Quon::~Quon | ( | ) |
Definition at line 1173 of file Quon.cc.
|
private |
Definition at line 498 of file Quon.cc.
Referenced by handleMove().
|
private |
Definition at line 315 of file Quon.cc.
Referenced by handleJoinAcknowledge(), handleNewNeighbors(), handleNodeLeave(), and handleNodeMove().
|
private |
Definition at line 121 of file Quon.cc.
Referenced by classifySites(), finishOverlay(), handleJoin(), handleJoinAcknowledge(), handleNodeGracefulLeaveNotification(), and initializeOverlay().
|
private |
Definition at line 375 of file Quon.cc.
Referenced by handleJoinAcknowledge(), handleMove(), handleNewNeighbors(), handleNodeLeave(), handleNodeMove(), and processAliveTimer().
|
private |
Definition at line 1024 of file Quon.cc.
Referenced by handleNodeLeave(), and processAliveTimer().
|
private |
Definition at line 456 of file Quon.cc.
Referenced by handleNodeLeave(), and processAliveTimer().
|
virtual |
collects statistical data in derived class
Reimplemented from BaseOverlay.
Definition at line 1103 of file Quon.cc.
double Quon::getAOI | ( | ) |
double Quon::getAreaDimension | ( | ) |
OverlayKey Quon::getKey | ( | ) |
Vector2D Quon::getPosition | ( | ) |
long Quon::getSoftNeighborCount | ( | ) |
QState Quon::getState | ( | ) |
Reimplemented from BaseOverlay.
Definition at line 1135 of file Quon.cc.
Referenced by ConnectivityProbeQuon::extractTopology().
|
virtual |
Processes "timer" self-messages.
msg | A self-message Processes non-commonAPI messages |
msg | non-commonAPIMessage |
Reimplemented from BaseOverlay.
Definition at line 229 of file Quon.cc.
|
private |
Definition at line 763 of file Quon.cc.
Referenced by handleAppMessage().
|
private |
Definition at line 961 of file Quon.cc.
Referenced by handleNewNeighbors(), handleNodeLeave(), and handleNodeMove().
|
private |
Definition at line 673 of file Quon.cc.
Referenced by handleAppMessage().
|
private |
Definition at line 820 of file Quon.cc.
Referenced by handleUDPMessage().
|
private |
Definition at line 775 of file Quon.cc.
Referenced by handleUDPMessage().
|
private |
Definition at line 698 of file Quon.cc.
Referenced by handleAppMessage().
|
private |
Definition at line 922 of file Quon.cc.
Referenced by handleUDPMessage().
|
virtual |
This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes.
Reimplemented from BaseOverlay.
Definition at line 530 of file Quon.cc.
|
private |
Definition at line 937 of file Quon.cc.
Referenced by handleUDPMessage().
|
private |
Definition at line 850 of file Quon.cc.
Referenced by handleUDPMessage().
|
virtual |
Reimplemented from BaseRpc.
Definition at line 191 of file Quon.cc.
|
virtual |
Processes messages from underlay.
msg | Message from UDP |
Reimplemented from BaseOverlay.
Definition at line 260 of file Quon.cc.
|
virtual |
Initializes derived-class-attributes.
Initializes derived-class-attributes, called by BaseOverlay::initialize(). By default this method is called once. If more stages are needed one can overload numInitStages() and add more stages.
stage | the init stage |
Reimplemented from BaseOverlay.
Definition at line 31 of file Quon.cc.
|
private |
Definition at line 620 of file Quon.cc.
Referenced by handleTimerEvent().
|
private |
Definition at line 652 of file Quon.cc.
Referenced by handleTimerEvent().
|
private |
Definition at line 610 of file Quon.cc.
Referenced by handleTimerEvent().
|
private |
Definition at line 566 of file Quon.cc.
Referenced by handleTimerEvent().
|
private |
Definition at line 573 of file Quon.cc.
Referenced by handleTimerEvent().
|
private |
Definition at line 473 of file Quon.cc.
Referenced by handleJoinAcknowledge(), handleMove(), handleNewNeighbors(), handleNodeLeave(), handleNodeMove(), and processAliveTimer().
|
private |
Definition at line 1047 of file Quon.cc.
Referenced by handleEvent(), handleInvalidNode(), handleJoin(), handleJoinAcknowledge(), handleJoinRequest(), handleMove(), handleNodeGracefulLeaveNotification(), handleNodeMove(), and processBackupTimer().
|
private |
Definition at line 1035 of file Quon.cc.
Referenced by adaptAoI(), changeState(), deleteAppNeighbor(), handleNodeGracefulLeaveNotification(), handleUDPMessage(), processJoinTimer(), and synchronizeAppNeighbors().
|
private |
Definition at line 1083 of file Quon.cc.
Referenced by changeState().
|
private |
Definition at line 989 of file Quon.cc.
Referenced by handleJoinAcknowledge(), handleMove(), handleNewNeighbors(), handleNodeLeave(), handleNodeMove(), and processAliveTimer().
|
private |
|
private |
Definition at line 78 of file Quon.h.
Referenced by adaptAoI(), and initializeOverlay().
|
private |
Definition at line 85 of file Quon.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Quon().
|
private |
Definition at line 67 of file Quon.h.
Referenced by changeState(), handleTimerEvent(), and initializeOverlay().
|
private |
Definition at line 151 of file Quon.h.
Referenced by addSite(), classifySites(), handleJoin(), and initializeOverlay().
|
private |
Definition at line 68 of file Quon.h.
Referenced by adaptAoI(), changeState(), classifySites(), getAOI(), handleInvalidNode(), handleJoin(), handleJoinAcknowledge(), handleJoinRequest(), handleMove(), handleNodeGracefulLeaveNotification(), handleNodeMove(), initializeOverlay(), processBackupTimer(), and processSecTimer().
|
private |
Definition at line 72 of file Quon.h.
Referenced by getAreaDimension(), and initializeOverlay().
|
private |
Definition at line 124 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 132 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 86 of file Quon.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Quon().
|
private |
Definition at line 73 of file Quon.h.
Referenced by changeState(), handleTimerEvent(), and initializeOverlay().
|
private |
Definition at line 146 of file Quon.h.
Referenced by classifySites(), initializeOverlay(), and processBackupTimer().
|
private |
Definition at line 128 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 125 of file Quon.h.
Referenced by handleJoinAcknowledge(), initializeOverlay(), processSecTimer(), and sendMessage().
|
private |
Definition at line 155 of file Quon.h.
Referenced by initializeOverlay(), and processSecTimer().
|
private |
Definition at line 71 of file Quon.h.
Referenced by adaptAoI(), and initializeOverlay().
|
private |
Definition at line 145 of file Quon.h.
Referenced by addSite(), handleInvalidNode(), handleNodeLeave(), handleNodeMove(), processAliveTimer(), and processDeleteTimer().
|
private |
Definition at line 66 of file Quon.h.
Referenced by handleNodeLeave(), initializeOverlay(), and processAliveTimer().
|
private |
Definition at line 129 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 79 of file Quon.h.
Referenced by adaptAoI(), and initializeOverlay().
|
private |
Definition at line 83 of file Quon.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Quon().
|
private |
Definition at line 119 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and sendMessage().
|
private |
Definition at line 118 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and sendMessage().
|
private |
Definition at line 133 of file Quon.h.
Referenced by changeState(), and initializeOverlay().
|
private |
Definition at line 65 of file Quon.h.
Referenced by handleTimerEvent(), and initializeOverlay().
|
private |
Definition at line 77 of file Quon.h.
Referenced by adaptAoI(), and initializeOverlay().
|
private |
Definition at line 154 of file Quon.h.
Referenced by changeState(), handleJoin(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 70 of file Quon.h.
Referenced by adaptAoI(), changeState(), and initializeOverlay().
|
private |
Definition at line 123 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 69 of file Quon.h.
Referenced by adaptAoI(), and initializeOverlay().
|
private |
Definition at line 121 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and sendMessage().
|
private |
Definition at line 80 of file Quon.h.
Referenced by handleNodeMove(), and initializeOverlay().
|
private |
Definition at line 122 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and sendMessage().
|
private |
Definition at line 120 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and sendMessage().
|
private |
Definition at line 147 of file Quon.h.
Referenced by classifySites(), initializeOverlay(), and processBackupTimer().
|
private |
Definition at line 150 of file Quon.h.
Referenced by changeState(), getState(), handleAppMessage(), handleNodeGracefulLeaveNotification(), handleTimerEvent(), handleUDPMessage(), processSecTimer(), sendMessage(), and setBootstrapedIcon().
|
private |
Definition at line 131 of file Quon.h.
Referenced by classifySites().
|
private |
Definition at line 84 of file Quon.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Quon().
|
private |
Definition at line 130 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
QuonSiteMap Quon::Sites |
Definition at line 61 of file Quon.h.
Referenced by adaptAoI(), addSite(), classifySites(), deleteSite(), ConnectivityProbeQuon::getComponentSize(), handleEvent(), handleInvalidNode(), handleJoinAcknowledge(), handleJoinRequest(), handleMove(), handleNodeGracefulLeaveNotification(), handleNodeMove(), processAliveTimer(), processSecTimer(), purgeSites(), synchronizeAppNeighbors(), and ~Quon().
|
private |
Definition at line 126 of file Quon.h.
Referenced by getSoftNeighborCount(), handleMove(), and initializeOverlay().
|
private |
Definition at line 127 of file Quon.h.
Referenced by finishOverlay(), initializeOverlay(), and processSecTimer().
|
private |
Definition at line 144 of file Quon.h.
Referenced by addSite(), changeState(), classifySites(), getKey(), getPosition(), handleAppMessage(), handleJoin(), handleJoinAcknowledge(), handleJoinRequest(), handleMove(), handleNodeGracefulLeaveNotification(), handleNodeMove(), handleUDPMessage(), initializeOverlay(), processBackupTimer(), processSecTimer(), sendMessage(), sendToApp(), updateThisSite(), and ~Quon().
|
private |
Definition at line 156 of file Quon.h.
Referenced by initializeOverlay(), and processSecTimer().
|
private |
Definition at line 74 of file Quon.h.
Referenced by handleMove(), handleNodeMove(), and initializeOverlay().
|
private |
Definition at line 75 of file Quon.h.
Referenced by classifySites(), handleNodeMove(), and initializeOverlay().