#include <ProphetTLV.h>
Inheritance diagram for dtn::RIBTLV:
Definition at line 171 of file ProphetTLV.h.
Public Types | |
typedef PointerList< RIBNode > | List |
typedef List::iterator | iterator |
Public Member Functions | |
RIBTLV (const List &nodes, bool relay, bool custody, bool internet, const char *logpath) | |
virtual | ~RIBTLV () |
const List & | nodes () |
bool | relay_node () |
bool | custody_node () |
bool | internet_gateway () |
size_t | serialize (u_char *, size_t) |
void | dump (oasys::StringBuffer *buf) |
Protected Member Functions | |
size_t | write_rib_entry (u_int16_t sid, double pvalue, bool relay, bool custody, bool internet, u_char *buffer, size_t len) |
size_t | read_rib_entry (u_int16_t *sid, double *pvalue, bool *relay, bool *custody, bool *internet, u_char *buffer, size_t len) |
RIBTLV (const char *logpath) | |
bool | deserialize (u_char *, size_t) |
Protected Attributes | |
List | nodes_ |
bool | relay_ |
bool | custody_ |
bool | internet_ |
Friends | |
class | TLVFactory< RIBTLV > |
typedef PointerList<RIBNode> dtn::RIBTLV::List |
Definition at line 174 of file ProphetTLV.h.
typedef List::iterator dtn::RIBTLV::iterator |
Definition at line 175 of file ProphetTLV.h.
dtn::RIBTLV::RIBTLV | ( | const List & | nodes, | |
bool | relay, | |||
bool | custody, | |||
bool | internet, | |||
const char * | logpath | |||
) | [inline] |
Definition at line 177 of file ProphetTLV.h.
References dtn::BaseTLV::length_, nodes_, dtn::Prophet::RIBEntrySize, and dtn::Prophet::RIBTLVHeaderSize.
virtual dtn::RIBTLV::~RIBTLV | ( | ) | [inline, virtual] |
Definition at line 192 of file ProphetTLV.h.
dtn::RIBTLV::RIBTLV | ( | const char * | logpath | ) | [inline, protected] |
Definition at line 220 of file ProphetTLV.h.
const List& dtn::RIBTLV::nodes | ( | ) | [inline] |
Definition at line 194 of file ProphetTLV.h.
References nodes_.
Referenced by dtn::ProphetEncounter::handle_rib_tlv().
bool dtn::RIBTLV::relay_node | ( | ) | [inline] |
Definition at line 195 of file ProphetTLV.h.
References relay_.
Referenced by dtn::ProphetEncounter::handle_rib_tlv().
bool dtn::RIBTLV::custody_node | ( | ) | [inline] |
Definition at line 196 of file ProphetTLV.h.
References custody_.
Referenced by dtn::ProphetEncounter::handle_rib_tlv().
bool dtn::RIBTLV::internet_gateway | ( | ) | [inline] |
Definition at line 197 of file ProphetTLV.h.
References internet_.
Referenced by dtn::ProphetEncounter::handle_rib_tlv().
size_t dtn::RIBTLV::serialize | ( | u_char * | , | |
size_t | ||||
) | [virtual] |
Implements dtn::BaseTLV.
Definition at line 898 of file ProphetTLV.cc.
References dtn::ProphetNode::custody(), custody_, dtn::Prophet::CUSTODY_NODE, dtn::Prophet::RIBTLVHeader::flags, internet_, dtn::ProphetNode::internet_gw(), dtn::Prophet::INTERNET_GW_NODE, dtn::Prophet::RIBTLVHeader::length, dtn::BaseTLV::length_, log_err, nodes_, dtn::ProphetNode::p_value(), dtn::ProphetNode::relay(), relay_, dtn::Prophet::RELAY_NODE, dtn::Prophet::RIBTLVHeader::rib_string_count, dtn::Prophet::RIBEntrySize, dtn::Prophet::RIBTLVHeaderSize, dtn::RIBNode::sid_, dtn::Prophet::RIBTLVHeader::type, dtn::BaseTLV::typecode_, and write_rib_entry().
void dtn::RIBTLV::dump | ( | oasys::StringBuffer * | buf | ) | [virtual] |
Reimplemented from dtn::BaseTLV.
Definition at line 51 of file ProphetTLV.cc.
References oasys::StringBuffer::appendf(), custody_, dump(), internet_, nodes_, and relay_.
Referenced by dtn::ProphetTLV::dump().
size_t dtn::RIBTLV::write_rib_entry | ( | u_int16_t | sid, | |
double | pvalue, | |||
bool | relay, | |||
bool | custody, | |||
bool | internet, | |||
u_char * | buffer, | |||
size_t | len | |||
) | [protected] |
Definition at line 873 of file ProphetTLV.cc.
References dtn::Prophet::CUSTODY_NODE, dtn::Prophet::RIBEntry::flags, dtn::Prophet::INTERNET_GW_NODE, log_debug, dtn::Prophet::RIBEntry::pvalue, dtn::Prophet::RELAY_NODE, dtn::Prophet::RIBEntrySize, and dtn::Prophet::RIBEntry::string_id.
Referenced by serialize().
size_t dtn::RIBTLV::read_rib_entry | ( | u_int16_t * | sid, | |
double * | pvalue, | |||
bool * | relay, | |||
bool * | custody, | |||
bool * | internet, | |||
u_char * | buffer, | |||
size_t | len | |||
) | [protected] |
Definition at line 249 of file ProphetTLV.cc.
References dtn::Prophet::CUSTODY_NODE, dtn::Prophet::RIBEntry::flags, dtn::Prophet::INTERNET_GW_NODE, log_debug, dtn::Prophet::RIBEntry::pvalue, dtn::Prophet::RELAY_NODE, dtn::Prophet::RIBEntrySize, and dtn::Prophet::RIBEntry::string_id.
Referenced by deserialize().
bool dtn::RIBTLV::deserialize | ( | u_char * | , | |
size_t | ||||
) | [protected, virtual] |
Implements dtn::BaseTLV.
Definition at line 271 of file ProphetTLV.cc.
References custody, dtn::Prophet::RIBTLVHeader::flags, dtn::BaseTLV::flags_, dtn::Prophet::RIBTLVHeader::length, dtn::BaseTLV::length_, log_err, nodes_, read_rib_entry(), dtn::Prophet::RIBTLVHeader::rib_string_count, dtn::Prophet::RIBEntrySize, dtn::Prophet::RIBTLVHeaderSize, dtn::ProphetNode::set_custody(), dtn::ProphetNode::set_internet_gw(), dtn::ProphetNode::set_pvalue(), dtn::ProphetNode::set_relay(), dtn::RIBNode::sid_, dtn::Prophet::RIBTLVHeader::type, and dtn::BaseTLV::typecode_.
friend class TLVFactory< RIBTLV > [friend] |
Definition at line 202 of file ProphetTLV.h.
List dtn::RIBTLV::nodes_ [protected] |
Definition at line 229 of file ProphetTLV.h.
Referenced by deserialize(), dump(), nodes(), RIBTLV(), and serialize().
bool dtn::RIBTLV::relay_ [protected] |
bool dtn::RIBTLV::custody_ [protected] |
bool dtn::RIBTLV::internet_ [protected] |
Definition at line 232 of file ProphetTLV.h.
Referenced by dump(), internet_gateway(), and serialize().