blob: aedffac62aa4156a0bc1611d95ed25be6e55d126 [file] [log] [blame]
akmhoque3d06e792014-05-27 16:23:20 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -04002/*
Junxiao Shib032fcb2022-04-28 01:28:50 +00003 * Copyright (c) 2014-2022, The University of Memphis,
Vince Lehmanc2e51f62015-01-20 15:03:11 -06004 * Regents of the University of California,
5 * Arizona Board of Regents.
akmhoque3d06e792014-05-27 16:23:20 -05006 *
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/>.
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -040020 */
Vince Lehmanc2e51f62015-01-20 15:03:11 -060021
dmcoomese689dd62017-03-29 11:05:12 -050022#ifndef NLSR_CONF_PARAMETER_HPP
23#define NLSR_CONF_PARAMETER_HPP
akmhoque53353462014-04-22 08:43:45 -050024
Nick Gordone98480b2017-05-24 11:23:03 -050025#include "common.hpp"
Ashlesh Gawande982a58f2018-02-14 17:39:12 -060026#include "test-access-control.hpp"
Ashlesh Gawande85998a12017-12-07 22:22:13 -060027#include "adjacency-list.hpp"
28#include "name-prefix-list.hpp"
Ashlesh Gawande3909aa12017-07-28 16:01:35 -050029
akmhoque31d1d4b2014-05-05 22:08:14 -050030#include <ndn-cxx/face.hpp>
Ashlesh Gawande85998a12017-12-07 22:22:13 -060031#include <ndn-cxx/security/validator-config.hpp>
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -040032#include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
akmhoque53353462014-04-22 08:43:45 -050033
Davide Pesaventoc1d0e8e2022-06-15 14:26:02 -040034#include <optional>
35
akmhoque53353462014-04-22 08:43:45 -050036namespace nlsr {
akmhoque157b0a42014-05-13 00:26:37 -050037
38enum {
39 LSA_REFRESH_TIME_MIN = 240,
40 LSA_REFRESH_TIME_DEFAULT = 1800,
41 LSA_REFRESH_TIME_MAX = 7200
42};
43
Ashlesh Gawande30d96e42021-03-21 19:15:33 -070044enum SyncProtocol {
45#ifdef HAVE_CHRONOSYNC
46 SYNC_PROTOCOL_CHRONOSYNC,
47#endif
48 SYNC_PROTOCOL_PSYNC
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -050049};
50
51enum {
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -070052 LSA_INTEREST_LIFETIME_MIN = 1,
53 LSA_INTEREST_LIFETIME_DEFAULT = 4,
54 LSA_INTEREST_LIFETIME_MAX = 60
55};
56
57enum {
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -050058 ADJ_LSA_BUILD_INTERVAL_MIN = 5,
59 ADJ_LSA_BUILD_INTERVAL_DEFAULT = 10,
60 ADJ_LSA_BUILD_INTERVAL_MAX = 30
Vince Lehman7b616582014-10-17 16:25:39 -050061};
62
63enum {
64 ROUTING_CALC_INTERVAL_MIN = 0,
65 ROUTING_CALC_INTERVAL_DEFAULT = 15,
66 ROUTING_CALC_INTERVAL_MAX = 15
67};
68
Nick Gordond5c1a372016-10-31 13:56:23 -050069
70enum {
71 FACE_DATASET_FETCH_TRIES_MIN = 1,
72 FACE_DATASET_FETCH_TRIES_MAX = 10,
73 FACE_DATASET_FETCH_TRIES_DEFAULT = 3
74};
75
76enum {
77 FACE_DATASET_FETCH_INTERVAL_MIN = 1800,
78 FACE_DATASET_FETCH_INTERVAL_MAX = 5400,
79 FACE_DATASET_FETCH_INTERVAL_DEFAULT = 3600
80};
81
Vince Lehman7b616582014-10-17 16:25:39 -050082enum {
akmhoque157b0a42014-05-13 00:26:37 -050083 HELLO_RETRIES_MIN = 1,
84 HELLO_RETRIES_DEFAULT = 3,
85 HELLO_RETRIES_MAX = 15
86};
87
88enum {
89 HELLO_TIMEOUT_MIN = 1,
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -050090 HELLO_TIMEOUT_DEFAULT = 1,
akmhoque157b0a42014-05-13 00:26:37 -050091 HELLO_TIMEOUT_MAX = 15
92};
93
94enum {
95 HELLO_INTERVAL_MIN = 30,
96 HELLO_INTERVAL_DEFAULT = 60,
97 HELLO_INTERVAL_MAX =90
98};
99
100enum {
101 MAX_FACES_PER_PREFIX_MIN = 0,
alvya2228c62014-12-09 10:25:11 -0600102 MAX_FACES_PER_PREFIX_DEFAULT = 0,
akmhoque157b0a42014-05-13 00:26:37 -0500103 MAX_FACES_PER_PREFIX_MAX = 60
104};
105
Nick Gordon5c467f02016-07-13 13:40:10 -0500106enum HyperbolicState {
akmhoque157b0a42014-05-13 00:26:37 -0500107 HYPERBOLIC_STATE_OFF = 0,
108 HYPERBOLIC_STATE_ON = 1,
alvya2228c62014-12-09 10:25:11 -0600109 HYPERBOLIC_STATE_DRY_RUN = 2,
110 HYPERBOLIC_STATE_DEFAULT = 0
akmhoque157b0a42014-05-13 00:26:37 -0500111};
112
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600113enum {
114 SYNC_INTEREST_LIFETIME_MIN = 1000,
115 SYNC_INTEREST_LIFETIME_DEFAULT = 60000,
116 SYNC_INTEREST_LIFETIME_MAX = 120000,
117};
118
Nick Gordond0a7df32017-05-30 16:44:34 -0500119/*! \brief A class to house all the configuration parameters for NLSR.
120 *
121 * This class is conceptually a singleton (but not mechanically) which
122 * is just a collection of attributes that serve as a
123 * separation-of-data for NLSR's configuration variables. NLSR refers
124 * to an instance of this class for all its configuration
125 * parameters. This object is typically populated by a
126 * ConfFileProcessor reading a configuration file.
127 *
128 * \sa nlsr::ConfFileProcessor
129 */
akmhoque53353462014-04-22 08:43:45 -0500130class ConfParameter
131{
akmhoque53353462014-04-22 08:43:45 -0500132public:
Davide Pesaventod90338d2021-01-07 17:50:05 -0500133 ConfParameter(ndn::Face& face, ndn::KeyChain& keyChain,
Saurab Dulal427e0122019-11-28 11:58:02 -0600134 const std::string& confFileName = "nlsr.conf");
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600135
136 const std::string&
137 getConfFileName()
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700138 {
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600139 return m_confFileName;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700140 }
akmhoque53353462014-04-22 08:43:45 -0500141
142 void
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600143 setNetwork(const ndn::Name& networkName);
akmhoque53353462014-04-22 08:43:45 -0500144
akmhoque31d1d4b2014-05-05 22:08:14 -0500145 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700146 getNetwork() const
akmhoque53353462014-04-22 08:43:45 -0500147 {
148 return m_network;
149 }
150
151 void
akmhoque157b0a42014-05-13 00:26:37 -0500152 setRouterName(const ndn::Name& routerName)
153 {
154 m_routerName = routerName;
155 }
156
157 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700158 getRouterName() const
akmhoque157b0a42014-05-13 00:26:37 -0500159 {
160 return m_routerName;
161 }
162
163 void
164 setSiteName(const ndn::Name& siteName)
165 {
166 m_siteName = siteName;
167 }
168
169 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700170 getSiteName() const
akmhoque157b0a42014-05-13 00:26:37 -0500171 {
172 return m_siteName;
173 }
174
175 void
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500176 buildRouterAndSyncUserPrefix()
akmhoque53353462014-04-22 08:43:45 -0500177 {
akmhoque31d1d4b2014-05-05 22:08:14 -0500178 m_routerPrefix = m_network;
179 m_routerPrefix.append(m_siteName);
180 m_routerPrefix.append(m_routerName);
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500181
182 m_syncUserPrefix = m_lsaPrefix;
183 m_syncUserPrefix.append(m_siteName);
184 m_syncUserPrefix.append(m_routerName);
akmhoque53353462014-04-22 08:43:45 -0500185 }
186
akmhoque31d1d4b2014-05-05 22:08:14 -0500187 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700188 getRouterPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500189 {
190 return m_routerPrefix;
191 }
192
akmhoque31d1d4b2014-05-05 22:08:14 -0500193 const ndn::Name&
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500194 getSyncUserPrefix() const
195 {
196 return m_syncUserPrefix;
197 }
198
199 const ndn::Name&
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600200 getSyncPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500201 {
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600202 return m_syncPrefix;
akmhoque53353462014-04-22 08:43:45 -0500203 }
204
akmhoque157b0a42014-05-13 00:26:37 -0500205 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700206 getLsaPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500207 {
akmhoque157b0a42014-05-13 00:26:37 -0500208 return m_lsaPrefix;
akmhoque53353462014-04-22 08:43:45 -0500209 }
210
211 void
alvy5a454952014-12-15 12:49:54 -0600212 setLsaRefreshTime(uint32_t lrt)
akmhoque53353462014-04-22 08:43:45 -0500213 {
214 m_lsaRefreshTime = lrt;
akmhoque53353462014-04-22 08:43:45 -0500215 }
216
Ashlesh Gawande30d96e42021-03-21 19:15:33 -0700217 SyncProtocol
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500218 getSyncProtocol() const
219 {
220 return m_syncProtocol;
221 }
222
223 void
Ashlesh Gawande30d96e42021-03-21 19:15:33 -0700224 setSyncProtocol(SyncProtocol syncProtocol)
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500225 {
Ashlesh Gawande30d96e42021-03-21 19:15:33 -0700226 m_syncProtocol = syncProtocol;
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500227 }
228
229 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700230 getLsaRefreshTime() const
akmhoque53353462014-04-22 08:43:45 -0500231 {
232 return m_lsaRefreshTime;
233 }
234
235 void
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700236 setLsaInterestLifetime(const ndn::time::seconds& lifetime)
237 {
238 m_lsaInterestLifetime = lifetime;
239 }
240
241 const ndn::time::seconds&
242 getLsaInterestLifetime() const
243 {
244 return m_lsaInterestLifetime;
245 }
246
247 void
Vince Lehman7b616582014-10-17 16:25:39 -0500248 setAdjLsaBuildInterval(uint32_t interval)
249 {
250 m_adjLsaBuildInterval = interval;
251 }
252
253 uint32_t
254 getAdjLsaBuildInterval() const
255 {
256 return m_adjLsaBuildInterval;
257 }
258
259 void
Vince Lehman7b616582014-10-17 16:25:39 -0500260 setRoutingCalcInterval(uint32_t interval)
261 {
262 m_routingCalcInterval = interval;
263 }
264
265 uint32_t
266 getRoutingCalcInterval() const
267 {
268 return m_routingCalcInterval;
269 }
270
271 void
alvy5a454952014-12-15 12:49:54 -0600272 setRouterDeadInterval(uint32_t rdt)
akmhoque53353462014-04-22 08:43:45 -0500273 {
274 m_routerDeadInterval = rdt;
275 }
276
alvy5a454952014-12-15 12:49:54 -0600277 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700278 getRouterDeadInterval() const
akmhoque53353462014-04-22 08:43:45 -0500279 {
280 return m_routerDeadInterval;
281 }
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700282
283 void
Nick Gordond5c1a372016-10-31 13:56:23 -0500284 setFaceDatasetFetchTries(uint32_t count)
285 {
286 m_faceDatasetFetchTries = count;
287 }
288
289 uint32_t
290 getFaceDatasetFetchTries() const
291 {
292 return m_faceDatasetFetchTries;
293 }
294
295 void
Ashlesh Gawande3909aa12017-07-28 16:01:35 -0500296 setFaceDatasetFetchInterval(uint32_t interval)
Nick Gordond5c1a372016-10-31 13:56:23 -0500297 {
Ashlesh Gawande3909aa12017-07-28 16:01:35 -0500298 m_faceDatasetFetchInterval = ndn::time::seconds(interval);
Nick Gordond5c1a372016-10-31 13:56:23 -0500299 }
300
301 const ndn::time::seconds
302 getFaceDatasetFetchInterval() const
303 {
304 return m_faceDatasetFetchInterval;
305 }
306
307 void
akmhoque157b0a42014-05-13 00:26:37 -0500308 setInterestRetryNumber(uint32_t irn)
akmhoque53353462014-04-22 08:43:45 -0500309 {
akmhoque157b0a42014-05-13 00:26:37 -0500310 m_interestRetryNumber = irn;
311 }
312
313 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700314 getInterestRetryNumber() const
akmhoque157b0a42014-05-13 00:26:37 -0500315 {
316 return m_interestRetryNumber;
317 }
318
319 void
alvy5a454952014-12-15 12:49:54 -0600320 setInterestResendTime(uint32_t irt)
akmhoque157b0a42014-05-13 00:26:37 -0500321 {
322 m_interestResendTime = irt;
akmhoque53353462014-04-22 08:43:45 -0500323 }
324
alvy5a454952014-12-15 12:49:54 -0600325 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700326 getInterestResendTime() const
akmhoque53353462014-04-22 08:43:45 -0500327 {
akmhoque157b0a42014-05-13 00:26:37 -0500328 return m_interestResendTime;
akmhoque53353462014-04-22 08:43:45 -0500329 }
330
alvy5a454952014-12-15 12:49:54 -0600331 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700332 getInfoInterestInterval() const
akmhoque53353462014-04-22 08:43:45 -0500333 {
akmhoque157b0a42014-05-13 00:26:37 -0500334 return m_infoInterestInterval;
akmhoque53353462014-04-22 08:43:45 -0500335 }
336
337 void
alvy5a454952014-12-15 12:49:54 -0600338 setInfoInterestInterval(uint32_t iii)
akmhoque53353462014-04-22 08:43:45 -0500339 {
akmhoque157b0a42014-05-13 00:26:37 -0500340 m_infoInterestInterval = iii;
341 }
342
343 void
344 setHyperbolicState(int32_t ihc)
345 {
346 m_hyperbolicState = ihc;
akmhoque53353462014-04-22 08:43:45 -0500347 }
348
akmhoquefdbddb12014-05-02 18:35:19 -0500349 int32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700350 getHyperbolicState() const
akmhoque53353462014-04-22 08:43:45 -0500351 {
akmhoque157b0a42014-05-13 00:26:37 -0500352 return m_hyperbolicState;
akmhoque53353462014-04-22 08:43:45 -0500353 }
354
akmhoque157b0a42014-05-13 00:26:37 -0500355 bool
akmhoque53353462014-04-22 08:43:45 -0500356 setCorR(double cr)
357 {
akmhoque157b0a42014-05-13 00:26:37 -0500358 if ( cr >= 0 ) {
359 m_corR = cr;
360 return true;
361 }
362 return false;
akmhoque53353462014-04-22 08:43:45 -0500363 }
364
365 double
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700366 getCorR() const
akmhoque53353462014-04-22 08:43:45 -0500367 {
368 return m_corR;
369 }
370
371 void
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600372 setCorTheta(const std::vector<double>& ct)
akmhoque53353462014-04-22 08:43:45 -0500373 {
374 m_corTheta = ct;
375 }
376
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600377 std::vector<double>
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700378 getCorTheta() const
akmhoque53353462014-04-22 08:43:45 -0500379 {
380 return m_corTheta;
381 }
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700382
akmhoque53353462014-04-22 08:43:45 -0500383 void
Vince Lehman942eb7b2014-10-02 10:09:27 -0500384 setMaxFacesPerPrefix(uint32_t mfpp)
akmhoque53353462014-04-22 08:43:45 -0500385 {
akmhoque157b0a42014-05-13 00:26:37 -0500386 m_maxFacesPerPrefix = mfpp;
akmhoque53353462014-04-22 08:43:45 -0500387 }
388
Vince Lehman942eb7b2014-10-02 10:09:27 -0500389 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700390 getMaxFacesPerPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500391 {
akmhoque157b0a42014-05-13 00:26:37 -0500392 return m_maxFacesPerPrefix;
akmhoque53353462014-04-22 08:43:45 -0500393 }
394
395 void
dulalsaurab82a34c22019-02-04 17:31:21 +0000396 setStateFileDir(const std::string& ssfd)
akmhoque53353462014-04-22 08:43:45 -0500397 {
dulalsaurab82a34c22019-02-04 17:31:21 +0000398 m_stateFileDir = ssfd;
akmhoque53353462014-04-22 08:43:45 -0500399 }
400
akmhoque157b0a42014-05-13 00:26:37 -0500401 const std::string&
dulalsaurab82a34c22019-02-04 17:31:21 +0000402 getStateFileDir() const
akmhoque53353462014-04-22 08:43:45 -0500403 {
dulalsaurab82a34c22019-02-04 17:31:21 +0000404 return m_stateFileDir;
405 }
406
dulalsaurabd0816a32019-07-26 13:11:24 +0000407 void
408 setConfFileNameDynamic(const std::string& confFileDynamic)
dulalsaurab82a34c22019-02-04 17:31:21 +0000409 {
410 m_confFileNameDynamic = confFileDynamic;
411 }
412
413 const std::string&
414 getConfFileNameDynamic() const
415 {
416 return m_confFileNameDynamic;
akmhoque53353462014-04-22 08:43:45 -0500417 }
418
akmhoque674b0b12014-05-20 14:33:28 -0500419 void
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600420 setSyncInterestLifetime(uint32_t syncInterestLifetime)
421 {
422 m_syncInterestLifetime = ndn::time::milliseconds(syncInterestLifetime);
423 }
424
425 const ndn::time::milliseconds&
426 getSyncInterestLifetime() const
427 {
428 return m_syncInterestLifetime;
429 }
430
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600431 AdjacencyList&
432 getAdjacencyList()
433 {
434 return m_adjl;
435 }
436
437 NamePrefixList&
438 getNamePrefixList()
439 {
440 return m_npl;
441 }
442
443 ndn::security::ValidatorConfig&
444 getValidator()
445 {
446 return m_validator;
447 }
448
449 ndn::security::ValidatorConfig&
450 getPrefixUpdateValidator()
451 {
452 return m_prefixUpdateValidator;
453 }
454
Saurab Dulal427e0122019-11-28 11:58:02 -0600455 const ndn::security::SigningInfo&
456 getSigningInfo() const
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600457 {
Saurab Dulal427e0122019-11-28 11:58:02 -0600458 return m_signingInfo;
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600459 }
460
Saurab Dulal427e0122019-11-28 11:58:02 -0600461 void
462 addCertPath(const std::string& certPath)
463 {
464 m_certs.insert(certPath);
465 }
466
467 const std::unordered_set<std::string>&
468 getIdCerts() const
469 {
470 return m_certs;
471 }
472
473 const ndn::KeyChain&
474 getKeyChain() const
475 {
476 return m_keyChain;
477 }
478
Davide Pesaventoc1d0e8e2022-06-15 14:26:02 -0400479 std::optional<ndn::security::Certificate>
Saurab Dulal427e0122019-11-28 11:58:02 -0600480 initializeKey();
481
482 void
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -0400483 loadCertToValidator(const ndn::security::Certificate& cert);
Saurab Dulal427e0122019-11-28 11:58:02 -0600484
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600485 /*! \brief Dump the current state of all attributes to the log.
486 */
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600487 void
akmhoque674b0b12014-05-20 14:33:28 -0500488 writeLog();
akmhoque53353462014-04-22 08:43:45 -0500489
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600490PUBLIC_WITH_TESTS_ELSE_PRIVATE:
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600491 std::string m_confFileName;
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600492 std::string m_confFileNameDynamic;
Davide Pesaventod90338d2021-01-07 17:50:05 -0500493
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600494private:
akmhoque31d1d4b2014-05-05 22:08:14 -0500495 ndn::Name m_routerName;
496 ndn::Name m_siteName;
497 ndn::Name m_network;
akmhoque53353462014-04-22 08:43:45 -0500498
akmhoque31d1d4b2014-05-05 22:08:14 -0500499 ndn::Name m_routerPrefix;
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500500 ndn::Name m_syncUserPrefix;
akmhoque53353462014-04-22 08:43:45 -0500501
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600502 ndn::Name m_syncPrefix;
akmhoque157b0a42014-05-13 00:26:37 -0500503 ndn::Name m_lsaPrefix;
504
alvy5a454952014-12-15 12:49:54 -0600505 uint32_t m_lsaRefreshTime;
Vince Lehman7b616582014-10-17 16:25:39 -0500506
507 uint32_t m_adjLsaBuildInterval;
Vince Lehman7b616582014-10-17 16:25:39 -0500508 uint32_t m_routingCalcInterval;
509
Nick Gordond5c1a372016-10-31 13:56:23 -0500510 uint32_t m_faceDatasetFetchTries;
511 ndn::time::seconds m_faceDatasetFetchInterval;
512
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700513 ndn::time::seconds m_lsaInterestLifetime;
alvy5a454952014-12-15 12:49:54 -0600514 uint32_t m_routerDeadInterval;
akmhoque53353462014-04-22 08:43:45 -0500515
akmhoquefdbddb12014-05-02 18:35:19 -0500516 uint32_t m_interestRetryNumber;
alvy5a454952014-12-15 12:49:54 -0600517 uint32_t m_interestResendTime;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700518
alvy5a454952014-12-15 12:49:54 -0600519 uint32_t m_infoInterestInterval;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700520
akmhoque157b0a42014-05-13 00:26:37 -0500521 int32_t m_hyperbolicState;
akmhoque53353462014-04-22 08:43:45 -0500522 double m_corR;
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600523 std::vector<double> m_corTheta;
akmhoque53353462014-04-22 08:43:45 -0500524
Vince Lehman942eb7b2014-10-02 10:09:27 -0500525 uint32_t m_maxFacesPerPrefix;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700526
dulalsaurab82a34c22019-02-04 17:31:21 +0000527 std::string m_stateFileDir;
528
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600529 ndn::time::milliseconds m_syncInterestLifetime;
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600530
Ashlesh Gawande30d96e42021-03-21 19:15:33 -0700531 SyncProtocol m_syncProtocol;
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500532
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600533PUBLIC_WITH_TESTS_ELSE_PRIVATE:
Davide Pesaventoc1d0e8e2022-06-15 14:26:02 -0400534 // must be incremented when breaking changes are made to sync
535 static constexpr uint64_t SYNC_VERSION = 10;
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600536
537 AdjacencyList m_adjl;
538 NamePrefixList m_npl;
539 ndn::security::ValidatorConfig m_validator;
540 ndn::security::ValidatorConfig m_prefixUpdateValidator;
Saurab Dulal427e0122019-11-28 11:58:02 -0600541 ndn::security::SigningInfo m_signingInfo;
542 std::unordered_set<std::string> m_certs;
543 ndn::KeyChain& m_keyChain;
akmhoque53353462014-04-22 08:43:45 -0500544};
545
akmhoque53353462014-04-22 08:43:45 -0500546} // namespace nlsr
547
dmcoomese689dd62017-03-29 11:05:12 -0500548#endif // NLSR_CONF_PARAMETER_HPP