prophet::BundleTLV Class Reference

#include <BundleTLV.h>

Inheritance diagram for prophet::BundleTLV:

prophet::BaseTLV prophet::OfferTLV prophet::ResponseTLV

List of all members.

Classes

struct  BundleEntry
 Bundle Offer/Response Entry p. More...
struct  BundleTLVHeader
 Bundle Offer/Response Header
p. More...

Public Types

enum  bundletlv_flags_t { CUSTODY = 1 << 0, ACCEPTED = 1 << 1, ACK = 1 << 7 }
 Flag values for Bundle Offer/Response Entry p. More...

Public Member Functions

virtual ~BundleTLV ()
 Destructor.

Public Attributes

struct
prophet::BundleTLV::BundleTLVHeader 
packed
 Bundle Offer/Response Header
p.
struct
prophet::BundleTLV::BundleEntry 
packed
 Bundle Offer/Response Entry p.

Static Public Attributes

static const size_t BundleTLVHeaderSize = sizeof(struct BundleTLVHeader)
static const size_t BundleEntrySize = sizeof(struct BundleEntry)

Protected Member Functions

 BundleTLV (BaseTLV::prophet_tlv_t type=BaseTLV::UNKNOWN_TLV, u_int8_t flags=0, u_int16_t length=0)
 Constructor.
size_t write_bundle_entry (u_int32_t cts, u_int32_t seq, u_int16_t sid, bool custody, bool accept, bool ack, BundleTLVEntry::bundle_entry_t type, u_char *bp, size_t len) const
 Serialize BundleOfferTLVEntry out to no more than len bytes of buffer; return bytes written.
size_t read_bundle_entry (u_int32_t *cts, u_int32_t *seq, u_int16_t *sid, bool *custody, bool *accept, bool *ack, BundleTLVEntry::bundle_entry_t *type, const u_char *bp, size_t len)
 Deserialize struct BundleOfferTLVEntry from transport into memory, reading no more than len bytes from buffer; return bytes read.


Detailed Description

Definition at line 28 of file BundleTLV.h.


Member Enumeration Documentation

Flag values for Bundle Offer/Response Entry p.

31, 4.4.5

Enumerator:
CUSTODY  custody offered or accepted on this bundle
ACCEPTED  this bundle is accepted for relay
ACK  Prophet ACK for this bundle.

Definition at line 108 of file BundleTLV.h.


Constructor & Destructor Documentation

virtual prophet::BundleTLV::~BundleTLV (  )  [inline, virtual]

Destructor.

Definition at line 121 of file BundleTLV.h.

prophet::BundleTLV::BundleTLV ( BaseTLV::prophet_tlv_t  type = BaseTLV::UNKNOWN_TLV,
u_int8_t  flags = 0,
u_int16_t  length = 0 
) [inline, protected]

Constructor.

Protected to force access through derived classes.

Definition at line 127 of file BundleTLV.h.


Member Function Documentation

size_t prophet::BundleTLV::read_bundle_entry ( u_int32_t *  cts,
u_int32_t *  seq,
u_int16_t *  sid,
bool custody,
bool accept,
bool ack,
BundleTLVEntry::bundle_entry_t type,
const u_char *  bp,
size_t  len 
) [protected]

size_t prophet::BundleTLV::write_bundle_entry ( u_int32_t  cts,
u_int32_t  seq,
u_int16_t  sid,
bool  custody,
bool  accept,
bool  ack,
BundleTLVEntry::bundle_entry_t  type,
u_char *  bp,
size_t  len 
) const [protected]


Member Data Documentation

const size_t prophet::BundleTLV::BundleEntrySize = sizeof(struct BundleEntry) [static]

const size_t prophet::BundleTLV::BundleTLVHeaderSize = sizeof(struct BundleTLVHeader) [static]

Bundle Offer/Response Entry p.

30, 4.4.5

Bundle Offer/Response Header
p.

30, 4.4.5

After the routing information has been passed, the node will ask the other node to review available bundles and determine which bundles it will accept for relay. The source relay will determine which bundles to offer based on relative delivery predictabilities as explained in Section 3.6. The Bundle Offer TLV also lists the bundles that a PRoPHET acknowledgement has been issued for. Those bundles have the PRoPHET ACK flag set in their entry in the list. When a node receives a PRoPHET ACK for a bundle, it MUST remove any copies of that bundle from its buffers, but SHOULD keep an entry of the acknowledged bundle to be able to further propagate the PRoPHET ACK.

The Response message is identical to the request message with the exception that the flag indicate acceptance of the bundle.


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

Generated on Fri Jan 30 09:27:06 2009 for DTN Reference Implementation by  doxygen 1.5.8