TcaRegistry Class Reference

#include <TcaRegistry.h>

List of all members.


Detailed Description

Definition at line 44 of file TcaRegistry.h.

Public Member Functions

 TcaRegistry ()
bool init_nodes ()
bool init_addrs ()
bool write (const RegRecord &rr, int ttl)
bool read (RegRecord &rr)

Protected Member Functions

CLIENT * get_node ()

Protected Attributes

std::vector< std::string > dht_nodes_
std::vector< sockaddr_in > dht_addrs_
unsigned int last_node_


Constructor & Destructor Documentation

TcaRegistry::TcaRegistry (  )  [inline]

Definition at line 48 of file TcaRegistry.h.


Member Function Documentation

bool TcaRegistry::init_nodes (  ) 

Definition at line 57 of file TcaRegistry.cc.

References dht_nodes_.

Referenced by TcaController::init().

bool TcaRegistry::init_addrs (  ) 

Definition at line 86 of file TcaRegistry.cc.

References dht_addrs_, dht_nodes_, last_node_, and test_node().

Referenced by TcaController::init().

bool TcaRegistry::write ( const RegRecord rr,
int  ttl 
)

Definition at line 120 of file TcaRegistry.cc.

References APP_STRING, bamboo_dht_proc_put_2(), BAMBOO_OK, CLIB_STRING, DHT_KEYLEN, get_node(), hash(), RegRecord::host_, RegRecord::link_addr_, and uint8.

Referenced by TcaController::do_registration().

bool TcaRegistry::read ( RegRecord rr  ) 

Definition at line 157 of file TcaRegistry.cc.

References APP_STRING, bamboo_dht_proc_get_2(), bamboo_value::bamboo_value_val, CLIB_STRING, DHT_KEYLEN, get_node(), hash(), RegRecord::host_, RegRecord::link_addr_, uint8, bamboo_get_res::values, bamboo_get_res::values_len, and bamboo_get_res::values_val.

Referenced by TcaController::get_registration().

CLIENT * TcaRegistry::get_node (  )  [protected]

Definition at line 233 of file TcaRegistry.cc.

References dht_addrs_, get_connection(), and last_node_.

Referenced by read(), and write().


Member Data Documentation

std::vector<std::string> TcaRegistry::dht_nodes_ [protected]

Definition at line 58 of file TcaRegistry.h.

Referenced by init_addrs(), and init_nodes().

std::vector<sockaddr_in> TcaRegistry::dht_addrs_ [protected]

Definition at line 59 of file TcaRegistry.h.

Referenced by get_node(), and init_addrs().

unsigned int TcaRegistry::last_node_ [protected]

Definition at line 61 of file TcaRegistry.h.

Referenced by get_node(), and init_addrs().


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