|
Ring Daemon
|
#include <routing_table.h>

Classes | |
| struct | NodeStats |
Public Member Functions | |
| bool | addConnectingNode (const NodeId &nodeId) |
| Add connecting node to routing table. | |
| bool | addKnownNode (const NodeId &nodeId) |
| Add known node to routing table. | |
| bool | addMobileNode (const NodeId &nodeId) |
| Add mobile node to routing table. | |
| bool | addNode (const std::shared_ptr< dhtnet::ChannelSocketInterface > &channel, std::list< Bucket >::iterator &bucket) |
| Add socket to specific bucket. | |
| bool | addNode (const std::shared_ptr< dhtnet::ChannelSocketInterface > &socket) |
| Add socket to bucket. | |
| std::vector< NodeId > | closestNodes (const NodeId &nodeId, unsigned count) |
| Returns the count closest nodes to a specific nodeId. | |
| bool | contains (const std::list< Bucket >::iterator &it, const NodeId &nodeId) const |
| Test if connected nodeId is in specific bucket. | |
| void | deleteNode (const NodeId &nodeId) |
| Delete node from every table in bucket. | |
| std::list< Bucket >::iterator | findBucket (const NodeId &nodeId) |
| Returns bucket iterator containing nodeId. | |
| const std::list< Bucket >::const_iterator | findBucket (const NodeId &nodeId) const |
| Returns bucket iterator containing nodeId. | |
| unsigned | getActiveNodesCount () const |
| std::vector< NodeId > | getAllNodes () const |
| Return every node from each bucket. | |
| std::vector< NodeId > | getBucketMobileNodes () const |
| Returns mobile nodes corresponding to the swarm's id. | |
| std::list< Bucket > & | getBuckets () |
| Returns buckets in routing table. | |
| std::vector< NodeId > | getConnectedNodes () const |
| std::vector< NodeId > | getConnectingNodes () const |
| Returns all routing table's connecting nodes. | |
| NodeId | getId () const |
| Returns id for routing table. | |
| std::vector< NodeId > | getKnownNodes () const |
| Returns all routing table's known nodes. | |
| std::vector< NodeId > | getMobileNodes () const |
| Returns all routing table's mobile nodes. | |
| unsigned | getNodeCount () const |
| Returns number of total nodes in routing table. | |
| std::vector< NodeId > | getNodes () const |
| Returns all routing table's connected nodes. | |
| std::vector< NodeStats > | getRoutingTableStats () const |
| bool | hasConnectingNode (const NodeId &nodeId) const |
| Check if Connecting node exists in routing table. | |
| bool | hasKnownNode (const NodeId &nodeId) const |
| Checks if known node exists in routing table. | |
| bool | hasMobileNode (const NodeId &nodeId) |
| Check if mobile node exists in routing table. | |
| bool | hasNode (const NodeId &nodeId) |
| Check if connected node exsits in routing table. | |
| bool | isEmpty () const |
| void | printRoutingTable () const |
| Prints routing table. | |
| void | removeConnectingNode (const NodeId &nodeId) |
| Remove connecting connecting node to routing table. | |
| void | removeMobileNode (const NodeId &nodeId) |
| Remove mobile node to routing table. | |
| bool | removeNode (const NodeId &nodeId) |
| Removes node from routing table Adds it to known_nodes or mobile_nodes depending on mobility. | |
| RoutingTable () | |
| void | setId (const NodeId &node) |
| Sets id for routing table. | |
| void | shutdownAllNodes () |
| Shutdowns all nodes in routing table and add them to known_nodes or mobile_nodes. | |
| void | shutdownNode (const NodeId &nodeId) |
| Shutdowns a node. | |
| unsigned | size () const |
| Returns number of buckets in routing table. | |
Definition at line 301 of file routing_table.h.
| jami::RoutingTable::RoutingTable | ( | ) |
Definition at line 245 of file routing_table.cpp.
Add connecting node to routing table.
| nodeId |
Definition at line 343 of file routing_table.cpp.
References jami::emitSignal(), and findBucket().
Referenced by jami::SwarmManager::maintainBuckets().

Add known node to routing table.
| nodeId |
Definition at line 303 of file routing_table.cpp.
References jami::emitSignal(), and findBucket().

Add mobile node to routing table.
| nodeId |
Definition at line 316 of file routing_table.cpp.
References jami::emitSignal(), and findBucket().

| bool jami::RoutingTable::addNode | ( | const std::shared_ptr< dhtnet::ChannelSocketInterface > & | channel, |
| std::list< Bucket >::iterator & | bucket | ||
| ) |
Add socket to specific bucket.
| channel | |
| bucket |
Definition at line 269 of file routing_table.cpp.
References contains(), jami::emitSignal(), and findBucket().

| bool jami::RoutingTable::addNode | ( | const std::shared_ptr< dhtnet::ChannelSocketInterface > & | socket | ) |
Add socket to bucket.
| socket |
Definition at line 262 of file routing_table.cpp.
References addNode(), jami::emitSignal(), and findBucket().
Referenced by jami::SwarmManager::addChannel(), and addNode().

Returns the count closest nodes to a specific nodeId.
| nodeId | |
| count |
Definition at line 382 of file routing_table.cpp.
References closestNodes(), jami::emitSignal(), and findBucket().
Referenced by closestNodes().

| bool jami::RoutingTable::contains | ( | const std::list< Bucket >::iterator & | it, |
| const NodeId & | nodeId | ||
| ) | const |
Test if connected nodeId is in specific bucket.
| it | |
| nodeId |
Definition at line 494 of file routing_table.cpp.
References jami::emitSignal().
Referenced by addNode(), and jami::SwarmManager::maintainBuckets().

