OverSim
|
Base class for providing additional underlay specific information associated with a certain transport address. More...
#include <PeerInfo.h>
Public Member Functions | |
PeerInfo (uint32_t type, int moduleId, cObject **context) | |
constructor | |
virtual | ~PeerInfo () |
int | getModuleID () |
returns the moduleId of the peer | |
int8_t | getNpsLayer () |
returns the NPS layer of the peer | |
void | setNpsLayer (int8_t layer) |
set the NPS layer of the peer | |
uint32_t | getTypeID () |
returns the type of the node | |
bool | isPreKilled () |
is the peer marked for deletion? | |
void | setPreKilled (bool killed=true) |
mark that the peer gets deleted soon | |
bool | isMalicious () |
is the peer malicious? | |
cObject ** | getContext () |
Private Member Functions | |
virtual void | dummy () |
dummy-function to make PeerInfo polymorphic | |
void | setMalicious (bool malic=true) |
set the maliciousness of the peer |
Private Attributes | |
bool | malicious |
true if the node is malicious | |
bool | preKilled |
true, if the node is marked for deletion | |
int | moduleId |
the moduleId of the peer | |
uint32_t | type |
ID of the node type. | |
int8_t | npsLayer |
NPS Layer of the node. | |
cObject ** | context |
context pointer |
Friends | |
class | PeerStorage |
std::ostream & | operator<< (std::ostream &os, const PeerInfo info) |
standard output stream for PeerInfo, gives moduleID and true if peer has bootstrapped, false otherwise |
Base class for providing additional underlay specific information associated with a certain transport address.
Definition at line 39 of file PeerInfo.h.
PeerInfo::PeerInfo | ( | uint32_t | type, |
int | moduleId, | ||
cObject ** | context | ||
) |
|
inlinevirtual |
Definition at line 49 of file PeerInfo.h.
|
privatevirtual |
dummy-function to make PeerInfo polymorphic
Reimplemented in InetInfo, SimpleInfo, and ReaSEInfo.
Definition at line 35 of file PeerInfo.cc.
|
inline |
Definition at line 98 of file PeerInfo.h.
Referenced by GlobalNodeList::getContext().
|
inline |
returns the moduleId of the peer
Definition at line 56 of file PeerInfo.h.
Referenced by TraceChurn::createNode(), TopologyVis::deleteOverlayNeighborArrow(), and GlobalNodeList::setOverlayReadyIcon().
|
inline |
returns the NPS layer of the peer
Definition at line 63 of file PeerInfo.h.
Referenced by Nps::getLandmarks(), GlobalNodeList::killPeer(), SimpleUDP::processMsgFromApp(), and SimpleTCPConnection::sendToIP().
|
inline |
returns the type of the node
Definition at line 75 of file PeerInfo.h.
Referenced by PeerStorage::insertMapIteratorIntoVector(), InetUnderlayConfigurator::preKillNode(), SimpleUnderlayConfigurator::preKillNode(), ReaSEUnderlayConfigurator::preKillNode(), SimpleUDP::processMsgFromApp(), PeerStorage::removeMapIteratorFromVector(), SimpleTCPConnection::sendToIP(), and Nps::setOwnLayer().
|
inline |
is the peer malicious?
Definition at line 96 of file PeerInfo.h.
Referenced by PeerStorage::insertMapIteratorIntoVector(), GlobalNodeList::isMalicious(), and PeerStorage::removeMapIteratorFromVector().
|
inline |
is the peer marked for deletion?
Definition at line 82 of file PeerInfo.h.
Referenced by GlobalNodeList::setPreKilled().
|
inlineprivate |
set the maliciousness of the peer
malic | whether the peer is malicious or not |
Definition at line 119 of file PeerInfo.h.
|
inline |
set the NPS layer of the peer
Definition at line 68 of file PeerInfo.h.
Referenced by Nps::setOwnLayer().
|
inline |
mark that the peer gets deleted soon
killed | true, if the peer gets deleted soon |
Definition at line 89 of file PeerInfo.h.
Referenced by GlobalNodeList::addPeer(), and GlobalNodeList::setPreKilled().
|
friend |
standard output stream for PeerInfo, gives moduleID and true if peer has bootstrapped, false otherwise
os | the ostream |
info | the PeerInfo |
Definition at line 39 of file PeerInfo.cc.
|
friend |
Definition at line 41 of file PeerInfo.h.
|
private |
context pointer
Definition at line 126 of file PeerInfo.h.
Referenced by getContext(), and PeerInfo().
|
private |
true if the node is malicious
Definition at line 119 of file PeerInfo.h.
Referenced by isMalicious(), PeerInfo(), and setMalicious().
|
private |
the moduleId of the peer
Definition at line 123 of file PeerInfo.h.
Referenced by getModuleID(), operator<<(), and PeerInfo().
|
private |
NPS Layer of the node.
Definition at line 125 of file PeerInfo.h.
Referenced by getNpsLayer(), operator<<(), PeerInfo(), and setNpsLayer().
|
private |
true, if the node is marked for deletion
Definition at line 122 of file PeerInfo.h.
Referenced by isPreKilled(), and setPreKilled().
|
private |
ID of the node type.
Definition at line 124 of file PeerInfo.h.
Referenced by getTypeID(), operator<<(), and PeerInfo().