IBR-DTNSuite  0.12
dtn::daemon::Configuration::DHT Class Reference

#include <Configuration.h>

Inheritance diagram for dtn::daemon::Configuration::DHT:
Inheritance graph
Collaboration diagram for dtn::daemon::Configuration::DHT:
Collaboration graph

Public Member Functions

bool enabled () const
 
bool randomPort () const
 
unsigned int getPort () const
 
string getID () const
 
bool randomID () const
 
bool isDNSBootstrappingEnabled () const
 
std::vector< string > getDNSBootstrappingNames () const
 
bool isIPBootstrappingEnabled () const
 
std::vector< string > getIPBootstrappingIPs () const
 
string getIPv4Binding () const
 
string getIPv6Binding () const
 
string getPathToNodeFiles () const
 
bool isIPv4Enabled () const
 
bool isIPv6Enabled () const
 
std::vector< int > getPortFilter () const
 
bool isBlacklistEnabled () const
 
bool isSelfAnnouncingEnabled () const
 
int getMinimumRating () const
 
bool isNeighbourAnnouncementEnabled () const
 
bool isNeighbourAllowedToAnnounceMe () const
 
bool ignoreDHTNeighbourInformations () const
 

Protected Member Functions

 DHT ()
 
virtual ~DHT ()
 
void load (const ibrcommon::ConfigFile &conf)
 

Friends

class Configuration
 

Detailed Description

Definition at line 547 of file Configuration.h.

Constructor & Destructor Documentation

dtn::daemon::Configuration::DHT::DHT ( )
protected

Definition at line 110 of file Configuration.cpp.

dtn::daemon::Configuration::DHT::~DHT ( )
protectedvirtual

Definition at line 132 of file Configuration.cpp.

Member Function Documentation

bool dtn::daemon::Configuration::DHT::enabled ( ) const
Returns
True, if the dht name service is enabled

Definition at line 1318 of file Configuration.cpp.

std::vector< string > dtn::daemon::Configuration::DHT::getDNSBootstrappingNames ( ) const
Returns
List of domain names for bootstrapping

Definition at line 1348 of file Configuration.cpp.

string dtn::daemon::Configuration::DHT::getID ( ) const
Returns
a string, which should be used to generate a dht id

Definition at line 1333 of file Configuration.cpp.

std::vector< string > dtn::daemon::Configuration::DHT::getIPBootstrappingIPs ( ) const
Returns
list of all IP(and port) informations

Definition at line 1358 of file Configuration.cpp.

string dtn::daemon::Configuration::DHT::getIPv4Binding ( ) const
Returns
a exact IPv4 address, to be used to bind the dht IPv4 socket

Definition at line 1363 of file Configuration.cpp.

string dtn::daemon::Configuration::DHT::getIPv6Binding ( ) const
Returns
a exact IPv6 address, to be used to bind the dht IPv6 socket

Definition at line 1367 of file Configuration.cpp.

int dtn::daemon::Configuration::DHT::getMinimumRating ( ) const
Returns
the minimum rating of a dht node information

Definition at line 1392 of file Configuration.cpp.

string dtn::daemon::Configuration::DHT::getPathToNodeFiles ( ) const

Gives a path to a file, where the dtndht lib could save good nodes on shutdown, or read good nodes used as the last session to bootstrap from them. If it doesn't exist, it will be created by the lib on writing good nodes.

Returns
a string with the path to the file

Definition at line 1372 of file Configuration.cpp.

unsigned int dtn::daemon::Configuration::DHT::getPort ( ) const
Returns
the port, which should be used for the dht

Definition at line 1328 of file Configuration.cpp.

std::vector<int> dtn::daemon::Configuration::DHT::getPortFilter ( ) const
Returns
a list of all allowed ports
bool dtn::daemon::Configuration::DHT::ignoreDHTNeighbourInformations ( ) const

If this method return true, neighbours of a found node should be ignored. This can be useful, if any routing algorithm can do this instead. If a routing algorithm, like prophet, askes also for the neighbours of a node, this method should return true, otherwise, the sent informations about the neighbours will be used to create static routes to the neighbour over the answering node.

Returns
True, if the neighbours of a found Node should be ignored, default is false

Definition at line 1412 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isBlacklistEnabled ( ) const
Returns
True, if a blacklist should be used by the dtndht lib

Definition at line 1407 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isDNSBootstrappingEnabled ( ) const
Returns
True, if dns bootstrapping is not disabled

Definition at line 1343 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isIPBootstrappingEnabled ( ) const
Returns
True, if a IP (and port) information was given

Definition at line 1353 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isIPv4Enabled ( ) const
Returns
True, if IPv4 should be used for the DHT

Definition at line 1377 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isIPv6Enabled ( ) const
Returns
True, if IPv6 should be used for the DHT

Definition at line 1382 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isNeighbourAllowedToAnnounceMe ( ) const
Returns
True, if all neighbours are allowed to announce me

Definition at line 1402 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isNeighbourAnnouncementEnabled ( ) const
Returns
True, if I announce my neighbours too

Definition at line 1397 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::isSelfAnnouncingEnabled ( ) const
Returns
True, if this daemon should announce itself on the dht

Definition at line 1387 of file Configuration.cpp.

void dtn::daemon::Configuration::DHT::load ( const ibrcommon::ConfigFile conf)
protectedvirtual

Implements dtn::daemon::Configuration::Extension.

Definition at line 448 of file Configuration.cpp.

References ibrcommon::ConfigFile::read(), and dtn::utils::Utils::tokenize().

Referenced by dtn::daemon::Configuration::load().

Here is the call graph for this function:

bool dtn::daemon::Configuration::DHT::randomID ( ) const
Returns
True, if no string was given to generate a dht id

Definition at line 1338 of file Configuration.cpp.

bool dtn::daemon::Configuration::DHT::randomPort ( ) const
Returns
True, if a random port will be chosen

Definition at line 1323 of file Configuration.cpp.

Friends And Related Function Documentation

friend class Configuration
friend

Definition at line 549 of file Configuration.h.


The documentation for this class was generated from the following files: