IBR-DTNSuite  0.12
dtn::data::Bundle Class Reference

#include <Bundle.h>

Inheritance diagram for dtn::data::Bundle:
Inheritance graph
Collaboration diagram for dtn::data::Bundle:
Collaboration graph

Classes

class  block_elem
 
class  NoSuchBlockFoundException
 

Public Types

typedef std::list< block_elemblock_list
 
typedef block_list::iterator iterator
 
typedef block_list::const_iterator const_iterator
 
typedef
ibrcommon::find_iterator
< iterator, block_t
find_iterator
 
typedef
ibrcommon::find_iterator
< const_iterator, block_t
const_find_iterator
 
- Public Types inherited from dtn::data::PrimaryBlock
enum  PRIORITY { PRIO_LOW = 0, PRIO_MEDIUM = 1, PRIO_HIGH = 2 }
 
enum  FLAGS {
  FRAGMENT = 1 << 0x00, APPDATA_IS_ADMRECORD = 1 << 0x01, DONT_FRAGMENT = 1 << 0x02, CUSTODY_REQUESTED = 1 << 0x03,
  DESTINATION_IS_SINGLETON = 1 << 0x04, ACKOFAPP_REQUESTED = 1 << 0x05, RESERVED_6 = 1 << 0x06, PRIORITY_BIT1 = 1 << 0x07,
  PRIORITY_BIT2 = 1 << 0x08, CLASSOFSERVICE_9 = 1 << 0x09, CLASSOFSERVICE_10 = 1 << 0x0A, CLASSOFSERVICE_11 = 1 << 0x0B,
  CLASSOFSERVICE_12 = 1 << 0x0C, CLASSOFSERVICE_13 = 1 << 0x0D, REQUEST_REPORT_OF_BUNDLE_RECEPTION = 1 << 0x0E, REQUEST_REPORT_OF_CUSTODY_ACCEPTANCE = 1 << 0x0F,
  REQUEST_REPORT_OF_BUNDLE_FORWARDING = 1 << 0x10, REQUEST_REPORT_OF_BUNDLE_DELIVERY = 1 << 0x11, REQUEST_REPORT_OF_BUNDLE_DELETION = 1 << 0x12, STATUS_REPORT_REQUEST_19 = 1 << 0x13,
  STATUS_REPORT_REQUEST_20 = 1 << 0x14, DTNSEC_REQUEST_SIGN = 1 << 0x1A, DTNSEC_REQUEST_ENCRYPT = 1 << 0x1B, DTNSEC_STATUS_VERIFIED = 1 << 0x1C,
  DTNSEC_STATUS_CONFIDENTIAL = 1 << 0x1D, DTNSEC_STATUS_AUTHENTICATED = 1 << 0x1E, IBRDTN_REQUEST_COMPRESSION = 1 << 0x1F
}
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator find (block_t blocktype)
 
const_iterator find (block_t blocktype) const
 
iterator find (const Block &block)
 
const_iterator find (const Block &block) const
 
 Bundle (bool zero_timestamp=false)
 
virtual ~Bundle ()
 
bool operator== (const BundleID &other) const
 
bool operator== (const MetaBundle &other) const
 
bool operator== (const Bundle &other) const
 
bool operator!= (const Bundle &other) const
 
bool operator< (const Bundle &other) const
 
bool operator> (const Bundle &other) const
 
template<class T >
T & find ()
 
template<class T >
const T & find () const
 
template<class T >
T & push_front ()
 
template<class T >
T & push_back ()
 
template<class T >
T & insert (iterator before)
 
dtn::data::PayloadBlockpush_front (ibrcommon::BLOB::Reference &ref)
 
dtn::data::PayloadBlockpush_back (ibrcommon::BLOB::Reference &ref)
 
dtn::data::PayloadBlockinsert (iterator before, ibrcommon::BLOB::Reference &ref)
 
dtn::data::Blockpush_front (ExtensionBlock::Factory &factory)
 
dtn::data::Blockpush_back (ExtensionBlock::Factory &factory)
 
dtn::data::Blockinsert (iterator before, ExtensionBlock::Factory &factory)
 
void erase (iterator it)
 
void erase (iterator begin, iterator end)
 
void remove (const Block &block)
 
void clear ()
 
Size size () const
 
bool allEIDsInCBHE () const
 
dtn::data::Length getPayloadLength () const
 
- Public Member Functions inherited from dtn::data::PrimaryBlock
 PrimaryBlock (bool zero_timestamp=false)
 
virtual ~PrimaryBlock ()
 
void set (FLAGS flag, bool value)
 
bool get (FLAGS flag) const
 
PRIORITY getPriority () const
 
void setPriority (PRIORITY p)
 
bool isFragment () const
 
void setFragment (bool val)
 
void relabel (bool zero_timestamp=false)
 
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 Member Functions inherited from dtn::data::BundleID
 BundleID ()
 
virtual ~BundleID ()
 
bool operator!= (const BundleID &other) const
 
bool operator== (const BundleID &other) const
 
bool operator< (const BundleID &other) const
 
bool operator> (const BundleID &other) const
 
 BundleID (const BundleID &id)
 
BundleIDoperator= (const BundleID &id)
 
std::string toString () const
 
virtual void setPayloadLength (const dtn::data::Length &value)
 
void addTo (ibrcommon::BloomFilter &bf) const
 
bool isIn (const ibrcommon::BloomFilter &bf) const
 
size_t raw (unsigned char *data, size_t len) const
 

Friends

class BundleBuilder
 

Additional Inherited Members

- Public Attributes inherited from dtn::data::PrimaryBlock
Bitset< FLAGSprocflags
 
Number lifetime
 
Number appdatalength
 
EID destination
 
EID reportto
 
EID custodian
 

Detailed Description

Definition at line 52 of file Bundle.h.

Member Typedef Documentation

Definition at line 74 of file Bundle.h.

typedef block_list::const_iterator dtn::data::Bundle::const_iterator

Definition at line 77 of file Bundle.h.

typedef block_list::iterator dtn::data::Bundle::iterator

Definition at line 76 of file Bundle.h.

Constructor & Destructor Documentation

dtn::data::Bundle::Bundle ( bool  zero_timestamp = false)

Definition at line 33 of file Bundle.cpp.

References dtn::data::BundleID::timestamp.

dtn::data::Bundle::~Bundle ( )
virtual

Definition at line 44 of file Bundle.cpp.

References clear().

Here is the call graph for this function:

Member Function Documentation

bool dtn::data::Bundle::allEIDsInCBHE ( ) const
Bundle::const_iterator dtn::data::Bundle::begin ( ) const

Definition at line 59 of file Bundle.cpp.

Bundle::const_iterator dtn::data::Bundle::end ( ) const

Definition at line 64 of file Bundle.cpp.

void dtn::data::Bundle::erase ( Bundle::iterator  b,
Bundle::iterator  e 
)

Definition at line 112 of file Bundle.cpp.

References end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

Bundle::const_iterator dtn::data::Bundle::find ( block_t  blocktype) const

Definition at line 302 of file Bundle.cpp.

References begin(), and end().

Here is the call graph for this function:

Bundle::iterator dtn::data::Bundle::find ( const Block block)

Definition at line 312 of file Bundle.cpp.

References begin(), and end().

Here is the call graph for this function:

Bundle::const_iterator dtn::data::Bundle::find ( const Block block) const

Definition at line 322 of file Bundle.cpp.

References begin(), and end().

Here is the call graph for this function:

template<class T >
T & dtn::data::Bundle::find ( )

Definition at line 145 of file Bundle.h.

References end().

Referenced by find().

Here is the call graph for this function:

template<class T >
const T & dtn::data::Bundle::find ( ) const

Definition at line 153 of file Bundle.h.

References end(), and find().

Here is the call graph for this function:

dtn::data::Length dtn::data::Bundle::getPayloadLength ( ) const
virtual

Reimplemented from dtn::data::BundleID.

Definition at line 292 of file Bundle.cpp.

References dtn::data::PayloadBlock::getLength().

Here is the call graph for this function:

dtn::data::PayloadBlock & dtn::data::Bundle::insert ( iterator  before,
ibrcommon::BLOB::Reference ref 
)

Definition at line 144 of file Bundle.cpp.

References end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

Block & dtn::data::Bundle::insert ( iterator  before,
ExtensionBlock::Factory factory 
)

Definition at line 238 of file Bundle.cpp.

References dtn::data::ExtensionBlock::Factory::create(), end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

bool dtn::data::Bundle::operator!= ( const Bundle other) const

Definition at line 79 of file Bundle.cpp.

bool dtn::data::Bundle::operator< ( const Bundle other) const

Definition at line 89 of file Bundle.cpp.

bool dtn::data::Bundle::operator== ( const BundleID other) const

Definition at line 69 of file Bundle.cpp.

bool dtn::data::Bundle::operator== ( const MetaBundle other) const

Definition at line 74 of file Bundle.cpp.

bool dtn::data::Bundle::operator== ( const Bundle other) const

Definition at line 84 of file Bundle.cpp.

bool dtn::data::Bundle::operator> ( const Bundle other) const

Definition at line 94 of file Bundle.cpp.

dtn::data::PayloadBlock & dtn::data::Bundle::push_back ( ibrcommon::BLOB::Reference ref)

Definition at line 184 of file Bundle.cpp.

References end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

dtn::data::Block & dtn::data::Bundle::push_back ( ExtensionBlock::Factory factory)

Definition at line 220 of file Bundle.cpp.

References dtn::data::ExtensionBlock::Factory::create(), end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

dtn::data::PayloadBlock & dtn::data::Bundle::push_front ( ibrcommon::BLOB::Reference ref)

Definition at line 166 of file Bundle.cpp.

References end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

dtn::data::Block & dtn::data::Bundle::push_front ( ExtensionBlock::Factory factory)

Definition at line 203 of file Bundle.cpp.

References dtn::data::ExtensionBlock::Factory::create(), end(), dtn::data::Block::LAST_BLOCK, and size().

Here is the call graph for this function:

void dtn::data::Bundle::remove ( const Block block)

Definition at line 99 of file Bundle.cpp.

References begin(), end(), and erase().

Referenced by dtn::security::PayloadConfidentialBlock::decrypt(), dtn::security::SecurityBlock::decryptBlock(), and dtn::data::CompressedPayloadBlock::extract().

Here is the call graph for this function:

Size dtn::data::Bundle::size ( ) const

Friends And Related Function Documentation

friend class BundleBuilder
friend

Definition at line 54 of file Bundle.h.


The documentation for this class was generated from the following files: