#include <ProphetTLV.h>
Inheritance diagram for dtn::BundleTLV:
Definition at line 235 of file ProphetTLV.h.
Public Member Functions | |
BundleTLV (const BundleOfferList &list, const char *logpath) | |
virtual | ~BundleTLV () |
const BundleOfferList & | list () |
Returns resultant list after serialize/deserialize. | |
BundleOffer::bundle_offer_t | type () |
size_t | serialize (u_char *, size_t) |
void | dump (oasys::StringBuffer *buf) |
Protected Member Functions | |
size_t | read_bundle_offer (u_int32_t *cts, u_int16_t *sid, bool *custody, bool *accept, bool *ack, BundleOffer::bundle_offer_t *type, u_char *bp, size_t len) |
size_t | write_bundle_offer (u_int32_t cts, u_int16_t sid, bool custody, bool accept, bool ack, BundleOffer::bundle_offer_t type, u_char *bp, size_t len) |
BundleTLV (const char *logpath) | |
bool | deserialize (u_char *, size_t) |
Protected Attributes | |
BundleOfferList | list_ |
Friends | |
class | TLVFactory< BundleTLV > |
dtn::BundleTLV::BundleTLV | ( | const BundleOfferList & | list, | |
const char * | logpath | |||
) | [inline] |
Definition at line 238 of file ProphetTLV.h.
References dtn::Prophet::BundleOfferEntrySize, dtn::Prophet::BundleOfferTLVHeaderSize, dtn::BaseTLV::length_, list_, and dtn::BundleOfferList::size().
virtual dtn::BundleTLV::~BundleTLV | ( | ) | [inline, virtual] |
dtn::BundleTLV::BundleTLV | ( | const char * | logpath | ) | [inline, protected] |
Definition at line 271 of file ProphetTLV.h.
References ASSERT, list_, dtn::BundleOfferList::type(), and dtn::BundleOffer::UNDEFINED.
const BundleOfferList& dtn::BundleTLV::list | ( | ) | [inline] |
Returns resultant list after serialize/deserialize.
Definition at line 252 of file ProphetTLV.h.
References list_.
Referenced by dtn::ProphetEncounter::handle_bundle_tlv().
BundleOffer::bundle_offer_t dtn::BundleTLV::type | ( | ) | [inline] |
Definition at line 254 of file ProphetTLV.h.
References list_, and dtn::BundleOfferList::type().
Referenced by deserialize().
size_t dtn::BundleTLV::serialize | ( | u_char * | , | |
size_t | ||||
) | [virtual] |
Implements dtn::BaseTLV.
Definition at line 1001 of file ProphetTLV.cc.
References dtn::BundleOfferList::begin(), dtn::Prophet::BUNDLE_TLV, dtn::Prophet::BundleOfferTLVHeaderSize, dtn::BundleOfferList::end(), dtn::BundleOfferList::guess_size(), ExamineDump::l, dtn::BaseTLV::length_, list_, dtn::BundleOfferList::lock(), dtn::BundleOfferList::size(), and write_bundle_offer().
void dtn::BundleTLV::dump | ( | oasys::StringBuffer * | buf | ) | [virtual] |
Reimplemented from dtn::BaseTLV.
Definition at line 71 of file ProphetTLV.cc.
References oasys::StringBuffer::appendf(), dtn::BundleOfferList::dump(), dump(), list_, dtn::BundleOfferList::size(), dtn::BundleOfferList::type(), and dtn::BundleOffer::type_to_str().
Referenced by dtn::ProphetTLV::dump().
size_t dtn::BundleTLV::read_bundle_offer | ( | u_int32_t * | cts, | |
u_int16_t * | sid, | |||
bool * | custody, | |||
bool * | accept, | |||
bool * | ack, | |||
BundleOffer::bundle_offer_t * | type, | |||
u_char * | bp, | |||
size_t | len | |||
) | [protected] |
Definition at line 335 of file ProphetTLV.cc.
References dtn::Prophet::BundleOfferEntry::b_flags, dtn::Prophet::BUNDLE_ACCEPTED, dtn::Prophet::BundleOfferEntrySize, dtn::Prophet::BundleOfferEntry::creation_timestamp, dtn::Prophet::CUSTODY_ACCEPTED, dtn::Prophet::CUSTODY_OFFERED, dtn::Prophet::BundleOfferEntry::dest_string_id, dtn::BaseTLV::flags(), log_debug, dtn::BundleOffer::OFFER, dtn::Prophet::PROPHET_ACK, dtn::BundleOffer::RESPONSE, and dtn::BundleOffer::UNDEFINED.
Referenced by deserialize().
size_t dtn::BundleTLV::write_bundle_offer | ( | u_int32_t | cts, | |
u_int16_t | sid, | |||
bool | custody, | |||
bool | accept, | |||
bool | ack, | |||
BundleOffer::bundle_offer_t | type, | |||
u_char * | bp, | |||
size_t | len | |||
) | [protected] |
Definition at line 963 of file ProphetTLV.cc.
References dtn::Prophet::BUNDLE_ACCEPTED, dtn::Prophet::BundleOfferEntrySize, dtn::Prophet::CUSTODY_ACCEPTED, dtn::Prophet::CUSTODY_OFFERED, log_debug, dtn::BundleOffer::OFFER, dtn::Prophet::PROPHET_ACK, and dtn::BundleOffer::RESPONSE.
Referenced by serialize().
bool dtn::BundleTLV::deserialize | ( | u_char * | , | |
size_t | ||||
) | [protected, virtual] |
Implements dtn::BaseTLV.
Definition at line 388 of file ProphetTLV.cc.
References dtn::BundleOfferList::add_offer(), ASSERT, dtn::Prophet::BundleOfferEntrySize, dtn::Prophet::BundleOfferTLVHeaderSize, custody, dtn::BundleOfferList::empty(), dtn::Prophet::BundleOfferTLVHeader::flags, dtn::BaseTLV::flags_, dtn::Prophet::BundleOfferTLVHeader::length, dtn::BaseTLV::length_, list_, log_debug, dtn::Prophet::BundleOfferTLVHeader::offer_count, read_bundle_offer(), dtn::BundleOfferList::set_type(), type(), dtn::BundleOfferList::type(), dtn::Prophet::BundleOfferTLVHeader::type, dtn::BundleOffer::type_to_str(), dtn::BaseTLV::typecode_, and dtn::BundleOffer::UNDEFINED.
friend class TLVFactory< BundleTLV > [friend] |
Definition at line 259 of file ProphetTLV.h.
BundleOfferList dtn::BundleTLV::list_ [protected] |
Definition at line 279 of file ProphetTLV.h.
Referenced by BundleTLV(), deserialize(), dump(), list(), serialize(), type(), and ~BundleTLV().