|
IBR-DTN
1.0.0
|
#include <ConnectionManager.h>


Classes | |
| class | ShutdownException |
Public Types | |
| typedef std::set < dtn::core::Node::Protocol > | protocol_set |
| typedef std::list < dtn::core::Node::Protocol > | protocol_list |
Protected Member Functions | |
| void | discovered (const dtn::core::Node &node) |
| virtual void | componentUp () throw () |
| virtual void | componentDown () throw () |
Definition at line 62 of file ConnectionManager.h.
| typedef std::list<dtn::core::Node::Protocol> dtn::net::ConnectionManager::protocol_list |
Definition at line 118 of file ConnectionManager.h.
| typedef std::set<dtn::core::Node::Protocol> dtn::net::ConnectionManager::protocol_set |
Definition at line 117 of file ConnectionManager.h.
| dtn::net::ConnectionManager::ConnectionManager | ( | ) |
Definition at line 48 of file ConnectionManager.cpp.
|
virtual |
Definition at line 53 of file ConnectionManager.cpp.
| void dtn::net::ConnectionManager::add | ( | const dtn::core::Node & | n | ) | |
| throw | ( | ||||
| ) | |||||
Definition at line 166 of file ConnectionManager.cpp.
References dtn::core::Node::add(), dtn::core::BundleCore::addRoute(), dtn::core::Node::get(), dtn::core::Node::getAll(), dtn::core::Node::getEID(), dtn::core::BundleCore::getInstance(), dtn::utils::Clock::getTime(), dtn::core::Node::isAnnounced(), dtn::core::Node::isAvailable(), dtn::core::NODE_AVAILABLE, dtn::core::NODE_DATA_ADDED, dtn::core::NodeEvent::raise(), dtn::core::Node::remove(), dtn::core::Node::setAnnounced(), and dtn::core::Node::size().
Referenced by dtn::daemon::NativeDaemon::addConnection(), dtn::net::WifiP2PManager::componentUp(), discovered(), dtn_dht_handle_lookup_result(), dtn::net::P2PDialupExtension::fireConnected(), dtn::net::P2PDialupExtension::fireDiscovered(), dtn::net::P2PDialupExtension::P2PDialupExtension(), and dtn::api::ApiP2PExtensionHandler::setup().

| void dtn::net::ConnectionManager::add | ( | ConvergenceLayer * | cl | ) |
Add a convergence layer
Definition at line 248 of file ConnectionManager.cpp.
References dtn::net::ConvergenceLayer::getDiscoveryProtocol().

| void dtn::net::ConnectionManager::add | ( | P2PDialupExtension * | ext | ) |
Add a p2p dial-up extension
Definition at line 289 of file ConnectionManager.cpp.
|
protectedvirtual | |||||||||||||
Implements dtn::daemon::IntegratedComponent.
Definition at line 73 of file ConnectionManager.cpp.
References dtn::core::EventDispatcher< E >::remove().

|
protectedvirtual | |||||||||||||
Implements dtn::daemon::IntegratedComponent.
Definition at line 57 of file ConnectionManager.cpp.
References dtn::core::EventDispatcher< E >::add(), dtn::daemon::Configuration::Network::getAutoConnect(), dtn::daemon::Configuration::getInstance(), dtn::daemon::Configuration::getNetwork(), and dtn::utils::Clock::getTime().

|
protected |
trigger for periodical discovery of nodes
| node |
Definition at line 301 of file ConnectionManager.cpp.
References add(), dtn::core::Node::getEID(), and dtn::core::BundleCore::local.
Referenced by updateNeighbor().

|
virtual |
Implements dtn::daemon::Component.
Definition at line 629 of file ConnectionManager.cpp.
| const dtn::core::Node dtn::net::ConnectionManager::getNeighbor | ( | const dtn::data::EID & | eid | ) | |
| throw | ( | NodeNotAvailableException | |||
| ) | |||||
Get the neighbor with the given EID.
| dtn::net::NodeNotAvailableException | if the node is not a neighbor. |
| eid | The EID of the neighbor. |
Definition at line 604 of file ConnectionManager.cpp.
References dtn::core::Node::isAvailable().
Referenced by dtn::daemon::NativeDaemon::getInfo(), and dtn::daemon::NativeDaemon::initiateConnection().

| const std::set< dtn::core::Node > dtn::net::ConnectionManager::getNeighbors | ( | ) |
get a set with all neighbors
Definition at line 589 of file ConnectionManager.cpp.
References dtn::core::Node::isAvailable().
Referenced by dtn::dht::DHTNameService::componentRun(), dtn::routing::NeighborRoutingExtension::eventBundleQueued(), dtn::routing::FloodRoutingExtension::eventBundleQueued(), dtn::routing::EpidemicRoutingExtension::eventBundleQueued(), dtn::routing::ProphetRoutingExtension::eventBundleQueued(), dtn::routing::BaseRouter::extensionsUp(), dtn::daemon::NativeDaemon::getNeighbors(), dtn::daemon::NativeDaemon::getStats(), dtn::daemon::DTNTPWorker::raiseEvent(), dtn::routing::BaseRouter::raiseEvent(), dtn::api::ExtendedApiHandler::run(), dtn::routing::FloodRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().

| void dtn::net::ConnectionManager::getStats | ( | dtn::net::ConvergenceLayer::stats_data & | data | ) |
Returns statistic data about all convergence-layers
Definition at line 269 of file ConnectionManager.cpp.
References dtn::net::ConvergenceLayer::getStats().
Referenced by dtn::daemon::NativeDaemon::getStats().

| const ConnectionManager::protocol_set dtn::net::ConnectionManager::getSupportedProtocols | ( | ) | ||
| throw | ( | |||
| ) | ||||
Returns a list of all supported protocols
Definition at line 560 of file ConnectionManager.cpp.
Referenced by dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
| const ConnectionManager::protocol_list dtn::net::ConnectionManager::getSupportedProtocols | ( | const dtn::data::EID & | eid | ) | |
| throw | ( | NodeNotAvailableException | |||
| ) | |||||
Returns a list of protocol supported by both, local BPA and the peer
Definition at line 567 of file ConnectionManager.cpp.
References dtn::core::Node::getAll(), dtn::core::Node::URI::protocol, and dtn::core::Node::URI::type.

| bool dtn::net::ConnectionManager::isNeighbor | ( | const dtn::core::Node & | node | ) | |
| throw | ( | ||||
| ) | |||||
Checks if a node is already known as neighbor.
| @return |
Definition at line 613 of file ConnectionManager.cpp.
References dtn::core::Node::isAvailable().
Referenced by dtn_dht_handle_lookup_result().

| void dtn::net::ConnectionManager::open | ( | const dtn::core::Node & | node | ) | |
| throw | ( | ibrcommon::Exception | |||
| ) | |||||
Definition at line 449 of file ConnectionManager.cpp.
References dtn::net::P2PDialupExtension::connect(), dtn::net::ConvergenceLayer::getDiscoveryProtocol(), dtn::net::P2PDialupExtension::getProtocol(), dtn::net::ConvergenceLayer::open(), dtn::core::Node::URI::protocol, and dtn::core::Node::URI::type.
Referenced by dtn::daemon::NativeDaemon::initiateConnection().

| void dtn::net::ConnectionManager::queue | ( | dtn::net::BundleTransfer & | job | ) |
queue a bundle for transmission
Definition at line 495 of file ConnectionManager.cpp.
References dtn::net::BundleTransfer::abort(), dtn::net::P2PDialupExtension::connect(), dtn::core::Node::get(), dtn::net::ConvergenceLayer::getDiscoveryProtocol(), dtn::net::BundleTransfer::getNeighbor(), dtn::net::P2PDialupExtension::getProtocol(), dtn::net::BundleTransfer::getProtocol(), dtn::net::ConvergenceLayer::queue(), dtn::net::TransferAbortedEvent::REASON_CONNECTION_DOWN, and dtn::core::Node::URI::type.
Referenced by dtn::routing::RetransmissionExtension::raiseEvent(), and dtn::routing::RoutingExtension::transferTo().

|
virtual | ||||||||||||||
method to receive new events from the EventSwitch
Implements dtn::core::EventReceiver< dtn::core::TimeEvent >.
Definition at line 120 of file ConnectionManager.cpp.
References dtn::core::TIME_SECOND_TICK.
|
virtual | ||||||||||||||
Implements dtn::core::EventReceiver< dtn::core::NodeEvent >.
Definition at line 96 of file ConnectionManager.cpp.
References dtn::core::Node::doConnectImmediately(), and dtn::core::NODE_AVAILABLE.

|
virtual | ||||||||||||||
Implements dtn::core::EventReceiver< dtn::net::ConnectionEvent >.
Definition at line 129 of file ConnectionManager.cpp.
References dtn::net::ConnectionEvent::CONNECTION_DOWN, and dtn::net::ConnectionEvent::CONNECTION_UP.
|
virtual | ||||||||||||||
Implements dtn::core::EventReceiver< dtn::core::GlobalEvent >.
Definition at line 150 of file ConnectionManager.cpp.
| void dtn::net::ConnectionManager::remove | ( | const dtn::core::Node & | n | ) | |
| throw | ( | ||||
| ) | |||||
Definition at line 228 of file ConnectionManager.cpp.
References dtn::core::NODE_DATA_REMOVED, dtn::core::NodeEvent::raise(), and dtn::core::Node::size().
Referenced by dtn::net::WifiP2PManager::componentDown(), dtn::api::ApiP2PExtensionHandler::finally(), dtn::net::P2PDialupExtension::fireDisconnected(), dtn::daemon::NativeDaemon::removeConnection(), and dtn::net::P2PDialupExtension::~P2PDialupExtension().

| void dtn::net::ConnectionManager::remove | ( | ConvergenceLayer * | cl | ) |
Remove a convergence layer
Definition at line 255 of file ConnectionManager.cpp.
References dtn::net::ConvergenceLayer::getDiscoveryProtocol().

| void dtn::net::ConnectionManager::remove | ( | P2PDialupExtension * | ext | ) |
Remove a p2p dial-up extension
Definition at line 295 of file ConnectionManager.cpp.
| void dtn::net::ConnectionManager::resetStats | ( | ) |
Definition at line 279 of file ConnectionManager.cpp.
References dtn::net::ConvergenceLayer::resetStats().

| void dtn::net::ConnectionManager::updateNeighbor | ( | const dtn::core::Node & | n | ) |
Add collected data about a neighbor to the neighbor database.
| n | The node object of the neighbor |
Definition at line 624 of file ConnectionManager.cpp.
References discovered().
Referenced by dtn::net::DiscoveryAgent::onBeaconReceived().
