prophet::RIBDTLV Class Reference

#include <RIBDTLV.h>

Inheritance diagram for prophet::RIBDTLV:
prophet::BaseTLV

List of all members.

Classes

struct  RIBDTLVHeader
 Routing Information Base Dictionary TLV
p. More...
struct  RoutingAddressString
 Routing Address String (entry in RIBD above) p. More...

Public Member Functions

 RIBDTLV (const Dictionary &ribd)
 Constructor.
virtual ~RIBDTLV ()
 Destructor.
size_t serialize (u_char *bp, size_t len) const
 Virtual from BaseTLV.
const Dictionaryribd (const std::string &sender, const std::string &receiver)
 Accessor.

Public Attributes

struct
prophet::RIBDTLV::RIBDTLVHeader 
packed
 Routing Information Base Dictionary TLV
p.
struct
prophet::RIBDTLV::RoutingAddressString 
packed
 Routing Address String (entry in RIBD above) p.

Static Public Attributes

static const size_t RIBDTLVHeaderSize = sizeof(struct RIBDTLVHeader)
static const size_t RoutingAddressStringSize

Protected Member Functions

 RIBDTLV ()
 Constructor.
size_t write_ras_entry (u_int16_t sid, const std::string &dest_id, u_char *bp, size_t len) const
 Serialize destination ID out to buffer bp, size len, using struct RoutingAddressString; return total bytes written.
size_t read_ras_entry (u_int16_t *sid, std::string &dest_id, const u_char *bp, size_t len)
 Deserialize RoutingAddressString struct from transport into memory, setting *sid and dest_id; return total bytes read.
bool deserialize (const u_char *bp, size_t len)
 Virtual from BaseTLV.

Protected Attributes

Dictionary ribd_
 mapping from destination id string to numeric id (sid)

Friends

class TLVFactory< RIBDTLV >

Detailed Description

Definition at line 26 of file RIBDTLV.h.


Constructor & Destructor Documentation

prophet::RIBDTLV::RIBDTLV ( const Dictionary ribd  ) 
virtual prophet::RIBDTLV::~RIBDTLV (  )  [inline, virtual]

Destructor.

Definition at line 82 of file RIBDTLV.h.

prophet::RIBDTLV::RIBDTLV (  )  [protected]

Constructor.

Protected to force access through TLVFactory.

Definition at line 31 of file RIBDTLV.cc.


Member Function Documentation

bool prophet::RIBDTLV::deserialize ( const u_char *  bp,
size_t  len 
) [protected, virtual]
size_t prophet::RIBDTLV::read_ras_entry ( u_int16_t *  sid,
std::string &  dest_id,
const u_char *  bp,
size_t  len 
) [protected]

Deserialize RoutingAddressString struct from transport into memory, setting *sid and dest_id; return total bytes read.

Definition at line 115 of file RIBDTLV.cc.

References FOUR_BYTE_ALIGN, prophet::RIBDTLV::RoutingAddressString::length, prophet::RIBDTLV::RoutingAddressString::ra_string, RoutingAddressStringSize, and prophet::RIBDTLV::RoutingAddressString::string_id.

Referenced by deserialize().

const Dictionary & prophet::RIBDTLV::ribd ( const std::string &  sender,
const std::string &  receiver 
)
size_t prophet::RIBDTLV::serialize ( u_char *  bp,
size_t  len 
) const [virtual]
size_t prophet::RIBDTLV::write_ras_entry ( u_int16_t  sid,
const std::string &  dest_id,
u_char *  bp,
size_t  len 
) const [protected]

Serialize destination ID out to buffer bp, size len, using struct RoutingAddressString; return total bytes written.

Definition at line 35 of file RIBDTLV.cc.

References FOUR_BYTE_ALIGN, prophet::RIBDTLV::RoutingAddressString::length, prophet::RIBDTLV::RoutingAddressString::ra_string, RoutingAddressStringSize, and prophet::RIBDTLV::RoutingAddressString::string_id.

Referenced by serialize().


Friends And Related Function Documentation

friend class TLVFactory< RIBDTLV > [friend]

Definition at line 96 of file RIBDTLV.h.


Member Data Documentation

Routing Address String (entry in RIBD above) p.

27, 4.4.3

Routing Information Base Dictionary TLV
p.

27, 4.4.3

The Routing Information Base Dictionary includes the list of addresses used in making routing decisions. The referents remain constant for the duration of a session over a link where the instance numbers remain the same and can be used by both the Routing Information Base messages and the bundle offer messages.

mapping from destination id string to numeric id (sid)

Definition at line 122 of file RIBDTLV.h.

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

const size_t prophet::RIBDTLV::RIBDTLVHeaderSize = sizeof(struct RIBDTLVHeader) [static]

Definition at line 69 of file RIBDTLV.h.

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

Initial value:
        sizeof(struct RoutingAddressString)

Definition at line 71 of file RIBDTLV.h.

Referenced by read_ras_entry(), RIBDTLV(), serialize(), and write_ras_entry().


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 13:21:33 2010 for DTN Reference Implementation by  doxygen 1.6.3