dtn::Bundle Class Reference

The internal representation of a bundle. More...

#include <Bundle.h>

Inheritance diagram for dtn::Bundle:

dtn::TempBundle

List of all members.

Public Types

enum  priority_values_t {
  COS_INVALID = -1, COS_BULK = 0, COS_NORMAL = 1, COS_EXPEDITED = 2,
  COS_RESERVED = 3
}
 Values for the bundle priority field. More...

Public Member Functions

 Bundle (BundlePayload::location_t location=BundlePayload::DISK)
 Default constructor to create an empty bundle, initializing all fields to defaults and allocating a new bundle id.
 Bundle (const oasys::Builder &)
 Constructor when re-reading the database.
virtual ~Bundle ()
 Bundle destructor.
void copy_metadata (Bundle *new_bundle) const
 Copy the metadata from one bundle to another (used in fragmentation).
int format (char *buf, size_t sz) const
 Virtual from formatter.
void format_verbose (oasys::StringBuffer *buf)
 Virtual from formatter.
void serialize (oasys::SerializeAction *a)
 Virtual from SerializableObject.
u_int32_t durable_key ()
 Hook for the generic durable table implementation to know what the key is for the database.
size_t durable_size ()
 Hook for the bundle store implementation to count the storage impact of this bundle.
int refcount ()
 Return the bundle's reference count, corresponding to the number of entries in the mappings set, i.e.
int add_ref (const char *what1, const char *what2="")
 Bump up the reference count.
int del_ref (const char *what1, const char *what2="")
 Decrement the reference count.
size_t num_mappings ()
 Return the number of mappings for this bundle.
BundleMappingsmappings ()
 Return a pointer to the mappings.
bool is_queued_on (const BundleList *l)
 Return true if the bundle is on the given list.
bool validate (oasys::StringBuffer *errbuf)
 Validate the bundle's fields.
bool receipt_requested () const
 True if any return receipt fields are set.
u_int32_t bundleid () const
 Accessors.
oasys::Lock * lock () const
 Accessors.
bool expired () const
 Accessors.
const EndpointIDsource () const
 Accessors.
const EndpointIDdest () const
 Accessors.
const EndpointIDcustodian () const
 Accessors.
const EndpointIDreplyto () const
 Accessors.
const EndpointIDprevhop () const
 Accessors.
bool is_fragment () const
 Accessors.
bool is_admin () const
 Accessors.
bool do_not_fragment () const
 Accessors.
bool custody_requested () const
 Accessors.
bool singleton_dest () const
 Accessors.
u_int8_t priority () const
 Accessors.
bool receive_rcpt () const
 Accessors.
bool custody_rcpt () const
 Accessors.
bool forward_rcpt () const
 Accessors.
bool delivery_rcpt () const
 Accessors.
bool deletion_rcpt () const
 Accessors.
bool app_acked_rcpt () const
 Accessors.
u_int32_t expiration () const
 Accessors.
u_int32_t frag_offset () const
 Accessors.
u_int32_t orig_length () const
 Accessors.
bool in_datastore () const
 Accessors.
bool local_custody () const
 Accessors.
const std::string & owner () const
 Accessors.
bool fragmented_incoming () const
 Accessors.
const SequenceIDsequence_id () const
 Accessors.
const SequenceIDobsoletes_id () const
 Accessors.
const EndpointIDsession_eid () const
 Accessors.
u_int8_t session_flags () const
 Accessors.
const BundlePayloadpayload () const
 Accessors.
const ForwardingLogfwdlog () const
 Accessors.
const BundleTimestampcreation_ts () const
 Accessors.
const BundleTimestampextended_id () const
 Accessors.
const BlockInfoVecrecv_blocks () const
 Accessors.
const MetadataVecrecv_metadata () const
 Accessors.
const LinkMetadataSetgenerated_metadata () const
 Accessors.
EndpointIDmutable_source ()
 Setters and mutable accessors.
EndpointIDmutable_dest ()
 Setters and mutable accessors.
EndpointIDmutable_replyto ()
 Setters and mutable accessors.
EndpointIDmutable_custodian ()
 Setters and mutable accessors.
EndpointIDmutable_prevhop ()
 Setters and mutable accessors.
void set_is_fragment (bool t)
 Setters and mutable accessors.
void set_is_admin (bool t)
 Setters and mutable accessors.
void set_do_not_fragment (bool t)
 Setters and mutable accessors.
void set_custody_requested (bool t)
 Setters and mutable accessors.
void set_singleton_dest (bool t)
 Setters and mutable accessors.
void set_priority (u_int8_t p)
 Setters and mutable accessors.
void set_receive_rcpt (bool t)
 Setters and mutable accessors.
void set_custody_rcpt (bool t)
 Setters and mutable accessors.
void set_forward_rcpt (bool t)
 Setters and mutable accessors.
void set_delivery_rcpt (bool t)
 Setters and mutable accessors.
void set_deletion_rcpt (bool t)
 Setters and mutable accessors.
void set_app_acked_rcpt (bool t)
 Setters and mutable accessors.
void set_expiration (u_int32_t e)
 Setters and mutable accessors.
void set_frag_offset (u_int32_t o)
 Setters and mutable accessors.
void set_orig_length (u_int32_t l)
 Setters and mutable accessors.
void set_in_datastore (bool t)
 Setters and mutable accessors.
void set_local_custody (bool t)
 Setters and mutable accessors.
void set_owner (const std::string &s)
 Setters and mutable accessors.
void set_fragmented_incoming (bool t)
 Setters and mutable accessors.
void set_creation_ts (const BundleTimestamp &ts)
 Setters and mutable accessors.
SequenceIDmutable_sequence_id ()
 Setters and mutable accessors.
SequenceIDmutable_obsoletes_id ()
 Setters and mutable accessors.
EndpointIDmutable_session_eid ()
 Setters and mutable accessors.
void set_session_flags (u_int8_t f)
 Setters and mutable accessors.
void test_set_bundleid (u_int32_t id)
 Setters and mutable accessors.
BundlePayloadmutable_payload ()
 Setters and mutable accessors.
ForwardingLogfwdlog ()
 Setters and mutable accessors.
ExpirationTimerexpiration_timer ()
 Setters and mutable accessors.
CustodyTimerVeccustody_timers ()
 Setters and mutable accessors.
BlockInfoVecapi_blocks ()
 Setters and mutable accessors.
LinkBlockSetxmit_blocks ()
 Setters and mutable accessors.
BlockInfoVecmutable_recv_blocks ()
 Setters and mutable accessors.
MetadataVecmutable_recv_metadata ()
 Setters and mutable accessors.
LinkMetadataSetmutable_generated_metadata ()
 Setters and mutable accessors.
void set_expiration_timer (ExpirationTimer *e)
 Setters and mutable accessors.

Static Public Member Functions

static const char * prioritytoa (u_int8_t priority)
 Pretty printer function for bundle_priority_t.

Private Member Functions

void init (u_int32_t id)
 Initialization helper function.

Private Attributes

EndpointID source_
 Source eid.
EndpointID dest_
 Destination eid.
EndpointID custodian_
 Current custodian eid.
EndpointID replyto_
 Reply-To eid.
EndpointID prevhop_
 Previous hop eid.
bool is_fragment_
 Fragmentary Bundle.
bool is_admin_
 Administrative record bundle.
bool do_not_fragment_
 Bundle shouldn't be fragmented.
bool custody_requested_
 Custody requested.
bool singleton_dest_
 Destination endpoint is a singleton.
u_int8_t priority_
 Bundle priority.
bool receive_rcpt_
 Hop by hop reception receipt.
bool custody_rcpt_
 Custody xfer reporting.
bool forward_rcpt_
 Hop by hop forwarding reporting.
bool delivery_rcpt_
 End-to-end delivery reporting.
bool deletion_rcpt_
 Bundle deletion reporting.
bool app_acked_rcpt_
 Acknowlege by application reporting.
BundleTimestamp creation_ts_
 Creation timestamp.
u_int32_t expiration_
 Bundle expiration time.
u_int32_t frag_offset_
 Offset of fragment in original bundle.
u_int32_t orig_length_
 Length of original bundle.
SequenceID sequence_id_
 Sequence id vector.
SequenceID obsoletes_id_
 Obsoletes id vector.
EndpointID session_eid_
 Session eid.
u_int8_t session_flags_
 Session flags.
BundlePayload payload_
 Reference to the payload.
u_int32_t bundleid_
 Local bundle identifier.
oasys::SpinLock lock_
 Lock for bundle data that can be updated by multiple threads.
bool in_datastore_
 Is bundle in persistent store.
