dtn::BundleStatusReport Class Reference

#include <BundleStatusReport.h>

List of all members.


Detailed Description

Utility class to create and parse status reports.

Definition at line 50 of file BundleStatusReport.h.

Public Types

typedef BundleProtocol::status_report_flag_t flag_t
 The status report flags are defined in the BundleProtocol class.
typedef BundleProtocol::status_report_reason_t reason_t
 The reason codes are defined in the BundleProtocol class.

Static Public Member Functions

static void create_status_report (Bundle *bundle, const Bundle *orig_bundle, const EndpointID &source, flag_t status_flag, reason_t reason)
 Constructor-like function that fills in the bundle payload buffer with the appropriate status report format.
static bool parse_status_report (data_t *data, const u_char *bp, u_int len)
 Parse a byte stream containing a Status Report Payload and store the fields in the given struct.

Classes

struct  data_t
 Specification of the contents of a Bundle Status Report. More...


Member Typedef Documentation

typedef BundleProtocol::status_report_flag_t dtn::BundleStatusReport::flag_t

The status report flags are defined in the BundleProtocol class.

Definition at line 55 of file BundleStatusReport.h.

typedef BundleProtocol::status_report_reason_t dtn::BundleStatusReport::reason_t

The reason codes are defined in the BundleProtocol class.

Definition at line 60 of file BundleStatusReport.h.


Member Function Documentation

void dtn::BundleStatusReport::create_status_report ( Bundle bundle,
const Bundle orig_bundle,
const EndpointID source,
flag_t  status_flag,
reason_t  reason 
) [static]

Constructor-like function that fills in the bundle payload buffer with the appropriate status report format.

Although the spec allows for multiple timestamps to be set in a single status report, this implementation only supports creating a single timestamp per report, hence there is only support for a single flag to be passed in the parameters.

Definition at line 47 of file BundleStatusReport.cc.

References dtn::BundleProtocol::ADMIN_IS_FRAGMENT, dtn::BundleProtocol::ADMIN_STATUS_REPORT, 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_status_report().

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

Parse a byte stream containing a Status Report Payload and store the fields in the given struct.

Returns false if parsing failed.

Definition at line 178 of file BundleStatusReport.cc.

References dtn::BundleStatusReport::data_t::acknowledgement_tv_, dtn::BundleStatusReport::data_t::admin_flags_, dtn::BundleProtocol::ADMIN_IS_FRAGMENT, dtn::BundleProtocol::ADMIN_STATUS_REPORT, dtn::BundleStatusReport::data_t::admin_type_, dtn::EndpointID::assign(), dtn::BundleStatusReport::data_t::custody_tv_, dtn::SDNV::decode(), dtn::BundleStatusReport::data_t::deletion_tv_, dtn::BundleStatusReport::data_t::delivery_tv_, dtn::BundleStatusReport::data_t::forwarding_tv_, dtn::BundleProtocol::get_timestamp(), dtn::BundleStatusReport::data_t::orig_creation_tv_, dtn::BundleStatusReport::data_t::orig_frag_length_, dtn::BundleStatusReport::data_t::orig_frag_offset_, dtn::BundleStatusReport::data_t::orig_source_eid_, dtn::BundleStatusReport::data_t::reason_code_, dtn::BundleStatusReport::data_t::receipt_tv_, dtn::BundleProtocol::STATUS_ACKED_BY_APP, dtn::BundleProtocol::STATUS_CUSTODY_ACCEPTED, dtn::BundleProtocol::STATUS_DELETED, dtn::BundleProtocol::STATUS_DELIVERED, dtn::BundleStatusReport::data_t::status_flags_, dtn::BundleProtocol::STATUS_FORWARDED, and dtn::BundleProtocol::STATUS_RECEIVED.

Referenced by dtn::TclRegistration::parse_bundle_data().


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