dtn::BundleStatusReport Class Reference

#include <BundleStatusReport.h>

List of all members.


Detailed Description

Utility class to create and parse status reports.

Definition at line 29 of file BundleStatusReport.h.


Public Types

enum  flag_t {
  STATUS_RECEIVED = 0x01, STATUS_CUSTODY_ACCEPTED = 0x02, STATUS_FORWARDED = 0x04, STATUS_DELIVERED = 0x08,
  STATUS_DELETED = 0x10, STATUS_ACKED_BY_APP = 0x20, STATUS_UNUSED = 0x40, STATUS_UNUSED2 = 0x80
}
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.
static bool parse_status_report (data_t *data, const Bundle *bundle)
 Parse the payload of the given bundle into the given struct.
static const char * reason_to_str (u_int8_t reason)
 Return a string version of the reason code.

Classes

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

Member Typedef Documentation

The reason codes are defined in the BundleProtocol class.

Definition at line 45 of file BundleStatusReport.h.


Member Enumeration Documentation

Enumerator:
STATUS_RECEIVED 
STATUS_CUSTODY_ACCEPTED 
STATUS_FORWARDED 
STATUS_DELIVERED 
STATUS_DELETED 
STATUS_ACKED_BY_APP 
STATUS_UNUSED 
STATUS_UNUSED2 

Definition at line 31 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]

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

bool dtn::BundleStatusReport::parse_status_report ( data_t data,
const Bundle bundle 
) [static]

Parse the payload of the given bundle into the given struct.

Returns false if the bundle is not a well formed status report.

Definition at line 291 of file BundleStatusReport.cc.

References dtn::BundleProtocol::ADMIN_STATUS_REPORT, buf, dtn::BundleProtocol::get_admin_type(), dtn::BundlePayload::length(), log_err_p, parse_status_report(), dtn::Bundle::payload(), and dtn::BundlePayload::read_data().

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


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

Generated on Mon Jul 21 14:12:20 2008 for DTN Reference Implementation by  doxygen 1.5.6