bool local_custody_
 Does local node have custody.
std::string owner_
 Declared entity that "owns" this bundle, which could be empty.
BundleTimestamp extended_id_
 Identifier for external routers to refer to duplicate bundles.
ForwardingLog fwdlog_
 Log of bundle forwarding records.
ExpirationTimerexpiration_timer_
 The expiration timer.
CustodyTimerVec custody_timers_
 Live custody timers for the bundle.
bool fragmented_incoming_
 Is the bundle an incoming reactive fragment.
BlockInfoVec recv_blocks_
 BP blocks as arrived off the wire.
BlockInfoVec api_blocks_
 BP blocks given from local API.
LinkBlockSet xmit_blocks_
 Block vector for each link.
MetadataVec recv_metadata_
 Metadata as arrived in bundle.
LinkMetadataSet generated_metadata_
 Metadata to be in bundle.
BundleMappings mappings_
 The set of BundleLists that contain the Bundle.
int refcount_
 Bundle reference count.
bool freed_
 Bit indicating whether a bundle free event has been posted.


Detailed Description

The internal representation of a bundle.

Bundles are reference counted, with references generally correlating one-to-one with each BundleList on which the Bundle resides.

However, although the push() methods of the BundleList always add a reference and a backpointer to the bundle, the pop() methods do not decremente the reference count. This means that the caller must explicitly remove it when done with the bundle.

Note that delref() will delete the Bundle when the reference count reaches zero, so care must be taken to never use the pointer after that point.

The Bundle class maintains a set of back-pointers to each BundleList it is contained on, and list addition/removal methods maintain the invariant that the entiries of this set correlate exactly with the list pointers.

Definition at line 66 of file bundling/Bundle.h.


Member Enumeration Documentation

Values for the bundle priority field.

Enumerator:
COS_INVALID  invalid
COS_BULK  lowest priority
COS_NORMAL  regular priority
COS_EXPEDITED  important
COS_RESERVED  TBD.

Definition at line 180 of file bundling/Bundle.h.


Constructor & Destructor Documentation

dtn::Bundle::Bundle ( BundlePayload::location_t  location = BundlePayload::DISK  ) 

Default constructor to create an empty bundle, initializing all fields to defaults and allocating a new bundle id.

For temporary bundles, the location can be set to MEMORY, and to support the simulator, the location can be overridden to be BundlePayload::NODATA.

Definition at line 77 of file Bundle.cc.

References expiration_timer_, freed_, dtn::BundlePayload::init(), init(), dtn::GlobalStore::instance(), dtn::GlobalStore::next_bundleid(), payload_, and refcount_.

dtn::Bundle::Bundle ( const oasys::Builder &   ) 

Constructor when re-reading the database.

Definition at line 90 of file Bundle.cc.

References expiration_timer_, freed_, init(), and refcount_.

dtn::Bundle::~Bundle (  )  [virtual]

Bundle destructor.

Definition at line 105 of file Bundle.cc.

References ASSERT, bundleid_, expiration_timer_, and mappings_.


Member Function Documentation

int dtn::Bundle::add_ref ( const char *  what1,
const char *  what2 = "" 
)

Bump up the reference count.

Parameters are used for logging.

Returns:
the new reference count

Definition at line 286 of file Bundle.cc.

References ASSERT, bundleid_, freed_, lock_, mappings_, and refcount_.

Referenced by dtn::BundleList::add_bundle().

BlockInfoVec* dtn::Bundle::api_blocks (  )  [inline]

Setters and mutable accessors.

Definition at line 276 of file bundling/Bundle.h.

References api_blocks_.

Referenced by dtn::BundleProtocol::prepare_blocks().

bool dtn::Bundle::app_acked_rcpt (  )  const [inline]

u_int32_t dtn::Bundle::bundleid (  )  const [inline]

void dtn::Bundle::copy_metadata ( Bundle new_bundle  )  const

const BundleTimestamp& dtn::Bundle::creation_ts (  )  const [inline]

const EndpointID& dtn::Bundle::custodian (  )  const [inline]

bool dtn::Bundle::custody_rcpt (  )  const [inline]

bool dtn::Bundle::custody_requested (  )  const [inline]

CustodyTimerVec* dtn::Bundle::custody_timers (  )  [inline]

int dtn::Bundle::del_ref ( const char *  what1,
const char *  what2 = "" 
)

Decrement the reference count.

