dtn::RIBDTLV Class Reference

#include <ProphetTLV.h>

Inheritance diagram for dtn::RIBDTLV:

dtn::BaseTLV oasys::Logger List of all members.

Detailed Description

Definition at line 122 of file ProphetTLV.h.

Public Member Functions

 RIBDTLV (const ProphetDictionary &ribd, const char *logpath)
virtual ~RIBDTLV ()
const ProphetDictionaryribd () const
size_t serialize (u_char *, size_t)
void dump (oasys::StringBuffer *buf)

Protected Member Functions

size_t write_ras_entry (u_int16_t sid, EndpointID eid, u_char *buffer, size_t len)
 Serialize EndpointID out to buffer size len using RoutingAddressString struct; return value is total bytes written.
size_t read_ras_entry (u_int16_t *sid, EndpointID *eid, u_char *buffer, size_t len)
 Deserialize RoutingAddressString struct from buffer size len into node, setting *sid; return value is total bytes read.
 RIBDTLV (const char *logpath)
bool deserialize (u_char *, size_t)

Protected Attributes

ProphetDictionary ribd_

Friends

class TLVFactory< RIBDTLV >


Constructor & Destructor Documentation

dtn::RIBDTLV::RIBDTLV ( const ProphetDictionary ribd,
const char *  logpath 
) [inline]

Definition at line 125 of file ProphetTLV.h.

References dtn::ProphetDictionary::guess_ribd_size(), dtn::BaseTLV::length_, ribd_, and dtn::Prophet::RIBDTLVHeaderSize.

virtual dtn::RIBDTLV::~RIBDTLV (  )  [inline, virtual]

Definition at line 134 of file ProphetTLV.h.

dtn::RIBDTLV::RIBDTLV ( const char *  logpath  )  [inline, protected]

Definition at line 161 of file ProphetTLV.h.


Member Function Documentation

const ProphetDictionary& dtn::RIBDTLV::ribd (  )  const [inline]

Definition at line 136 of file ProphetTLV.h.

References ribd_.

Referenced by dtn::ProphetEncounter::handle_ribd_tlv().

size_t dtn::RIBDTLV::serialize ( u_char *  ,
size_t   
) [virtual]

Implements dtn::BaseTLV.

Definition at line 817 of file ProphetTLV.cc.

References dtn::ProphetDictionary::begin(), dtn::ProphetDictionary::end(), dtn::Prophet::RIBDTLVHeader::entry_count, dtn::Prophet::RIBDTLVHeader::flags, dtn::ProphetDictionary::guess_ribd_size(), dtn::Prophet::RIBDTLVHeader::length, dtn::BaseTLV::length_, log_debug, log_err, ribd_, dtn::Prophet::RIBD_TLV, dtn::Prophet::RIBDTLVHeaderSize, dtn::ProphetDictionary::size(), dtn::Prophet::RIBDTLVHeader::type, and write_ras_entry().

void dtn::RIBDTLV::dump ( oasys::StringBuffer buf  )  [virtual]

Reimplemented from dtn::BaseTLV.

Definition at line 42 of file ProphetTLV.cc.

References oasys::StringBuffer::appendf(), dtn::ProphetDictionary::dump(), dump(), ribd_, and dtn::ProphetDictionary::size().

Referenced by dtn::ProphetTLV::dump().

size_t dtn::RIBDTLV::write_ras_entry ( u_int16_t  sid,
EndpointID  eid,
u_char *  buffer,
size_t  len 
) [protected]

Serialize EndpointID out to buffer size len using RoutingAddressString struct; return value is total bytes written.

Definition at line 782 of file ProphetTLV.cc.

References ASSERT, dtn::EndpointID::c_str(), dtn::EndpointID::equals(), FOUR_BYTE_ALIGN, dtn::EndpointID::length(), dtn::Prophet::RoutingAddressString::length, log_debug, dtn::EndpointID::NULL_EID(), dtn::Prophet::RoutingAddressString::ra_string, dtn::Prophet::RoutingAddressStringSize, and dtn::Prophet::RoutingAddressString::string_id.

Referenced by serialize().

size_t dtn::RIBDTLV::read_ras_entry ( u_int16_t *  sid,
EndpointID eid,
u_char *  buffer,
size_t  len 
) [protected]

Deserialize RoutingAddressString struct from buffer size len into node, setting *sid; return value is total bytes read.

Definition at line 171 of file ProphetTLV.cc.

References ASSERT, dtn::EndpointID::assign(), dtn::EndpointID::equals(), FOUR_BYTE_ALIGN, dtn::Prophet::RoutingAddressString::length, log_debug, dtn::EndpointID::NULL_EID(), dtn::Prophet::RoutingAddressString::ra_string, dtn::Prophet::RoutingAddressStringSize, and dtn::Prophet::RoutingAddressString::string_id.

Referenced by deserialize().

bool dtn::RIBDTLV::deserialize ( u_char *  ,
size_t   
) [protected, virtual]

Implements dtn::BaseTLV.

Definition at line 197 of file ProphetTLV.cc.

References dtn::ProphetDictionary::assign(), dtn::ProphetDictionary::clear(), dtn::Prophet::RIBDTLVHeader::entry_count, dtn::Prophet::RIBDTLVHeader::flags, dtn::BaseTLV::flags_, dtn::Prophet::RIBDTLVHeader::length, dtn::BaseTLV::length_, log_err, read_ras_entry(), ribd_, dtn::Prophet::RIBDTLVHeaderSize, dtn::Prophet::RIBDTLVHeader::type, and dtn::BaseTLV::typecode_.


Friends And Related Function Documentation

friend class TLVFactory< RIBDTLV > [friend]

Definition at line 159 of file ProphetTLV.h.


Member Data Documentation

ProphetDictionary dtn::RIBDTLV::ribd_ [protected]

Definition at line 168 of file ProphetTLV.h.

Referenced by deserialize(), dump(), ribd(), RIBDTLV(), and serialize().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 16:56:58 2007 for DTN Reference Implementation by  doxygen 1.5.1