IBR-DTNSuite  0.10
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 540 of file Configuration.h.

Constructor & Destructor Documentation

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

Definition at line 113 of file Configuration.cpp.

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

Definition at line 129 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 1185 of file Configuration.cpp.

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

Definition at line 1215 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 1200 of file Configuration.cpp.

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

Definition at line 1225 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 1230 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 1234 of file Configuration.cpp.

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

Definition at line 1259 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 1239 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 1195 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 1279 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 1274 of file Configuration.cpp.

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

Definition at line 1210 of file Configuration.cpp.

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

Definition at line 1220 of file Configuration.cpp.

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

Definition at line 1244 of file Configuration.cpp.

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

Definition at line 1249 of file Configuration.cpp.

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

Definition at line 1269 of file Configuration.cpp.

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

Definition at line 1264 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 1254 of file Configuration.cpp.

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

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

Definition at line 412 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 1205 of file Configuration.cpp.

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

Definition at line 1190 of file Configuration.cpp.

Friends And Related Function Documentation

friend class Configuration
friend

Definition at line 542 of file Configuration.h.


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