Parameters are used for logging.

If the reference count becomes zero, the bundle is deleted.

Returns:
the new reference count

Definition at line 307 of file Bundle.cc.

References bundleid_, freed_, lock_, mappings_, and refcount_.

Referenced by dtn::BundleList::erase(), dtn::BundleList::pop_back(), and dtn::BundleList::pop_front().

bool dtn::Bundle::deletion_rcpt (  )  const [inline]

bool dtn::Bundle::delivery_rcpt (  )  const [inline]

const EndpointID& dtn::Bundle::dest (  )  const [inline]

bool dtn::Bundle::do_not_fragment (  )  const [inline]

u_int32_t dtn::Bundle::durable_key (  )  [inline]

Hook for the generic durable table implementation to know what the key is for the database.

Definition at line 114 of file bundling/Bundle.h.

References bundleid_.

size_t dtn::Bundle::durable_size (  )  [inline]

Hook for the bundle store implementation to count the storage impact of this bundle.

Currently just returns the payload length but should be extended to include the metadata as well.

Definition at line 121 of file bundling/Bundle.h.

References dtn::BundlePayload::length(), and payload_.

Referenced by dtn::BundleStore::add(), dtn::BundleStore::del(), and dtn::BundleDaemon::load_bundles().

u_int32_t dtn::Bundle::expiration (  )  const [inline]

ExpirationTimer* dtn::Bundle::expiration_timer (  )  [inline]

Setters and mutable accessors.

Definition at line 274 of file bundling/Bundle.h.

References expiration_timer_.

Referenced by dtn::BundleDaemon::add_to_pending().

bool dtn::Bundle::expired (  )  const [inline]

Accessors.

Definition at line 203 of file bundling/Bundle.h.

References expiration_timer_.

Referenced by dtn::TableBasedRouter::handle_bundle_cancelled().

const BundleTimestamp& dtn::Bundle::extended_id (  )  const [inline]

Accessors.

Definition at line 235 of file bundling/Bundle.h.

References extended_id_.

int dtn::Bundle::format ( char *  buf,
size_t  sz 
) const

void dtn::Bundle::format_verbose ( oasys::StringBuffer *  buf  ) 

bool dtn::Bundle::forward_rcpt (  )  const [inline]

u_int32_t dtn::Bundle::frag_offset (  )  const [inline]

bool dtn::Bundle::fragmented_incoming (  )  const [inline]

Accessors.

Definition at line 227 of file bundling/Bundle.h.

References fragmented_incoming_.

Referenced by dtn::BundleProtocol::prepare_blocks(), and dtn::BundleProtocol::validate().

ForwardingLog* dtn::Bundle::fwdlog (  )  [inline]

Setters and mutable accessors.

Definition at line 273 of file bundling/Bundle.h.

References fwdlog_.

const ForwardingLog* dtn::Bundle::fwdlog (  )  const [inline]

const LinkMetadataSet& dtn::Bundle::generated_metadata (  )  const [inline]

Accessors.

Definition at line 238 of file bundling/Bundle.h.

References generated_metadata_.

Referenced by dtn::MetadataBlockProcessor::prepare_generated_metadata().

bool dtn::Bundle::in_datastore (  )  const [inline]

Accessors.

Definition at line 224 of file bundling/Bundle.h.

References in_datastore_.

Referenced by dtn::BundleDaemon::handle_bundle_free().

void dtn::Bundle::init ( u_int32_t  id  )  [private]

bool dtn::Bundle::is_admin (  )  const [inline]

bool dtn::Bundle::is_fragment (  )  const [inline]

bool dtn::Bundle::is_queued_on ( const BundleList l  ) 

Return true if the bundle is on the given list.

Definition at line 358 of file Bundle.cc.

References dtn::BundleMappings::contains(), lock_, and mappings_.

Referenced by dtn::BundleList::add_bundle(), dtn::BundleList::contains(), dtn::BundleDaemon::delete_bundle(), and dtn::TableBasedRouter::fwd_to_nexthop().

bool dtn::Bundle::local_custody (  )  const [inline]

oasys::Lock* dtn::Bundle::lock (  )  const [inline]

BundleMappings * dtn::Bundle::mappings (  ) 

Return a pointer to the mappings.

Requires that the bundle be locked.

Definition at line 348 of file Bundle.cc.

References lock_, and mappings_.

