OverSim
|
A Distributed Hash Table (DHT) for KBR protocols. More...
#include <DHT.h>
Classes | |
class | PendingRpcsEntry |
Public Member Functions | |
DHT () | |
virtual | ~DHT () |
Public Member Functions inherited from BaseApp | |
BaseApp () | |
virtual | ~BaseApp () |
virtual destructor | |
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) |
Private Types | |
enum | PendingRpcsStates { INIT = 0, LOOKUP_STARTED = 1, GET_HASH_SENT = 2, GET_VALUE_SENT = 3, PUT_SENT = 4 } |
typedef std::map< uint32_t, PendingRpcsEntry > | PendingRpcs |
Private Attributes | |
uint | numReplica |
int | numGetRequests |
double | ratioIdentical |
double | maintenanceMessages |
double | normalMessages |
double | numBytesMaintenance |
double | numBytesNormal |
bool | secureMaintenance |
use a secure maintenance algorithm based on majority decisions | |
bool | invalidDataAttack |
if node is malicious, it tries a invalidData attack | |
bool | maintenanceAttack |
if node is malicious, it tries a maintenanceData attack | |
PendingRpcs | pendingRpcs |
a map of all pending RPC operations | |
DHTDataStorage * | dataStorage |
pointer to the dht data storage |
Friends | |
std::ostream & | operator<< (std::ostream &Stream, const PendingRpcsEntry &entry) |
Additional Inherited Members | |
Public Types inherited from BaseTcpSupport | |
enum | EvCode { NO_EST_CONNECTION, PEER_CLOSED, PEER_TIMEDOUT, PEER_REFUSED, CONNECTION_RESET, CONNECTION_SUCC_ClOSED } |
Protected Member Functions inherited from BaseApp | |
int | numInitStages () const |
method to set InitStage | |
void | initialize (int stage) |
initializes base class-attributes | |
virtual void | initializeApp (int stage) |
initializes derived class-attributes | |
void | handleMessage (cMessage *msg) |
checks for message type and calls corresponding method | |
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 | handleNodeGracefulLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes. | |
void | finish () |
collects statistical data | |
virtual void | finishApp () |
collects statistical data of derived app | |
void | callRoute (const OverlayKey &key, cPacket *msg, const TransportAddress &hint=TransportAddress::UNSPECIFIED_NODE, RoutingType routingType=DEFAULT_ROUTING) |
Common API function: calls route-method in overlay. | |
void | callRoute (const OverlayKey &key, cPacket *msg, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType=DEFAULT_ROUTING) |
virtual void | deliver (OverlayKey &key, cMessage *msg) |
Common API function: handles delivered messages from overlay. | |
virtual void | forward (OverlayKey *key, cPacket **msg, NodeHandle *nextHopNode) |
Common API function: handles messages from overlay to be forwarded. | |
virtual void | update (const NodeHandle &node, bool joined) |
Common API function: informs application about neighbors and own nodeID. | |
NodeVector * | callLocalLookup (const OverlayKey &key, int num, bool safe) |
Common API function: produces a list of nodes that can be used as next hops towards key. | |
NodeVector * | callNeighborSet (int num) |
Common API function: produces a list of neighbor nodes. | |
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 void | handleLowerMessage (cMessage *msg) |
processes self-messages | |
virtual void | handleUpperMessage (cMessage *msg) |
handleUpperMessage gets called of handleMessage(cMessage* msg) if msg arrivedOn from_upperTier (currently msg gets deleted in this function) | |
virtual void | handleUDPMessage (cMessage *msg) |
method to handle messages that come directly from the UDP gate | |
virtual void | handleReadyMessage (CompReadyMessage *msg) |
method to handle ready messages from the overlay | |
virtual void | bindToPort (int port) |
Tells UDP we want to get all packets arriving on the given port. | |
virtual void | sendMessageToUDP (const TransportAddress &destAddr, cPacket *msg, simtime_t delay=SIMTIME_ZERO) |
Sends a packet over UDP. | |
virtual void | handleTraceMessage (cMessage *msg) |
handleTraceMessage gets called of handleMessage(cMessage* msg) if a message arrives at trace_in. | |
void | sendMessageToLowerTier (cPacket *msg) |
sends non-commonAPI message to the lower tier | |
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 | internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType) |
virtual CompType | getThisCompType () |
Return the component type of this module. | |
void | sendReadyMessage (bool ready=true, const OverlayKey &nodeId=OverlayKey::UNSPECIFIED_KEY) |
Protected Attributes inherited from BaseApp | |
UnderlayConfigurator * | underlayConfigurator |
pointer to UnderlayConfigurator in this node | |
GlobalNodeList * | globalNodeList |
pointer to GlobalNodeList in this node | |
GlobalStatistics * | globalStatistics |
pointer to GlobalStatistics module in this node | |
NotificationBoard * | notificationBoard |
pointer to NotificationBoard in this node | |
bool | debugOutput |
debug output yes/no? | |
int | numOverlaySent |
number of sent packets to overlay | |
int | bytesOverlaySent |
number of sent bytes to overlay | |
int | numOverlayReceived |
number of received packets from overlay | |
int | bytesOverlayReceived |
number of received bytes from overlay | |
int | numUdpSent |
number of sent packets to UDP | |
int | bytesUdpSent |
number of sent bytes to UDP | |
int | numUdpReceived |
number of received packets from UDP | |
int | bytesUdpReceived |
number of received bytes from UDP | |
simtime_t | creationTime |
simTime when the App has been created |
|
private |
|
private |
DHT::DHT | ( | ) |
|
virtual |
Definition at line 41 of file DHT.cc.
|
private |
Definition at line 927 of file DHT.cc.
|
private |
Definition at line 515 of file DHT.cc.
|
private |
Definition at line 501 of file DHT.cc.
|
private |
Definition at line 417 of file DHT.cc.
|
private |
Definition at line 555 of file DHT.cc.
|
private |
Definition at line 805 of file DHT.cc.
|
private |
Definition at line 486 of file DHT.cc.
|
private |
Definition at line 292 of file DHT.cc.
|
private |
Definition at line 531 of file DHT.cc.
|
private |
Definition at line 105 of file DHT.cc.
|
private |
Definition at line 120 of file DHT.cc.
|
private |
Definition at line 151 of file DHT.cc.
|
private |
|
private |
Definition at line 57 of file DHT.cc.
|
private |
|
private |
Definition at line 778 of file DHT.cc.
|
private |
Definition at line 690 of file DHT.cc.
|
friend |
Definition at line 952 of file DHT.cc.
|
private |
|
private |
|
private |
|
private |
|
private |