22 #ifndef NLSR_CONF_PARAMETER_HPP 23 #define NLSR_CONF_PARAMETER_HPP 33 #include <boost/cstdint.hpp> 34 #include <ndn-cxx/face.hpp> 35 #include <ndn-cxx/security/validator-config.hpp> 36 #include <ndn-cxx/security/v2/certificate-fetcher-direct-fetch.hpp> 37 #include <ndn-cxx/util/time.hpp> 141 ConfParameter(ndn::Face& face,
const std::string& confFileName =
"nlsr.conf");
146 return m_confFileName;
161 m_routerName = routerName;
173 m_siteName = siteName;
185 m_routerPrefix = m_network;
186 m_routerPrefix.append(m_siteName);
187 m_routerPrefix.append(m_routerName);
193 return m_routerPrefix;
211 m_lsaRefreshTime = lrt;
217 return m_syncProtocol;
224 m_syncProtocol = syncProtocol;
231 return m_lsaRefreshTime;
237 m_lsaInterestLifetime = lifetime;
240 const ndn::time::seconds&
243 return m_lsaInterestLifetime;
249 m_adjLsaBuildInterval = interval;
255 return m_adjLsaBuildInterval;
261 m_firstHelloInterval = interval;
267 return m_firstHelloInterval;
273 m_routingCalcInterval = interval;
279 return m_routingCalcInterval;
285 m_routerDeadInterval = rdt;
291 return m_routerDeadInterval;
297 m_faceDatasetFetchTries = count;
303 return m_faceDatasetFetchTries;
309 m_faceDatasetFetchInterval = ndn::time::seconds(interval);
312 const ndn::time::seconds
315 return m_faceDatasetFetchInterval;
321 m_interestRetryNumber = irn;
327 return m_interestRetryNumber;
333 m_interestResendTime = irt;
339 return m_interestResendTime;
345 return m_infoInterestInterval;
351 m_infoInterestInterval = iii;
357 m_hyperbolicState = ihc;
363 return m_hyperbolicState;
397 m_maxFacesPerPrefix = mfpp;
403 return m_maxFacesPerPrefix;
409 m_stateFileDir = ssfd;
415 return m_stateFileDir;
420 m_confFileNameDynamic = confFileDynamic;
426 return m_confFileNameDynamic;
432 m_syncInterestLifetime = ndn::time::milliseconds(syncInterestLifetime);
435 const ndn::time::milliseconds&
438 return m_syncInterestLifetime;
453 ndn::security::ValidatorConfig&
459 ndn::security::ValidatorConfig&
462 return m_prefixUpdateValidator;
477 std::string m_confFileName;
478 ndn::Name m_routerName;
479 ndn::Name m_siteName;
482 ndn::Name m_routerPrefix;
483 ndn::Name m_lsaRouterPrefix;
485 ndn::Name m_syncPrefix;
486 ndn::Name m_lsaPrefix;
488 uint32_t m_lsaRefreshTime;
490 uint32_t m_adjLsaBuildInterval;
491 uint32_t m_firstHelloInterval;
492 uint32_t m_routingCalcInterval;
494 uint32_t m_faceDatasetFetchTries;
495 ndn::time::seconds m_faceDatasetFetchInterval;
497 ndn::time::seconds m_lsaInterestLifetime;
498 uint32_t m_routerDeadInterval;
500 uint32_t m_interestRetryNumber;
501 uint32_t m_interestResendTime;
503 uint32_t m_infoInterestInterval;
505 int32_t m_hyperbolicState;
507 std::vector<double> m_corTheta;
509 uint32_t m_maxFacesPerPrefix;
511 std::string m_stateFileDir;
513 ndn::time::milliseconds m_syncInterestLifetime;
515 int32_t m_syncProtocol;
517 std::string m_confFileNameDynamic;
520 static const uint64_t SYNC_VERSION;
524 ndn::security::ValidatorConfig m_validator;
525 ndn::security::ValidatorConfig m_prefixUpdateValidator;
531 #endif // NLSR_CONF_PARAMETER_HPP
uint32_t getInterestResendTime() const
ConfParameter(ndn::Face &face, const std::string &confFileName="nlsr.conf")
ndn::security::ValidatorConfig & getValidator()
A class to house all the configuration parameters for NLSR.
const ndn::time::milliseconds & getSyncInterestLifetime() const
Store certificates for names.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
void setLsaInterestLifetime(const ndn::time::seconds &lifetime)
void setStateFileDir(const std::string &ssfd)
const std::string & getConfFileNameDynamic() const
void setMaxFacesPerPrefix(uint32_t mfpp)
const std::string & getConfFileName()
void setRoutingCalcInterval(uint32_t interval)
void setNetwork(const ndn::Name &networkName)
AdjacencyList & getAdjacencyList()
void setAdjLsaBuildInterval(uint32_t interval)
void setSiteName(const ndn::Name &siteName)
uint32_t getInfoInterestInterval() const
ndn::security::ValidatorConfig & getPrefixUpdateValidator()
const ndn::Name & getRouterPrefix() const
void setInterestResendTime(uint32_t irt)
void setInfoInterestInterval(uint32_t iii)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
const ndn::time::seconds & getLsaInterestLifetime() const
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
void setCorTheta(const std::vector< double > &ct)
const ndn::Name & getSyncPrefix() const
uint32_t getInterestRetryNumber() const
uint32_t getMaxFacesPerPrefix() const
std::vector< double > getCorTheta() const
const ndn::Name & getLsaPrefix() const
void setSyncInterestLifetime(uint32_t syncInterestLifetime)
const std::string & getStateFileDir() const
void setSyncProtocol(int32_t syncProtocol)
void setRouterName(const ndn::Name &routerName)
void setFaceDatasetFetchInterval(uint32_t interval)
uint32_t getLsaRefreshTime() const
void setInterestRetryNumber(uint32_t irn)
uint32_t getSyncProtocol() const
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
uint32_t getAdjLsaBuildInterval() const
void setConfFileNameDynamic(const std::string &confFileDynamic)
void setRouterDeadInterval(uint32_t rdt)
NamePrefixList & getNamePrefixList()
void setFirstHelloInterval(uint32_t interval)
security::CertificateStore & getCertStore()
uint32_t getFirstHelloInterval() const
void setLsaRefreshTime(uint32_t lrt)
uint32_t getFaceDatasetFetchTries() const
const ndn::Name & getNetwork() const
void setHyperbolicState(int32_t ihc)
void setFaceDatasetFetchTries(uint32_t count)
const ndn::Name & getRouterName() const
int32_t getHyperbolicState() const
uint32_t getRoutingCalcInterval() const
const ndn::Name & getSiteName() const
const ndn::time::seconds getFaceDatasetFetchInterval() const
uint32_t getRouterDeadInterval() const
void writeLog()
Dump the current state of all attributes to the log.