Referenced by dtn::BundleList::add_bundle(), dtn::BundleList::del_bundle(), and dtn::BundleList::erase().

EndpointID* dtn::Bundle::mutable_custodian (  )  [inline]

EndpointID* dtn::Bundle::mutable_dest (  )  [inline]

LinkMetadataSet* dtn::Bundle::mutable_generated_metadata (  )  [inline]

Setters and mutable accessors.

Definition at line 280 of file bundling/Bundle.h.

References generated_metadata_.

Referenced by dtn::MetadataBlockProcessor::delete_generated_metadata().

SequenceID* dtn::Bundle::mutable_obsoletes_id (  )  [inline]

Setters and mutable accessors.

Definition at line 268 of file bundling/Bundle.h.

References obsoletes_id_.

Referenced by dtn::SequenceIDBlockProcessor::consume().

BundlePayload* dtn::Bundle::mutable_payload (  )  [inline]

EndpointID* dtn::Bundle::mutable_prevhop (  )  [inline]

Setters and mutable accessors.

Definition at line 246 of file bundling/Bundle.h.

References prevhop_.

Referenced by dtn::PreviousHopBlockProcessor::consume(), and dtn::BundleDaemon::handle_bundle_received().

BlockInfoVec* dtn::Bundle::mutable_recv_blocks (  )  [inline]

MetadataVec* dtn::Bundle::mutable_recv_metadata (  )  [inline]

Setters and mutable accessors.

Definition at line 279 of file bundling/Bundle.h.

References recv_metadata_.

Referenced by dtn::MetadataBlockProcessor::parse_metadata().

EndpointID* dtn::Bundle::mutable_replyto (  )  [inline]

SequenceID* dtn::Bundle::mutable_sequence_id (  )  [inline]

Setters and mutable accessors.

Definition at line 267 of file bundling/Bundle.h.

References sequence_id_.

Referenced by dtn::SequenceIDBlockProcessor::consume(), and dtn::TableBasedRouter::subscribe_to_session().

EndpointID* dtn::Bundle::mutable_session_eid (  )  [inline]

Setters and mutable accessors.

Definition at line 269 of file bundling/Bundle.h.

References session_eid_.

Referenced by dtn::SessionBlockProcessor::consume(), and dtn::TableBasedRouter::subscribe_to_session().

EndpointID* dtn::Bundle::mutable_source (  )  [inline]

size_t dtn::Bundle::num_mappings (  ) 

Return the number of mappings for this bundle.

Definition at line 340 of file Bundle.cc.

References lock_, and mappings_.

const SequenceID& dtn::Bundle::obsoletes_id (  )  const [inline]

u_int32_t dtn::Bundle::orig_length (  )  const [inline]

const std::string& dtn::Bundle::owner (  )  const [inline]

Accessors.

Definition at line 226 of file bundling/Bundle.h.

References owner_.

Referenced by dtn::TcaRouter::fwd_to_matching_r().

const BundlePayload& dtn::Bundle::payload (  )  const [inline]

const EndpointID& dtn::Bundle::prevhop (  )  const [inline]

u_int8_t dtn::Bundle::priority (  )  const [inline]

Accessors.

Definition at line 214 of file bundling/Bundle.h.

References priority_.

Referenced by dtn::PrimaryBlockProcessor::format_cos_flags().

static const char* dtn::Bundle::prioritytoa ( u_int8_t  priority  )  [inline, static]

Pretty printer function for bundle_priority_t.

Definition at line 191 of file bundling/Bundle.h.

References COS_BULK, COS_EXPEDITED, and COS_NORMAL.

bool dtn::Bundle::receipt_requested (  )  const [inline]

True if any return receipt fields are set.

Definition at line 171 of file bundling/Bundle.h.

References custody_rcpt_, deletion_rcpt_, delivery_rcpt_, forward_rcpt_, and receive_rcpt_.

Referenced by dtn::BundleCommand::exec(), and dtn::PrimaryBlockProcessor::validate().

bool dtn::Bundle::receive_rcpt (  )  const [inline]

const BlockInfoVec& dtn::Bundle::recv_blocks (  )  const [inline]

const MetadataVec& dtn::Bundle::recv_metadata (  )  const [inline]

int dtn::Bundle::refcount (  )  [inline]

Return the bundle's reference count, corresponding to the number of entries in the mappings set, i.e.

the number of BundleLists that have a reference to this bundle, as well as any other scopes that are processing the bundle.

