#include <CustodySignal.h>
Definition at line 28 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... |
The reason codes are defined in the bundle protocol class.
Definition at line 33 of file CustodySignal.h.
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 25 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_, encode(), 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_, sdnv_encoding_len(), 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 140 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_, 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 205 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, dtn::BundleProtocol::CUSTODY_REDUNDANT_RECEPTION, and snprintf().
Referenced by dtn::BundleDaemon::handle_custody_signal().