IBR-DTNSuite
0.12
|
#include <EID.h>
Public Types | |
enum | Scheme { SCHEME_DTN = 0, SCHEME_CBHE = 1, SCHEME_EXTENDED = 2 } |
typedef std::pair< Number, Number > | Compressed |
Public Member Functions | |
EID () | |
EID (const std::string &scheme, const std::string &ssp) | |
EID (const std::string &value) | |
EID (const dtn::data::Number &node, const dtn::data::Number &application) | |
virtual | ~EID () |
bool | operator== (const EID &other) const |
bool | operator== (const std::string &other) const |
bool | operator!= (const EID &other) const |
bool | sameHost (const std::string &other) const |
bool | sameHost (const EID &other) const |
bool | operator< (const EID &other) const |
bool | operator> (const EID &other) const |
std::string | getString () const |
void | setApplication (const dtn::data::Number &app) throw () |
void | setApplication (const std::string &app) throw () |
std::string | getApplication () const throw () |
bool | isApplication (const dtn::data::Number &app) const throw () |
bool | isApplication (const std::string &app) const throw () |
std::string | getHost () const throw () |
const std::string | getScheme () const |
const std::string | getSSP () const |
std::string | getDelimiter () const |
EID | getNode () const throw () |
bool | hasApplication () const |
bool | isCompressable () const |
bool | isNone () const |
Compressed | getCompressed () const |
Static Public Member Functions | |
static Scheme | resolveScheme (const std::string &s) |
static const std::string | getSchemeName (const Scheme s) |
static Number | getApplicationNumber (const std::string &app) |
typedef std::pair<Number, Number> dtn::data::EID::Compressed |
dtn::data::EID::EID | ( | ) |
Definition at line 184 of file EID.cpp.
Referenced by getNode(), operator==(), and sameHost().
dtn::data::EID::EID | ( | const std::string & | scheme, |
const std::string & | ssp | ||
) |
Definition at line 197 of file EID.cpp.
References resolveScheme(), SCHEME_CBHE, and SCHEME_DTN.
dtn::data::EID::EID | ( | const std::string & | value) |
Definition at line 223 of file EID.cpp.
References resolveScheme(), SCHEME_CBHE, SCHEME_DTN, and dtn::utils::Utils::trim().
dtn::data::EID::EID | ( | const dtn::data::Number & | node, |
const dtn::data::Number & | application | ||
) |
Constructor for CBHE EIDs.
node | Node number. |
application | Application number. |
Definition at line 282 of file EID.cpp.
References SCHEME_DTN.
std::string dtn::data::EID::getApplication | ( | ) | const | |
throw | ( | |||
) |
Definition at line 438 of file EID.cpp.
References SCHEME_CBHE, SCHEME_DTN, and dtn::data::SDNV< E >::toString().
|
static |
Map an application string to a CBHE number
Definition at line 135 of file EID.cpp.
References GUINT32_TO_BE, and dtn::data::SDNV< E >::read().
Referenced by setApplication().
EID::Compressed dtn::data::EID::getCompressed | ( | ) | const |
Definition at line 571 of file EID.cpp.
References isCompressable().
Referenced by dtn::data::DefaultSerializer::getLength(), and dtn::data::DefaultSerializer::operator<<().
std::string dtn::data::EID::getDelimiter | ( | ) | const |
Definition at line 562 of file EID.cpp.
References SCHEME_CBHE.
std::string dtn::data::EID::getHost | ( | ) | const | |
throw | ( | |||
) |
Definition at line 475 of file EID.cpp.
References SCHEME_CBHE, SCHEME_DTN, and dtn::data::SDNV< E >::toString().
Referenced by dtn::net::TCPConnection::initiateExtendedHandshake().
EID dtn::data::EID::getNode | ( | ) | const | |
throw | ( | |||
) |
Return the EID with stripped application part
Definition at line 528 of file EID.cpp.
References EID(), SCHEME_CBHE, and SCHEME_DTN.
Referenced by dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::security::SecurityKeyManager::get(), dtn::security::SecurityBlock::getSecurityDestination(), dtn::security::SecurityBlock::getSecuritySource(), dtn::security::SecurityKeyManager::hasKey(), dtn::security::SecurityBlock::isSecurityDestination(), dtn::security::SecurityBlock::isSecuritySource(), dtn::routing::ForwardingStrategy::neighborDPIsGreater(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::ProphetRoutingExtension::processHandshake(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), dtn::routing::EpidemicRoutingExtension::run(), and dtn::security::SecurityKeyManager::store().
const std::string dtn::data::EID::getScheme | ( | ) | const |
Definition at line 487 of file EID.cpp.
References getSchemeName(), SCHEME_CBHE, and SCHEME_DTN.
Referenced by dtn::net::ConnectionManager::add(), dtn::data::Dictionary::add(), and dtn::data::Dictionary::getRef().
|
static |
Returns the name of a scheme
Definition at line 57 of file EID.cpp.
References SCHEME_CBHE, and SCHEME_DTN.
Referenced by getScheme(), and getString().
const std::string dtn::data::EID::getSSP | ( | ) | const |
Definition at line 499 of file EID.cpp.
References dtn::data::SDNV< E >::get(), SCHEME_CBHE, and SCHEME_DTN.
Referenced by dtn::data::Dictionary::add(), and dtn::data::Dictionary::getRef().
std::string dtn::data::EID::getString | ( | ) | const |
Definition at line 374 of file EID.cpp.
References dtn::data::SDNV< E >::get(), getSchemeName(), SCHEME_CBHE, and SCHEME_DTN.
Referenced by dtn::daemon::Debugger::callbackBundleReceived(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::api::Client::connect(), dtn::api::OrderedStreamHandler::get(), dtn::security::MutableSerializer::getLength(), dtn::daemon::NativeDaemon::getLocalUri(), dtn::net::TransferCompletedEvent::getMessage(), dtn::routing::NodeHandshakeEvent::getMessage(), dtn::net::ConnectionEvent::getMessage(), dtn::routing::StaticRouteChangeEvent::getMessage(), dtn::net::TransferAbortedEvent::getMessage(), dtn::daemon::NativeDaemon::getNeighbors(), dtn::net::TCPConnection::initiateExtendedHandshake(), dtn::security::SecurityBlock::isSecurityDestination(), dtn::security::SecurityBlock::isSecuritySource(), main(), dtn::routing::StaticRegexRoute::match(), dtn::api::PlainSerializer::operator<<(), dtn::streams::operator<<(), dtn::security::MutableSerializer::operator<<(), dtn::net::operator<<(), dtn::data::operator<<(), dtn::core::operator<<(), print_summary(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::ProphetRoutingExtension::processHandshake(), dtn::net::DatagramConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::net::DatagramConnection::queue(), dtn::net::EMailConvergenceLayer::queue(), dtn::net::ConnectionManager::queue(), dtn::api::EventConnection::raiseEvent(), dtn::daemon::NativeDaemon::raiseEvent(), dtn::data::BundleID::raw(), dtn::api::NativeSession::resetEndpoint(), dtn::api::ExtendedApiHandler::run(), dtn::data::BundleID::toString(), dtn::routing::StaticRegexRoute::toString(), dtn::net::DiscoveryBeacon::toString(), dtn::core::Node::toString(), dtn::routing::RoutingExtension::transferTo(), dtn::data::CustodySignalBlock::write(), and dtn::data::StatusReportBlock::write().
bool dtn::data::EID::hasApplication | ( | ) | const |
Definition at line 540 of file EID.cpp.
References SCHEME_CBHE, and SCHEME_DTN.
bool dtn::data::EID::isApplication | ( | const dtn::data::Number & | app) | const | |
throw | ( | ||||
) |
Definition at line 455 of file EID.cpp.
Referenced by dtn::net::FileConvergenceLayer::componentRun().
bool dtn::data::EID::isApplication | ( | const std::string & | app) | const | |
throw | ( | ||||
) |
bool dtn::data::EID::isCompressable | ( | ) | const |
check if a EID is compressable.
Definition at line 552 of file EID.cpp.
References SCHEME_CBHE, and SCHEME_DTN.
Referenced by dtn::data::Bundle::allEIDsInCBHE(), getCompressed(), and dtn::data::DefaultSerializer::isCompressable().
bool dtn::data::EID::isNone | ( | ) | const |
Determine if this EID is null
Definition at line 557 of file EID.cpp.
References SCHEME_DTN.
Referenced by dtn::api::Client::connect(), dtn::security::SecurityBlock::getSecurityDestination(), and dtn::security::SecurityBlock::getSecuritySource().
bool dtn::data::EID::operator< | ( | const EID & | other) | const |
Definition at line 343 of file EID.cpp.
References SCHEME_CBHE, and SCHEME_DTN.
bool dtn::data::EID::operator== | ( | const EID & | other) | const |
Definition at line 296 of file EID.cpp.
References SCHEME_CBHE, and SCHEME_DTN.
bool dtn::data::EID::operator== | ( | const std::string & | other) | const |
|
static |
Resolves a scheme in a string to the corresponding enum
Definition at line 69 of file EID.cpp.
References SCHEME_CBHE, SCHEME_DTN, and SCHEME_EXTENDED.
Referenced by EID().
bool dtn::data::EID::sameHost | ( | const std::string & | other) | const |
Definition at line 322 of file EID.cpp.
References EID().
Referenced by dtn::security::BundleAuthenticationBlock::auth(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::security::PayloadConfidentialBlock::encrypt(), dtn::security::SecurityBlock::isSecurityDestination(), dtn::security::SecurityBlock::isSecuritySource(), dtn::net::TCPConnection::match(), dtn::routing::ProphetRoutingExtension::processHandshake(), dtn::core::BundleCore::raiseEvent(), dtn::dht::DHTNameService::raiseEvent(), dtn::security::PayloadIntegrityBlock::sign(), dtn::core::FragmentManager::signal(), and dtn::routing::DeliveryPredictabilityMap::update().
bool dtn::data::EID::sameHost | ( | const EID & | other) | const |
Definition at line 327 of file EID.cpp.
References SCHEME_CBHE, and SCHEME_DTN.
void dtn::data::EID::setApplication | ( | const dtn::data::Number & | app) | ||
throw | ( | ||||
) |
Definition at line 403 of file EID.cpp.
References dtn::data::SDNV< E >::toString().
Referenced by dtn::api::NativeSession::addEndpoint(), dtn::api::BinaryStreamClient::eventConnectionUp(), dtn::core::AbstractWorker::initialize(), dtn::api::Registration::Registration(), dtn::api::NativeSession::removeEndpoint(), dtn::api::OrderedStreamHandler::run(), and dtn::api::ExtendedApiHandler::run().
void dtn::data::EID::setApplication | ( | const std::string & | app) | ||
throw | ( | ||||
) |
Definition at line 420 of file EID.cpp.
References getApplicationNumber().