22 #ifndef CONFIGURATION_H_
23 #define CONFIGURATION_H_
34 using namespace dtn::net;
35 using namespace dtn::core;
36 using namespace dtn::data;
68 NETWORK_DGRAM_UDP = 6,
69 NETWORK_DGRAM_LOWPAN = 7,
70 NETWORK_DGRAM_ETHERNET = 8
73 NetConfig(std::string name, NetType type,
const std::string &url);
75 NetConfig(std::string name, NetType type,
int port);
100 void load(
string filename);
102 void params(
int argc,
char *argv[]);
107 std::string getNodename()
const;
114 int getTimezone()
const;
137 std::string version()
const;
143 std::string getStorage()
const;
148 bool enableTrafficStats()
const;
153 EPIDEMIC_ROUTING = 1,
185 bool enabled()
const;
186 bool announce()
const;
187 bool shortbeacon()
const;
191 unsigned int timeout() const;
192 bool enableCrosslayer() const;
216 bool enabled()
const;
261 unsigned int options()
const;
266 std::ostream &output()
const;
271 bool display_timestamps()
const;
276 bool verbose()
const;
287 : p_encounter_max(0), p_encounter_first(0), p_first_threshold(0), beta(0), gamma(0), delta(0),
288 time_unit(0), i_typ(0), next_exchange_timeout(0), forwarding_strategy(), gtmx_nf_max(0)
330 const std::list<NetConfig>& getInterfaces()
const;
335 const std::list<Node>& getStaticNodes()
const;
340 const std::multimap<std::string, std::string>& getStaticRoutes()
const;
351 bool doForwarding()
const;
356 bool getTCPOptionNoDelay()
const;
376 bool doFragmentation()
const;
386 bool doScheduling()
const;
391 std::set<ibrcommon::vinterface> getInternetDevices()
const;
401 bool _tlsOptionalOnBadClock;
409 bool enabled()
const;
424 bool TLSRequired()
const;
428 SECURITY_LEVEL_NONE = 0,
429 SECURITY_LEVEL_AUTHENTICATED = 1,
430 SECURITY_LEVEL_ENCRYPTED = 2,
431 SECURITY_LEVEL_SIGNED = 4
437 int getLevel()
const;
469 bool TLSEncryptionDisabled()
const;
491 bool _disableEncryption;
509 bool daemonize()
const;
511 bool kill_daemon()
const;
531 bool hasReference()
const;
533 bool sendDiscoveryAnnouncements()
const;
535 float getSigma()
const;
536 float getPsi()
const;
537 float getSyncLevel()
const;
554 std::vector<string> _bootstrappingdomains;
555 bool _dnsbootstrapping;
556 std::vector<string> _bootstrappingips;
557 string _nodesFilePath;
562 std::vector<int> _portFilter;
564 bool _allowNeighbourToAnnounceMe;
565 bool _allowNeighbourAnnouncement;
566 bool _ignoreDHTNeighbourInformations;
572 bool enabled()
const;
577 bool randomPort()
const;
582 unsigned int getPort()
const;
587 string getID()
const;
592 bool randomID()
const;
597 bool isDNSBootstrappingEnabled()
const;
602 std::vector<string> getDNSBootstrappingNames()
const;
607 bool isIPBootstrappingEnabled()
const;
612 std::vector<string> getIPBootstrappingIPs()
const;
617 string getIPv4Binding()
const;
622 string getIPv6Binding()
const;
631 string getPathToNodeFiles()
const;
636 bool isIPv4Enabled()
const;
641 bool isIPv6Enabled()
const;
646 std::vector<int> getPortFilter()
const;
651 bool isBlacklistEnabled()
const;
656 bool isSelfAnnouncingEnabled()
const;
661 int getMinimumRating()
const;
666 bool isNeighbourAnnouncementEnabled()
const;
671 bool isNeighbourAllowedToAnnounceMe()
const;
682 bool ignoreDHTNeighbourInformations()
const;
697 const std::string getCtrlPath()
const;
698 bool enabled()
const;
723 std::string _filename;