IBR-DTNSuite
0.10
|
#include <PrimaryBlock.h>
Public Member Functions | |
PrimaryBlock () | |
virtual | ~PrimaryBlock () |
bool | isExpired () const DEPRECATED |
std::string | toString () const |
void | set (FLAGS flag, bool value) |
bool | get (FLAGS flag) const |
PRIORITY | getPriority () const |
void | setPriority (PRIORITY p) |
void | relabel () |
bool | operator== (const PrimaryBlock &other) const |
bool | operator!= (const PrimaryBlock &other) const |
bool | operator< (const PrimaryBlock &other) const |
bool | operator> (const PrimaryBlock &other) const |
Public Attributes | |
Bitset< FLAGS > | procflags |
Timestamp | timestamp |
Number | sequencenumber |
Number | lifetime |
Number | fragmentoffset |
Number | appdatalength |
EID | source |
EID | destination |
EID | reportto |
EID | custodian |
Definition at line 46 of file PrimaryBlock.h.
Definition at line 62 of file PrimaryBlock.h.
Define the Bundle Priorities PRIO_LOW low priority for this bundle PRIO_MEDIUM medium priority for this bundle PRIO_HIGH high priority for this bundle
Enumerator | |
---|---|
PRIO_LOW | |
PRIO_MEDIUM | |
PRIO_HIGH |
Definition at line 55 of file PrimaryBlock.h.
dtn::data::PrimaryBlock::PrimaryBlock | ( | ) |
Definition at line 35 of file PrimaryBlock.cpp.
References DESTINATION_IS_SINGLETON, and relabel().
Referenced by dtn::data::Bundle::operator!=(), dtn::data::Bundle::operator<(), dtn::data::Bundle::operator==(), and dtn::data::Bundle::operator>().
|
virtual |
Definition at line 44 of file PrimaryBlock.cpp.
bool dtn::data::PrimaryBlock::get | ( | FLAGS | flag | ) | const |
Definition at line 53 of file PrimaryBlock.cpp.
References dtn::data::Bitset< E >::getBit(), and procflags.
Referenced by dtn::utils::Utils::encapsule(), dtn::security::PayloadConfidentialBlock::encrypt(), dtn::data::DefaultSerializer::getLength(), main(), dtn::data::CustodySignalBlock::match(), operator<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), operator==(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::Registration::processIncomingBundle(), dtn::net::UDPConvergenceLayer::queue(), dtn::api::EventConnection::raiseEvent(), dtn::core::BundleCore::raiseEvent(), BundleStream::received(), dtn::data::CustodySignalBlock::setMatch(), dtn::security::PayloadIntegrityBlock::sign(), and dtn::core::FragmentManager::split().
PrimaryBlock::PRIORITY dtn::data::PrimaryBlock::getPriority | ( | ) | const |
Definition at line 58 of file PrimaryBlock.cpp.
References PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIORITY_BIT1, and PRIORITY_BIT2.
bool dtn::data::PrimaryBlock::isExpired | ( | ) | const |
This method is deprecated because it does not recognize the AgeBlock as alternative age verification.
Definition at line 141 of file PrimaryBlock.cpp.
References dtn::utils::Clock::isExpired(), lifetime, and timestamp.
bool dtn::data::PrimaryBlock::operator!= | ( | const PrimaryBlock & | other | ) | const |
Definition at line 95 of file PrimaryBlock.cpp.
bool dtn::data::PrimaryBlock::operator< | ( | const PrimaryBlock & | other | ) | const |
Definition at line 116 of file PrimaryBlock.cpp.
References FRAGMENT, fragmentoffset, get(), sequencenumber, source, and timestamp.
bool dtn::data::PrimaryBlock::operator== | ( | const PrimaryBlock & | other | ) | const |
Definition at line 100 of file PrimaryBlock.cpp.
References appdatalength, FRAGMENT, fragmentoffset, get(), sequencenumber, source, and timestamp.
bool dtn::data::PrimaryBlock::operator> | ( | const PrimaryBlock & | other | ) | const |
Definition at line 136 of file PrimaryBlock.cpp.
void dtn::data::PrimaryBlock::relabel | ( | ) |
relabel the primary block with a new sequence number and a timestamp
Definition at line 151 of file PrimaryBlock.cpp.
References dtn::utils::Clock::getTime(), dtn::utils::Clock::isBad(), sequencenumber, and timestamp.
Referenced by dtn::daemon::DTNTPWorker::callbackBundleReceived(), PrimaryBlock(), dtn::api::BinaryStreamClient::run(), and dtn::api::ExtendedApiHandler::run().
void dtn::data::PrimaryBlock::set | ( | FLAGS | flag, |
bool | value | ||
) |
Definition at line 48 of file PrimaryBlock.cpp.
References procflags, and dtn::data::Bitset< E >::setBit().
Referenced by BundleStreamBuf::__flush(), dtn::storage::BundleStorage::acceptCustody(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::utils::Utils::encapsule(), main(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::data::DefaultDeserializer::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::Registration::processIncomingBundle(), dtn::api::OrderedStreamHandler::put(), dtn::storage::BundleStorage::rejectCustody(), and dtn::core::FragmentManager::split().
void dtn::data::PrimaryBlock::setPriority | ( | PrimaryBlock::PRIORITY | p | ) |
Definition at line 73 of file PrimaryBlock.cpp.
References PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIORITY_BIT1, and PRIORITY_BIT2.
Referenced by main().
std::string dtn::data::PrimaryBlock::toString | ( | ) | const |
Definition at line 146 of file PrimaryBlock.cpp.
References dtn::data::BundleID::toString().
Referenced by dtn::data::Bundle::toString().
Number dtn::data::PrimaryBlock::appdatalength |
Definition at line 127 of file PrimaryBlock.h.
Referenced by dtn::data::DefaultSerializer::getLength(), dtn::data::CustodySignalBlock::match(), dtn::api::PlainSerializer::operator<<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), operator==(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::EventConnection::raiseEvent(), dtn::data::CustodySignalBlock::setMatch(), and dtn::core::FragmentManager::split().
EID dtn::data::PrimaryBlock::custodian |
Definition at line 132 of file PrimaryBlock.h.
Referenced by dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::data::DefaultSerializer::getLength(), dtn::data::DefaultSerializer::isCompressable(), main(), dtn::api::PlainSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::Registration::processIncomingBundle(), and dtn::storage::SimpleBundleStorage::store().
EID dtn::data::PrimaryBlock::destination |
Definition at line 130 of file PrimaryBlock.h.
Referenced by dtn::storage::BundleStorage::acceptCustody(), dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::net::FileConvergenceLayer::componentRun(), dtn::security::PayloadConfidentialBlock::encrypt(), dtn::storage::MemoryBundleStorage::getDistinctDestinations(), dtn::security::MutualSerializer::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::security::SecurityBlock::getSecurityDestination(), dtn::data::DefaultSerializer::isCompressable(), main(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::Registration::processIncomingBundle(), dtn::api::OrderedStreamHandler::put(), dtn::api::EventConnection::raiseEvent(), dtn::storage::BundleStorage::rejectCustody(), and dtn::security::PayloadIntegrityBlock::sign().
Number dtn::data::PrimaryBlock::fragmentoffset |
Definition at line 126 of file PrimaryBlock.h.
Referenced by dtn::security::PayloadConfidentialBlock::encrypt(), dtn::data::DefaultSerializer::getLength(), dtn::data::CustodySignalBlock::match(), operator<(), dtn::api::PlainSerializer::operator<<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), operator==(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::EventConnection::raiseEvent(), dtn::data::CustodySignalBlock::setMatch(), dtn::security::PayloadIntegrityBlock::sign(), and dtn::core::FragmentManager::split().
Number dtn::data::PrimaryBlock::lifetime |
Definition at line 125 of file PrimaryBlock.h.
Referenced by dtn::daemon::EchoWorker::callbackBundleReceived(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::utils::Utils::encapsule(), dtn::utils::Clock::getExpireTime(), dtn::data::DefaultSerializer::getLength(), dtn::utils::Clock::isExpired(), isExpired(), main(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::OrderedStreamHandler::put(), and dtn::api::EventConnection::raiseEvent().
Definition at line 122 of file PrimaryBlock.h.
Referenced by get(), dtn::data::DefaultSerializer::getLength(), main(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::EventConnection::raiseEvent(), and set().
EID dtn::data::PrimaryBlock::reportto |
Definition at line 131 of file PrimaryBlock.h.
Referenced by BundleStreamBuf::__flush(), dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::security::MutualSerializer::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::data::DefaultSerializer::isCompressable(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), and dtn::api::Registration::processIncomingBundle().
Number dtn::data::PrimaryBlock::sequencenumber |
Definition at line 124 of file PrimaryBlock.h.
Referenced by dtn::data::DefaultSerializer::getLength(), dtn::data::CustodySignalBlock::match(), operator<(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), operator==(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::EventConnection::raiseEvent(), relabel(), and dtn::data::CustodySignalBlock::setMatch().
EID dtn::data::PrimaryBlock::source |
Definition at line 129 of file PrimaryBlock.h.
Referenced by dtn::storage::BundleStorage::acceptCustody(), dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::security::BundleAuthenticationBlock::auth(), dtn::daemon::CapsuleWorker::callbackBundleReceived(), dtn::daemon::EchoWorker::callbackBundleReceived(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::security::PayloadConfidentialBlock::encrypt(), dtn::security::MutualSerializer::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::security::SecurityBlock::getSecuritySource(), dtn::data::DefaultSerializer::isCompressable(), main(), dtn::data::CustodySignalBlock::match(), operator<(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), operator==(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::Registration::processIncomingBundle(), dtn::api::OrderedStreamHandler::put(), dtn::api::EventConnection::raiseEvent(), dtn::core::BundleCore::raiseEvent(), dtn::storage::BundleStorage::rejectCustody(), dtn::data::CustodySignalBlock::setMatch(), and dtn::security::PayloadIntegrityBlock::sign().
Timestamp dtn::data::PrimaryBlock::timestamp |
Definition at line 123 of file PrimaryBlock.h.
Referenced by dtn::data::Bundle::Bundle(), dtn::utils::Utils::encapsule(), dtn::utils::Clock::getExpireTime(), dtn::data::DefaultSerializer::getLength(), dtn::utils::Clock::isExpired(), isExpired(), dtn::data::CustodySignalBlock::match(), operator<(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutualSerializer::operator<<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), operator==(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::Registration::processIncomingBundle(), dtn::api::EventConnection::raiseEvent(), relabel(), and dtn::data::CustodySignalBlock::setMatch().