conf-file-processor.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014-2023, The University of Memphis,
4  * Regents of the University of California,
5  * Arizona Board of Regents.
6  *
7  * This file is part of NLSR (Named-data Link State Routing).
8  * See AUTHORS.md for complete list of NLSR authors and contributors.
9  *
10  * NLSR is free software: you can redistribute it and/or modify it under the terms
11  * of the GNU General Public License as published by the Free Software Foundation,
12  * either version 3 of the License, or (at your option) any later version.
13  *
14  * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  * PURPOSE. See the GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along with
19  * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #include "conf-file-processor.hpp"
23 #include "adjacent.hpp"
25 #include "utility/name-helper.hpp"
26 
27 #include <ndn-cxx/name.hpp>
28 #include <ndn-cxx/net/face-uri.hpp>
29 #include <ndn-cxx/util/io.hpp>
30 
31 #include <boost/algorithm/string.hpp>
32 #include <boost/filesystem.hpp>
33 #include <boost/property_tree/info_parser.hpp>
34 
35 #include <fstream>
36 #include <iostream>
37 
38 namespace bf = boost::filesystem;
39 
40 namespace nlsr {
41 
42 template <class T>
43 class ConfigurationVariable
44 {
45 public:
46  typedef std::function<void(T)> ConfParameterCallback;
47 
48  ConfigurationVariable(const std::string& key, const ConfParameterCallback& setter)
49  : m_key(key)
50  , m_setterCallback(setter)
51  , m_minValue(0)
52  , m_maxValue(0)
53  , m_shouldCheckRange(false)
54  , m_isRequired(true)
55  {
56  }
57 
58  bool
59  parseFromConfigSection(const ConfigSection& section)
60  {
61  try {
62  T value = section.get<T>(m_key);
63 
64  if (!isValidValue(value)) {
65  return false;
66  }
67 
68  m_setterCallback(value);
69  return true;
70  }
71  catch (const std::exception& ex) {
72 
73  if (m_isRequired) {
74  std::cerr << ex.what() << std::endl;
75  std::cerr << "Missing required configuration variable" << std::endl;
76  return false;
77  }
78  else {
79  m_setterCallback(m_defaultValue);
80  return true;
81  }
82  }
83 
84  return false;
85  }
86 
87  void
88  setMinAndMaxValue(T min, T max)
89  {
90  m_minValue = min;
91  m_maxValue = max;
92  m_shouldCheckRange = true;
93  }
94 
95  void
96  setOptional(T defaultValue)
97  {
98  m_isRequired = false;
99  m_defaultValue = defaultValue;
100  }
101 
102 private:
103  void
104  printOutOfRangeError(T value)
105  {
106  std::cerr << "Invalid value for " << m_key << ": "
107  << value << ". "
108  << "Valid values: "
109  << m_minValue << " - "
110  << m_maxValue << std::endl;
111  }
112 
113  bool
114  isValidValue(T value)
115  {
116  if (!m_shouldCheckRange) {
117  return true;
118  }
119  else if (value < m_minValue || value > m_maxValue)
120  {
121  printOutOfRangeError(value);
122  return false;
123  }
124 
125  return true;
126  }
127 
128 private:
129  const std::string m_key;
130  const ConfParameterCallback m_setterCallback;
131 
132  T m_defaultValue;
133  T m_minValue;
134  T m_maxValue;
135 
136  bool m_shouldCheckRange;
137  bool m_isRequired;
138 };
139 
141  : m_confFileName(confParam.getConfFileName())
142  , m_confParam(confParam)
143 {
144 }
145 
146 bool
148 {
149  std::ifstream inputFile(m_confFileName);
150  if (!inputFile.is_open()) {
151  std::cerr << "Failed to read configuration file: " << m_confFileName << std::endl;
152  return false;
153  }
154 
155  if (!load(inputFile)) {
156  return false;
157  }
158 
159  m_confParam.buildRouterAndSyncUserPrefix();
160  m_confParam.writeLog();
161  return true;
162 }
163 
164 bool
165 ConfFileProcessor::load(std::istream& input)
166 {
167  ConfigSection pt;
168  try {
169  boost::property_tree::read_info(input, pt);
170  }
171  catch (const boost::property_tree::ptree_error& e) {
172  std::cerr << "Failed to parse configuration file '" << m_confFileName
173  << "': " << e.what() << std::endl;
174  return false;
175  }
176 
177  for (const auto& tn : pt) {
178  if (!processSection(tn.first, tn.second)) {
179  return false;
180  }
181  }
182  return true;
183 }
184 
185 bool
186 ConfFileProcessor::processSection(const std::string& sectionName, const ConfigSection& section)
187 {
188  bool ret = true;
189  if (sectionName == "general") {
190  ret = processConfSectionGeneral(section);
191  }
192  else if (sectionName == "neighbors") {
193  ret = processConfSectionNeighbors(section);
194  }
195  else if (sectionName == "hyperbolic") {
196  ret = processConfSectionHyperbolic(section);
197  }
198  else if (sectionName == "fib") {
199  ret = processConfSectionFib(section);
200  }
201  else if (sectionName == "advertising") {
202  ret = processConfSectionAdvertising(section);
203  }
204  else if (sectionName == "security") {
205  ret = processConfSectionSecurity(section);
206  }
207  else {
208  std::cerr << "Unknown configuration section: " << sectionName << std::endl;
209  }
210  return ret;
211 }
212 
213 bool
214 ConfFileProcessor::processConfSectionGeneral(const ConfigSection& section)
215 {
216  // sync-protocol
217  std::string syncProtocol = section.get<std::string>("sync-protocol", "psync");
218  if (syncProtocol == "chronosync") {
219 #ifdef HAVE_CHRONOSYNC
221 #else
222  std::cerr << "NLSR was compiled without ChronoSync support!\n";
223  return false;
224 #endif
225  }
226  else if (syncProtocol == "psync") {
227 #ifdef HAVE_PSYNC
229 #else
230  std::cerr << "NLSR was compiled without PSync support!\n";
231  return false;
232 #endif
233  }
234  else if (syncProtocol == "svs") {
235 #ifdef HAVE_SVS
236  m_confParam.setSyncProtocol(SyncProtocol::SVS);
237 #else
238  std::cerr << "NLSR was compiled without SVS support!\n";
239  return false;
240 #endif
241  }
242  else {
243  std::cerr << "Sync protocol '" << syncProtocol << "' is not supported!\n"
244  << "Use 'chronosync' or 'psync' or 'svs'\n";
245  return false;
246  }
247 
248  try {
249  std::string network = section.get<std::string>("network");
250  std::string site = section.get<std::string>("site");
251  std::string router = section.get<std::string>("router");
252  ndn::Name networkName(network);
253  if (!networkName.empty()) {
254  m_confParam.setNetwork(networkName);
255  }
256  else {
257  std::cerr << "Network can not be null or empty or in bad URI format" << std::endl;
258  return false;
259  }
260  ndn::Name siteName(site);
261  if (!siteName.empty()) {
262  m_confParam.setSiteName(siteName);
263  }
264  else {
265  std::cerr << "Site can not be null or empty or in bad URI format" << std::endl;
266  return false;
267  }
268  ndn::Name routerName(router);
269  if (!routerName.empty()) {
270  m_confParam.setRouterName(routerName);
271  }
272  else {
273  std::cerr << "Router name can not be null or empty or in bad URI format" << std::endl;
274  return false;
275  }
276  }
277  catch (const std::exception& ex) {
278  std::cerr << ex.what() << std::endl;
279  return false;
280  }
281 
282  // lsa-refresh-time
283  uint32_t lsaRefreshTime = section.get<uint32_t>("lsa-refresh-time", LSA_REFRESH_TIME_DEFAULT);
284 
285  if (lsaRefreshTime >= LSA_REFRESH_TIME_MIN && lsaRefreshTime <= LSA_REFRESH_TIME_MAX) {
286  m_confParam.setLsaRefreshTime(lsaRefreshTime);
287  }
288  else {
289  std::cerr << "Invalid value for lsa-refresh-time. "
290  << "Allowed range: " << LSA_REFRESH_TIME_MIN
291  << "-" << LSA_REFRESH_TIME_MAX << std::endl;
292  return false;
293  }
294 
295  // router-dead-interval
296  uint32_t routerDeadInterval = section.get<uint32_t>("router-dead-interval", 2 * lsaRefreshTime);
297 
298  if (routerDeadInterval > m_confParam.getLsaRefreshTime()) {
299  m_confParam.setRouterDeadInterval(routerDeadInterval);
300  }
301  else {
302  std::cerr << "Value of router-dead-interval must be larger than lsa-refresh-time" << std::endl;
303  return false;
304  }
305 
306  // lsa-interest-lifetime
307  int lifetime = section.get<int>("lsa-interest-lifetime", LSA_INTEREST_LIFETIME_DEFAULT);
308 
309  if (lifetime >= LSA_INTEREST_LIFETIME_MIN && lifetime <= LSA_INTEREST_LIFETIME_MAX) {
310  m_confParam.setLsaInterestLifetime(ndn::time::seconds(lifetime));
311  }
312  else {
313  std::cerr << "Invalid value for lsa-interest-timeout. "
314  << "Allowed range: " << LSA_INTEREST_LIFETIME_MIN
315  << "-" << LSA_INTEREST_LIFETIME_MAX << std::endl;
316  return false;
317  }
318 
319  // sync-interest-lifetime
320  uint32_t syncInterestLifetime = section.get<uint32_t>("sync-interest-lifetime",
322  if (syncInterestLifetime >= SYNC_INTEREST_LIFETIME_MIN &&
323  syncInterestLifetime <= SYNC_INTEREST_LIFETIME_MAX) {
324  m_confParam.setSyncInterestLifetime(syncInterestLifetime);
325  }
326  else {
327  std::cerr << "Invalid value for sync-interest-lifetime. "
328  << "Allowed range: " << SYNC_INTEREST_LIFETIME_MIN
329  << "-" << SYNC_INTEREST_LIFETIME_MAX << std::endl;
330  return false;
331  }
332 
333  try {
334  std::string stateDir = section.get<std::string>("state-dir");
335  if (bf::exists(stateDir)) {
336  if (bf::is_directory(stateDir)) {
337  // copying nlsr.conf file to a user-defined directory for possible modification
338  std::string conFileDynamic = (bf::path(stateDir) / "nlsr.conf").string();
339 
340  if (m_confFileName == conFileDynamic) {
341  std::cerr << "Please use nlsr.conf stored at another location "
342  << "or change the state-dir in the configuration." << std::endl;
343  std::cerr << "The file at " << conFileDynamic <<
344  " is used as dynamic file for saving NLSR runtime changes." << std::endl;
345  std::cerr << "The dynamic file can be used for next run "
346  << "after copying to another location." << std::endl;
347  return false;
348  }
349 
350  m_confParam.setConfFileNameDynamic(conFileDynamic);
351  try {
352  bf::copy_file(m_confFileName, conFileDynamic,
353 #if BOOST_VERSION >= 107400
354  bf::copy_options::overwrite_existing
355 #else
356  bf::copy_option::overwrite_if_exists
357 #endif
358  );
359  }
360  catch (const bf::filesystem_error& e) {
361  std::cerr << "Error copying conf file to the state directory: " << e.what() << std::endl;
362  return false;
363  }
364 
365  std::string testFileName = (bf::path(stateDir) / "test.seq").string();
366  std::ofstream testOutFile(testFileName);
367  if (testOutFile) {
368  m_confParam.setStateFileDir(stateDir);
369  }
370  else {
371  std::cerr << "NLSR does not have read/write permission on the state directory" << std::endl;
372  return false;
373  }
374  testOutFile.close();
375  remove(testFileName.c_str());
376  }
377  else {
378  std::cerr << "Provided path '" << stateDir << "' is not a directory" << std::endl;
379  return false;
380  }
381  }
382  else {
383  std::cerr << "Provided state directory '" << stateDir << "' does not exist" << std::endl;
384  return false;
385  }
386  }
387  catch (const std::exception& ex) {
388  std::cerr << "You must configure state directory" << std::endl;
389  std::cerr << ex.what() << std::endl;
390  return false;
391  }
392 
393  return true;
394 }
395 
396 bool
397 ConfFileProcessor::processConfSectionNeighbors(const ConfigSection& section)
398 {
399  // hello-retries
400  int retrials = section.get<int>("hello-retries", HELLO_RETRIES_DEFAULT);
401 
402  if (retrials >= HELLO_RETRIES_MIN && retrials <= HELLO_RETRIES_MAX) {
403  m_confParam.setInterestRetryNumber(retrials);
404  }
405  else {
406  std::cerr << "Invalid value for hello-retries. "
407  << "Allowed range: " << HELLO_RETRIES_MIN << "-" << HELLO_RETRIES_MAX << std::endl;
408  return false;
409  }
410 
411  // hello-timeout
412  uint32_t timeOut = section.get<uint32_t>("hello-timeout", HELLO_TIMEOUT_DEFAULT);
413 
414  if (timeOut >= HELLO_TIMEOUT_MIN && timeOut <= HELLO_TIMEOUT_MAX) {
415  m_confParam.setInterestResendTime(timeOut);
416  }
417  else {
418  std::cerr << "Invalid value for hello-timeout. "
419  << "Allowed range: " << HELLO_TIMEOUT_MIN << "-" << HELLO_TIMEOUT_MAX << std::endl;
420  return false;
421  }
422 
423  // hello-interval
424  uint32_t interval = section.get<uint32_t>("hello-interval", HELLO_INTERVAL_DEFAULT);
425 
426  if (interval >= HELLO_INTERVAL_MIN && interval <= HELLO_INTERVAL_MAX) {
427  m_confParam.setInfoInterestInterval(interval);
428  }
429  else {
430  std::cerr << "Invalid value for hello-interval. "
431  << "Allowed range: " << HELLO_INTERVAL_MIN << "-" << HELLO_INTERVAL_MAX << std::endl;
432  return false;
433  }
434 
435  // Event intervals
436  // adj-lsa-build-interval
437  ConfigurationVariable<uint32_t> adjLsaBuildInterval("adj-lsa-build-interval",
439  &m_confParam, _1));
440  adjLsaBuildInterval.setMinAndMaxValue(ADJ_LSA_BUILD_INTERVAL_MIN, ADJ_LSA_BUILD_INTERVAL_MAX);
441  adjLsaBuildInterval.setOptional(ADJ_LSA_BUILD_INTERVAL_DEFAULT);
442 
443  if (!adjLsaBuildInterval.parseFromConfigSection(section)) {
444  return false;
445  }
446  // Set the retry count for fetching the FaceStatus dataset
447  ConfigurationVariable<uint32_t> faceDatasetFetchTries("face-dataset-fetch-tries",
449  &m_confParam, _1));
450 
451  faceDatasetFetchTries.setMinAndMaxValue(FACE_DATASET_FETCH_TRIES_MIN,
453  faceDatasetFetchTries.setOptional(FACE_DATASET_FETCH_TRIES_DEFAULT);
454 
455  if (!faceDatasetFetchTries.parseFromConfigSection(section)) {
456  return false;
457  }
458 
459  // Set the interval between FaceStatus dataset fetch attempts.
460  ConfigurationVariable<uint32_t> faceDatasetFetchInterval("face-dataset-fetch-interval",
462  &m_confParam, _1));
463 
464  faceDatasetFetchInterval.setMinAndMaxValue(FACE_DATASET_FETCH_INTERVAL_MIN,
466  faceDatasetFetchInterval.setOptional(FACE_DATASET_FETCH_INTERVAL_DEFAULT);
467 
468  if (!faceDatasetFetchInterval.parseFromConfigSection(section)) {
469  return false;
470  }
471 
472  for (const auto& tn : section) {
473  if (tn.first == "neighbor") {
474  try {
475  ConfigSection CommandAttriTree = tn.second;
476  std::string name = CommandAttriTree.get<std::string>("name");
477  std::string uriString = CommandAttriTree.get<std::string>("face-uri");
478 
479  ndn::FaceUri faceUri;
480  if (!faceUri.parse(uriString)) {
481  std::cerr << "face-uri parsing failed" << std::endl;
482  return false;
483  }
484 
485  bool failedToCanonize = false;
486  faceUri.canonize([&faceUri] (const auto& canonicalUri) {
487  faceUri = canonicalUri;
488  },
489  [&faceUri, &failedToCanonize] (const auto& reason) {
490  failedToCanonize = true;
491  std::cerr << "Could not canonize URI: '" << faceUri
492  << "' because: " << reason << std::endl;
493  },
494  m_io,
496  m_io.run();
497  m_io.restart();
498 
499  if (failedToCanonize) {
500  return false;
501  }
502 
503  double linkCost = CommandAttriTree.get<double>("link-cost", Adjacent::DEFAULT_LINK_COST);
504  ndn::Name neighborName(name);
505  if (!neighborName.empty()) {
506  Adjacent adj(name, faceUri, linkCost, Adjacent::STATUS_INACTIVE, 0, 0);
507  m_confParam.getAdjacencyList().insert(adj);
508  }
509  else {
510  std::cerr << " Wrong command format ! [name /nbr/name/ \n face-uri /uri\n]";
511  std::cerr << " or bad URI format" << std::endl;
512  }
513  }
514  catch (const std::exception& ex) {
515  std::cerr << ex.what() << std::endl;
516  return false;
517  }
518  }
519  }
520  return true;
521 }
522 
523 bool
524 ConfFileProcessor::processConfSectionHyperbolic(const ConfigSection& section)
525 {
526  // state
527  std::string state = section.get<std::string>("state", "off");
528 
529  if (boost::iequals(state, "off")) {
531  }
532  else if (boost::iequals(state, "on")) {
534  }
535  else if (boost::iequals(state, "dry-run")) {
537  }
538  else {
539  std::cerr << "Invalid setting for hyperbolic state. "
540  << "Allowed values: off, on, dry-run" << std::endl;
541  return false;
542  }
543 
544  try {
545  // Radius and angle(s) are mandatory configuration parameters in hyperbolic section.
546  // Even if router can have hyperbolic routing calculation off but other router
547  // in the network may use hyperbolic routing calculation for FIB generation.
548  // So each router need to advertise its hyperbolic coordinates in the network
549  double radius = section.get<double>("radius");
550  std::string angleString = section.get<std::string>("angle");
551 
552  std::stringstream ss(angleString);
553  std::vector<double> angles;
554 
555  double angle;
556 
557  while (ss >> angle) {
558  angles.push_back(angle);
559  if (ss.peek() == ',' || ss.peek() == ' ') {
560  ss.ignore();
561  }
562  }
563 
564  if (!m_confParam.setCorR(radius)) {
565  return false;
566  }
567  m_confParam.setCorTheta(angles);
568  }
569  catch (const std::exception& ex) {
570  std::cerr << ex.what() << std::endl;
571  if (state == "on" || state == "dry-run") {
572  return false;
573  }
574  }
575 
576  return true;
577 }
578 
579 bool
580 ConfFileProcessor::processConfSectionFib(const ConfigSection& section)
581 {
582  // max-faces-per-prefix
583  int maxFacesPerPrefix = section.get<int>("max-faces-per-prefix", MAX_FACES_PER_PREFIX_DEFAULT);
584 
585  if (maxFacesPerPrefix >= MAX_FACES_PER_PREFIX_MIN &&
586  maxFacesPerPrefix <= MAX_FACES_PER_PREFIX_MAX) {
587  m_confParam.setMaxFacesPerPrefix(maxFacesPerPrefix);
588  }
589  else {
590  std::cerr << "Invalid value for max-faces-per-prefix. "
591  << "Allowed range: " << MAX_FACES_PER_PREFIX_MIN
592  << "-" << MAX_FACES_PER_PREFIX_MAX << std::endl;
593  return false;
594  }
595 
596  // routing-calc-interval
597  ConfigurationVariable<uint32_t> routingCalcInterval("routing-calc-interval",
599  &m_confParam, _1));
600  routingCalcInterval.setMinAndMaxValue(ROUTING_CALC_INTERVAL_MIN, ROUTING_CALC_INTERVAL_MAX);
601  routingCalcInterval.setOptional(ROUTING_CALC_INTERVAL_DEFAULT);
602 
603  if (!routingCalcInterval.parseFromConfigSection(section)) {
604  return false;
605  }
606 
607  return true;
608 }
609 
610 bool
611 ConfFileProcessor::processConfSectionAdvertising(const ConfigSection& section)
612 {
613  for (const auto& tn : section) {
614  if (tn.first == "prefix") {
615  try {
616  ndn::Name namePrefix(tn.second.data());
617  if (!namePrefix.empty()) {
618  m_confParam.getNamePrefixList().insert(namePrefix);
619  }
620  else {
621  std::cerr << " Wrong command format ! [prefix /name/prefix] or bad URI" << std::endl;
622  return false;
623  }
624  }
625  catch (const std::exception& ex) {
626  std::cerr << ex.what() << std::endl;
627  return false;
628  }
629  }
630  }
631  return true;
632 }
633 
634 bool
635 ConfFileProcessor::processConfSectionSecurity(const ConfigSection& section)
636 {
637  auto it = section.begin();
638 
639  if (it == section.end() || it->first != "validator") {
640  std::cerr << "Error: Expected validator section!" << std::endl;
641  return false;
642  }
643 
644  m_confParam.getValidator().load(it->second, m_confFileName);
645 
646  it++;
647  if (it != section.end() && it->first == "prefix-update-validator") {
648  m_confParam.getPrefixUpdateValidator().load(it->second, m_confFileName);
649 
650  it++;
651  for (; it != section.end(); it++) {
652  if (it->first != "cert-to-publish") {
653  std::cerr << "Error: Expected cert-to-publish!" << std::endl;
654  return false;
655  }
656 
657  std::string file = it->second.data();
658  bf::path certfilePath = absolute(file, bf::path(m_confFileName).parent_path());
659  std::ifstream ifs(certfilePath.string());
660 
661  ndn::security::Certificate idCert;
662  try {
663  idCert = ndn::io::loadTlv<ndn::security::Certificate>(ifs);
664  }
665  catch (const std::exception& e) {
666  std::cerr << "Error: Cannot load cert-to-publish '" << file << "': " << e.what() << std::endl;
667  return false;
668  }
669 
670  m_confParam.addCertPath(certfilePath.string());
671  m_confParam.loadCertToValidator(idCert);
672  }
673  }
674 
675  return true;
676 }
677 
678 } // namespace nlsr
bool insert(const Adjacent &adjacent)
static constexpr double DEFAULT_LINK_COST
Definition: adjacent.hpp:186
ConfFileProcessor(ConfParameter &confParam)
bool processConfFile()
Load and parse the configuration file, then populate NLSR.
A class to house all the configuration parameters for NLSR.
void setHyperbolicState(HyperbolicState ihc)
void setRouterName(const ndn::Name &routerName)
void setSiteName(const ndn::Name &siteName)
void setInterestRetryNumber(uint32_t irn)
void setMaxFacesPerPrefix(uint32_t mfpp)
void setRouterDeadInterval(uint32_t rdt)
void writeLog()
Dump the current state of all attributes to the log.
void setSyncProtocol(SyncProtocol syncProtocol)
void setStateFileDir(const std::string &ssfd)
void setLsaRefreshTime(uint32_t lrt)
void setInterestResendTime(uint32_t irt)
void loadCertToValidator(const ndn::security::Certificate &cert)
uint32_t getLsaRefreshTime() const
void setAdjLsaBuildInterval(uint32_t interval)
void setConfFileNameDynamic(const std::string &confFileDynamic)
void setInfoInterestInterval(uint32_t iii)
NamePrefixList & getNamePrefixList()
void addCertPath(const std::string &certPath)
AdjacencyList & getAdjacencyList()
void setFaceDatasetFetchTries(uint32_t count)
ndn::security::ValidatorConfig & getValidator()
void setLsaInterestLifetime(const ndn::time::seconds &lifetime)
void setSyncInterestLifetime(uint32_t syncInterestLifetime)
void setCorTheta(const std::vector< double > &ct)
bool setCorR(double cr)
ndn::security::ValidatorConfig & getPrefixUpdateValidator()
void setFaceDatasetFetchInterval(uint32_t interval)
void setNetwork(const ndn::Name &networkName)
void setRoutingCalcInterval(uint32_t interval)
bool insert(const ndn::Name &name, const std::string &source="")
Inserts name and source combination.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
@ FACE_DATASET_FETCH_TRIES_DEFAULT
@ FACE_DATASET_FETCH_TRIES_MIN
@ FACE_DATASET_FETCH_TRIES_MAX
@ LSA_REFRESH_TIME_MIN
@ LSA_REFRESH_TIME_MAX
@ LSA_REFRESH_TIME_DEFAULT
@ HELLO_RETRIES_MAX
@ HELLO_RETRIES_DEFAULT
@ HELLO_RETRIES_MIN
@ ROUTING_CALC_INTERVAL_DEFAULT
@ ROUTING_CALC_INTERVAL_MIN
@ ROUTING_CALC_INTERVAL_MAX
@ MAX_FACES_PER_PREFIX_MIN
@ MAX_FACES_PER_PREFIX_DEFAULT
@ MAX_FACES_PER_PREFIX_MAX
@ FACE_DATASET_FETCH_INTERVAL_DEFAULT
@ FACE_DATASET_FETCH_INTERVAL_MIN
@ FACE_DATASET_FETCH_INTERVAL_MAX
constexpr ndn::time::seconds TIME_ALLOWED_FOR_CANONIZATION
Definition: common.hpp:40
@ ADJ_LSA_BUILD_INTERVAL_DEFAULT
@ ADJ_LSA_BUILD_INTERVAL_MIN
@ ADJ_LSA_BUILD_INTERVAL_MAX
@ HYPERBOLIC_STATE_ON
@ HYPERBOLIC_STATE_DRY_RUN
@ HYPERBOLIC_STATE_OFF
@ LSA_INTEREST_LIFETIME_MAX
@ LSA_INTEREST_LIFETIME_DEFAULT
@ LSA_INTEREST_LIFETIME_MIN
boost::property_tree::ptree ConfigSection
@ HELLO_INTERVAL_MIN
@ HELLO_INTERVAL_DEFAULT
@ HELLO_INTERVAL_MAX
@ HELLO_TIMEOUT_DEFAULT
@ HELLO_TIMEOUT_MIN
@ HELLO_TIMEOUT_MAX
@ SYNC_INTEREST_LIFETIME_MIN
@ SYNC_INTEREST_LIFETIME_MAX
@ SYNC_INTEREST_LIFETIME_DEFAULT