Definition at line 129 of file bundling/Bundle.h.

References refcount_.

Referenced by dtn::BundleDaemon::handle_bundle_free().

const EndpointID& dtn::Bundle::replyto (  )  const [inline]

const SequenceID& dtn::Bundle::sequence_id (  )  const [inline]

void dtn::Bundle::serialize ( oasys::SerializeAction *  a  ) 

const EndpointID& dtn::Bundle::session_eid (  )  const [inline]

u_int8_t dtn::Bundle::session_flags (  )  const [inline]

void dtn::Bundle::set_app_acked_rcpt ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 258 of file bundling/Bundle.h.

References app_acked_rcpt_.

Referenced by dtn::PrimaryBlockProcessor::parse_bundle_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_creation_ts ( const BundleTimestamp ts  )  [inline]

Setters and mutable accessors.

Definition at line 266 of file bundling/Bundle.h.

References creation_ts_.

Referenced by dtn::PrimaryBlockProcessor::consume(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_custody_rcpt ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 254 of file bundling/Bundle.h.

References custody_rcpt_.

Referenced by dtn::BundleCommand::exec(), dtn::PrimaryBlockProcessor::parse_srr_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_custody_requested ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 250 of file bundling/Bundle.h.

References custody_requested_.

Referenced by dtn::BundleCommand::exec(), dtn::PrimaryBlockProcessor::parse_bundle_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_deletion_rcpt ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 257 of file bundling/Bundle.h.

References deletion_rcpt_.

Referenced by dtn::BundleCommand::exec(), dtn::PrimaryBlockProcessor::parse_srr_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_delivery_rcpt ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 256 of file bundling/Bundle.h.

References delivery_rcpt_.

Referenced by dtn::BundleCommand::exec(), dtn::PrimaryBlockProcessor::parse_srr_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_do_not_fragment ( bool  t  )  [inline]

void dtn::Bundle::set_expiration ( u_int32_t  e  )  [inline]

void dtn::Bundle::set_expiration_timer ( ExpirationTimer e  )  [inline]

Setters and mutable accessors.

Definition at line 283 of file bundling/Bundle.h.

References expiration_timer_.

Referenced by dtn::BundleDaemon::add_to_pending().

void dtn::Bundle::set_forward_rcpt ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 255 of file bundling/Bundle.h.

References forward_rcpt_.

Referenced by dtn::BundleCommand::exec(), dtn::PrimaryBlockProcessor::parse_srr_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_frag_offset ( u_int32_t  o  )  [inline]

void dtn::Bundle::set_fragmented_incoming ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 265 of file bundling/Bundle.h.

References fragmented_incoming_.

Referenced by dtn::FragmentManager::try_to_convert_to_fragment().

void dtn::Bundle::set_in_datastore ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 262 of file bundling/Bundle.h.

References in_datastore_.

Referenced by dtn::BundleDaemon::add_to_pending(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_is_admin ( bool  t  )  [inline]

void dtn::Bundle::set_is_fragment ( bool  t  )  [inline]

void dtn::Bundle::set_local_custody ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 263 of file bundling/Bundle.h.

References local_custody_.

Referenced by dtn::BundleDaemon::accept_custody(), dtn::BundleDaemon::release_custody(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_orig_length ( u_int32_t  l  )  [inline]

void dtn::Bundle::set_owner ( const std::string &  s  )  [inline]

Setters and mutable accessors.

Definition at line 264 of file bundling/Bundle.h.

References owner_.

void dtn::Bundle::set_priority ( u_int8_t  p  )  [inline]

Setters and mutable accessors.

Definition at line 252 of file bundling/Bundle.h.

References priority_.

Referenced by dtn::BundleDaemon::handle_bundle_inject(), dtn::PrimaryBlockProcessor::parse_cos_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_receive_rcpt ( bool  t  )  [inline]

Setters and mutable accessors.

Definition at line 253 of file bundling/Bundle.h.

References receive_rcpt_.

Referenced by dtn::BundleCommand::exec(), dtn::PrimaryBlockProcessor::parse_srr_flags(), and dtnsim::TrAgent::send_bundle().

void dtn::Bundle::set_session_flags ( u_int8_t  f  )  [inline]

Setters and mutable accessors.

Definition at line 270 of file bundling/Bundle.h.

References session_flags_.

Referenced by dtn::SessionBlockProcessor::consume(), and dtn::TableBasedRouter::subscribe_to_session().

void dtn::Bundle::set_singleton_dest ( bool  t  )  [inline]

bool dtn::Bundle::singleton_dest (  )  const [inline]

Accessors.

Definition at line 213 of file bundling/Bundle.h.

References singleton_dest_.

Referenced by dtn::PrimaryBlockProcessor::format_bundle_flags(), and dtn::BundleRouter::should_fwd().

const EndpointID& dtn::Bundle::source (  )  const [inline]

void dtn::Bundle::test_set_bundleid ( u_int32_t  id  )  [inline]

Setters and mutable accessors.

Definition at line 271 of file bundling/Bundle.h.

References bundleid_.

bool dtn::Bundle::validate ( oasys::StringBuffer *  errbuf  ) 

Validate the bundle's fields.

Definition at line 366 of file Bundle.cc.

References dtn::EndpointID::c_str(), custodian_, dest_, replyto_, source_, and dtn::EndpointID::valid().

Referenced by dtn::BundleCommand::exec().

LinkBlockSet* dtn::Bundle::xmit_blocks (  )  [inline]


Member Data Documentation

BP blocks given from local API.

Definition at line 340 of file bundling/Bundle.h.

Referenced by api_blocks(), format_verbose(), and serialize().

Acknowlege by application reporting.

Definition at line 309 of file bundling/Bundle.h.

Referenced by app_acked_rcpt(), copy_metadata(), format_verbose(), init(), serialize(), and set_app_acked_rcpt().

u_int32_t dtn::Bundle::bundleid_ [private]

Creation timestamp.

Definition at line 310 of file bundling/Bundle.h.

Referenced by copy_metadata(), creation_ts(), format_verbose(), init(), serialize(), and set_creation_ts().

Current custodian eid.

Definition at line 295 of file bundling/Bundle.h.

Referenced by copy_metadata(), custodian(), format_verbose(), mutable_custodian(), serialize(), and validate().

Custody xfer reporting.

Definition at line 305 of file bundling/Bundle.h.

Referenced by copy_metadata(), custody_rcpt(), format_verbose(), init(), receipt_requested(), serialize(), and set_custody_rcpt().

Custody requested.

Definition at line 301 of file bundling/Bundle.h.

Referenced by copy_metadata(), custody_requested(), format_verbose(), init(), serialize(), and set_custody_requested().

Live custody timers for the bundle.

Definition at line 335 of file bundling/Bundle.h.

Referenced by custody_timers().

End-to-end delivery reporting.

Definition at line 307 of file bundling/Bundle.h.

Referenced by copy_metadata(), delivery_rcpt(), format_verbose(), init(), receipt_requested(), serialize(), and set_delivery_rcpt().

Destination eid.

Definition at line 294 of file bundling/Bundle.h.

Referenced by copy_metadata(), dest(), format(), format_verbose(), mutable_dest(), serialize(), and validate().

Bundle shouldn't be fragmented.

Definition at line 300 of file bundling/Bundle.h.

Referenced by copy_metadata(), do_not_fragment(), format_verbose(), init(), serialize(), and set_do_not_fragment().

u_int32_t dtn::Bundle::expiration_ [private]

Bundle expiration time.

Definition at line 311 of file bundling/Bundle.h.

Referenced by copy_metadata(), expiration(), format_verbose(), init(), serialize(), and set_expiration().

The expiration timer.

Definition at line 334 of file bundling/Bundle.h.

Referenced by Bundle(), expiration_timer(), expired(), set_expiration_timer(), and ~Bundle().

Identifier for external routers to refer to duplicate bundles.

Definition at line 331 of file bundling/Bundle.h.

Referenced by extended_id(), init(), and serialize().

Hop by hop forwarding reporting.

Definition at line 306 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), forward_rcpt(), init(), receipt_requested(), serialize(), and set_forward_rcpt().

u_int32_t dtn::Bundle::frag_offset_ [private]

Offset of fragment in original bundle.

Definition at line 312 of file bundling/Bundle.h.

Referenced by format(), format_verbose(), frag_offset(), init(), serialize(), and set_frag_offset().

Is the bundle an incoming reactive fragment.

Definition at line 336 of file bundling/Bundle.h.

Referenced by fragmented_incoming(), init(), and set_fragmented_incoming().

Bit indicating whether a bundle free event has been posted.

Definition at line 350 of file bundling/Bundle.h.

Referenced by add_ref(), Bundle(), and del_ref().

Log of bundle forwarding records.

Definition at line 333 of file bundling/Bundle.h.

Referenced by format_verbose(), and fwdlog().

Metadata to be in bundle.

Definition at line 344 of file bundling/Bundle.h.

Referenced by generated_metadata(), and mutable_generated_metadata().

Is bundle in persistent store.

Definition at line 327 of file bundling/Bundle.h.

Referenced by in_datastore(), init(), serialize(), and set_in_datastore().

Administrative record bundle.

Definition at line 299 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), init(), is_admin(), serialize(), and set_is_admin().

Fragmentary Bundle.

Definition at line 298 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), init(), is_fragment(), serialize(), and set_is_fragment().