Delete node from every table in bucket.
Definition at line 534 of file routing_table.cpp.
References jami::emitSignal(), and findBucket().
Referenced by jami::SwarmManager::deleteNode().

| std::list< Bucket >::iterator jami::RoutingTable::findBucket | ( | const NodeId & | nodeId | ) |
Returns bucket iterator containing nodeId.
| nodeId |
Definition at line 364 of file routing_table.cpp.
References jami::emitSignal().
Referenced by jami::SwarmManager::addChannel(), addConnectingNode(), addKnownNode(), addMobileNode(), addNode(), addNode(), jami::SwarmManager::changeMobility(), closestNodes(), deleteNode(), findBucket(), getBucketMobileNodes(), hasConnectingNode(), hasKnownNode(), hasMobileNode(), hasNode(), removeConnectingNode(), removeMobileNode(), removeNode(), and shutdownNode().

|
inline |
Returns bucket iterator containing nodeId.
| nodeId |
Definition at line 414 of file routing_table.h.
References findBucket().

|
inline |
Definition at line 445 of file routing_table.h.
References jami::emitSignal().
Referenced by jami::SwarmManager::getActiveNodesCount().

| std::vector< NodeId > jami::RoutingTable::getAllNodes | ( | ) | const |
Return every node from each bucket.
Definition at line 501 of file routing_table.cpp.
References jami::emitSignal().
Referenced by jami::SwarmManager::getAllNodes().

| std::vector< NodeId > jami::RoutingTable::getBucketMobileNodes | ( | ) | const |
Returns mobile nodes corresponding to the swarm's id.
Definition at line 483 of file routing_table.cpp.
References jami::emitSignal(), and findBucket().

|
inline |
Returns buckets in routing table.
Definition at line 489 of file routing_table.h.
Referenced by jami::SwarmManager::display(), jami::SwarmManager::getBuckets(), and jami::SwarmManager::maintainBuckets().
| std::vector< NodeId > jami::RoutingTable::getConnectedNodes | ( | ) | const |
Definition at line 519 of file routing_table.cpp.
References jami::emitSignal().
Referenced by jami::SwarmManager::getConnectedNodes().

| std::vector< NodeId > jami::RoutingTable::getConnectingNodes | ( | ) | const |
Returns all routing table's connecting nodes.
Definition at line 472 of file routing_table.cpp.
References jami::emitSignal().

|
inline |
| std::vector< NodeId > jami::RoutingTable::getKnownNodes | ( | ) | const |
Returns all routing table's known nodes.
Definition at line 450 of file routing_table.cpp.
References jami::emitSignal().

| std::vector< NodeId > jami::RoutingTable::getMobileNodes | ( | ) | const |
Returns all routing table's mobile nodes.
Definition at line 461 of file routing_table.cpp.
References jami::emitSignal().

|
inline |
Returns number of total nodes in routing table.
Definition at line 437 of file routing_table.h.
References jami::emitSignal().
Referenced by jami::SwarmManager::display().

| std::vector< NodeId > jami::RoutingTable::getNodes | ( | ) | const |
Returns all routing table's connected nodes.
Definition at line 438 of file routing_table.cpp.
References jami::emitSignal().

| std::vector< RoutingTable::NodeStats > jami::RoutingTable::getRoutingTableStats | ( | ) | const |
Definition at line 552 of file routing_table.cpp.
References jami::emitSignal(), and jami::systemTimeFromSteady().
Referenced by jami::SwarmManager::getRoutingTableInfo().

Check if Connecting node exists in routing table.
| nodeId |
Definition at line 396 of file routing_table.h.
References jami::emitSignal(), and findBucket().

Checks if known node exists in routing table.
| nodeId |
Definition at line 350 of file routing_table.h.
References jami::emitSignal(), and findBucket().

Check if mobile node exists in routing table.
| nodeId |
Definition at line 337 of file routing_table.cpp.
References findBucket().

Check if connected node exsits in routing table.
| nodeId |
Definition at line 297 of file routing_table.cpp.
References findBucket().
Referenced by jami::SwarmManager::isConnectedWith().

| bool jami::RoutingTable::isEmpty | ( | ) | const |
Definition at line 251 of file routing_table.cpp.
References jami::emitSignal().
Referenced by jami::SwarmManager::isConnected().

| void jami::RoutingTable::printRoutingTable | ( | ) | const |
Prints routing table.
Definition at line 420 of file routing_table.cpp.
References jami::emitSignal(), and JAMI_DEBUG.

Remove connecting connecting node to routing table.
| nodeId |
Definition at line 358 of file routing_table.cpp.
References findBucket().

Remove mobile node to routing table.
| nodeId |
Definition at line 331 of file routing_table.cpp.
References findBucket().

Removes node from routing table Adds it to known_nodes or mobile_nodes depending on mobility.
| socket |
Definition at line 291 of file routing_table.cpp.
References findBucket().

Sets id for routing table.
| node |
Definition at line 477 of file routing_table.h.
Referenced by jami::SwarmManager::SwarmManager().
|
inline |
Shutdowns all nodes in routing table and add them to known_nodes or mobile_nodes.
Definition at line 467 of file routing_table.h.
References jami::emitSignal().
Referenced by jami::SwarmManager::shutdown().

Shutdowns a node.
| nodeId |
Definition at line 432 of file routing_table.cpp.
References findBucket().

|
inline |
Returns number of buckets in routing table.
Definition at line 431 of file routing_table.h.