IBR-DTNSuite
0.12
|
#include <NodeHandshakeExtension.h>
Public Member Functions | |
NodeHandshakeExtension () | |
virtual | ~NodeHandshakeExtension () |
void | raiseEvent (const dtn::core::Event *evt) throw () |
void | componentUp () throw () |
void | componentDown () throw () |
void | doHandshake (const dtn::data::EID &eid) |
void | requestHandshake (const dtn::data::EID &destination, NodeHandshake &request) const |
void | responseHandshake (const dtn::data::EID &source, const NodeHandshake &request, NodeHandshake &answer) |
void | processHandshake (const dtn::data::EID &source, NodeHandshake &answer) |
Public Member Functions inherited from dtn::routing::RoutingExtension | |
RoutingExtension () | |
virtual | ~RoutingExtension ()=0 |
virtual void | eventDataChanged (const dtn::data::EID &peer) throw () |
virtual void | eventTransferCompleted (const dtn::data::EID &peer, const dtn::data::MetaBundle &meta) throw () |
virtual void | eventBundleQueued (const dtn::data::EID &peer, const dtn::data::MetaBundle &meta) throw () |
void | transferTo (const dtn::data::EID &destination, const dtn::data::MetaBundle &meta) |
Public Member Functions inherited from dtn::core::EventReceiver | |
virtual | ~EventReceiver ()=0 |
Protected Member Functions | |
void | processHandshake (const dtn::data::Bundle &bundle) |
Protected Member Functions inherited from dtn::routing::RoutingExtension | |
BaseRouter & | operator* () |
Additional Inherited Members | |
Public Types inherited from dtn::routing::RoutingExtension | |
enum | CALLBACK_ACTION { ROUTE_CALLBACK_FORWARDED = 0, ROUTE_CALLBACK_ABORTED = 1, ROUTE_CALLBACK_REJECTED = 2, ROUTE_CALLBACK_DELETED = 3 } |
Definition at line 37 of file NodeHandshakeExtension.h.
dtn::routing::NodeHandshakeExtension::NodeHandshakeExtension | ( | ) |
Definition at line 50 of file NodeHandshakeExtension.cpp.
|
virtual |
Definition at line 55 of file NodeHandshakeExtension.cpp.
|
virtual |
Implements dtn::routing::RoutingExtension.
Definition at line 192 of file NodeHandshakeExtension.cpp.
References dtn::core::EventDispatcher< E >::remove().
Referenced by dtn::routing::BaseRouter::extensionsDown().
|
virtual |
Implements dtn::routing::RoutingExtension.
Definition at line 187 of file NodeHandshakeExtension.cpp.
References dtn::core::EventDispatcher< E >::add().
Referenced by dtn::routing::BaseRouter::extensionsUp().
void dtn::routing::NodeHandshakeExtension::doHandshake | ( | const dtn::data::EID & | eid) |
Definition at line 182 of file NodeHandshakeExtension.cpp.
Referenced by dtn::routing::BaseRouter::doHandshake().
|
virtual |
Update the neighbor database with the received filter. The filter was sent by the owner, so we assign the contained summary vector to the EID of the sender of this bundle.
Reimplemented from dtn::routing::RoutingExtension.
Definition at line 91 of file NodeHandshakeExtension.cpp.
References dtn::core::BUNDLE_DELETED, dtn::data::MetaBundle::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::MetaBundle::get(), dtn::storage::BundleStorage::get(), dtn::routing::NodeHandshake::get(), dtn::routing::NeighborDatabase::get(), dtn::data::BundleSet::getBloomFilter(), dtn::routing::NodeHandshake::getLifetime(), dtn::data::EID::getNode(), dtn::data::EID::getString(), dtn::routing::BloomFilterSummaryVector::getVector(), dtn::routing::BloomFilterPurgeVector::getVector(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::data::BundleID::isIn(), dtn::core::BundleCore::local, dtn::core::BundleEvent::raise(), dtn::storage::BundleStorage::remove(), and dtn::data::BundleID::toString().
Referenced by dtn::routing::BaseRouter::processHandshake().
|
protected |
Definition at line 300 of file NodeHandshakeExtension.cpp.
References dtn::data::CompressedPayloadBlock::compress(), dtn::data::CompressedPayloadBlock::COMPRESSION_ZLIB, dtn::data::PrimaryBlock::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::Bundle::find(), dtn::data::PayloadBlock::getBLOB(), dtn::data::EID::getNode(), dtn::data::EID::getString(), dtn::routing::NodeHandshake::getType(), dtn::routing::NodeHandshakeEvent::HANDSHAKE_COMPLETED, dtn::routing::NodeHandshakeEvent::HANDSHAKE_REPLIED, dtn::routing::NodeHandshake::HANDSHAKE_REQUEST, dtn::routing::NodeHandshake::HANDSHAKE_RESPONSE, dtn::routing::NodeHandshake::hasRequest(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::BLOB::iostream::iostream(), dtn::data::PrimaryBlock::lifetime, dtn::data::PrimaryBlock::PRIORITY_BIT1, dtn::data::PrimaryBlock::PRIORITY_BIT2, dtn::data::Bundle::push_back(), dtn::data::Bundle::push_front(), dtn::routing::NodeHandshakeEvent::raiseEvent(), dtn::routing::NodeHandshakeItem::REQUEST_COMPRESSED_ANSWER, dtn::data::PrimaryBlock::set(), dtn::data::ScopeControlHopLimitBlock::setLimit(), dtn::data::BundleID::source, dtn::routing::NodeHandshake::toString(), ibrcommon::LogLevel::warning, and ibrcommon::Exception::what().
|
virtual |
Implements dtn::core::EventReceiver.
Definition at line 197 of file NodeHandshakeExtension.cpp.
References dtn::core::NodeEvent::getAction(), dtn::core::Node::getEID(), dtn::core::NodeEvent::getNode(), and dtn::core::NODE_UNAVAILABLE.
|
virtual |
Reimplemented from dtn::routing::RoutingExtension.
Definition at line 59 of file NodeHandshakeExtension.cpp.
References dtn::routing::NodeHandshake::addRequest(), and dtn::routing::BloomFilterPurgeVector::identifier.
Referenced by dtn::routing::BaseRouter::requestHandshake().
|
virtual |
Reimplemented from dtn::routing::RoutingExtension.
Definition at line 64 of file NodeHandshakeExtension.cpp.
References dtn::routing::NodeHandshake::addItem(), dtn::routing::NodeHandshake::hasRequest(), dtn::routing::BloomFilterSummaryVector::identifier, and dtn::routing::BloomFilterPurgeVector::identifier.
Referenced by dtn::routing::BaseRouter::responseHandshake().