#include <source/ariba/SideportListener.h>
Public Types | |
enum | Protocol { undefined = 0x0, rfcomm = 0x1, ipv4 = 0x2, ipv6 = 0x3 } |
Public Member Functions | |
SideportListener () | |
virtual | ~SideportListener () |
string | getEndpointDescription (const LinkID &link) const |
string | getEndpointDescription (const NodeID &node=NodeID::UNSPECIFIED) const |
const NodeID & | getNodeID (const LinkID &link=LinkID::UNSPECIFIED) const |
vector< LinkID > | getLinkIDs (const NodeID &node=NodeID::UNSPECIFIED) const |
string | getHtmlLinks () |
vector< NodeID > | getOverlayNeighbors (bool deep=true) |
bool | isRelayingNode (const NodeID &node) |
bool | isRelayedNode (const NodeID &node) |
Protocol | getReachabilityProtocol (const NodeID &node) |
Static Public Attributes | |
static SideportListener | DEFAULT |
Protected Member Functions | |
virtual void | onLinkUp (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet) |
virtual void | onLinkDown (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet) |
virtual void | onLinkChanged (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet) |
virtual void | onLinkFail (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet) |
Private Member Functions | |
void | configure (overlay::BaseOverlay *_overlay) |
Private Attributes | |
overlay::BaseOverlay * | overlay |
Friends | |
class | Node |
class | AribaModule |
class | overlay::BaseOverlay |
Definition at line 68 of file SideportListener.h.
Protocols for some layer, can be combined
Definition at line 170 of file SideportListener.h.
ariba::SideportListener::SideportListener | ( | ) |
Constructor of the SideportListener.
Definition at line 51 of file SideportListener.cpp.
ariba::SideportListener::~SideportListener | ( | ) | [virtual] |
Virtual Desctructor for the SideportListener.
Definition at line 54 of file SideportListener.cpp.
void ariba::SideportListener::configure | ( | overlay::BaseOverlay * | _overlay | ) | [private] |
Configure the sideport with the correct base overlay.
_overlay | The BaseOverlay where to attach the sideport. |
Definition at line 163 of file SideportListener.cpp.
References overlay.
Referenced by ariba::overlay::BaseOverlay::registerSidePort().
string ariba::SideportListener::getEndpointDescription | ( | const NodeID & | node = NodeID::UNSPECIFIED |
) | const |
Get a descriprive string that identifiers the remote node.
node | The node id to query endpoint information. |
Definition at line 62 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getEndpointDescriptor(), overlay, and ariba::communication::EndpointDescriptor::toString().
string ariba::SideportListener::getEndpointDescription | ( | const LinkID & | link | ) | const |
Get a descriptive string that identifies the remote endpoint for the given link.
link | The link to query endpoint information for. |
Definition at line 57 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getEndpointDescriptor(), overlay, and ariba::communication::EndpointDescriptor::toString().
string ariba::SideportListener::getHtmlLinks | ( | ) |
Get html presentation of the links.
Definition at line 77 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getLinkHTMLInfo(), and overlay.
vector< LinkID > ariba::SideportListener::getLinkIDs | ( | const NodeID & | node = NodeID::UNSPECIFIED |
) | const |
Get all links that end at the specified node id. Or all links from the local node when the node id is set to unspecified.
node | The remote node to query all links or unspecified for all local starting links |
Definition at line 72 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getLinkIDs(), and overlay.
const NodeID & ariba::SideportListener::getNodeID | ( | const LinkID & | link = LinkID::UNSPECIFIED |
) | const |
Get the remote endpoint node id for the given string, or the local nodeid for an unspecified link.
link | The link to get the remote node. |
Definition at line 67 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getNodeID(), overlay, and ariba::utility::NodeID::UNSPECIFIED.
vector< NodeID > ariba::SideportListener::getOverlayNeighbors | ( | bool | deep = true |
) |
Get the neighbots in the overlay structure
Definition at line 81 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getOverlayNeighbors(), and overlay.
SideportListener::Protocol ariba::SideportListener::getReachabilityProtocol | ( | const NodeID & | node | ) |
Through which protocol is a node reachable.
node | The node for which to return protocol reachability |
Definition at line 124 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::bc, ariba::overlay::LinkDescriptor::communicationId, ariba::overlay::LinkDescriptor::communicationUp, ipv4, ipv6, ariba::overlay::BaseOverlay::links, overlay, ariba::communication::BaseCommunication::queryLocalLink(), ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteNode, rfcomm, undefined, and ariba::overlay::LinkDescriptor::up.
bool ariba::SideportListener::isRelayedNode | ( | const NodeID & | node | ) |
Is this node only reachable for us through a relay?
node | The node in question |
Definition at line 89 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::links, overlay, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteNode, and ariba::overlay::LinkDescriptor::up.
bool ariba::SideportListener::isRelayingNode | ( | const NodeID & | node | ) |
Is this node acting as a relay for us
node | The node in question |
Definition at line 109 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::links, overlay, and ariba::overlay::LinkDescriptor::routeRecord.
void ariba::SideportListener::onLinkChanged | ( | const LinkID & | lnk, | |
const NodeID & | local, | |||
const NodeID & | remote, | |||
const SpoVNetID & | spovnet | |||
) | [protected, virtual] |
Notification function when a link has changed
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 173 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::onLinkChanged().
void ariba::SideportListener::onLinkDown | ( | const LinkID & | lnk, | |
const NodeID & | local, | |||
const NodeID & | remote, | |||
const SpoVNetID & | spovnet | |||
) | [protected, virtual] |
Notification function when a link has gone down.
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 170 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::dropLink(), and ariba::overlay::BaseOverlay::onLinkDown().
void ariba::SideportListener::onLinkFail | ( | const LinkID & | lnk, | |
const NodeID & | local, | |||
const NodeID & | remote, | |||
const SpoVNetID & | spovnet | |||
) | [protected, virtual] |
Notification function when a link has failed
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 176 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::onLinkFail().
void ariba::SideportListener::onLinkUp | ( | const LinkID & | lnk, | |
const NodeID & | local, | |||
const NodeID & | remote, | |||
const SpoVNetID & | spovnet | |||
) | [protected, virtual] |
Notification function when a link has gone up.
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 167 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::handleLinkUpdate().
friend class AribaModule [friend] |
Definition at line 71 of file SideportListener.h.
friend class Node [friend] |
Definition at line 70 of file SideportListener.h.
friend class overlay::BaseOverlay [friend] |
Definition at line 72 of file SideportListener.h.
A default object of the SideportListener that has empty event functions and will return invalid information.
Definition at line 80 of file SideportListener.h.
Referenced by ariba::overlay::BaseOverlay::unregisterSidePort().
The configured BaseOverlay where the sideport is attached to.
Definition at line 262 of file SideportListener.h.
Referenced by configure(), getEndpointDescription(), getHtmlLinks(), getLinkIDs(), getNodeID(), getOverlayNeighbors(), getReachabilityProtocol(), isRelayedNode(), and isRelayingNode().