IBR-DTNSuite
0.8
|
#include <NodeHandshakeExtension.h>
Classes | |
class | HandshakeEndpoint |
Public Member Functions | |
NodeHandshakeExtension () | |
virtual | ~NodeHandshakeExtension () |
void | notify (const dtn::core::Event *evt) |
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) |
Protected Member Functions | |
void | processHandshake (const dtn::data::Bundle &bundle) |
const std::list < BaseRouter::Extension * > & | getExtensions () |
Definition at line 22 of file NodeHandshakeExtension.h.
Definition at line 27 of file NodeHandshakeExtension.cpp.
Definition at line 32 of file NodeHandshakeExtension.cpp.
void dtn::routing::NodeHandshakeExtension::doHandshake | ( | const dtn::data::EID & | eid | ) |
Definition at line 112 of file NodeHandshakeExtension.cpp.
Referenced by dtn::routing::BaseRouter::doHandshake().
const std::list< BaseRouter::Extension * > & dtn::routing::NodeHandshakeExtension::getExtensions | ( | ) | [protected] |
Definition at line 135 of file NodeHandshakeExtension.cpp.
void dtn::routing::NodeHandshakeExtension::notify | ( | const dtn::core::Event * | evt | ) | [virtual] |
Implements dtn::routing::BaseRouter::Extension.
Definition at line 117 of file NodeHandshakeExtension.cpp.
References dtn::core::NodeEvent::getAction(), dtn::core::Node::getEID(), dtn::core::NodeEvent::getNode(), and dtn::core::NODE_UNAVAILABLE.
void dtn::routing::NodeHandshakeExtension::processHandshake | ( | const dtn::data::EID & | source, |
NodeHandshake & | answer | ||
) | [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::BaseRouter::Extension.
Definition at line 68 of file NodeHandshakeExtension.cpp.
References dtn::core::BUNDLE_DELETED, dtn::routing::NodeHandshake::get(), dtn::routing::NeighborDatabase::get(), dtn::routing::SummaryVector::getBloomFilter(), dtn::routing::NodeHandshake::getLifetime(), dtn::data::EID::getNode(), dtn::routing::BloomFilterSummaryVector::getVector(), dtn::routing::BloomFilterPurgeVector::getVector(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleEvent::raise(), dtn::storage::BundleStorage::remove(), dtn::data::BundleID::toString(), and dtn::routing::NeighborDatabase::NeighborEntry::update().
void dtn::routing::NodeHandshakeExtension::processHandshake | ( | const dtn::data::Bundle & | bundle | ) | [protected] |
Definition at line 228 of file NodeHandshakeExtension.cpp.
References dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_lifetime, dtn::data::PrimaryBlock::_source, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::PayloadBlock::getBLOB(), dtn::data::Bundle::getBlock(), dtn::routing::NodeHandshake::getType(), dtn::routing::NodeHandshakeEvent::HANDSHAKE_COMPLETED, dtn::routing::NodeHandshakeEvent::HANDSHAKE_REPLIED, dtn::routing::NodeHandshake::HANDSHAKE_REQUEST, dtn::routing::NodeHandshake::HANDSHAKE_RESPONSE, ibrcommon::BLOB::iostream::iostream(), dtn::data::PrimaryBlock::PRIORITY_BIT1, dtn::data::PrimaryBlock::PRIORITY_BIT2, dtn::routing::BaseRouter::Extension::processHandshake(), dtn::data::Bundle::push_back(), dtn::data::Bundle::push_front(), dtn::routing::NodeHandshakeEvent::raiseEvent(), dtn::routing::BaseRouter::Extension::responseHandshake(), dtn::data::PrimaryBlock::set(), and dtn::data::ScopeControlHopLimitBlock::setLimit().
void dtn::routing::NodeHandshakeExtension::requestHandshake | ( | const dtn::data::EID & | destination, |
NodeHandshake & | request | ||
) | const [virtual] |
Reimplemented from dtn::routing::BaseRouter::Extension.
Definition at line 36 of file NodeHandshakeExtension.cpp.
References dtn::routing::NodeHandshake::addRequest(), and dtn::routing::BloomFilterPurgeVector::identifier.
void dtn::routing::NodeHandshakeExtension::responseHandshake | ( | const dtn::data::EID & | source, |
const NodeHandshake & | request, | ||
NodeHandshake & | answer | ||
) | [virtual] |
Reimplemented from dtn::routing::BaseRouter::Extension.
Definition at line 41 of file NodeHandshakeExtension.cpp.
References dtn::routing::NodeHandshake::addItem(), dtn::routing::NodeHandshake::hasRequest(), dtn::routing::BloomFilterSummaryVector::identifier, and dtn::routing::BloomFilterPurgeVector::identifier.