Does local node have custody.

Definition at line 328 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), init(), local_custody(), serialize(), and set_local_custody().

oasys::SpinLock dtn::Bundle::lock_ [mutable, private]

Lock for bundle data that can be updated by multiple threads.

Definition at line 325 of file bundling/Bundle.h.

Referenced by add_ref(), del_ref(), format_verbose(), is_queued_on(), lock(), mappings(), and num_mappings().

The set of BundleLists that contain the Bundle.

Definition at line 346 of file bundling/Bundle.h.

Referenced by add_ref(), del_ref(), format_verbose(), is_queued_on(), mappings(), num_mappings(), and ~Bundle().

Obsoletes id vector.

Definition at line 315 of file bundling/Bundle.h.

Referenced by format_verbose(), mutable_obsoletes_id(), and obsoletes_id().

u_int32_t dtn::Bundle::orig_length_ [private]

Length of original bundle.

Definition at line 313 of file bundling/Bundle.h.

Referenced by format(), format_verbose(), init(), orig_length(), serialize(), and set_orig_length().

std::string dtn::Bundle::owner_ [private]

Declared entity that "owns" this bundle, which could be empty.

Definition at line 329 of file bundling/Bundle.h.

Referenced by init(), owner(), serialize(), and set_owner().

Previous hop eid.

Definition at line 297 of file bundling/Bundle.h.

Referenced by format_verbose(), mutable_prevhop(), prevhop(), and serialize().

u_int8_t dtn::Bundle::priority_ [private]

Bundle priority.

Definition at line 303 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), init(), priority(), serialize(), and set_priority().

Hop by hop reception receipt.

Definition at line 304 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), init(), receipt_requested(), receive_rcpt(), serialize(), and set_receive_rcpt().

BP blocks as arrived off the wire.

Definition at line 339 of file bundling/Bundle.h.

Referenced by format_verbose(), mutable_recv_blocks(), recv_blocks(), and serialize().

Metadata as arrived in bundle.

Definition at line 343 of file bundling/Bundle.h.

Referenced by mutable_recv_metadata(), and recv_metadata().

int dtn::Bundle::refcount_ [private]

Bundle reference count.

Definition at line 349 of file bundling/Bundle.h.

Referenced by add_ref(), Bundle(), del_ref(), and refcount().

Reply-To eid.

Definition at line 296 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), mutable_replyto(), replyto(), serialize(), and validate().

Sequence id vector.

Definition at line 314 of file bundling/Bundle.h.

Referenced by format_verbose(), mutable_sequence_id(), and sequence_id().

Session eid.

Definition at line 316 of file bundling/Bundle.h.

Referenced by format_verbose(), mutable_session_eid(), serialize(), and session_eid().

u_int8_t dtn::Bundle::session_flags_ [private]

Session flags.

Definition at line 317 of file bundling/Bundle.h.

Referenced by format_verbose(), init(), serialize(), session_flags(), and set_session_flags().

Destination endpoint is a singleton.

Definition at line 302 of file bundling/Bundle.h.

Referenced by copy_metadata(), format_verbose(), init(), serialize(), set_singleton_dest(), and singleton_dest().

Source eid.

Definition at line 293 of file bundling/Bundle.h.

Referenced by copy_metadata(), format(), format_verbose(), mutable_source(), serialize(), source(), and validate().

Block vector for each link.

Definition at line 341 of file bundling/Bundle.h.

Referenced by xmit_blocks().


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

Generated on Fri Jan 30 09:43:12 2009 for DTN Reference Implementation by  doxygen 1.5.8