blob: c000c4b9e2e20335152dcf4c81de6cde067064cd [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/*
Davide Pesaventod90338d2021-01-07 17:50:05 -05003 * Copyright (c) 2014-2021, 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 Gawande3909aa12017-07-28 16:01:35 -050026#include "logger.hpp"
Ashlesh Gawande982a58f2018-02-14 17:39:12 -060027#include "test-access-control.hpp"
Ashlesh Gawande85998a12017-12-07 22:22:13 -060028#include "adjacency-list.hpp"
29#include "name-prefix-list.hpp"
Ashlesh Gawande3909aa12017-07-28 16:01:35 -050030
akmhoque31d1d4b2014-05-05 22:08:14 -050031#include <ndn-cxx/face.hpp>
Ashlesh Gawande85998a12017-12-07 22:22:13 -060032#include <ndn-cxx/security/validator-config.hpp>
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -040033#include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
akmhoque53353462014-04-22 08:43:45 -050034
35namespace nlsr {
akmhoque157b0a42014-05-13 00:26:37 -050036
37enum {
38 LSA_REFRESH_TIME_MIN = 240,
39 LSA_REFRESH_TIME_DEFAULT = 1800,
40 LSA_REFRESH_TIME_MAX = 7200
41};
42
43enum {
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -050044 SYNC_PROTOCOL_CHRONOSYNC = 0,
45 SYNC_PROTOCOL_PSYNC = 1
46};
47
48enum {
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -070049 LSA_INTEREST_LIFETIME_MIN = 1,
50 LSA_INTEREST_LIFETIME_DEFAULT = 4,
51 LSA_INTEREST_LIFETIME_MAX = 60
52};
53
54enum {
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -050055 ADJ_LSA_BUILD_INTERVAL_MIN = 5,
56 ADJ_LSA_BUILD_INTERVAL_DEFAULT = 10,
57 ADJ_LSA_BUILD_INTERVAL_MAX = 30
Vince Lehman7b616582014-10-17 16:25:39 -050058};
59
60enum {
61 ROUTING_CALC_INTERVAL_MIN = 0,
62 ROUTING_CALC_INTERVAL_DEFAULT = 15,
63 ROUTING_CALC_INTERVAL_MAX = 15
64};
65
Nick Gordond5c1a372016-10-31 13:56:23 -050066
67enum {
68 FACE_DATASET_FETCH_TRIES_MIN = 1,
69 FACE_DATASET_FETCH_TRIES_MAX = 10,
70 FACE_DATASET_FETCH_TRIES_DEFAULT = 3
71};
72
73enum {
74 FACE_DATASET_FETCH_INTERVAL_MIN = 1800,
75 FACE_DATASET_FETCH_INTERVAL_MAX = 5400,
76 FACE_DATASET_FETCH_INTERVAL_DEFAULT = 3600
77};
78
Vince Lehman7b616582014-10-17 16:25:39 -050079enum {
akmhoque157b0a42014-05-13 00:26:37 -050080 HELLO_RETRIES_MIN = 1,
81 HELLO_RETRIES_DEFAULT = 3,
82 HELLO_RETRIES_MAX = 15
83};
84
85enum {
86 HELLO_TIMEOUT_MIN = 1,
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -050087 HELLO_TIMEOUT_DEFAULT = 1,
akmhoque157b0a42014-05-13 00:26:37 -050088 HELLO_TIMEOUT_MAX = 15
89};
90
91enum {
92 HELLO_INTERVAL_MIN = 30,
93 HELLO_INTERVAL_DEFAULT = 60,
94 HELLO_INTERVAL_MAX =90
95};
96
97enum {
98 MAX_FACES_PER_PREFIX_MIN = 0,
alvya2228c62014-12-09 10:25:11 -060099 MAX_FACES_PER_PREFIX_DEFAULT = 0,
akmhoque157b0a42014-05-13 00:26:37 -0500100 MAX_FACES_PER_PREFIX_MAX = 60
101};
102
Nick Gordon5c467f02016-07-13 13:40:10 -0500103enum HyperbolicState {
akmhoque157b0a42014-05-13 00:26:37 -0500104 HYPERBOLIC_STATE_OFF = 0,
105 HYPERBOLIC_STATE_ON = 1,
alvya2228c62014-12-09 10:25:11 -0600106 HYPERBOLIC_STATE_DRY_RUN = 2,
107 HYPERBOLIC_STATE_DEFAULT = 0
akmhoque157b0a42014-05-13 00:26:37 -0500108};
109
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600110enum {
111 SYNC_INTEREST_LIFETIME_MIN = 1000,
112 SYNC_INTEREST_LIFETIME_DEFAULT = 60000,
113 SYNC_INTEREST_LIFETIME_MAX = 120000,
114};
115
Nick Gordond0a7df32017-05-30 16:44:34 -0500116/*! \brief A class to house all the configuration parameters for NLSR.
117 *
118 * This class is conceptually a singleton (but not mechanically) which
119 * is just a collection of attributes that serve as a
120 * separation-of-data for NLSR's configuration variables. NLSR refers
121 * to an instance of this class for all its configuration
122 * parameters. This object is typically populated by a
123 * ConfFileProcessor reading a configuration file.
124 *
125 * \sa nlsr::ConfFileProcessor
126 */
akmhoque53353462014-04-22 08:43:45 -0500127class ConfParameter
128{
akmhoque53353462014-04-22 08:43:45 -0500129public:
Davide Pesaventod90338d2021-01-07 17:50:05 -0500130 ConfParameter(ndn::Face& face, ndn::KeyChain& keyChain,
Saurab Dulal427e0122019-11-28 11:58:02 -0600131 const std::string& confFileName = "nlsr.conf");
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600132
133 const std::string&
134 getConfFileName()
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700135 {
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600136 return m_confFileName;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700137 }
akmhoque53353462014-04-22 08:43:45 -0500138
139 void
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600140 setNetwork(const ndn::Name& networkName);
akmhoque53353462014-04-22 08:43:45 -0500141
akmhoque31d1d4b2014-05-05 22:08:14 -0500142 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700143 getNetwork() const
akmhoque53353462014-04-22 08:43:45 -0500144 {
145 return m_network;
146 }
147
148 void
akmhoque157b0a42014-05-13 00:26:37 -0500149 setRouterName(const ndn::Name& routerName)
150 {
151 m_routerName = routerName;
152 }
153
154 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700155 getRouterName() const
akmhoque157b0a42014-05-13 00:26:37 -0500156 {
157 return m_routerName;
158 }
159
160 void
161 setSiteName(const ndn::Name& siteName)
162 {
163 m_siteName = siteName;
164 }
165
166 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700167 getSiteName() const
akmhoque157b0a42014-05-13 00:26:37 -0500168 {
169 return m_siteName;
170 }
171
172 void
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500173 buildRouterAndSyncUserPrefix()
akmhoque53353462014-04-22 08:43:45 -0500174 {
akmhoque31d1d4b2014-05-05 22:08:14 -0500175 m_routerPrefix = m_network;
176 m_routerPrefix.append(m_siteName);
177 m_routerPrefix.append(m_routerName);
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500178
179 m_syncUserPrefix = m_lsaPrefix;
180 m_syncUserPrefix.append(m_siteName);
181 m_syncUserPrefix.append(m_routerName);
akmhoque53353462014-04-22 08:43:45 -0500182 }
183
akmhoque31d1d4b2014-05-05 22:08:14 -0500184 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700185 getRouterPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500186 {
187 return m_routerPrefix;
188 }
189
akmhoque31d1d4b2014-05-05 22:08:14 -0500190 const ndn::Name&
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500191 getSyncUserPrefix() const
192 {
193 return m_syncUserPrefix;
194 }
195
196 const ndn::Name&
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600197 getSyncPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500198 {
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600199 return m_syncPrefix;
akmhoque53353462014-04-22 08:43:45 -0500200 }
201
akmhoque157b0a42014-05-13 00:26:37 -0500202 const ndn::Name&
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700203 getLsaPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500204 {
akmhoque157b0a42014-05-13 00:26:37 -0500205 return m_lsaPrefix;
akmhoque53353462014-04-22 08:43:45 -0500206 }
207
208 void
alvy5a454952014-12-15 12:49:54 -0600209 setLsaRefreshTime(uint32_t lrt)
akmhoque53353462014-04-22 08:43:45 -0500210 {
211 m_lsaRefreshTime = lrt;
akmhoque53353462014-04-22 08:43:45 -0500212 }
213
alvy5a454952014-12-15 12:49:54 -0600214 uint32_t
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500215 getSyncProtocol() const
216 {
217 return m_syncProtocol;
218 }
219
220 void
221 setSyncProtocol(int32_t syncProtocol)
222 {
223 if (syncProtocol == SYNC_PROTOCOL_CHRONOSYNC || syncProtocol == SYNC_PROTOCOL_PSYNC) {
224 m_syncProtocol = syncProtocol;
225 }
226 }
227
228 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700229 getLsaRefreshTime() const
akmhoque53353462014-04-22 08:43:45 -0500230 {
231 return m_lsaRefreshTime;
232 }
233
234 void
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700235 setLsaInterestLifetime(const ndn::time::seconds& lifetime)
236 {
237 m_lsaInterestLifetime = lifetime;
238 }
239
240 const ndn::time::seconds&
241 getLsaInterestLifetime() const
242 {
243 return m_lsaInterestLifetime;
244 }
245
246 void
Vince Lehman7b616582014-10-17 16:25:39 -0500247 setAdjLsaBuildInterval(uint32_t interval)
248 {
249 m_adjLsaBuildInterval = interval;
250 }
251
252 uint32_t
253 getAdjLsaBuildInterval() const
254 {
255 return m_adjLsaBuildInterval;
256 }
257
258 void
Vince Lehman7b616582014-10-17 16:25:39 -0500259 setRoutingCalcInterval(uint32_t interval)
260 {
261 m_routingCalcInterval = interval;
262 }
263
264 uint32_t
265 getRoutingCalcInterval() const
266 {
267 return m_routingCalcInterval;
268 }
269
270 void
alvy5a454952014-12-15 12:49:54 -0600271 setRouterDeadInterval(uint32_t rdt)
akmhoque53353462014-04-22 08:43:45 -0500272 {
273 m_routerDeadInterval = rdt;
274 }
275
alvy5a454952014-12-15 12:49:54 -0600276 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700277 getRouterDeadInterval() const
akmhoque53353462014-04-22 08:43:45 -0500278 {
279 return m_routerDeadInterval;
280 }
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700281
282 void
Nick Gordond5c1a372016-10-31 13:56:23 -0500283 setFaceDatasetFetchTries(uint32_t count)
284 {
285 m_faceDatasetFetchTries = count;
286 }
287
288 uint32_t
289 getFaceDatasetFetchTries() const
290 {
291 return m_faceDatasetFetchTries;
292 }
293
294 void
Ashlesh Gawande3909aa12017-07-28 16:01:35 -0500295 setFaceDatasetFetchInterval(uint32_t interval)
Nick Gordond5c1a372016-10-31 13:56:23 -0500296 {
Ashlesh Gawande3909aa12017-07-28 16:01:35 -0500297 m_faceDatasetFetchInterval = ndn::time::seconds(interval);
Nick Gordond5c1a372016-10-31 13:56:23 -0500298 }
299
300 const ndn::time::seconds
301 getFaceDatasetFetchInterval() const
302 {
303 return m_faceDatasetFetchInterval;
304 }
305
306 void
akmhoque157b0a42014-05-13 00:26:37 -0500307 setInterestRetryNumber(uint32_t irn)
akmhoque53353462014-04-22 08:43:45 -0500308 {
akmhoque157b0a42014-05-13 00:26:37 -0500309 m_interestRetryNumber = irn;
310 }
311
312 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700313 getInterestRetryNumber() const
akmhoque157b0a42014-05-13 00:26:37 -0500314 {
315 return m_interestRetryNumber;
316 }
317
318 void
alvy5a454952014-12-15 12:49:54 -0600319 setInterestResendTime(uint32_t irt)
akmhoque157b0a42014-05-13 00:26:37 -0500320 {
321 m_interestResendTime = irt;
akmhoque53353462014-04-22 08:43:45 -0500322 }
323
alvy5a454952014-12-15 12:49:54 -0600324 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700325 getInterestResendTime() const
akmhoque53353462014-04-22 08:43:45 -0500326 {
akmhoque157b0a42014-05-13 00:26:37 -0500327 return m_interestResendTime;
akmhoque53353462014-04-22 08:43:45 -0500328 }
329
alvy5a454952014-12-15 12:49:54 -0600330 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700331 getInfoInterestInterval() const
akmhoque53353462014-04-22 08:43:45 -0500332 {
akmhoque157b0a42014-05-13 00:26:37 -0500333 return m_infoInterestInterval;
akmhoque53353462014-04-22 08:43:45 -0500334 }
335
336 void
alvy5a454952014-12-15 12:49:54 -0600337 setInfoInterestInterval(uint32_t iii)
akmhoque53353462014-04-22 08:43:45 -0500338 {
akmhoque157b0a42014-05-13 00:26:37 -0500339 m_infoInterestInterval = iii;
340 }
341
342 void
343 setHyperbolicState(int32_t ihc)
344 {
345 m_hyperbolicState = ihc;
akmhoque53353462014-04-22 08:43:45 -0500346 }
347
akmhoquefdbddb12014-05-02 18:35:19 -0500348 int32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700349 getHyperbolicState() const
akmhoque53353462014-04-22 08:43:45 -0500350 {
akmhoque157b0a42014-05-13 00:26:37 -0500351 return m_hyperbolicState;
akmhoque53353462014-04-22 08:43:45 -0500352 }
353
akmhoque157b0a42014-05-13 00:26:37 -0500354 bool
akmhoque53353462014-04-22 08:43:45 -0500355 setCorR(double cr)
356 {
akmhoque157b0a42014-05-13 00:26:37 -0500357 if ( cr >= 0 ) {
358 m_corR = cr;
359 return true;
360 }
361 return false;
akmhoque53353462014-04-22 08:43:45 -0500362 }
363
364 double
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700365 getCorR() const
akmhoque53353462014-04-22 08:43:45 -0500366 {
367 return m_corR;
368 }
369
370 void
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600371 setCorTheta(const std::vector<double>& ct)
akmhoque53353462014-04-22 08:43:45 -0500372 {
373 m_corTheta = ct;
374 }
375
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600376 std::vector<double>
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700377 getCorTheta() const
akmhoque53353462014-04-22 08:43:45 -0500378 {
379 return m_corTheta;
380 }
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700381
akmhoque53353462014-04-22 08:43:45 -0500382 void
Vince Lehman942eb7b2014-10-02 10:09:27 -0500383 setMaxFacesPerPrefix(uint32_t mfpp)
akmhoque53353462014-04-22 08:43:45 -0500384 {
akmhoque157b0a42014-05-13 00:26:37 -0500385 m_maxFacesPerPrefix = mfpp;
akmhoque53353462014-04-22 08:43:45 -0500386 }
387
Vince Lehman942eb7b2014-10-02 10:09:27 -0500388 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700389 getMaxFacesPerPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500390 {
akmhoque157b0a42014-05-13 00:26:37 -0500391 return m_maxFacesPerPrefix;
akmhoque53353462014-04-22 08:43:45 -0500392 }
393
394 void
dulalsaurab82a34c22019-02-04 17:31:21 +0000395 setStateFileDir(const std::string& ssfd)
akmhoque53353462014-04-22 08:43:45 -0500396 {
dulalsaurab82a34c22019-02-04 17:31:21 +0000397 m_stateFileDir = ssfd;
akmhoque53353462014-04-22 08:43:45 -0500398 }
399
akmhoque157b0a42014-05-13 00:26:37 -0500400 const std::string&
dulalsaurab82a34c22019-02-04 17:31:21 +0000401 getStateFileDir() const
akmhoque53353462014-04-22 08:43:45 -0500402 {
dulalsaurab82a34c22019-02-04 17:31:21 +0000403 return m_stateFileDir;
404 }
405
dulalsaurabd0816a32019-07-26 13:11:24 +0000406 void
407 setConfFileNameDynamic(const std::string& confFileDynamic)
dulalsaurab82a34c22019-02-04 17:31:21 +0000408 {
409 m_confFileNameDynamic = confFileDynamic;
410 }
411
412 const std::string&
413 getConfFileNameDynamic() const
414 {
415 return m_confFileNameDynamic;
akmhoque53353462014-04-22 08:43:45 -0500416 }
417
akmhoque674b0b12014-05-20 14:33:28 -0500418 void
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600419 setSyncInterestLifetime(uint32_t syncInterestLifetime)
420 {
421 m_syncInterestLifetime = ndn::time::milliseconds(syncInterestLifetime);
422 }
423
424 const ndn::time::milliseconds&
425 getSyncInterestLifetime() const
426 {
427 return m_syncInterestLifetime;
428 }
429
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600430 AdjacencyList&
431 getAdjacencyList()
432 {
433 return m_adjl;
434 }
435
436 NamePrefixList&
437 getNamePrefixList()
438 {
439 return m_npl;
440 }
441
442 ndn::security::ValidatorConfig&
443 getValidator()
444 {
445 return m_validator;
446 }
447
448 ndn::security::ValidatorConfig&
449 getPrefixUpdateValidator()
450 {
451 return m_prefixUpdateValidator;
452 }
453
Saurab Dulal427e0122019-11-28 11:58:02 -0600454 const ndn::security::SigningInfo&
455 getSigningInfo() const
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600456 {
Saurab Dulal427e0122019-11-28 11:58:02 -0600457 return m_signingInfo;
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600458 }
459
Saurab Dulal427e0122019-11-28 11:58:02 -0600460 void
461 addCertPath(const std::string& certPath)
462 {
463 m_certs.insert(certPath);
464 }
465
466 const std::unordered_set<std::string>&
467 getIdCerts() const
468 {
469 return m_certs;
470 }
471
472 const ndn::KeyChain&
473 getKeyChain() const
474 {
475 return m_keyChain;
476 }
477
Davide Pesaventod90338d2021-01-07 17:50:05 -0500478 std::shared_ptr<ndn::security::Certificate>
Saurab Dulal427e0122019-11-28 11:58:02 -0600479 initializeKey();
480
481 void
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -0400482 loadCertToValidator(const ndn::security::Certificate& cert);
Saurab Dulal427e0122019-11-28 11:58:02 -0600483
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600484 /*! \brief Dump the current state of all attributes to the log.
485 */
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600486 void
akmhoque674b0b12014-05-20 14:33:28 -0500487 writeLog();
akmhoque53353462014-04-22 08:43:45 -0500488
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600489PUBLIC_WITH_TESTS_ELSE_PRIVATE:
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600490 std::string m_confFileName;
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600491 std::string m_confFileNameDynamic;
Davide Pesaventod90338d2021-01-07 17:50:05 -0500492
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600493private:
akmhoque31d1d4b2014-05-05 22:08:14 -0500494 ndn::Name m_routerName;
495 ndn::Name m_siteName;
496 ndn::Name m_network;
akmhoque53353462014-04-22 08:43:45 -0500497
akmhoque31d1d4b2014-05-05 22:08:14 -0500498 ndn::Name m_routerPrefix;
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500499 ndn::Name m_syncUserPrefix;
akmhoque53353462014-04-22 08:43:45 -0500500
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600501 ndn::Name m_syncPrefix;
akmhoque157b0a42014-05-13 00:26:37 -0500502 ndn::Name m_lsaPrefix;
503
alvy5a454952014-12-15 12:49:54 -0600504 uint32_t m_lsaRefreshTime;
Vince Lehman7b616582014-10-17 16:25:39 -0500505
506 uint32_t m_adjLsaBuildInterval;
Vince Lehman7b616582014-10-17 16:25:39 -0500507 uint32_t m_routingCalcInterval;
508
Nick Gordond5c1a372016-10-31 13:56:23 -0500509 uint32_t m_faceDatasetFetchTries;
510 ndn::time::seconds m_faceDatasetFetchInterval;
511
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700512 ndn::time::seconds m_lsaInterestLifetime;
alvy5a454952014-12-15 12:49:54 -0600513 uint32_t m_routerDeadInterval;
akmhoque53353462014-04-22 08:43:45 -0500514
akmhoquefdbddb12014-05-02 18:35:19 -0500515 uint32_t m_interestRetryNumber;
alvy5a454952014-12-15 12:49:54 -0600516 uint32_t m_interestResendTime;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700517
alvy5a454952014-12-15 12:49:54 -0600518 uint32_t m_infoInterestInterval;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700519
akmhoque157b0a42014-05-13 00:26:37 -0500520 int32_t m_hyperbolicState;
akmhoque53353462014-04-22 08:43:45 -0500521 double m_corR;
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600522 std::vector<double> m_corTheta;
akmhoque53353462014-04-22 08:43:45 -0500523
Vince Lehman942eb7b2014-10-02 10:09:27 -0500524 uint32_t m_maxFacesPerPrefix;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700525
dulalsaurab82a34c22019-02-04 17:31:21 +0000526 std::string m_stateFileDir;
527
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600528 ndn::time::milliseconds m_syncInterestLifetime;
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600529
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500530 int32_t m_syncProtocol;
531
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600532PUBLIC_WITH_TESTS_ELSE_PRIVATE:
533 static const uint64_t SYNC_VERSION;
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600534
535 AdjacencyList m_adjl;
536 NamePrefixList m_npl;
537 ndn::security::ValidatorConfig m_validator;
538 ndn::security::ValidatorConfig m_prefixUpdateValidator;
Saurab Dulal427e0122019-11-28 11:58:02 -0600539 ndn::security::SigningInfo m_signingInfo;
540 std::unordered_set<std::string> m_certs;
541 ndn::KeyChain& m_keyChain;
akmhoque53353462014-04-22 08:43:45 -0500542};
543
akmhoque53353462014-04-22 08:43:45 -0500544} // namespace nlsr
545
dmcoomese689dd62017-03-29 11:05:12 -0500546#endif // NLSR_CONF_PARAMETER_HPP