IBR-DTNSuite
0.8
|
#include <Configuration.h>
This class contains the hole configuration for the daemon.
Definition at line 24 of file Configuration.h.
Definition at line 154 of file Configuration.h.
bool dtn::daemon::Configuration::doAPI | ( | ) |
Enable/Disable the API interface.
Definition at line 814 of file Configuration.cpp.
Referenced by __daemon_run().
Definition at line 472 of file Configuration.cpp.
References dtn::daemon::Configuration::NetConfig::NETWORK_TCP, and ibrcommon::ConfigFile::read().
Referenced by __daemon_run().
Definition at line 493 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by __daemon_run().
const Configuration::Daemon & dtn::daemon::Configuration::getDaemon | ( | ) | const |
Definition at line 144 of file Configuration.cpp.
Referenced by __daemon_run(), and main().
const Configuration::Debug & dtn::daemon::Configuration::getDebug | ( | ) | const |
Definition at line 124 of file Configuration.cpp.
Referenced by __daemon_run().
const Configuration::DHT & dtn::daemon::Configuration::getDHT | ( | ) | const |
Definition at line 154 of file Configuration.cpp.
Referenced by __daemon_run().
const Configuration::Discovery & dtn::daemon::Configuration::getDiscovery | ( | ) | const |
Definition at line 114 of file Configuration.cpp.
Referenced by __daemon_run().
unsigned int dtn::daemon::Configuration::getGID | ( | ) | const |
The "gid" keyword in the configuration can define a group to work as. If this daemon is started as root the daemon will switch to the defined group on startup.
Definition at line 784 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by switchUser().
Configuration & dtn::daemon::Configuration::getInstance | ( | ) | [static] |
Definition at line 159 of file Configuration.cpp.
Referenced by dtn::daemon::Configuration::Discovery::address(), dtn::daemon::Configuration::Statistic::address(), dtn::daemon::Configuration::Discovery::announce(), dtn::api::ClientHandler::ClientHandler(), dtn::api::ApiServer::componentRun(), dtn::dht::DHTNameService::componentRun(), dtn::net::ConnectionManager::componentUp(), dtn::net::TCPConnection::connect(), dtn_dht_handle_lookup_result(), dtn::daemon::Configuration::Statistic::enabled(), dtn::net::TCPConnection::eventConnectionUp(), dtn::security::SecurityManager::fastverify(), dtn::security::SecurityKeyManager::get(), dtn::security::SecurityCertificateManager::initialize(), dtn::daemon::Configuration::Statistic::interval(), dtn::daemon::Configuration::Statistic::logfile(), dtn::net::operator<<(), dtn::daemon::Configuration::Discovery::port(), dtn::daemon::Configuration::Statistic::port(), dtn::net::UDPConvergenceLayer::queue(), dtn::security::TLSStreamComponent::raiseEvent(), dtn::routing::StaticRoutingExtension::run(), dtn::daemon::Configuration::Discovery::shortbeacon(), dtn::net::TCPConnection::TCPConnection(), dtn::daemon::Configuration::Statistic::type(), and dtn::daemon::Configuration::Discovery::version().
size_t dtn::daemon::Configuration::getLimit | ( | std::string | suffix | ) |
Returns a limit defined in the configuration file. The given string specify with limit is to return. If the string is "block", then the value of "limit_block" is returned.
Definition at line 912 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by createBundleStorage(), and setGlobalVars().
const Configuration::Logger & dtn::daemon::Configuration::getLogger | ( | ) | const |
Definition at line 129 of file Configuration.cpp.
Referenced by __daemon_run().
const Configuration::Network & dtn::daemon::Configuration::getNetwork | ( | ) | const |
Definition at line 134 of file Configuration.cpp.
Referenced by __daemon_run(), dtn::dht::DHTNameService::componentRun(), dtn::net::ConnectionManager::componentUp(), createConvergenceLayers(), dtn::net::TCPConnection::eventConnectionUp(), and dtn::routing::StaticRoutingExtension::run().
std::string dtn::daemon::Configuration::getNodename | ( | ) |
Returns the name of the node
Definition at line 423 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by setGlobalVars().
string dtn::daemon::Configuration::getNotifyCommand | ( | ) |
The keyword "notify_cmd" can define an external application which is called by some events. This could be used to notify the user of some events of interest.
Definition at line 819 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by __daemon_run().
ibrcommon::File dtn::daemon::Configuration::getPath | ( | string | name | ) |
Generic command to get a specific path. If "name" is set to "foo" then the parameter "foo_path" is returned.
name | The prefix of the path to get. |
Definition at line 753 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by createBundleStorage(), and initialize_blobs().
const Configuration::Security & dtn::daemon::Configuration::getSecurity | ( | ) | const |
Definition at line 139 of file Configuration.cpp.
Referenced by __daemon_run(), dtn::security::SecurityManager::fastverify(), dtn::security::SecurityKeyManager::get(), dtn::security::SecurityCertificateManager::initialize(), and dtn::security::TLSStreamComponent::raiseEvent().
const Configuration::Statistic & dtn::daemon::Configuration::getStatistic | ( | ) | const |
Definition at line 119 of file Configuration.cpp.
Referenced by __daemon_run().
std::string dtn::daemon::Configuration::getStorage | ( | ) | const |
Get the type of bundle storage to use.
Definition at line 504 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by createBundleStorage().
const Configuration::TimeSync & dtn::daemon::Configuration::getTimeSync | ( | ) | const |
Definition at line 149 of file Configuration.cpp.
Returns the manual timezone difference in hours.
Definition at line 748 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by setGlobalVars().
unsigned int dtn::daemon::Configuration::getUID | ( | ) | const |
The "uid" keyword in the configuration can define a user to work as. If this daemon is started as root the daemon will switch to the defined user on startup.
Definition at line 775 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by switchUser().
const std::string dtn::daemon::Configuration::getUser | ( | ) | const |
The "user" keyword in the configuration can define a user to work as. If this daemon is started as root the daemon will switch to the defined user on startup.
Definition at line 766 of file Configuration.cpp.
References ibrcommon::ConfigFile::read().
Referenced by switchUser().
void dtn::daemon::Configuration::load | ( | ) |
load the configuration from a file
Definition at line 304 of file Configuration.cpp.
Referenced by __daemon_run().
void dtn::daemon::Configuration::load | ( | string | filename | ) |
Definition at line 309 of file Configuration.cpp.
References _debug, ibrcommon::ConfigFile::add(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::daemon::Configuration::Discovery::load(), dtn::daemon::Configuration::Statistic::load(), dtn::daemon::Configuration::Logger::load(), dtn::daemon::Configuration::Network::load(), dtn::daemon::Configuration::Security::load(), dtn::daemon::Configuration::TimeSync::load(), and dtn::daemon::Configuration::DHT::load().
void dtn::daemon::Configuration::params | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 165 of file Configuration.cpp.
References _debug, dtn::daemon::Configuration::Network::_default_net, dtn::daemon::Configuration::Discovery::_enabled, dtn::daemon::Configuration::Logger::_timestamps, dtn::daemon::Configuration::Network::_use_default_net, dtn::utils::Clock::badclock, and version().
Referenced by main().
std::string dtn::daemon::Configuration::version | ( | ) |
Get the version of this daemon.
Definition at line 53 of file Configuration.cpp.
References PACKAGE_VERSION, and SVN_REVISION.
Referenced by __daemon_run(), dtn::api::ApiServer::componentRun(), and params().