IBR-DTNSuite 0.6

dtn::data::PrimaryBlock Class Reference

#include <PrimaryBlock.h>

Inheritance diagram for dtn::data::PrimaryBlock:
Collaboration diagram for dtn::data::PrimaryBlock:

List of all members.

Public Types

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

 PrimaryBlock ()
virtual ~PrimaryBlock ()
bool isExpired () const __attribute__((deprecated))
std::string toString () const
void set (FLAGS flag, bool value)
bool get (FLAGS flag) const
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

size_t _procflags
size_t _timestamp
size_t _sequencenumber
size_t _lifetime
size_t _fragmentoffset
size_t _appdatalength
EID _source
EID _destination
EID _reportto
EID _custodian

Friends

class DefaultSerializer
class DefaultDeserializer

Detailed Description

Definition at line 24 of file PrimaryBlock.h.


Member Enumeration Documentation

Enumerator:
FRAGMENT 
APPDATA_IS_ADMRECORD 
DONT_FRAGMENT 
CUSTODY_REQUESTED 
DESTINATION_IS_SINGLETON 
ACKOFAPP_REQUESTED 
RESERVED_6 
PRIORITY_BIT1 
PRIORITY_BIT2 
CLASSOFSERVICE_9 
CLASSOFSERVICE_10 
CLASSOFSERVICE_11 
CLASSOFSERVICE_12 
CLASSOFSERVICE_13 
REQUEST_REPORT_OF_BUNDLE_RECEPTION 
REQUEST_REPORT_OF_CUSTODY_ACCEPTANCE 
REQUEST_REPORT_OF_BUNDLE_FORWARDING 
REQUEST_REPORT_OF_BUNDLE_DELIVERY 
REQUEST_REPORT_OF_BUNDLE_DELETION 
STATUS_REPORT_REQUEST_19 
STATUS_REPORT_REQUEST_20 
DTNSEC_REQUEST_SIGN 
DTNSEC_REQUEST_ENCRYPT 
DTNSEC_STATUS_VERIFIED 
DTNSEC_STATUS_CONFIDENTIAL 
DTNSEC_STATUS_AUTHENTICATED 
IBRDTN_REQUEST_COMPRESSION 

Definition at line 30 of file PrimaryBlock.h.


Constructor & Destructor Documentation

dtn::data::PrimaryBlock::PrimaryBlock ( )

Definition at line 20 of file PrimaryBlock.cpp.

References relabel().

Referenced by dtn::data::Bundle::operator!=(), dtn::data::Bundle::operator<(), dtn::data::Bundle::operator==(), and dtn::data::Bundle::operator>().

Here is the call graph for this function:

dtn::data::PrimaryBlock::~PrimaryBlock ( ) [virtual]

Definition at line 26 of file PrimaryBlock.cpp.


Member Function Documentation

bool dtn::data::PrimaryBlock::isExpired ( ) const

This method is deprecated because it does not recognize the AgeBlock as alternative age verification.

Definition at line 90 of file PrimaryBlock.cpp.

References _lifetime, and _timestamp.

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

Definition at line 47 of file PrimaryBlock.cpp.

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

Definition at line 69 of file PrimaryBlock.cpp.

References _fragmentoffset, _sequencenumber, _source, _timestamp, FRAGMENT, and get().

Here is the call graph for this function:

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

Definition at line 52 of file PrimaryBlock.cpp.

References _appdatalength, _fragmentoffset, _sequencenumber, _source, _timestamp, FRAGMENT, and get().

Here is the call graph for this function:

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

Definition at line 85 of file PrimaryBlock.cpp.

void dtn::data::PrimaryBlock::relabel ( )

relabel the primary block with a new sequence number and a timestamp

Definition at line 110 of file PrimaryBlock.cpp.

References _sequencenumber, _timestamp, dtn::utils::Clock::badclock, and dtn::utils::Clock::getTime().

Referenced by PrimaryBlock(), and dtn::api::ClientHandler::run().

Here is the call graph for this function:

std::string dtn::data::PrimaryBlock::toString ( ) const

Reimplemented in dtn::data::Bundle.

Definition at line 95 of file PrimaryBlock.cpp.

References _destination, _fragmentoffset, _sequencenumber, _source, _timestamp, FRAGMENT, and dtn::data::EID::getString().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class DefaultDeserializer [friend]

Reimplemented in dtn::data::Bundle.

Definition at line 27 of file PrimaryBlock.h.

friend class DefaultSerializer [friend]

Reimplemented in dtn::data::Bundle.

Definition at line 26 of file PrimaryBlock.h.


Member Data Documentation


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