Git Product home page Git Product logo

nlsr's Introduction

NLSR: Named Data Link State Routing Protocol

Latest version Language CI Docker Docs

Tip

For more extensive documentation, visit the NLSR homepage.

Overview

NLSR is a routing protocol for Named Data Networking (NDN) that populates the Routing Information Base (RIB) of an NDN router, such as NFD. NLSR continues to evolve alongside the core NDN protocol.

The main design goal of NLSR is to provide a routing protocol to populate NDN's RIB. NLSR calculates the routing table using link-state or hyperbolic routing and produces multiple faces for each reachable name prefix in a single authoritative domain. NLSR will continue to evolve over time to include neighbor discovery and to become a full fledged inter-domain routing protocol for NDN.

NLSR was mainly developed by members of the NSF-sponsored NDN project. See AUTHORS.md for details.

Source releases

The source code and installation instructions are available at the following locations:

Reporting bugs

Please submit any bug reports or feature requests to the NLSR issue tracker.

Additional resources

License

NLSR is free software distributed under the GNU General Public License version 3. See COPYING.md for details.

NLSR contains third-party software, licensed under the following licenses:

nlsr's People

Contributors

agawande avatar akmhoque avatar alanwaketan avatar alvyc avatar ashiqopu avatar awlane avatar bruinfish avatar cawka avatar david-arjona avatar dmcoomes avatar dthnsley avatar dulalsaurab avatar eric135 avatar gltorres avatar joaopapereira avatar laqinfan avatar matianxing1992 avatar pesa avatar pulsejet avatar rwickman avatar sfayer avatar signorello avatar spirosmastorakis avatar vslehman avatar yoursunny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nlsr's Issues

Build fails because Keychain does not have makeCertificate member

I am trying to build NLSR and it throws error as following:

[14/40] Compiling src/communication/sync-protocol-adapter.cpp
[15/40] Compiling src/conf-parameter.cpp
[21/40] Compiling src/stats-collector.cpp
[22/40] Compiling src/update/nfd-rib-commands.cpp
[33/40] Compiling src/statistics.cpp
../src/conf-parameter.cpp: In member function ‘nonstd::optional_lite::optional<ndn::security::v2::Certificate> nlsr::ConfParameter::initializeKey()’:
../src/conf-parameter.cpp:162:26: error: ‘class ndn::security::v2::KeyChain’ has no member named ‘makeCertificate’; did you mean ‘addCertificate’?
   auto cert = m_keyChain.makeCertificate(key, signingByIdentity(routerIdentity));
                          ^~~~~~~~~~~~~~~
                          addCertificate

../src/communication/sync-protocol-adapter.cpp: In member function ‘void nlsr::SyncProtocolAdapter::onPSyncUpdate(const std::vector<psync::MissingDataInfo>&)’:
../src/communication/sync-protocol-adapter.cpp:115:64: error: ‘const struct psync::MissingDataInfo’ has no member named ‘incomingFace’
     m_syncUpdateCallback(update.prefix, update.highSeq, update.incomingFace);
                                                                ^~~~~~~~~~~~

Waf: Leaving directory `/home/picocluster/Desktop/tm/NLSR/build'
Build failed
 -> task in 'nlsr-objects' failed with exit status 1 (run with -v to display more information)
 -> task in 'nlsr-objects' failed with exit status 1 (run with -v to display more information)

How can I solve the issue?

Linker error with ChronoSync when building.

Upon the "sudo ./waf" command, I receive several undefined reference errors with ChronoSync:

VirtualBox:~/NLSR$ sudo ./waf
Waf: Entering directory `/home/travis/NLSR/build'
[47/49] Linking build/bin/nlsr
[49/49] Linking build/bin/nlsrc
/usr/local/lib/libChronoSync.so: error: undefined reference to 'ndn::util::Sha256::Sha256()'
/usr/local/lib/libChronoSync.so: error: undefined reference to 'ndn::util::Sha256::computeDigest()'
/usr/local/lib/libChronoSync.so: error: undefined reference to 'ndn::util::Sha256::reset()'
/usr/local/lib/libChronoSync.so: error: undefined reference to 'ndn::util::Sha256::operator<<(ndn::Block const&)'
/usr/local/lib/libChronoSync.so: error: undefined reference to 'ndn::util::Sha256::operator<<(unsigned long)'
/usr/local/lib/libChronoSync.so: error: undefined reference to 'ndn::InMemoryStorage::erase(ndn::Name const&, bool)'

I have successfully installed both ndn-cxx and ChronoSync onto my system.

./waf issue

Setting top to : /home/hacks/.src/NLSR
Setting out to : /home/hacks/.src/NLSR/build
Checking for 'g++' (C++ compiler) : /usr/bin/g++
Checking C++ compiler version : 9.4.0
Checking supported CXXFLAGS : -std=c++17
Checking supported LINKFLAGS : -fuse-ld=gold
Checking for program 'doxygen' : /usr/bin/doxygen
Checking for program 'tar' : /usr/bin/tar
Checking for program 'sphinx-build' : /home/hacks/.local/bin/sphinx-build
Checking for program 'dot' : /usr/bin/dot
Checking for program 'pkgconf, pkg-config' : /usr/bin/pkg-config
Checking for 'libndn-cxx' : yes
Checking for program 'dpkg-architecture' : /usr/bin/dpkg-architecture
Checking boost includes : 1.71.0
Checking boost libs : boost_system boost_iostreams boost_filesystem boost_regex
Checking for boost linkage : ok
Checking for 'PSync' : yes
Checking supported CXXFLAGS : -O2 -g -pedantic -Wall -Wextra -Wcatch-value=2 -Wextra-semi -Wnon-virtual-dtor -Wno-unused-parameter -fdiagnostics-color
Checking supported LINKFLAGS : -Wl,-O1
'configure' finished successfully (1.302s)
hacks@ECIT01681:~/.src/NLSR$ ./waf
Waf: Entering directory `/home/hacks/.src/NLSR/build'
[ 8/40] Compiling src/adjacent.cpp
[ 9/40] Compiling src/name-prefix-list.cpp
[10/40] Compiling src/update/nfd-rib-command-processor.cpp
[11/40] Compiling src/update/prefix-update-commands.cpp
[12/40] Compiling src/update/nfd-rib-commands.cpp
[13/40] Compiling src/route/fib.cpp
[14/40] Compiling src/lsdb.cpp
[21/40] Compiling src/lsa/coordinate-lsa.cpp
[36/40] Compiling src/nlsr.cpp
[37/40] Compiling src/main.cpp
[38/40] Compiling tools/nlsrc.cpp
../src/lsdb.cpp: In member function ‘bool nlsr::Lsdb::processInterestForLsa(const ndn::Interest&, const ndn::Name&, nlsr::Lsa::Type, uint64_t)’:
../src/lsdb.cpp:209:80: error: no matching function for call to ‘psync::SegmentPublisher::publish(const ndn::Name&, const ndn::Name&, const ndn::Block&, ndn::time::seconds&, const ndn::security::SigningInfo&)’
209 | m_lsaRefreshTime, m_confParam.getSigningInfo());
| ^
In file included from /usr/local/include/PSync/producer-base.hpp:26,
from /usr/local/include/PSync/full-producer.hpp:23,
from ../src/communication/sync-protocol-adapter.hpp:33,
from ../src/communication/sync-logic-handler.hpp:28,
from ../src/lsdb.hpp:32,
from ../src/lsdb.cpp:22:
/usr/local/include/PSync/segment-publisher.hpp:51:3: note: candidate: ‘void psync::SegmentPublisher::publish(const ndn::Name&, const ndn::Name&, nonstd::span_lite::span, ndn::time::milliseconds)’ 51 | publish(const ndn::Name& interestName, const ndn::Name& dataName,
| ^~~~~~~
/usr/local/include/PSync/segment-publisher.hpp:51:3: note: candidate expects 4 arguments, 5 provided

Fail ./waf, It seem like PSync was updated a few days ago and break this.

named-data/PSync@b68f284?diff=split

In version 0.5.0. Execute nlsrc lsdb, the LSDB info can dump out, but also report double free error

*** Error in `nlsrc': double free or corruption (!prev): 0x0000000001545c80 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f3575bdd7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f3575be637a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f3575bea53c]
nlsrc(_ZN3ndn4NameD1Ev+0x3b)[0x42c15b]
/lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7f3575ba036a]
/usr/local/lib/libndn-cxx.so.0.6.3(+0x15e593)[0x7f3574915593]
======= Memory map: ========
00400000-0053d000 r-xp 00000000 08:01 13371563 /usr/local/bin/nlsrc
0053e000-0053f000 r--p 0013d000 08:01 13371563 /usr/local/bin/nlsrc
0053f000-00540000 rw-p 0013e000 08:01 13371563 /usr/local/bin/nlsrc
00540000-00546000 rw-p 00000000 00:00 0
0152f000-015bb000 rw-p 00000000 00:00 0 [heap]
7f356c000000-7f356c021000 rw-p 00000000 00:00 0
7f356c021000-7f3570000000 ---p 00000000 00:00 0
7f3573988000-7f3573989000 ---p 00000000 00:00 0
7f3573989000-7f3574189000 rw-p 00000000 00:00 0
7f3574189000-7f35741a2000 r-xp 00000000 08:01 8655495 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f35741a2000-7f35743a1000 ---p 00019000 08:01 8655495 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f35743a1000-7f35743a2000 r--p 00018000 08:01 8655495 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f35743a2000-7f35743a3000 rw-p 00019000 08:01 8655495 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f35743a3000-7f35743b2000 r-xp 00000000 08:01 8655303 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f35743b2000-7f35745b1000 ---p 0000f000 08:01 8655303 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f35745b1000-7f35745b2000 r--p 0000e000 08:01 8655303 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f35745b2000-7f35745b3000 rw-p 0000f000 08:01 8655303 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7f35745b3000-7f35745b6000 r-xp 00000000 08:01 8657707 /lib/x86_64-linux-gnu/libdl-2.23.so
7f35745b6000-7f35747b5000 ---p 00003000 08:01 8657707 /lib/x86_64-linux-gnu/libdl-2.23.so
7f35747b5000-7f35747b6000 r--p 00002000 08:01 8657707 /lib/x86_64-linux-gnu/libdl-2.23.so
7f35747b6000-7f35747b7000 rw-p 00003000 08:01 8657707 /lib/x86_64-linux-gnu/libdl-2.23.so
7f35747b7000-7f3574bde000 r-xp 00000000 08:01 13508167 /usr/local/lib/libndn-cxx.so.0.6.3
7f3574bde000-7f3574bf0000 r--p 00426000 08:01 13508167 /usr/local/lib/libndn-cxx.so.0.6.3
7f3574bf0000-7f3574bfa000 rw-p 00438000 08:01 13508167 /usr/local/lib/libndn-cxx.so.0.6.3
7f3574bfa000-7f3574bfe000 rw-p 00000000 00:00 0
7f3574bfe000-7f3574c15000 r-xp 00000000 08:01 13377513 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.58.0
7f3574c15000-7f3574e15000 ---p 00017000 08:01 13377513 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.58.0
7f3574e15000-7f3574e16000 r--p 00017000 08:01 13377513 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.58.0
7f3574e16000-7f3574e17000 rw-p 00018000 08:01 13377513 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.58.0
7f3574e17000-7f3574e1e000 r-xp 00000000 08:01 8657705 /lib/x86_64-linux-gnu/librt-2.23.so
7f3574e1e000-7f357501d000 ---p 00007000 08:01 8657705 /lib/x86_64-linux-gnu/librt-2.23.so
7f357501d000-7f357501e000 r--p 00006000 08:01 8657705 /lib/x86_64-linux-gnu/librt-2.23.so
7f357501e000-7f357501f000 rw-p 00007000 08:01 8657705 /lib/x86_64-linux-gnu/librt-2.23.so
7f357501f000-7f35750ee000 r-xp 00000000 08:01 13374248 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f35750ee000-7f35752ed000 ---p 000cf000 08:01 13374248 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f35752ed000-7f35752f0000 r--p 000ce000 08:01 13374248 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f35752f0000-7f35752f2000 rw-p 000d1000 08:01 13374248 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f35752f2000-7f35752f3000 rw-p 00000000 00:00 0
7f35752f3000-7f357550e000 r-xp 00000000 08:01 8655206 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f357550e000-7f357570d000 ---p 0021b000 08:01 8655206 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f357570d000-7f3575729000 r--p 0021a000 08:01 8655206 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f3575729000-7f3575735000 rw-p 00236000 08:01 8655206 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f3575735000-7f3575738000 rw-p 00000000 00:00 0
7f3575738000-7f357575c000 r-xp 00000000 08:01 13380702 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7f357575c000-7f357595b000 ---p 00024000 08:01 13380702 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7f357595b000-7f357595d000 r--p 00023000 08:01 13380702 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7f357595d000-7f357595e000 rw-p 00025000 08:01 13380702 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7f357595e000-7f3575964000 r-xp 00000000 08:01 13380699 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
7f3575964000-7f3575b64000 ---p 00006000 08:01 13380699 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
7f3575b64000-7f3575b65000 r--p 00006000 08:01 13380699 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
7f3575b65000-7f3575b66000 rw-p 00007000 08:01 13380699 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0
7f3575b66000-7f3575d26000 r-xp 00000000 08:01 8657722 /lib/x86_64-linux-gnu/libc-2.23.so
7f3575d26000-7f3575f26000 ---p 001c0000 08:01 8657722 /lib/x86_64-linux-gnu/libc-2.23.so
7f3575f26000-7f3575f2a000 r--p 001c0000 08:01 8657722 /lib/x86_64-linux-gnu/libc-2.23.so
7f3575f2a000-7f3575f2c000 rw-p 001c4000 08:01 8657722 /lib/x86_64-linux-gnu/libc-2.23.so
7f3575f2c000-7f3575f30000 rw-p 00000000 00:00 0
7f3575f30000-7f3575f46000 r-xp 00000000 08:01 8655342 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3575f46000-7f3576145000 ---p 00016000 08:01 8655342 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3576145000-7f3576146000 rw-p 00015000 08:01 8655342 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3576146000-7f357624e000 r-xp 00000000 08:01 8657725 /lib/x86_64-linux-gnu/libm-2.23.so
7f357624e000-7f357644d000 ---p 00108000 08:01 8657725 /lib/x86_64-linux-gnu/libm-2.23.so
7f357644d000-7f357644e000 r--p 00107000 08:01 8657725 /lib/x86_64-linux-gnu/libm-2.23.so
7f357644e000-7f357644f000 rw-p 00108000 08:01 8657725 /lib/x86_64-linux-gnu/libm-2.23.so
7f357644f000-7f35765c1000 r-xp 00000000 08:01 13371525 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f35765c1000-7f35767c1000 ---p 00172000 08:01 13371525 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f35767c1000-7f35767cb000 r--p 00172000 08:01 13371525 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f35767cb000-7f35767cd000 rw-p 0017c000 08:01 13371525 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f35767cd000-7f35767d1000 rw-p 00000000 00:00 0
7f35767d1000-7f35767e9000 r-xp 00000000 08:01 8657709 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f35767e9000-7f35769e8000 ---p 00018000 08:01 8657709 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f35769e8000-7f35769e9000 r--p 00017000 08:01 8657709 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f35769e9000-7f35769ea000 rw-p 00018000 08:01 8657709 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f35769ea000-7f35769ee000 rw-p 00000000 00:00 0
7f35769ee000-7f3576ac0000 r-xp 00000000 08:01 13380796 /usr/lib/x86_64-linux-gnu/libboost_log.so.1.58.0
7f3576ac0000-7f3576cc0000 ---p 000d2000 08:01 13380796 /usr/lib/x86_64-linux-gnu/libboost_log.so.1.58.0
7f3576cc0000-7f3576cc6000 r--p 000d2000 08:01 13380796 /usr/lib/x86_64-linux-gnu/libboost_log.so.1.58.0
7f3576cc6000-7f3576cc7000 rw-p 000d8000 08:01 13380796 /usr/lib/x86_64-linux-gnu/libboost_log.so.1.58.0
7f3576cc7000-7f3576cde000 r-xp 00000000 08:01 13377512 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7f3576cde000-7f3576edd000 ---p 00017000 08:01 13377512 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7f3576edd000-7f3576ede000 r--p 00016000 08:01 13377512 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7f3576ede000-7f3576edf000 rw-p 00017000 08:01 13377512 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7f3576edf000-7f3576ee2000 r-xp 00000000 08:01 13377514 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7f3576ee2000-7f35770e1000 ---p 00003000 08:01 13377514 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7f35770e1000-7f35770e2000 r--p 00002000 08:01 13377514 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7f35770e2000-7f35770e3000 rw-p 00003000 08:01 13377514 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7f35770e3000-7f3577511000 r-xp 00000000 08:01 13505851 /usr/local/lib/libndn-cxx.so.0.6.5
7f3577511000-7f3577512000 ---p 0042e000 08:01 13505851 /usr/local/lib/libndn-cxx.so.0.6.5
7f3577512000-7f3577524000 r--p 0042e000 08:01 13505851 /usr/local/lib/libndn-cxx.so.0.6.5
7f3577524000-7f357752e000 rw-p 00440000 08:01 13505851 /usr/local/lib/libndn-cxx.so.0.6.5
7f357752e000-7f3577531000 rw-p 00000000 00:00 0
7f3577531000-7f3577557000 r-xp 00000000 08:01 8657708 /lib/x86_64-linux-gnu/ld-2.23.so
7f3577632000-7f3577645000 rw-p 00000000 00:00 0
7f3577645000-7f35776b9000 r-xp 00000000 08:01 13505894 /usr/local/lib/libPSync.so
7f35776b9000-7f35776ba000 ---p 00074000 08:01 13505894 /usr/local/lib/libPSync.so
7f35776ba000-7f35776bc000 r--p 00074000 08:01 13505894 /usr/local/lib/libPSync.so
7f35776bc000-7f35776be000 rw-p 00076000 08:01 13505894 /usr/local/lib/libPSync.so
7f35776be000-7f35776bf000 rw-p 00000000 00:00 0
7f35776bf000-7f3577735000 r-xp 00000000 08:01 13508214 /usr/local/lib/libChronoSync.so.0.5.2
7f3577735000-7f3577736000 ---p 00076000 08:01 13508214 /usr/local/lib/libChronoSync.so.0.5.2
7f3577736000-7f3577739000 r--p 00076000 08:01 13508214 /usr/local/lib/libChronoSync.so.0.5.2
7f3577739000-7f357773b000 rw-p 00079000 08:01 13508214 /usr/local/lib/libChronoSync.so.0.5.2
7f357773b000-7f357773d000 rw-p 00000000 00:00 0
7f3577755000-7f3577756000 rw-p 00000000 00:00 0
7f3577756000-7f3577757000 r--p 00025000 08:01 8657708 /lib/x86_64-linux-gnu/ld-2.23.so
7f3577757000-7f3577758000 rw-p 00026000 08:01 8657708 /lib/x86_64-linux-gnu/ld-2.23.so
7f3577758000-7f3577759000 rw-p 00000000 00:00 0
7ffc0651e000-7ffc0653f000 rw-p 00000000 00:00 0 [stack]
7ffc0656c000-7ffc0656f000 r--p 00000000 00:00 0 [vvar]
7ffc0656f000-7ffc06571000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

