blob: 89d01c4911f0876987ec3ec7335a055c592907ee [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/*
Saurab Dulal427e0122019-11-28 11:58:02 -06003 * Copyright (c) 2014-2020, 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
akmhoquefdbddb12014-05-02 18:35:19 -050031#include <boost/cstdint.hpp>
akmhoque31d1d4b2014-05-05 22:08:14 -050032#include <ndn-cxx/face.hpp>
Ashlesh Gawande85998a12017-12-07 22:22:13 -060033#include <ndn-cxx/security/validator-config.hpp>
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -040034#include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -070035#include <ndn-cxx/util/time.hpp>
akmhoque53353462014-04-22 08:43:45 -050036
37namespace nlsr {
akmhoque157b0a42014-05-13 00:26:37 -050038
39enum {
40 LSA_REFRESH_TIME_MIN = 240,
41 LSA_REFRESH_TIME_DEFAULT = 1800,
42 LSA_REFRESH_TIME_MAX = 7200
43};
44
45enum {
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -050046 SYNC_PROTOCOL_CHRONOSYNC = 0,
47 SYNC_PROTOCOL_PSYNC = 1
48};
49
50enum {
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -070051 LSA_INTEREST_LIFETIME_MIN = 1,
52 LSA_INTEREST_LIFETIME_DEFAULT = 4,
53 LSA_INTEREST_LIFETIME_MAX = 60
54};
55
56enum {
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -050057 ADJ_LSA_BUILD_INTERVAL_MIN = 5,
58 ADJ_LSA_BUILD_INTERVAL_DEFAULT = 10,
59 ADJ_LSA_BUILD_INTERVAL_MAX = 30
Vince Lehman7b616582014-10-17 16:25:39 -050060};
61
62enum {
63 ROUTING_CALC_INTERVAL_MIN = 0,
64 ROUTING_CALC_INTERVAL_DEFAULT = 15,
65 ROUTING_CALC_INTERVAL_MAX = 15
66};
67
Nick Gordond5c1a372016-10-31 13:56:23 -050068
69enum {
70 FACE_DATASET_FETCH_TRIES_MIN = 1,
71 FACE_DATASET_FETCH_TRIES_MAX = 10,
72 FACE_DATASET_FETCH_TRIES_DEFAULT = 3
73};
74
75enum {
76 FACE_DATASET_FETCH_INTERVAL_MIN = 1800,
77 FACE_DATASET_FETCH_INTERVAL_MAX = 5400,
78 FACE_DATASET_FETCH_INTERVAL_DEFAULT = 3600
79};
80
Vince Lehman7b616582014-10-17 16:25:39 -050081enum {
akmhoque157b0a42014-05-13 00:26:37 -050082 HELLO_RETRIES_MIN = 1,
83 HELLO_RETRIES_DEFAULT = 3,
84 HELLO_RETRIES_MAX = 15
85};
86
87enum {
88 HELLO_TIMEOUT_MIN = 1,
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -050089 HELLO_TIMEOUT_DEFAULT = 1,
akmhoque157b0a42014-05-13 00:26:37 -050090 HELLO_TIMEOUT_MAX = 15
91};
92
93enum {
94 HELLO_INTERVAL_MIN = 30,
95 HELLO_INTERVAL_DEFAULT = 60,
96 HELLO_INTERVAL_MAX =90
97};
98
99enum {
100 MAX_FACES_PER_PREFIX_MIN = 0,
alvya2228c62014-12-09 10:25:11 -0600101 MAX_FACES_PER_PREFIX_DEFAULT = 0,
akmhoque157b0a42014-05-13 00:26:37 -0500102 MAX_FACES_PER_PREFIX_MAX = 60
103};
104
Nick Gordon5c467f02016-07-13 13:40:10 -0500105enum HyperbolicState {
akmhoque157b0a42014-05-13 00:26:37 -0500106 HYPERBOLIC_STATE_OFF = 0,
107 HYPERBOLIC_STATE_ON = 1,
alvya2228c62014-12-09 10:25:11 -0600108 HYPERBOLIC_STATE_DRY_RUN = 2,
109 HYPERBOLIC_STATE_DEFAULT = 0
akmhoque157b0a42014-05-13 00:26:37 -0500110};
111
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600112enum {
113 SYNC_INTEREST_LIFETIME_MIN = 1000,
114 SYNC_INTEREST_LIFETIME_DEFAULT = 60000,
115 SYNC_INTEREST_LIFETIME_MAX = 120000,
116};
117
Nick Gordond0a7df32017-05-30 16:44:34 -0500118/*! \brief A class to house all the configuration parameters for NLSR.
119 *
120 * This class is conceptually a singleton (but not mechanically) which
121 * is just a collection of attributes that serve as a
122 * separation-of-data for NLSR's configuration variables. NLSR refers
123 * to an instance of this class for all its configuration
124 * parameters. This object is typically populated by a
125 * ConfFileProcessor reading a configuration file.
126 *
127 * \sa nlsr::ConfFileProcessor
128 */
akmhoque53353462014-04-22 08:43:45 -0500129class ConfParameter
130{
131
132public:
Saurab Dulal427e0122019-11-28 11:58:02 -0600133 ConfParameter(ndn::Face& face, ndn::KeyChain& keyChain,
134 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
alvy5a454952014-12-15 12:49:54 -0600217 uint32_t
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500218 getSyncProtocol() const
219 {
220 return m_syncProtocol;
221 }
222
223 void
224 setSyncProtocol(int32_t syncProtocol)
225 {
226 if (syncProtocol == SYNC_PROTOCOL_CHRONOSYNC || syncProtocol == SYNC_PROTOCOL_PSYNC) {
227 m_syncProtocol = syncProtocol;
228 }
229 }
230
231 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700232 getLsaRefreshTime() const
akmhoque53353462014-04-22 08:43:45 -0500233 {
234 return m_lsaRefreshTime;
235 }
236
237 void
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700238 setLsaInterestLifetime(const ndn::time::seconds& lifetime)
239 {
240 m_lsaInterestLifetime = lifetime;
241 }
242
243 const ndn::time::seconds&
244 getLsaInterestLifetime() const
245 {
246 return m_lsaInterestLifetime;
247 }
248
249 void
Vince Lehman7b616582014-10-17 16:25:39 -0500250 setAdjLsaBuildInterval(uint32_t interval)
251 {
252 m_adjLsaBuildInterval = interval;
253 }
254
255 uint32_t
256 getAdjLsaBuildInterval() const
257 {
258 return m_adjLsaBuildInterval;
259 }
260
261 void
Vince Lehman7b616582014-10-17 16:25:39 -0500262 setRoutingCalcInterval(uint32_t interval)
263 {
264 m_routingCalcInterval = interval;
265 }
266
267 uint32_t
268 getRoutingCalcInterval() const
269 {
270 return m_routingCalcInterval;
271 }
272
273 void
alvy5a454952014-12-15 12:49:54 -0600274 setRouterDeadInterval(uint32_t rdt)
akmhoque53353462014-04-22 08:43:45 -0500275 {
276 m_routerDeadInterval = rdt;
277 }
278
alvy5a454952014-12-15 12:49:54 -0600279 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700280 getRouterDeadInterval() const
akmhoque53353462014-04-22 08:43:45 -0500281 {
282 return m_routerDeadInterval;
283 }
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700284
285 void
Nick Gordond5c1a372016-10-31 13:56:23 -0500286 setFaceDatasetFetchTries(uint32_t count)
287 {
288 m_faceDatasetFetchTries = count;
289 }
290
291 uint32_t
292 getFaceDatasetFetchTries() const
293 {
294 return m_faceDatasetFetchTries;
295 }
296
297 void
Ashlesh Gawande3909aa12017-07-28 16:01:35 -0500298 setFaceDatasetFetchInterval(uint32_t interval)
Nick Gordond5c1a372016-10-31 13:56:23 -0500299 {
Ashlesh Gawande3909aa12017-07-28 16:01:35 -0500300 m_faceDatasetFetchInterval = ndn::time::seconds(interval);
Nick Gordond5c1a372016-10-31 13:56:23 -0500301 }
302
303 const ndn::time::seconds
304 getFaceDatasetFetchInterval() const
305 {
306 return m_faceDatasetFetchInterval;
307 }
308
309 void
akmhoque157b0a42014-05-13 00:26:37 -0500310 setInterestRetryNumber(uint32_t irn)
akmhoque53353462014-04-22 08:43:45 -0500311 {
akmhoque157b0a42014-05-13 00:26:37 -0500312 m_interestRetryNumber = irn;
313 }
314
315 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700316 getInterestRetryNumber() const
akmhoque157b0a42014-05-13 00:26:37 -0500317 {
318 return m_interestRetryNumber;
319 }
320
321 void
alvy5a454952014-12-15 12:49:54 -0600322 setInterestResendTime(uint32_t irt)
akmhoque157b0a42014-05-13 00:26:37 -0500323 {
324 m_interestResendTime = irt;
akmhoque53353462014-04-22 08:43:45 -0500325 }
326
alvy5a454952014-12-15 12:49:54 -0600327 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700328 getInterestResendTime() const
akmhoque53353462014-04-22 08:43:45 -0500329 {
akmhoque157b0a42014-05-13 00:26:37 -0500330 return m_interestResendTime;
akmhoque53353462014-04-22 08:43:45 -0500331 }
332
alvy5a454952014-12-15 12:49:54 -0600333 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700334 getInfoInterestInterval() const
akmhoque53353462014-04-22 08:43:45 -0500335 {
akmhoque157b0a42014-05-13 00:26:37 -0500336 return m_infoInterestInterval;
akmhoque53353462014-04-22 08:43:45 -0500337 }
338
339 void
alvy5a454952014-12-15 12:49:54 -0600340 setInfoInterestInterval(uint32_t iii)
akmhoque53353462014-04-22 08:43:45 -0500341 {
akmhoque157b0a42014-05-13 00:26:37 -0500342 m_infoInterestInterval = iii;
343 }
344
345 void
346 setHyperbolicState(int32_t ihc)
347 {
348 m_hyperbolicState = ihc;
akmhoque53353462014-04-22 08:43:45 -0500349 }
350
akmhoquefdbddb12014-05-02 18:35:19 -0500351 int32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700352 getHyperbolicState() const
akmhoque53353462014-04-22 08:43:45 -0500353 {
akmhoque157b0a42014-05-13 00:26:37 -0500354 return m_hyperbolicState;
akmhoque53353462014-04-22 08:43:45 -0500355 }
356
akmhoque157b0a42014-05-13 00:26:37 -0500357 bool
akmhoque53353462014-04-22 08:43:45 -0500358 setCorR(double cr)
359 {
akmhoque157b0a42014-05-13 00:26:37 -0500360 if ( cr >= 0 ) {
361 m_corR = cr;
362 return true;
363 }
364 return false;
akmhoque53353462014-04-22 08:43:45 -0500365 }
366
367 double
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700368 getCorR() const
akmhoque53353462014-04-22 08:43:45 -0500369 {
370 return m_corR;
371 }
372
373 void
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600374 setCorTheta(const std::vector<double>& ct)
akmhoque53353462014-04-22 08:43:45 -0500375 {
376 m_corTheta = ct;
377 }
378
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600379 std::vector<double>
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700380 getCorTheta() const
akmhoque53353462014-04-22 08:43:45 -0500381 {
382 return m_corTheta;
383 }
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700384
akmhoque53353462014-04-22 08:43:45 -0500385 void
Vince Lehman942eb7b2014-10-02 10:09:27 -0500386 setMaxFacesPerPrefix(uint32_t mfpp)
akmhoque53353462014-04-22 08:43:45 -0500387 {
akmhoque157b0a42014-05-13 00:26:37 -0500388 m_maxFacesPerPrefix = mfpp;
akmhoque53353462014-04-22 08:43:45 -0500389 }
390
Vince Lehman942eb7b2014-10-02 10:09:27 -0500391 uint32_t
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700392 getMaxFacesPerPrefix() const
akmhoque53353462014-04-22 08:43:45 -0500393 {
akmhoque157b0a42014-05-13 00:26:37 -0500394 return m_maxFacesPerPrefix;
akmhoque53353462014-04-22 08:43:45 -0500395 }
396
397 void
dulalsaurab82a34c22019-02-04 17:31:21 +0000398 setStateFileDir(const std::string& ssfd)
akmhoque53353462014-04-22 08:43:45 -0500399 {
dulalsaurab82a34c22019-02-04 17:31:21 +0000400 m_stateFileDir = ssfd;
akmhoque53353462014-04-22 08:43:45 -0500401 }
402
akmhoque157b0a42014-05-13 00:26:37 -0500403 const std::string&
dulalsaurab82a34c22019-02-04 17:31:21 +0000404 getStateFileDir() const
akmhoque53353462014-04-22 08:43:45 -0500405 {
dulalsaurab82a34c22019-02-04 17:31:21 +0000406 return m_stateFileDir;
407 }
408
dulalsaurabd0816a32019-07-26 13:11:24 +0000409 void
410 setConfFileNameDynamic(const std::string& confFileDynamic)
dulalsaurab82a34c22019-02-04 17:31:21 +0000411 {
412 m_confFileNameDynamic = confFileDynamic;
413 }
414
415 const std::string&
416 getConfFileNameDynamic() const
417 {
418 return m_confFileNameDynamic;
akmhoque53353462014-04-22 08:43:45 -0500419 }
420
akmhoque674b0b12014-05-20 14:33:28 -0500421 void
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600422 setSyncInterestLifetime(uint32_t syncInterestLifetime)
423 {
424 m_syncInterestLifetime = ndn::time::milliseconds(syncInterestLifetime);
425 }
426
427 const ndn::time::milliseconds&
428 getSyncInterestLifetime() const
429 {
430 return m_syncInterestLifetime;
431 }
432
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600433 AdjacencyList&
434 getAdjacencyList()
435 {
436 return m_adjl;
437 }
438
439 NamePrefixList&
440 getNamePrefixList()
441 {
442 return m_npl;
443 }
444
445 ndn::security::ValidatorConfig&
446 getValidator()
447 {
448 return m_validator;
449 }
450
451 ndn::security::ValidatorConfig&
452 getPrefixUpdateValidator()
453 {
454 return m_prefixUpdateValidator;
455 }
456
Saurab Dulal427e0122019-11-28 11:58:02 -0600457 const ndn::security::SigningInfo&
458 getSigningInfo() const
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600459 {
Saurab Dulal427e0122019-11-28 11:58:02 -0600460 return m_signingInfo;
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600461 }
462
Saurab Dulal427e0122019-11-28 11:58:02 -0600463 void
464 addCertPath(const std::string& certPath)
465 {
466 m_certs.insert(certPath);
467 }
468
469 const std::unordered_set<std::string>&
470 getIdCerts() const
471 {
472 return m_certs;
473 }
474
475 const ndn::KeyChain&
476 getKeyChain() const
477 {
478 return m_keyChain;
479 }
480
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -0400481 shared_ptr<ndn::security::Certificate>
Saurab Dulal427e0122019-11-28 11:58:02 -0600482 initializeKey();
483
484 void
Alexander Afanasyev0ad01f32020-06-03 14:12:58 -0400485 loadCertToValidator(const ndn::security::Certificate& cert);
Saurab Dulal427e0122019-11-28 11:58:02 -0600486
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600487 /*! \brief Dump the current state of all attributes to the log.
488 */
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600489 void
akmhoque674b0b12014-05-20 14:33:28 -0500490 writeLog();
akmhoque53353462014-04-22 08:43:45 -0500491
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600492PUBLIC_WITH_TESTS_ELSE_PRIVATE:
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600493 std::string m_confFileName;
Ashlesh Gawande328fc112019-12-12 17:06:44 -0600494 std::string m_confFileNameDynamic;
495private:
akmhoque31d1d4b2014-05-05 22:08:14 -0500496 ndn::Name m_routerName;
497 ndn::Name m_siteName;
498 ndn::Name m_network;
akmhoque53353462014-04-22 08:43:45 -0500499
akmhoque31d1d4b2014-05-05 22:08:14 -0500500 ndn::Name m_routerPrefix;
Ashlesh Gawande6b388fc2019-09-30 10:14:41 -0500501 ndn::Name m_syncUserPrefix;
akmhoque53353462014-04-22 08:43:45 -0500502
Ashlesh Gawande85998a12017-12-07 22:22:13 -0600503 ndn::Name m_syncPrefix;
akmhoque157b0a42014-05-13 00:26:37 -0500504 ndn::Name m_lsaPrefix;
505
alvy5a454952014-12-15 12:49:54 -0600506 uint32_t m_lsaRefreshTime;
Vince Lehman7b616582014-10-17 16:25:39 -0500507
508 uint32_t m_adjLsaBuildInterval;
Vince Lehman7b616582014-10-17 16:25:39 -0500509 uint32_t m_routingCalcInterval;
510
Nick Gordond5c1a372016-10-31 13:56:23 -0500511 uint32_t m_faceDatasetFetchTries;
512 ndn::time::seconds m_faceDatasetFetchInterval;
513
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700514 ndn::time::seconds m_lsaInterestLifetime;
alvy5a454952014-12-15 12:49:54 -0600515 uint32_t m_routerDeadInterval;
akmhoque53353462014-04-22 08:43:45 -0500516
akmhoquefdbddb12014-05-02 18:35:19 -0500517 uint32_t m_interestRetryNumber;
alvy5a454952014-12-15 12:49:54 -0600518 uint32_t m_interestResendTime;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700519
alvy5a454952014-12-15 12:49:54 -0600520 uint32_t m_infoInterestInterval;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700521
akmhoque157b0a42014-05-13 00:26:37 -0500522 int32_t m_hyperbolicState;
akmhoque53353462014-04-22 08:43:45 -0500523 double m_corR;
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600524 std::vector<double> m_corTheta;
akmhoque53353462014-04-22 08:43:45 -0500525
Vince Lehman942eb7b2014-10-02 10:09:27 -0500526 uint32_t m_maxFacesPerPrefix;
Alexander Afanasyev411ee4b2014-08-16 23:17:03 -0700527
dulalsaurab82a34c22019-02-04 17:31:21 +0000528 std::string m_stateFileDir;
529
Ashlesh Gawandef7da9c52018-02-06 17:36:46 -0600530 ndn::time::milliseconds m_syncInterestLifetime;
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600531
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500532 int32_t m_syncProtocol;
533
Ashlesh Gawande982a58f2018-02-14 17:39:12 -0600534PUBLIC_WITH_TESTS_ELSE_PRIVATE:
535 static const uint64_t SYNC_VERSION;
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