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,
74 NetConfig(
const std::string &name, NetType type);
98 void load(
bool quiet =
false);
99 void load(
const std::string &filename,
bool quiet =
false);
101 void params(
int argc,
char *argv[]);
106 std::string getNodename()
const;
129 std::string version()
const;
135 std::string getStorage()
const;
141 bool getUsePersistentBundleSets()
const;
146 EPIDEMIC_ROUTING = 1,
178 bool enabled()
const;
179 bool announce()
const;
180 bool shortbeacon()
const;
184 unsigned int timeout() const;
185 bool enableCrosslayer() const;
209 bool enabled()
const;
254 unsigned int options()
const;
259 std::ostream &output()
const;
264 bool display_timestamps()
const;
269 bool verbose()
const;
280 : p_encounter_max(0), p_encounter_first(0), p_first_threshold(0), beta(0), gamma(0), delta(0),
281 time_unit(0), i_typ(0), next_exchange_timeout(0), forwarding_strategy(), gtmx_nf_max(0)
325 const std::list<NetConfig>& getInterfaces()
const;
330 const std::list<Node>& getStaticNodes()
const;
335 const std::multimap<std::string, std::string>& getStaticRoutes()
const;
346 bool doForwarding()
const;
353 bool doPreferDirect()
const;
358 bool getTCPOptionNoDelay()
const;
378 bool doFragmentation()
const;
388 bool doScheduling()
const;
393 std::set<ibrcommon::vinterface> getInternetDevices()
const;
398 size_t getLinkRequestInterval()
const;
408 bool _tlsOptionalOnBadClock;
416 bool enabled()
const;
431 bool TLSRequired()
const;
435 SECURITY_LEVEL_NONE = 0,
436 SECURITY_LEVEL_AUTHENTICATED = 1,
437 SECURITY_LEVEL_ENCRYPTED = 2,
438 SECURITY_LEVEL_SIGNED = 4
444 int getLevel()
const;
476 bool TLSEncryptionDisabled()
const;
498 bool _disableEncryption;
516 bool daemonize()
const;
518 bool kill_daemon()
const;
538 bool hasReference()
const;
540 bool sendDiscoveryBeacons()
const;
542 float getSigma()
const;
543 float getPsi()
const;
544 float getSyncLevel()
const;
561 std::vector<string> _bootstrappingdomains;
562 bool _dnsbootstrapping;
563 std::vector<string> _bootstrappingips;
564 string _nodesFilePath;
569 std::vector<int> _portFilter;
571 bool _allowNeighbourToAnnounceMe;
572 bool _allowNeighbourAnnouncement;
573 bool _ignoreDHTNeighbourInformations;
579 bool enabled()
const;
584 bool randomPort()
const;
589 unsigned int getPort()
const;
594 string getID()
const;
599 bool randomID()
const;
604 bool isDNSBootstrappingEnabled()
const;
609 std::vector<string> getDNSBootstrappingNames()
const;
614 bool isIPBootstrappingEnabled()
const;
619 std::vector<string> getIPBootstrappingIPs()
const;
624 string getIPv4Binding()
const;
629 string getIPv6Binding()
const;
638 string getPathToNodeFiles()
const;
643 bool isIPv4Enabled()
const;
648 bool isIPv6Enabled()
const;
653 std::vector<int> getPortFilter()
const;
658 bool isBlacklistEnabled()
const;
663 bool isSelfAnnouncingEnabled()
const;
668 int getMinimumRating()
const;
673 bool isNeighbourAnnouncementEnabled()
const;
678 bool isNeighbourAllowedToAnnounceMe()
const;
689 bool ignoreDHTNeighbourInformations()
const;
704 const std::string getCtrlPath()
const;
705 bool enabled()
const;
716 std::string _address;
717 std::string _smtpServer;
719 std::string _smtpUsername;
720 std::string _smtpPassword;
724 size_t _smtpInterval;
725 size_t _smtpConnectionTimeout;
726 size_t _smtpKeepAliveTimeout;
727 std::string _imapServer;
729 std::string _imapUsername;
730 std::string _imapPassword;
733 std::vector<std::string> _imapFolder;
734 size_t _imapInterval;
735 size_t _imapConnectionTimeout;
737 std::vector<std::string> _tlsCACerts;
738 std::vector<std::string> _tlsUserCerts;
739 size_t _availableTime;
740 size_t _returningMailsCheck;
749 std::string getOwnAddress()
const;
757 std::string getSmtpServer()
const;
765 int getSmtpPort()
const;
773 std::string getSmtpUsername()
const;
781 std::string getSmtpPassword()
const;
791 size_t getSmtpSubmitInterval()
const;
796 size_t getSmtpConnectionTimeout()
const;
806 size_t getSmtpKeepAliveTimeout()
const;
812 bool smtpAuthenticationNeeded()
const;
818 bool smtpUseTLS()
const;
824 bool smtpUseSSL()
const;
832 std::string getImapServer()
const;
840 int getImapPort()
const;
848 std::string getImapUsername()
const;
856 std::string getImapPassword()
const;
865 std::vector<std::string> getImapFolder()
const;
875 size_t getImapLookupInterval()
const;
880 size_t getImapConnectionTimeout()
const;
886 bool imapUseTLS()
const;
892 bool imapUseSSL()
const;
897 bool imapPurgeMail()
const;
903 std::vector<std::string> getTlsCACerts()
const;
909 std::vector<std::string> getTlsUserCerts()
const;
915 size_t getNodeAvailableTime()
const;
920 size_t getReturningMailChecks()
const;
947 std::string _filename;