dtn::CustodySignal Class Reference

#include <CustodySignal.h>

List of all members.


Detailed Description

Utility class to format and parse custody signal bundles.

Definition at line 49 of file CustodySignal.h.

Public Types

typedef BundleProtocol::custody_signal_reason_t reason_t
 The reason codes are defined in the bundle protocol class.

Static Public Member Functions

static void create_custody_signal (Bundle *bundle, const Bundle *orig_bundle, const EndpointID &source_eid, bool succeeded, reason_t reason)
 Constructor-like function to create a new custody signal bundle.
static bool parse_custody_signal (data_t *data, const u_char *bp, u_int len)
 Parsing function for custody signal bundles.
static const char * reason_to_str (u_int8_t reason)
 Pretty printer for custody signal reasons.

Classes

struct  data_t
 Struct to hold the payload data of the custody signal. More...


Member Typedef Documentation

typedef BundleProtocol::custody_signal_reason_t dtn::CustodySignal::reason_t

The reason codes are defined in the bundle protocol class.

Definition at line 54 of file CustodySignal.h.


Member Function Documentation

void dtn::CustodySignal::create_custody_signal ( Bundle bundle,
const Bundle orig_bundle,
const EndpointID source_eid,
bool  succeeded,
reason_t  reason 
) [static]

Constructor-like function to create a new custody signal bundle.

Definition at line 46 of file CustodySignal.cc.

References dtn::BundleProtocol::ADMIN_CUSTODY_SIGNAL, dtn::BundleProtocol::ADMIN_IS_FRAGMENT, ASSERT, dtn::EndpointID::assign(), oasys::ScratchBuffer< _memory_t, _static_size >::buf(), dtn::EndpointID::c_str(), dtn::Bundle::creation_ts_, dtn::Bundle::custodian_, dtn::Bundle::dest_, dtn::SDNV::encode(), dtn::SDNV::encoding_len(), dtn::EndpointID::equals(), dtn::Bundle::expiration_, dtn::Bundle::frag_offset_, dtn::BundleTimestamp::get_current_time(), dtn::Bundle::is_admin_, dtn::Bundle::is_fragment_, dtn::EndpointID::length(), dtn::EndpointID::NULL_EID(), dtn::Bundle::orig_length_, dtn::Bundle::payload_, dtn::Bundle::replyto_, dtn::BundleTimestamp::seconds_, dtn::BundleTimestamp::seqno_, dtn::BundlePayload::set_data(), dtn::BundleProtocol::set_timestamp(), and dtn::Bundle::source_.

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

bool dtn::CustodySignal::parse_custody_signal ( data_t data,
const u_char *  bp,
u_int  len 
) [static]

Parsing function for custody signal bundles.

Definition at line 161 of file CustodySignal.cc.

References dtn::BundleProtocol::ADMIN_CUSTODY_SIGNAL, dtn::CustodySignal::data_t::admin_flags_, dtn::BundleProtocol::ADMIN_IS_FRAGMENT, dtn::CustodySignal::data_t::admin_type_, dtn::EndpointID::assign(), dtn::CustodySignal::data_t::custody_signal_tv_, dtn::SDNV::decode(), dtn::BundleProtocol::get_timestamp(), dtn::CustodySignal::data_t::orig_creation_tv_, dtn::CustodySignal::data_t::orig_frag_length_, dtn::CustodySignal::data_t::orig_frag_offset_, dtn::CustodySignal::data_t::orig_source_eid_, dtn::CustodySignal::data_t::reason_, and dtn::CustodySignal::data_t::succeeded_.

Referenced by dtn::AdminRegistration::deliver_bundle(), and dtn::TclRegistration::parse_bundle_data().

const char * dtn::CustodySignal::reason_to_str ( u_int8_t  reason  )  [static]

Pretty printer for custody signal reasons.

Definition at line 226 of file CustodySignal.cc.

References dtn::BundleProtocol::CUSTODY_BLOCK_UNINTELLIGIBLE, dtn::BundleProtocol::CUSTODY_DEPLETED_STORAGE, dtn::BundleProtocol::CUSTODY_ENDPOINT_ID_UNINTELLIGIBLE, dtn::BundleProtocol::CUSTODY_NO_ADDTL_INFO, dtn::BundleProtocol::CUSTODY_NO_ROUTE_TO_DEST, dtn::BundleProtocol::CUSTODY_NO_TIMELY_CONTACT, and dtn::BundleProtocol::CUSTODY_REDUNDANT_RECEPTION.

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


The documentation for this class was generated from the following files:
Generated on Fri Dec 22 14:48:03 2006 for DTN Reference Implementation by  doxygen 1.5.1