nlsr: symbol lookup error

in /usr/bin directory, run nlsr command , there is an error:

nlsr: symbol lookup error: nlsr: undefined symbol: _ZN3ndn8security2v211Certificate17DEFAULT_ISSUER_IDE

About the problems encountered when using nlsrc withdraw <name>

Problem Description:On a simple NFD-connected topology, after a prefix is withdrawn using nlsrc withdraw , all routing information for that prefix on adjacent NFDs is removed.
Cause of the problem: NLSR calculates routing information according to LSDB, forms FIB table, specifically: prefix+NextHops (faceID, cost), and registers routing information to NFD through Interest-Data, where the formal parameters of register() method are prefix, faceURI, Cost, and The formal parameters of the unregister() method are prefix, faceURI, and Cost, and the formal parameters of the unregister() method are prefix, faceURI, so it can be assumed that when NLSR registers the route with NFD, it registers all the route information under a certain prefix.
Solution: Modify void Fib::update(const ndn::Name& name, const NexthopList& allHops) in the fib.cpp file in the NLSR-0.4.3\src\route directory(In fact every version of NLSR has this problem, version 0.4.3 has been tested)The code is modified as follows:

`void Fib::update(const ndn::Name& name, const NexthopList& allHops)
{
NLSR_LOG_DEBUG("Fib::update called");

// Get the max possible faces which is the minumum of the configuration setting and
// the length of the list of all next hops.
unsigned int maxFaces = getNumberOfFacesForName(allHops);

NexthopList hopsToAdd;
unsigned int nFaces = 0;

// Create a list of next hops to be installed with length == maxFaces
for (NexthopList::iterator it = allHops.cbegin(); it != allHops.cend() && nFaces < maxFaces;
++it, ++nFaces) {
hopsToAdd.addNextHop(*it);
}

std::map<ndn::Name, FibEntry>::iterator entryIt = m_table.find(name);

// New FIB entry that has nextHops
if (entryIt == m_table.end() && hopsToAdd.size() != 0) {
NLSR_LOG_DEBUG("New FIB Entry");

FibEntry entry(name);

addNextHopsToFibEntryAndNfd(entry, hopsToAdd);

m_table.emplace(name, entry);

entryIt = m_table.find(name);

}
// Existing FIB entry that may or may not have nextHops
else {
// Existing FIB entry
NLSR_LOG_DEBUG("Existing FIB Entry");

// Remove empty FIB entry
if (hopsToAdd.size() == 0) {
  remove(name);
  return;
}

FibEntry& entry = (entryIt->second);//

//**addNextHopsToFibEntryAndNfd(entry, hopsToAdd);**//Adjust the position of the row

std::set<NextHop, NextHopComparator> hopsToRemove;
std::set_difference(entry.getNexthopList().begin(), entry.getNexthopList().end(),
                    hopsToAdd.begin(), hopsToAdd.end(),
                    std::inserter(hopsToRemove, hopsToRemove.end()), NextHopComparator());

bool isUpdatable = isPrefixUpdatable(entry.getName());
// Remove the uninstalled next hops from NFD and FIB entry
for (const auto& hop: hopsToRemove){
  if (isUpdatable) {
    unregisterPrefix(entry.getName(), hop.getConnectingFaceUri());
  }
  NLSR_LOG_DEBUG("Removing " << hop.getConnectingFaceUri() << " from " << entry.getName());
  entry.getNexthopList().removeNextHop(hop);
}
  addNextHopsToFibEntryAndNfd(entry, hopsToAdd);         //  Adjust here
// Increment sequence number
entry.setSeqNo(entry.getSeqNo() + 1);

entryIt = m_table.find(name);

}
if (entryIt != m_table.end() && !entryIt->second.getRefreshEventId()) {
scheduleEntryRefresh(entryIt->second,
[this] (FibEntry& entry) {
scheduleLoop(entry);
});
}
}

./waf fails

./waf fails with the following error

src/nlsr.cpp:34:10: fatal error: ndn-cxx/signature.hpp: No such file or directory

It should be noted that ndn-cxx/signature.hpp has been removed from ndn-cxx with the commit a86300a8671aaac35e035328563ddf31215acfb

A temporary workaround I used was to checkout version 0b2aa13fbf2cc72e6c1f3dee4802cf726d9907a6 of ndn-cxx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.