466 Commits
Author SHA1 Message Date
Davide Pesavento fd1e940648 Switch to Face::getIoContext() and simplify some code
Change-Id: Iba49171f6e59ead02283e8f975219ab97fcbeb00
2023-11-13 15:40:41 -05:00
Davide Pesavento 5849ee7582 build: require boost >= 1.71.0
Refs: #5276
Change-Id: I6eaae86beb89e00adf3891deb87816a1f176fdd6
2023-11-12 20:00:21 -05:00
Junxiao Shi 2ecb059eb9 lsa: define NameLsa operator==
refs #4094

Change-Id: I99650cb3c6c452b157595a394c30227e47aa88c8
2023-08-27 20:27:34 +00:00
Junxiao Shi 20377645fb lsa: split test suites and reduce includes
refs #4094

Change-Id: I25817cc4786711432b0af60c7819a54b6e41311a
2023-08-27 20:27:17 +00:00
Junxiao Shi 6593a43fa3 route: use ndn::FaceUri type for faceUri
refs #4227

Change-Id: I1b0d7ed97e43e4d0c50770ed306cbe85382dfc9a
2023-08-25 10:06:59 +00:00
Junxiao Shi 931ca9f576 name-prefix-list: delete unused methods and cleanup tests
Unit tests for NamePrefixList type are deduplicated. This allows
deleting countSources() method and NamePair type, which were used
sparsely in the unit tests and not needed by the rest of the codebase.

refs #4094

Change-Id: Id5a6e6b90f863dfeef2ed71e67a9823d84088a48
2023-08-21 10:14:46 +00:00
Davide Pesavento cd77aabaa9 build: update waf to version 2.0.26
Change-Id: I786be093be266ccd1720cc5c7752b00323ee09b6
2023-08-21 02:42:11 +00:00
Davide Pesavento eed3209c8d build: sync default build flags with ndn-cxx
Refactor default-compiler-flags.py to reduce duplication

Change-Id: I71b9255caed4d9262d73155c392a202ec7674e71
2023-08-21 02:42:00 +00:00
Davide Pesavento 5110a8a4ee build: align minimum build requirements with ndn-cxx
Change-Id: Ia28aabc9e496f7467fa58525cde97d44ad159003
2023-08-21 02:41:43 +00:00
Junxiao Shi 52f16644ab name-prefix-list: compare names only in operator==
NamePrefixList type is now a sorted container. The sort() method is
deleted.

The remove() method is renamed to erase(), in accordance with ndn-cxx
code style recommendations.

refs #4094

Change-Id: I2d3f2fa768a8dd9a51108f6f4064243b21fd6df8
2023-08-21 01:47:10 +00:00
Junxiao Shi 43f37a08fc Change namespace of DummyClientFace, Signal, Segmenter, SegmentFetcher
refs #3940

Change-Id: Ia3c9b4adcca9ff79a14be705ca9da525914f3dff
2023-08-20 02:23:22 +00:00
Saurab Dulal ecb0b7180e Prepare release 0.7.0
Change-Id: I3d707d1f1684879fa9133ac87d1b53710465dea1
2023-08-17 21:48:54 -04:00
Junxiao Shi 771a0de40c tests: change FaceId in test-nlsr and test-fib
DummyClientFace is no longer overwriting FaceId of prefix registration
reply, so that we can use FaceId other than 1.

refs #5011

Change-Id: I50ff0a6ee023ebe5cc78e6d62a45ce375798ad41
2023-08-14 10:49:07 +00:00
Davide Pesavento 907675bd06 tests: fix sync prefix test if SVS support is disabled
Amends a2599dafa9

Change-Id: I21b4379ad83f2241ad6749759ac3a95d98929a17
2023-08-02 20:11:12 -04:00
Varun Patil 7543f590a3 sync: use incomingFace for SVS
Change-Id: I28c24fd6d8da58fdfd7f125736ac22af91179fed
2023-07-21 18:15:59 +00:00
Varun Patil a2599dafa9 comm: do not use localhop for SVS
SVS does not work with localhop; Sync Interests need to
be forwarded at the network layer to all nodes in the group.

Change-Id: I32cba55f98f5a77257dd249d1b7c92d78460b39b
2023-07-19 16:56:16 -07:00
Junxiao Shi f7ea150405 tools: exit with non-zero on advertise/withdraw error
refs #5271

Change-Id: I287fc5746ac1fd2930bb85ac49e5ad732abd3581
2023-06-23 04:30:19 +00:00
Davide Pesavento 658fd85bc7 Avoid using deprecated ndn-cxx type aliases
Change-Id: I55fd500377698adc8035113bdff2d64091a36e07
2023-05-10 22:15:03 -04:00
Davide Pesavento 070ee3b52d Add missing include
Change-Id: Ia350ad412e931c96b963595019f361a6f0181c4e
2023-03-16 22:36:36 -04:00
Davide Pesavento e0ad5808e3 tests: fix two dangling-reference warnings with gcc 13
Change-Id: Iccb9045eaa468f4af7782dc466bd8a28a53ffa73
2023-02-20 21:10:03 -05:00
Davide Pesavento fa54ee99b4 ci: adopt reusable workflows from named-data/actions
Switch source archive (tarball) to xz compression

Change-Id: I3e1963bc1f101b7815f1919b4a16da973261f158
2023-02-20 04:22:42 -05:00
Davide Pesavento 1e9faf1d1b build: bump ndn-cxx, ChronoSync, PSync dependencies
Also fix a few outdated URLs in docs

Change-Id: I4269ca53f55433568e8fd93eec497697c01b3c6d
2023-01-21 16:04:50 -05:00
Davide Pesavento 1b640fd092 docs: improve formatting and document structure
Change-Id: I530d58f2700eb264855843021db32f568d373a1d
2023-01-05 04:02:02 -05:00
Davide Pesavento fcef058206 build: update waf to version 2.0.24
Change-Id: I2b367680138454e51c7aa82d3b93de70d4573d12
2022-12-06 15:08:05 -05:00
Varun Patil 7d2d689d89 communication: add SVS support
Change-Id: I74c5a091c8b1c05dd186a0c10849aa5bb4f39e50
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2022-12-05 15:27:56 +00:00
Davide Pesavento 65ee992149 lsdb: use ndn-cxx's Segmenter
This commit also makes lld the preferred linker on Linux

Change-Id: I178ca7d28ad21d8a1e3f3daf99f80206e8b1c54e
2022-11-20 22:08:09 -05:00
Davide Pesavento 69904fcb73 tests: fix compatibility with signed Interests in v0.3 format
Change-Id: I52bd2bfb5d9551614e2cf012b19b966d84306368
2022-10-14 09:45:34 -04:00
Davide Pesavento 1954a0c5ce communication: adapt to API changes in PSync
Pass the KeyChain instance to psync::FullProducer

Change-Id: Ia97356dc364c7bdaf6dc80ad57fa351eeabe997d
2022-09-30 16:40:24 -04:00
Davide Pesavento d1cb063482 docs: simplify conf.py and fix compatibility with upcoming Sphinx 6.0
Change-Id: Ib68b2cf40c9b3e74251bb87aa76ca18b7e371f3c
2022-09-25 14:11:23 -04:00
Davide Pesavento ede5963845 build+ci: support CentOS Stream 9 and macOS/arm64
This commit also syncs the CI config and scripts with ndn-cxx

Change-Id: Ie46b1d4b299bc95b03aa05d48efe366e1c72d54d
2022-08-26 20:35:44 -04:00
Davide Pesavento c1d0e8e34d build: migrate to C++17
Change-Id: Ic9f09efd20b608bfcb713fd319834b2666cf6242
2022-06-29 15:04:57 -04:00
awlane 0c87b12458 lsdb: Fix for issues involving incorrect retransmission behavior
Change-Id: I912ca04ccc8303f0c621cd5065553193d09bd26f
2022-06-17 15:53:10 -05:00
Dylan fabe9729b9 Re-add exception handler for dummy keychain
refs: #5206
Change-Id: I8099a99892e62c9365732a53b20f2f5030a67cc7
2022-05-24 16:51:31 -04:00
Alexander Afanasyev 135288cf4f lsdb: Fetch LSA from the face the notification about LSAs came from
Change-Id: Iadb7a22bcc8b2d7801787e5d88b37eec4eafc974
2022-05-24 16:12:14 -04:00
Davide Pesavento 8de8a8b37a tests: sync common testing infrastructure with ndn-cxx
Change-Id: I1e5cdcda8f6d3d9f9addc7a9f17359aedef9db7e
2022-05-12 01:26:43 -04:00
Junxiao Shi b032fcb38f conf+security: accommodate certificate name in KeyLocator
refs #5195

Change-Id: I88709f891fe78fc9f2699bc021d35ca72ebc6850
2022-04-28 01:28:50 +00:00
Davide Pesavento 583473a76f ci: require gcovr 5.1 for code coverage reports
Stop passing `-j`, it wasn't very useful and it's broken in gcovr 5.1

Change-Id: I265b23eb21a5c229b8ce7b4099b342cecd4925a3
2022-04-20 13:23:06 -04:00
Davide Pesavento e28d8756ce Avoid deprecated ndn-cxx functions
Change-Id: I763368c2ea12902b4ea400f92c23b17ad5a5628e
2022-03-19 03:55:25 -04:00
Davide Pesavento d1f1df802c build: align minimum build dependencies with ndn-cxx
* boost 1.65.1
 * gcc 7.4
 * clang 6.0
 * Xcode 10.0 (11.3 or later recommended)

Also improve some test cases

Change-Id: Ib81d082a19e61940fa6f1d89204ea8de8ed57940
2022-03-12 16:40:37 -05:00
Junxiao Shi a3a63975d1 nlsrc: run command on remote router
refs #4544

Change-Id: I977ebfb94c84730bd2bcc73515f77cc4773ec2de
2022-01-24 02:03:41 +00:00
Davide Pesavento ea94f83039 build: update waf to version 2.0.23
Change-Id: I0d8a12968548fcf183cd2183a53b27690e13237c
2022-01-02 18:46:23 -05:00
Davide Pesavento cf14807f7d ci: add code coverage reporting via gcovr
Change-Id: Idc442d4e960360f0c82bcfda0bc8c97004b5d0aa
2021-11-06 19:38:01 -04:00
Davide Pesavento 7bc3d438e7 Improve error handling and reporting
Change-Id: I41a58409c1d488ab2038ae534851e1ab59c6d952
2021-10-26 23:11:04 -04:00
Davide Pesavento ba8a4ed2d2 ci: replace Travis with GitHub Actions
Change-Id: I6316bc7872fe25644dceafb1e2e2119c9c6e5ac3
2021-10-13 21:58:29 -04:00
Davide Pesavento 7ae8b08fc2 build+docs: align minimum requirements with ndn-cxx/NFD
* Recommend boost >= 1.65.1 and gcc >= 7.4.0
 * Require clang >= 4.0, or Xcode >= 9.0 on macOS
 * Silence an ABI-related diagnostic message from gcc on armv7
 * Update waf to version 2.0.21
 * Make graphviz optional for building documentation
 * Sync sphinx configuration

Change-Id: Ib271da841cd12e7595ae83d75bd0fc681f8c231f
2021-10-13 21:57:36 -04:00
Ashlesh Gawande 6f0f35d96d fib: fix route unregister bug during update
refs: #5179

Change-Id: I19952ebcb0c78c405f3d820694a7b0f1cf7a3fe6
2021-09-06 21:20:31 -07:00
Ashlesh Gawande 3781c7ebc1 NameLsa: fix Lsdb update bug by sorting the NPLs before difference
Change-Id: Ib3d5bbf546de3356e0594732ca09671d7c32dbf1
2021-06-11 07:42:18 -07:00
Davide Pesavento 22520e68f5 Fix build with BOOST_FILESYSTEM_NO_DEPRECATED
Change-Id: Ibdd3e7c4de0e8a0a4d6ae08c26386ea780f97f57
2021-06-08 22:16:52 -04:00
Davide Pesavento 6184c2088b Use InterestSigner instead of deprecated CommandInterestSigner
Change-Id: Idb2f1ee7fe99981c229b4a587ebcf671b876e624
2021-05-17 02:28:03 -04:00
Ashlesh Gawande e63b7fa7dc Fix recurring sync prefix registration on every hello data
refs: #5157

Change-Id: Id0f77789976bd84720d2f96b549013b285e58978
2021-04-11 10:47:00 -07:00
Eric Newberry 04bfe0465a tests: make agnostic to whether name components typed or markers
refs #5044

Change-Id: If776224368556c864d6e1db74260cc00ff68d9fa
2021-04-02 11:03:51 -07:00
Ashlesh Gawande 30d96e4875 Do not compile ChronoSync support by default
ChronoSync dependency is now made optional
and is kept for testing purposes only.

Also change sig-type to ecdsa-sha256 in nlsr.conf
as ndn-cxx now has strict checking for it.

refs: #5147

Change-Id: I95c9fb844681ebf2c4e7bbb03cc7796a0795de83
2021-03-27 11:00:40 -07:00
Davide Pesavento 6002e6ab4b tests: explicitly set CanBePrefix in one more place
Refs: #4582
Change-Id: I000d09a0a936db873d50129b66cadfd21a621200
2021-03-17 15:37:32 -04:00
Ashlesh Gawande 5d93aa5b04 lsdb: emit signals when modified
RoutingTable and NamePrefixTable consume the signal
and behave accordingly.

refs: #4127

Change-Id: I6540f30f0222f804b01dc7d9640831c84e5264cc
2021-02-27 08:04:41 -08:00
Davide Pesavento d90338d230 Replace remaining uses of BOOST_THROW_EXCEPTION with NDN_THROW
Change-Id: I0c149acbe5607d928cdf9e8d73813d5e74ca45d0
2021-01-08 11:50:43 -05:00
Saurab Dulal cf06444860 Prepare release 0.6.0
Change-Id: I8c08855856fe781a244695f3eec702bf8f7ba7cc
2021-01-07 11:46:55 -06:00
Ashlesh Gawande 214032e7ac hello-protocol: fix wrong reaction on hello Interest timeout
refs: #5139

Change-Id: If043a618106633de8d1414c81dddf29af6576dff
2020-12-30 18:33:03 -08:00
Ashlesh Gawande 0af4627ad7 tools: fix compilation for ubuntu 16.04
Change-Id: Ifdbc43994e0060b67ffb94a72fdac026671a3be2
2020-12-12 16:58:57 -05:00
Davide Pesavento e4edb3952c Add missing include
Fixes compilation with gcc 10

Change-Id: I54f0808c7519b8bf1a668f05c4d09d4ca3d3b11f
2020-12-06 14:05:45 -05:00
Davide Pesavento d8d6bbcbe6 tests: fix range-loop-construct warning with clang 10 and later
Change-Id: I69a40705201f07147dccb21b3aea2db4f384b24e
2020-11-24 21:38:44 -05:00
Davide Pesavento 4a90b9ae52 ci: disable frames in lcov HTML coverage report
Change-Id: I82d521b75b9e05aa56f12c19a0b159e2ef966a6d
2020-08-09 02:21:46 -04:00
Ashlesh Gawande 7a231c0dc1 route: replace FibEntry class with struct
fix warnings from ndn-cxx

Change-Id: I1be322251dcfe5d867717a64547e1908b99c78ba
2020-07-28 22:11:20 -07:00
Ashlesh GawandeandNick Gordon 57a8717ec7 lsdb: rebuild using boost::multi_index to replace 3 LSA lists
refs: #4127

Co-authored-by: Nick Gordon <nmgordon@memphis.edu>

Change-Id: Ic179f90019e472157b0d61c6db02a4afaf4843b6
2020-07-18 19:17:26 -07:00
Ashlesh Gawande 0421bc6bcd **breaking** route: consolidate routing tlv into route
refs: #5116

Plus some misc improvements

Change-Id: Id0902fec65160b4368b1b5066f460433aced98ed
2020-06-12 07:09:40 -07:00
Alexander Afanasyev 0ad01f3834 Adjust includes for the updated locations of ndn-cxx security headers
Change-Id: I01787a91cdb70b7136f3c4e9e646e68888e6d064
2020-06-10 12:24:26 -04:00
Alexander Afanasyev 96ebd9b7c3 Rename VERSION to VERSION.info to avoid conflicts with modern STL
On case-insensitive file systems (e.g., macOS), inclusion of the new
standard <version> header resulted in unexpected inclusion of VERSION
file.

Change-Id: I84d6e37fd5f31666ced4b8b47816ff28dd911f17
2020-06-01 19:16:52 -04:00
Davide Pesavento a122abf5f6 ci: update Travis configuration
* Add testing on arm64, ppc64le, and s390x with select compiler versions
 * Drop clang 3.9
 * Reenable ASan on Linux with clang 7, the upstream bug has been fixed
 * Add clang 11 (development branch)
 * Drop Xcode 9.2 (macOS 10.12 is no longer supported)
 * Replace Xcode 11 with 11.3 and 11.4
 * Various cleanups

Change-Id: I7c27cb7765961eb5b057406b0a69d6e40b0e4ca8
2020-05-01 02:51:34 -04:00
Davide Pesavento 4b9d30f8e2 src: fix -Wrange-loop-construct warning with clang 10
Change-Id: Ife00440ffa456c6ad2119fc656a34681327e0ab3
2020-05-01 02:48:34 -04:00
Davide Pesavento f6be8e37f6 build+ci: switch to python3
Also in this commit:
 * Sync CI scripts with other projects
 * Modernize docs/conf.py
 * Replace redmine_issue extension with sphinx.ext.extlinks
 * Minor updates to docs/doxygen.conf.in
 * Cleanup README.md and INSTALL.rst

Refs: #5095
Change-Id: I614e876e6aed73659f4f4cea01813f4604599263
2020-04-30 19:45:26 -04:00
Ashlesh Gawande 0db4d4d8fc **breaking** consolidate src/tlv/*lsa* into src/lsa/*lsa*
Lsa de/serialize functions are replaced by wireEncode/Decode.
Update LSA wire formats. Change TLV assignments as required.
Update nlsrc to print using new encoding.

refs: #4787

Change-Id: Ie8d40b7836d51ea5bb444c8db208dc2b3a0d1cec
2020-04-14 20:06:01 -07:00
Ashlesh Gawande f89878c12c tlv: remove unused class LsdbStatus
refs: #4787

Change-Id: I9c7ce59238a3bac06d3db32423853f11f22e9160
2020-03-31 19:18:46 -07:00
Davide Pesavento fd021d5e3d build: upgrade waf to version 2.0.19
Change-Id: I34f4e78b109012f44aab597e2990a95dde9162ca
2020-02-24 00:42:41 -05:00
Saurab Dulal 1158c55878 Prepare release 0.5.2
Change-Id: If4489a9fcb7f2bdb9c9f2315dca932aa93f847ed
2020-02-19 09:33:58 -06:00
Saurab Dulal 427e012304 security: refactor CertificateStore class
Refs: #5075

Change-Id: I8ab92012b3acf405503ab33c9320463accc682a9
2020-02-13 23:05:28 -06:00
Eric Newberry 4a5334cba7 docs: restructure and update AUTHORS.md
refs #5078

Change-Id: Id87c4fa070170dc6bcf68d3b27a5ce8e372e9ca3
2020-02-05 17:20:04 -08:00
Ashlesh Gawande 55d1b5c2c0 sequencing-manager: remove support for old combined seq no file
refs: #4143

Change-Id: I3334ef136f75b18225828ebfba17f63c468708db
2020-01-13 21:17:33 -08:00
Davide Pesavento cb065f1773 tests: sync common test infrastructure with ndn-cxx
Change-Id: I6f2ee4b5b644d6fddcebbe1158b1dd9ad2159417
2019-12-27 01:03:34 -05:00
Ashlesh Gawande 328fc11217 conf-file-processor: fix empty file creation if conf file is same as dynamic
refs: #5071

Change-Id: I031381156d3c9aee21bb8ab7d018a37189e4a321
2019-12-12 17:27:48 -06:00
Ashlesh Gawande 6b388fc36d src: change initialization order
Send Hello Interest after route to neighbor is successfully registered
--> First Hello interval is eliminated
--> After Hello Nack, wait exponentially before processing it as a timeout
Register sync route for each neighbor after its Hello Data is validated

refs: #5009

Change-Id: Ice39a591f1e58e474b494d93c913fa45e10f24f2
2019-11-13 19:16:50 -06:00
Davide Pesavento f75bfdaa34 build: pass pkg_config_path to check_cfg()
Instead of modifying os.environ

Refs: #5042
Change-Id: Ibc17cf8f310ccd058ebacc3151fa6b4e3d355319
2019-11-10 18:34:13 -05:00
Ashlesh Gawande 842b1cf1f0 src: do not crash if identity cannot be created
This is useful during testing with dummy keychain to save overhead

Change-Id: I73eee512aba9afc3d768270e0e5b4212c7adf058
2019-10-03 22:16:56 -05:00
Davide Pesavento d21d83d892 ci: upgrade Travis config to Ubuntu 18.04
Also in this commit:

 * Drop clang 3.8 (no easy way to install it on 18.04)
 * Add clang 10 (trunk)
 * Drop Xcode 8.3
 * Upgrade Xcode 10.2 to 10.3
 * Add Xcode 11

Change-Id: I5b18eee860dd5e92ec51ae832998b57aa7681854
2019-10-01 01:00:02 -04:00
Ashlesh Gawande 4187857a9a src: onFaceEventNotification only proceed if face id was zero or updated
refs: #5010

Change-Id: Ie5b1f8a5ca2a372890a9ef2a28dc00e1a7c0a366
2019-09-30 13:36:26 -05:00
dulalsaurab d0816a3ced route: handle zero cost links
refs: #4978

Change-Id: I461bdac9e10cb8362a7624b177ee68aa20d3ff3e
2019-09-03 14:53:30 -05:00
Nick Gordon c64bed22a8 publisher: remove unused functions
Change-Id: Ifc9a590de11fa841b1d27027d46a9376c5dff41f
refs: #4127
2019-07-22 09:33:57 -05:00
Tianxing Ma 9ea3639be2 tlv: Use the encoding/decoding functions for "double" from ndn-cxx
refs: #4615

Change-Id: I0bde7085876646f272ee6006f4d3cfbd513d4ffd
2019-07-16 16:32:02 -05:00
Davide Pesavento cf22053914 ci: add gcc-9 to Travis CI build matrix
Change-Id: I9c7d2c42390f1314e57745c7459962dd98788f8a
2019-06-25 13:43:17 -04:00
dulalsaurab 348321368d Prepare release 0.5.1
Change-Id: I96ce5a15fe653cc59650edec2a9e42c2253f99a1
2019-06-12 21:33:06 -05:00
Ashlesh Gawande 08bce9c325 src: set best-route strategy for certificate prefixes
refs: #4881

Change-Id: I655c261233e478bf01ff298b74af5eb62a33ffaf
2019-05-25 08:20:39 -07:00
Junxiao Shi 0b1b7d9ff4 tests: add FreshnessPeriod where MustBeFresh is used
refs #4913

Change-Id: Idf7e85b46ea9530678b51bf1f472ecfcfca5773f
2019-05-22 15:37:18 +00:00
Ashlesh Gawande 15052408e9 src: use InMemoryStoragePersistent instead of custom LsaSegmentStorage
refs: #4788

Change-Id: Ie5d8721915864ead2f30e7f5e6181f56acefc559
2019-03-26 11:02:26 -05:00
Ashlesh Gawande dec85d2da4 src: disable network interest in CertificateFetcherDirectFetch
refs: #4879

Change-Id: I6b34b34710bdfcdf0a82327637be83bc452b16d9
2019-03-22 14:03:59 -05:00
Davide Pesavento af7a2113e4 Follow ndn::Scheduler API changes
Switch from ndn::EventId to ndn::scheduler::EventId
and simplify some code.

Refs: #4883
Change-Id: Ifbd3b00da441ca0a277900265f8f6e31fdcebf2a
2019-03-20 08:01:58 -07:00
Davide Pesavento 0b0eddd60c ci: update .travis.yml and jenkins scripts
Change-Id: I315196cb9d8e96f46e706a78c2d15d856a0a8d8b
2019-03-19 14:42:15 -04:00
Ashlesh Gawande 9ecbdc95c5 src: fix canonization by resetting io service after each neighbor
refs: #4872

Change-Id: I87e83eb36f1a17d0dc2633f04c529f71d751a497
2019-03-12 16:45:12 -05:00
Saurab Dulal b2fea6d79f NLSR Release 0.5.0: Minor change to AUTHORS.md file
Change-Id: I79f62495583a57e24e1c589e80e47d0e1d8095e1
2019-02-24 15:53:00 -06:00
Saurab Dulal d3b60a8b24 Prepare release 0.5.0
Change-Id: I8ebb2f5779d7da0c0b6c2f11cc9c653e8d3b1d90
2019-02-23 17:34:26 -06:00
Davide Pesavento 0da3eab4da Add systemd unit file
Refs: #4594
Change-Id: I415bafa14902e9d43be4891f66349192e12b9166
2019-02-22 13:50:37 -06:00
dulalsaurab 82a34c2cd8 **breaking change** nlsr.conf: rename seq-dir as state-dir
update: conf file in seperate directory for runtime modification

refs:  #4823

Change-Id: I5378d831294814e382ad23a9e522d0b576180f20
2019-02-19 15:49:38 -06:00
Ashlesh Gawande 85998a1dc9 src: decouple classes from Nlsr object
refs: #1952, #2803, #3960, #4288

Change-Id: Ibe3ac3820f11e8107ee4b13e510d53c27467a6cb
2019-02-01 14:23:55 -06:00
Ashlesh Gawande 7e3f6d75c8 src: move and simplify canonize functionality to ConfFileProcessor
refs: #4817

Change-Id: I0a7f448f50994906d0403bcb97a3973dc1a25917
2019-02-01 11:54:48 -06:00
Davide Pesavento e3c741da9a main: fix error handling and normalize exit codes
Change-Id: I3b6d6dd1f5a8fac3ec4998bd81af80a232350337
2019-01-30 23:45:32 -05:00
Davide Pesavento 5859ed3dfb Use the official markdown version of the GPLv3
Change-Id: I5de645c2b29c29e2927e19b12831c0b336ad54b7
2019-01-29 19:49:09 -05:00
Davide Pesavento e556991595 build: various updates
* Upgrade waf to 2.0.14
 * Sync default compiler flags with ndn-cxx

Change-Id: I9e5bbbc7c13d1770e6ac0b0b5f5c0fbe17f89f23
2019-01-29 19:39:06 -05:00
Saurab Dulal 72b2b25cd2 route: remove redundant function
refs: #4811

Change-Id: I31b1031f57a344e7c3176b917ffbad2f6b2bd821
2019-01-25 05:06:50 -06:00
laqinfan 7c13ba5448 nlsrc: demarcate LS and HR routing table in dry run mode
refs: #4452

Change-Id: I522493e473810f90e4e982b35a58310154816cae
2019-01-22 21:47:51 -06:00
Junxiao Shi 008c9b18a5 tests: set CanBePrefix in test suites
refs #4581

Change-Id: Ia53e2a865dbc8a422626640d8d7f3878e49066ba
2019-01-13 23:15:56 +00:00
Saurab Dulal 7526cee087 update: Add/delete prefix to the conf file
refs: #4303

Change-Id: I401885bf76be90a5076365eebc311275461813c4
2019-01-08 20:56:09 -06:00
Ashlesh Gawande 939b6f8652 src: use psync::SegmentPublisher and fix proccessing of interests w/ segments
refs: #4784, #4760

Change-Id: Ia017a6f340e1cd35991068453c9da595c453ca1f
2018-12-22 15:45:50 -06:00
Ashlesh Gawande e5002b3fc4 fib: don't refresh neighbor router's FIB entry (it is already installed w/ expiry=never)
refs: #4799

Change-Id: Ib55687655ccd8673eeae14d8418e458ad8ab00aa
2018-12-21 12:18:49 -06:00
Ashlesh Gawande 32ec3fd51e communication: sync protocol adapater to add psync
refs: #4082

Change-Id: Ibe4649e709dfbc3cdc1f2afbfc4ff03f75a3f136
2018-12-10 10:38:41 -06:00
David Arjona 2fa23ea104 docs: Improving documentation for NLSR
Change-Id: Iada3c9bbc56b53fb66bfea1c99ef2204afaf9039
2018-12-07 12:29:20 -06:00
Ashlesh Gawande 744e481642 ci: enable leak sanitizer
src: fix memory leaks caused by segment fetcher

refs: #4682

Change-Id: I4fdf24f369e2d27845f1f6e6ca9978905110a024
2018-11-25 10:43:40 -08:00
ashiqopu 8433cfeace ci: install gcovr via apt
Change-Id: I0e24a2299c99d4e685a9bb5a1ddba34d06ba2f77
refs: #4771
2018-11-25 06:47:37 +00:00
David Arjona 2e6c8bb896 docs: A beginners' guide to installing and testing on Fedora
Change-Id: I2345fe8443981dab60782f8daa8c4ae0b107a1bf
2018-11-15 16:44:25 -06:00
Ashlesh Gawande 3494f7366a src: disallow interest loopbacks
refs: #4768

Change-Id: If5ec53fc9869b65e318c3eaf950708cfa36e658a
2018-11-06 17:30:40 -06:00
Ashlesh Gawande 05cb728c63 src+tools: use segment fetcher start
jenkins: re-compile ChronoSync on ndn-cxx change

refs: #4464

Change-Id: Ia627e00b8f13bad0068e213a6019f62a84cad41a
2018-09-25 17:55:43 -05:00
Ashlesh Gawande 057005460e hello-protocol: set canBePrefix to true
refs: #4691, #4679

Change-Id: I5f57d7bb6a75af074fc64206fe6061f2fc758b40
2018-08-28 11:13:28 -07:00
Ashlesh Gawande e8d8bd5276 adjacency-list: fix crash in equals operator
some minor code improvements

refs: #4705

Change-Id: I28805981a88a94c79f699956bb7e62a268d9ba49
2018-08-26 13:25:27 -05:00
Ashlesh Gawande 481010723b communication: use ChronoSync Logic instead of Socket
refs: #4623

Change-Id: I6950af9d92a254b4fe05f7570ab6bc8b8a9599c8
2018-06-08 13:12:04 -07:00
Davide Pesavento a08dc3f1f1 build: require gcc >= 5.3 and switch to C++14
Change-Id: I93c8fc238cc2654346bbc69a9d8ea83d1c0b099e
Refs: #3076, #4462
2018-06-06 16:27:47 -04:00
Saurab Dulal 301220346e docs: Prepare version 0.4.3 release notes
Change-Id: I0b3a6166eac489be67ea03ff69a13ffe35616f63
2018-05-21 12:54:11 -05:00
Ashlesh Gawande 8df15986ef tlv: avoid misaligned memory access
They cause unit test crashing on ARM platform.

refs: #4609

Change-Id: Ifdb0401529de48b5c08ebcf6938d80ba87ff883d
2018-05-19 22:21:25 -07:00
Ryan Wickman f3c79a6f87 src: make LSA's isEqualContent methods of type const
refs: #4137
Change-Id: Idb1cdea33d4efbc3af3c07d901a620d3ef253979
2018-05-10 20:15:01 -05:00
Ashlesh Gawande cba0ae2f56 **breaking** Change NLSR to nlsr for various prefixes
src: register router prefix to fix remote requests

refs: #4543

Change-Id: I698484318bf8e641f955ea40e6c51c6865cad8bf
2018-04-19 14:34:29 -05:00
Eric Newberry f1a8ee66de build: find Boost lib architecture automatically
refs #4573

Change-Id: I383f821bc651926ba5d2ed830b20dd3116e8a3fc
2018-04-07 16:38:47 -07:00
Ashlesh Gawande d65786a0ea src/lsa-segment-storage: fix convergence w/o content store
refs: #4430

Change-Id: I5124e9fd49bd9850c904c31d221b42b4249553a3
2018-04-02 22:55:17 -05:00
Ashlesh Gawande e6ba9158e0 Fix build with clang-5.0
refs: #4547

Change-Id: I7fd0411b3dc7c62651875aa035bbfb6ca269bf81
2018-03-30 16:20:27 -05:00
Eric Newberry aa41b04807 docs: disable sphinxcontrib-googleanalytics
refs #4553

Change-Id: I94529272787b0facd9370f9c6fca06435a636093
2018-03-26 15:16:43 -07:00
Alexander Afanasyev 67758b1fba build: update waf to version 2.0.6
Fix discovered build issues

Change-Id: I9a861c955283c1b20cc5065a4baa22bd7c2ab0c1
2018-03-11 12:17:41 -04:00
Ashlesh Gawande 350d58489b docs: Prepare version 0.4.2 release notes
Change-Id: I36780f66b803b6049e5399fde6e1a097c40a65b3
2018-03-05 12:04:31 -06:00
Ashlesh Gawande 8c6d8c831a lsa-segment-storage: fix segfault in scheduled erase of lsa segment
refs: #4520

Change-Id: I597604b4be9e063a08ff5031faa8d305408b676d
2018-03-01 12:54:15 -06:00
Ashlesh Gawande 0b27c1ff5c Update symlink to latest release notes
Change-Id: I0956f0be737af0b4d43810ff7c7c91fd89982c8a
2018-02-26 14:35:53 -06:00
Ashlesh Gawande 39cf81a110 docs: Prepare version 0.4.1 release notes
Change-Id: I91db5b65dfe06187ddb0e9df32905dc2c8797ddc
2018-02-22 17:37:51 -06:00
Alexander Afanasyev b0bf8df1bd Hard-code fixed session name for ChronoSync sockets
This commit reverts behavior of the hard-coded fixed session name that
was feature in old nsync-based implementation.

Also fixing an initialized configuration parameter.

refs: #4513

Change-Id: I44559e729c949f90511a5c53282fd4a240356157
2018-02-21 13:49:40 -08:00
laqinfan a073e2e23e publisher: fix encoding bug in routing table publisher
refs: #4453

Change-Id: I03e819e963f0957f3d40ff25e378f2b9b17357b7
2018-02-16 12:30:36 +00:00
Saurab Dulal 9da6aa7fce Routing: Print labels on adjacency matrix when logging
refs: #2045

Change-Id: I0fa36eed1a6afdca6f135c80a20aa062a5e8cd63
2018-02-15 12:20:15 -08:00
Ashlesh Gawande 304bebf64f Remove some unused functions
Change-Id: Ic99891d2037e928ac927651607559e7660bd677f
2018-02-15 12:41:43 -06:00
Ashlesh Gawande 982a58fae5 Add version number after ChronoSync prefix
Change-Id: I5c6782461e6c00129850ab00df407a1f59f4353b
2018-02-14 17:39:12 -06:00
Alexander Afanasyev 7afe22f410 Output extended diagnostic information on fatal errors
Change-Id: I36bdd60df742837aeffb16ab78a93b93d5b24887
2018-02-13 16:17:40 -05:00
Ashlesh Gawande f7da9c542c conf: make ChronoSync's sync interest lifetime configurable
refs: #4490

Change-Id: Id3eabeed1049d1208ba49c47206f73f798f37a35
2018-02-09 15:24:47 -06:00
Muktadir Chowdhury c3ea26f000 Serve other routers' certificate and LSA
refs #4448, #4430

Change-Id: I3a9a9ae613770774be06effe26dfb866ea49f05a
2018-01-29 23:23:19 +00:00
Ashlesh Gawande 0d2c38299e Change certificate validity period to 1 year
Change certificate freshness period to 1 year
Catch Malformed URI error

refs: #4473, #4474

Change-Id: Ia341cba1e72b541c13eb480dfa53f26f89d854fa
2018-01-25 10:34:01 -06:00
Nick Gordon 563611eb20 communication: improve constness
Change-Id: Iabc5093d3c8e84540ddef4f6f2ff768dd9f3d0da
refs: #4472
2018-01-23 14:08:26 -06:00
Nick Gordon af87575012 nlsr: refactor equality operator
Change-Id: Iaaef9511e6569d597afcc5fa083b98ce86d8f78d
refs: #4127
2018-01-23 11:36:54 -08:00
Nick Gordon 4964870e9d src: improve constness
Change-Id: I8b3084e311642578628ea7c1017dc2a58979ab83
refs: #4472
2018-01-23 08:45:37 -08:00
dmcoomes b2ef6adbd3 Remove log4cxx from Jenkins
refs: #3949

Change-Id: I7ff3da932fe8a011aa391766c501b475118eaea5
2018-01-22 16:22:50 -06:00
dmcoomes cf8d0eda75 Use ndn-cxx logging facility
refs: #3949

Change-Id: I5d0931c3576c88e0c2fa52bdd0a716946400e0bc
2018-01-22 13:24:35 -06:00
Davide Pesavento 437adfeed6 ci: expand Travis-CI build matrix
Change-Id: I6ef5a461eaed9d66bed12189cde28cab30e55df8
2018-01-11 18:57:47 -05:00
laqinfan 357318540d publisher: implement routing table dataset publisher
refs: #3631, #3634

Change-Id: I7e961fdd0857690bee65d2bdfa4cf3de90ccac06
2018-01-11 12:08:27 +00:00
Ashlesh Gawande 14ab329746 Fix NLSR not converging without content store
refs: #4430

Change-Id: I8bff1facf528a07a3c2d90e8f512128c0420d799
2017-12-29 12:03:26 -06:00
Nick Gordon ed473c6c47 docs: mention the contributing guide
Change-Id: Ie14448f2fdf228db380f8332bee3dbe0b769fa50
refs: #4412
2017-12-21 14:02:30 -06:00
laqinfan ac4b65664f communication: fix dry-run mode not working
refs: #4394

Change-Id: I6b7eba5e36af307b9da6b5c198d44f9915db6358
2017-12-08 11:33:52 +00:00
Ashlesh Gawande d88c1dfdc2 ci+docs: remove all references to cryptopp/crypto++
Also update COPYING

refs: #3946

Change-Id: I87ded823f806857bb27079648e51619bb9dde6bc
2017-12-05 16:37:22 -06:00
Ashlesh Gawande 9e955bcec7 docs: Prepare version 0.4.0 release notes
Split the long release notes similar to NFD

Change-Id: If5ce5247bf74a4e402a33d92a35a686e7193dea1
2017-11-30 21:03:03 -06:00
Muktadir Chowdhury f04f98943d Convert to v2::security and adapt to ndn-cxx changes
Change-Id: I54f1b758cfb8f3f6cbc66a1aec5120ae1640b0ec
refs: #3964
2017-11-30 20:54:47 +00:00
Nick Gordon 2f62338d12 lsa: added noexcept and docs
Change-Id: Ic8c8566ced9654185a0619eca614ee1c6d108674
refs: #4354
2017-11-03 13:49:31 -05:00
Nick Gordon ae0a047c41 lsa: improved printing and logging
refs: #4354

Change-Id: I27cc99c6d01ba22668f4f56ad57b6f34f24f8af2
2017-11-02 13:55:56 -05:00
dmcoomes 5bcb39e255 rename log macros to comply with ISO C++ standard
refs: #4341

Change-Id: Idb05f59660f42c01a7bf014c6fff4125a28327f2
2017-11-01 09:36:53 -05:00
Nick Gordon 0fa4c77987 lsa: simplify initializeFromContent and improve naming
refs: #4354

Change-Id: I5ddd5a9f482f59e6ca52061ac92514feab8c3070
2017-10-30 17:09:24 -05:00
Nick Gordon 22cc1a8d17 lsa: simplified key getter
refs: #4354

Change-Id: Id886d41ff98530e1953066593640232d31b93b26
2017-10-27 10:18:57 -07:00
Nick Gordon 96861ca49c npl: npls more conveniently instantiable
NPLs can now be instantiated using brace-init lists, as well as by passing
any iterator-capable container.

refs: #4345

Change-Id: Ib43373d5899d0ac14861027c34431fa928eec191
2017-10-26 15:25:59 -07:00
Nick Gordon faf49f4c32 lsa: leverage class hierarchy when serializing.
refs: #4354

Change-Id: Ia3e79694c785b208184137d8ef0813629d61cc83
2017-10-26 11:08:25 -05:00
Nick Gordon 9212bd43bb lsa: make base class abstract
refs: #4353

Change-Id: If95c1689727f541c123623d21aec78ab8bdd58e6
2017-10-23 13:56:46 -05:00
Nick Gordon 727d4830d7 lsa: change type variable to enum class
Change-Id: I7fba951649771700ce6ccc4be7fb400546607e96
refs: #4340
2017-10-19 15:44:06 -07:00
Nick Gordon ff9a62713b style: made container APIs more consistent.
Change-Id: Ib4feedfc4c9fb497dfcd67e7e6a33ee03db58d7f
refs: #4337
2017-10-13 16:03:27 -07:00
Nick Gordon e18296c270 hello: move constructor definition to implementation file.
Change-Id: Ia176b5cad081a61368f45ac137dc6c9474101751
refs: #4334
2017-10-11 14:41:09 -07:00
Nick Gordon 2a1ac616b3 adjacency-list: improve constness of equality operator
refs: #4331

Change-Id: Ia57a82859abb2a32b22a7dbff471d1843d8237f0
2017-10-11 11:55:49 -07:00
dmcoomes a47255c2c5 docs: add commit ids for dependencies to README.md
refs: #4260

Change-Id: I096d5502a1cdc5fe712021fc0046d883a456173b
2017-10-04 11:24:48 -05:00
dmcoomes ffb62fa3fb docs: update authors
refs: #4231

Change-Id: Idbee3121d59d10ee96ff6b044cc55552f3b64c94
2017-09-29 10:29:17 -05:00
Nick Gordon 114537f6e0 publisher: simplified LSDB dataset interest handler.
refs: #4235

Change-Id: Ia3f606947884304e8b01211b5887ad62488f7167
2017-09-08 14:47:52 -07:00
Nick Gordon 922714a0d9 nlsr: Added a finally() to canonizeNeighborUris
Change-Id: I0046ae7a07be69f20a8f9d2b4acb33d8533a28e7
refs: #4128
2017-09-08 10:25:45 -07:00
Nick Gordon 5867b5233f fib: merged redundant functions
Change-Id: Iebec912fa7a3b8ab2cfe36835868dbdb068d7076
refs: #4105
2017-09-07 08:48:11 -07:00
Nick Gordon d40a588e25 routing: use unique_ptr for signal container
Change-Id: I1912f8630d0e26d8c25c2050208f6b8b0ffd9009
refs: #4268
2017-09-06 14:51:26 -07:00
Nick Gordon 8f23b5d58e sync: improved unit tests
refs: #4264

Change-Id: I981f3d8f653e4750ee6f9d77f2c89188f11d8ebb
2017-09-06 14:23:16 -07:00
Nick Gordon 9eac4d9830 sync: removed ref to lsdb.
Sync now emits to a signal whenever a new LSA is detected, and the LSDB
listens to this signal.  Sync consults a function object gotten at ctor time
to determine LSA newness.  This means Sync no longer needs a reference to
the LSDB, and LSA newness criteria can be freely manipulated.

Change-Id: Ifce3ebfc921ad846fcfa12d99c78f3b337180827
refs: #4264
2017-09-05 12:20:53 -07:00
Davide Pesavento 6ebfd7c182 build+ci: enable code-coverage reporting
This required changing the CI scripts to run the
unit tests against the debug version of NLSR.

Also sync default-compiler-flags.py with NFD.

Change-Id: I31f37e3dfef2c1237393512e0c238f5e6bcbe525
2017-08-31 13:49:13 -04:00
Nick Gordon b7b5839197 route: communicate routing changes using signals
The RoutingTable now has a signal that it emits upon finishing
calculation, which other modules can subscribe to. The NamePrefixTable
now references this emitted container to update its local copies of
routing information.

Change-Id: Id601776258ad0367cc47461ea8f86a710eada132
refs: #4249
2017-08-29 13:18:38 -07:00
Davide Pesavento 813df80e20 ci: sync CI scripts with NFD
Notable changes include:
  - support WAF_JOBS env var
  - use two parallel build jobs on Travis-CI
  - use "limited builds" for code-coverage and Travis-CI
  - upgrade Travis-CI osx from xcode8.2 to xcode8.3
  - enable ASan on Travis-CI

Change-Id: I4101499ebc590478d67ec8134c0395c4aafb8fb6
2017-08-26 17:06:00 -04:00
Davide Pesavento 0bd37314fe ci: speed up Travis-CI osx jobs by upgrading only the packages we need
Synchronize the rest of the file with NFD.

Change-Id: If2f5fba0eb614a881b51396b15a5a30e7939f728
2017-08-26 17:06:00 -04:00
Davide Pesavento 6a81b77260 ci: preserve PATH when running waf under sudo
Change-Id: I85bdc5b69de2c2c7b8c0dc5a7aa2927b495e2168
Refs: #4186
2017-08-26 17:06:00 -04:00
Nick Gordon c0c6bcf7e2 route: updates to name prefixes are more efficent.
With this change, only entries that have changed next-hops will
cause any change in the name prefix table.  Consequently, routing
table calculations no longer cause RIB registrations for unchanged
prefixes.  However, this is not a problem because FIB entries
refresh themselves.  This resulted in the removal of a test from the
TestNlsr suite.

refs: #2864

Change-Id: If28a04cb7bb47a3a6c32cd24578c68885d08d6b3
2017-08-24 16:54:39 -05:00
Nick Gordon 098aae410a tests: make LSDB tests more deterministic
TestLsdb/LsdbSync now iterates over all sent Interests to
check that any of them match, as opposed to checking
positionally, which cannot be guaranteed to pass.

Change-Id: Ib9e3a4b0aea4e1a4dd9f1c7e65d1b2a299863a9c
refs: #4257
2017-08-23 14:47:29 -07:00
Nick Gordon e40377d570 routing: improved routing map data structure.
Change-Id: I1cde5b2b9cffcec5cbfd78c5dd4262b5fb919a73
refs: #4240
2017-08-23 12:57:19 -05:00
Nick Gordon 7afcab4652 tests: make sync tests more deterministic
This change makes the UpdateForOther{LS,HR} tests more deterministic by
removing the temporal ordering requirement of sent interests.

Change-Id: Iceab5735baa2ff2fb97b18babfcf2bb32110a3c2
refs: #4253
2017-08-22 14:05:43 -07:00
Nick Gordon e98480b5d1 nlsr: removed references to ndn-cxx/common aliases and improved namespacing
Change-Id: I65e4691305b0157f334fc68d96998c119ef8b03b
refs: #3406
2017-08-22 13:37:21 -05:00
Nick Gordon d0a7df337f docs: wrote Doxygen comments for all files
refs: #4118

Change-Id: Ib0e7f1926cdabcca5aa401b59b24519412a099f7
2017-08-21 14:30:50 -07:00
Alejandro Gil Torres e0d2048d5f src: Implement packet statistics collection
refs: #2955, #2956

Change-Id: I57476a63562dbd378e566ad0280c89ccc5883e3e
2017-08-17 11:59:53 -07:00
Nick Gordon f14ec357d5 nlsr: Add support for sources to NamePrefixList
Added support for string sources to NamePrefixList entries.  Required was
some tweaking of the API, and refactoring usage around the codebase.

Change-Id: I44813e024a88dc1f591f427b0fad568a7d5353ab
refs: #4177
2017-08-16 15:00:14 -07:00
Davide Pesavento c58cc7f596 build+ci: enable AddressSanitizer and LeakSanitizer for unit tests
Refs: #2589, #4206

Change-Id: Ie9770134ff87fce438029b97c9ed61dbef3a71a3
2017-08-16 12:35:52 -07:00
Nick Gordon 22b5c957c0 routing: made map more container-agnostic
Change-Id: Ib18a41bac7627a9eb0bbafa6ccad0335d420dd68
refs: #4239
2017-08-15 09:06:28 -07:00
Ashlesh Gawande 90173ad966 Resolve ASan errors that will be thrown once it is turned on
Plus few minor spelling and code-style issues

refs: #4230

Change-Id: Ia665bab546a9628347af45836dcbe765dc91c54f
2017-08-14 10:54:15 -05:00
Nick Gordon 608061b95d tests: wrote select-cheapest-hop test.
Change-Id: I1eaed69675010bbf7b85221b72c4fcea71ebd9f0
refs: #4169
2017-08-11 10:38:40 -07:00
Ashlesh Gawande 793e8707a1 src: fix prefix advertise runtime error
Don't schedule Hello after receiving face changes in dataset,
let it be on its schedule. Also don't schedule routing calc (HR)
or AdjLsa (LS) let them be scheduled on Hello Data.

refs: #4215

Change-Id: I5c3881943f83b2f7683316fa3e22e6c280b6b64d
2017-08-10 16:21:34 -05:00
Laqin Fan 54a43f06e1 update: Refactor to use ndn-cxx dispatcher for prefix update/readvertise
refs: #3728

Change-Id: I3186433ed460850753f033a1d03fe27fd1fe889c
2017-08-04 12:46:50 -07:00
Ashlesh Gawande 820bb66350 src/lsdb: fix heap buffer overflow
refs: #4217

Change-Id: I902dfd7fcb856b5fd5cd285ef4d498956029848e
2017-08-03 16:14:19 -05:00
Ashlesh Gawande 9b71bbc970 wscript: install nlsr.conf as sample in the system
refs: #4197

Change-Id: If4fa9282f71661450950d8d6e44bf2ac4fe2bcee
2017-08-01 11:00:44 -07:00
Ashlesh Gawande 3909aa160a src: fix incorrect error on face-dataset-fetch-interval valid values
refs: #4211

Change-Id: I9ec04483a633ecf31797dd1637229d147d436d35
2017-07-31 12:30:13 -05:00
Nick Gordon d5c1a378d1 nlsr: discover Faces from NFD
refs: #2954

Change-Id: I072972d88bce0e1012e96f33577657048b7df1e1
2017-07-21 08:39:11 -07:00
Ashlesh Gawande f6bfb14def src/logger: use unix timestamp as default
refs: #4187

Change-Id: I235c1ba60d981b7c52d50b14b6fefafca049679a
2017-07-19 15:41:44 -05:00
laqinfan d22da51783 publisher: use ndn-cxx dispatcher for dataset publisher
Change-Id: I836a718ba40ff471bcdac7a7cc684c13914c4ea5
refs: #3728
2017-07-07 10:46:25 -05:00
Nick Gordon a75fdb27c5 build: fix build issues with pegged ndn-cxx
Change-Id: I0f000455d1eaf974d85ed76414af8710bc44dad4
2017-07-06 14:10:43 -05:00
laqinfan cd7ca05378 route: refactor Fib::removeOldNextHopsFromFibEntryAndNfd()
Change-Id: I6ef61fcec6b934c0238ecb697c14564c02cacfe2
refs: #3820
2017-06-28 08:45:13 -05:00
Muktadir R Chowdhury b00dc2acea Accommodate n-Dimensional HR coordinates
refs: #3751

Change-Id: Ib705b671daba56f58e09876a48d8b31649bd7ab1
2017-06-26 15:52:48 -05:00
Nick Gordon 0f1bf1dfcd Revert "sync: remove check-for-self in sync updates"
This reverts commit b23f279353.

Change-Id: I8630be544195a01e09b3a2e4d85d102ac00cfc72
refs: #4134
2017-06-22 13:47:55 -07:00
Ashlesh Gawande 8bfd124212 Use network name in sync prefix to avoid sync leaks from other networks
refs: #4101

Change-Id: I97d76d54571a124de33c6e62e07115c0df26882c
2017-06-22 09:15:27 -07:00
Ashlesh Gawande 7600c90882 Complete remaining changes for ChronoSync dependency issue
refs: #2400

Change-Id: If0cf9d3140f3ef65d86394fad3b6a6c7c58064f9
2017-06-21 14:25:03 -05:00
Nick Gordon e9733ed876 nlsr: refactor Adjacent to use FaceUri objects
Change-Id: Ib46f70570669c381572182eeea5c047a38a05104
refs: #4063
2017-06-20 15:02:55 -07:00
Nick Gordon b9e2c650e6 build: Fixed ChronoSync not being found on OS X.
Change-Id: I79dfa5bb8c25d6922c1e7b7529953fb2fb2fcae2
2017-06-20 13:12:02 -07:00
Nick Gordon 494de4033d nlsr: remove writeLog in NamePrefixList
Change-Id: Id54152684d1aa366b5eec8eeb79c046dedf6da7c
refs: #4131
2017-06-15 09:15:29 -07:00
Nick Gordon 56d1fae10a nlsr: implement NameLsa::isEqualContent
Change-Id: Ibf9021144f5ff253515875ac61de97740a1fecd7
refs: #2962
2017-06-15 09:15:24 -07:00
Nick Gordon adad2490e5 nlsr: LSA getData() now uses ostream instead of manually building the string
Change-Id: Ib4f6e27ccbe614140dbda63e6a5c7f4a78baedb7
refs: #2346
2017-06-13 12:15:43 -07:00
Nick Gordon b23f279353 sync: remove check-for-self in sync updates
Change-Id: Iba7e80370acc7c7144725bb6de1d018a8493b9b7
refs: #4117
2017-06-12 17:17:06 -05:00
Ashlesh Gawande 3e105a0493 Use separate name prefix and sequence number for each LSA type
refs: #1523

Change-Id: I9db6b3a3ea9ce5e17e132d2a4e2ae9f30dd4f591
2017-06-09 13:54:24 -05:00
Nick Gordon b9c5cecfb2 build: specify pre-v2 change version of ndn-cxx, ChronoSync in Jenkins file
Change-Id: I4c1a13542444821df6455958cdbbd9685c017337
refs: #3920 #4119
2017-06-09 10:37:12 -05:00
Nick Gordon f8852c2d27 nlsr: change configuration parameter output level to info
Change-Id: I32ec91457aaa45e0dbd87c599b3a6bd0b5ac92a6
refs: #2850
2017-05-25 10:07:53 -05:00
Nick Gordon 9461afb721 nlsr: canonize Adjacent FaceURIs on startup
Change-Id: I6a2b31631918c1ece79c3fc13e392917162efc2d
refs: #4063
2017-05-24 10:42:57 -07:00
Nick Gordon 2108808ae3 nlsr: remove deprecated ndn-cxx header includes
Change-Id: Ia016bf6f29304bbc2232db45003fedb331f43ee6
refs: #4088
2017-05-24 10:57:49 -05:00
Ashlesh Gawande 6fa00d923c Add missing dispatcher header to fix compilation
Change-Id: I7a7c637e74974c546bfc2c70fa39e850e8dbeaa2
2017-05-19 19:31:46 -05:00
Ashlesh Gawande b4567f40fb docs+README: improve documentation
Change-Id: I562508869f7e60ccf465b8c1acdf63e27c905c7a
2017-05-05 10:25:24 -05:00
Ashlesh Gawande 415676b6cc make chronosync a dependency
refs: #2400

Change-Id: I8b488f165a4f9a2c9a7731931be3b6d2e3c43c89
2017-05-02 14:26:16 -05:00
Nick Gordon c780a6986b nlsr: refactor AdjacencyList to use iterators instead of bare ptrs
Change-Id: I42225ee63c3d64eb80e58bc51c8d1afd20dd2ce2
refs: #4068
2017-04-28 10:43:08 -05:00
dmcoomes 9eaf3f4417 nlsr: Improve logging throughout lsdb.cpp and others
refs: #3934

Change-Id: I2365c88b795316c83dbeac2eab82f371c0275f88
2017-04-27 12:37:18 -05:00
dmcoomes c2c3ae0fd2 nlsr: update manpages for nlsrc when security is enabled
refs: #3911

Change-Id: Idf496ed2c3826c2aafd015a42b9a61d9ec4ecceb
2017-04-24 13:34:13 -05:00
Ashlesh Gawande 812af97447 ci: check boost version change on OSX
refs: #4060

Change-Id: I70819d428c6285ed4e18d2da9478d2c99333d37a
2017-04-24 10:31:49 -05:00
dmcoomes e689dd6d8b Make header guards comply with Rule 3.2
refs: #3984

Change-Id: Iec7a0d9ff49cf6124af9e554432ee5f09a199651
2017-04-12 09:24:42 -05:00
Nick Gordon 4d2c6c07ae nlsr: accept NFD-RIB-style register/unregister commands
refs: #3818

Change-Id: I7a5455bdec815bdcbe53ad535dab44249d1a18ce
2017-03-31 12:22:42 -05:00
Ashlesh Gawande 30096b8f37 docs: update NLSR paper
Change-Id: Ia8fda3373c5873db77db43f30165ec41dd4d05b2
2017-03-30 18:16:11 -05:00
Muktadir Chowdhury 3be6466a85 route: Refresh FIB entries independently of routing table calculation
refs: #2778

Change-Id: I3536faa9c097152bfb99ebc0270221ca359cba35
2017-03-28 10:58:30 -05:00
Muktadir R Chowdhury f023a88ec1 docs+build: Prepare release for version 0.3.2
refs: #3995

Change-Id: If9ea3e69eee886abce90700e33f37c0102e367a7
2017-03-16 09:19:50 -07:00
Alexander Afanasyev 4c2bb361ae Remove more use of deprecated code
Change-Id: I4322ab4aedb9287acf2eb608f96b7eefbc5f7dba
Refs: #3988
2017-03-14 12:29:19 -07:00
Alexander Afanasyev 1de901f161 Remove use of deprecated code
Change-Id: I197471c48c54c5671bb8f641c4332b3ac7893824
Refs: #3988
2017-03-11 13:50:28 -08:00
dmcoomes 9f93666519 nlsr: Don't use ndn aliases provided by ndn-cxx/common.hpp
refs: #3983

Change-Id: I31da8d68e0285dcfe9c7d3e5e678c00397d22bef
2017-03-09 12:12:40 -06:00
Nick Gordon 48daea20d7 nlsr: enable dispatcher for LOCALHOST_PREFIX
refs: #3938

Change-Id: I532b69aa7e2ade22929588f42de55366fccb80d2
2017-02-27 15:33:10 -06:00
Ashlesh Gawande 218aaef118 utility: temp fix for face already exists (409)
refs: #3976

Change-Id: I930ae5dae8938c83b7deff5079a499b7c5dcc639
2017-02-25 21:34:36 -06:00
Davide Pesavento 87911dacd5 src: use ndn::nfd::ROUTE_ORIGIN_NLSR instead of a magic number
Change-Id: I88dc8e8bc5893820085f305abb52bfd1b654dfcd
Refs: #3903
2017-02-21 22:13:25 -05:00
Ashlesh Gawande 54e726cf5e update config file for /localhop LSA
refs: #3899

Change-Id: I028ed7067724a2d3506ceca0813aea89efea528d
2017-02-14 11:04:08 -06:00
Laqin Fan a4cf402084 nlsr: Pass keyChain to NLSR constructor
refs: #3742

Change-Id: I186784da2989aa8bcc396c81c4fc80254a6f313a
2017-02-01 10:18:05 -08:00
Nick Gordon f590fecfc2 docs+build: Prepare release for version 0.3.1
Change-Id: I01d0b8e71ee4fdf37957a323e11e87f69672d473
2017-01-22 11:03:28 -08:00
Ashlesh Gawande 6077ea910c src: use /localhop component in LSA prefix
refs: #3899

Change-Id: Ibbb42adf3cc34e4a09e267bd73ffb248aad715d5
2017-01-21 16:23:34 -08:00
Nick Gordon d1f4f33cfd nlsr: Add dispatcher to NLSR class
refs: #3930

Change-Id: I69d3a1a87558118ea25258f08f7441e0d7ebe73d
2017-01-20 14:50:20 -06:00
Laqin Fan d8c9d8cdab Fix typos in the sample configuration file.
Change-Id: I66d66bef84aeb3508af654f7e664ca59bc5fee53
refs: #3113
2017-01-19 15:54:12 +00:00
Nick Gordon feae5574b8 boilerplate: Update copyright year in .cpp files
refs: #3923

Change-Id: I8a46f2634527094d82c85c605384f25ddd172732
2017-01-13 12:18:32 -06:00
Alexander Afanasyev 4fc69e49a9 ci: Fix macOS build with Travis-CI
Change-Id: Iabdfd71c4ba8b3c35f6de117da3b42b61cb1dc4e
2017-01-11 13:31:43 -08:00
Nick Gordon c6a852234d nlsr: Updated license boilerplate for all NLSR files.
refs: #3909

Change-Id: I7186b62e2e3506e23a28c70b95b7e6a225a8d78b
2017-01-03 16:56:17 -06:00
Ashlesh Gawande 44395237b8 src: use /localhop component in Sync prefix
refs: #3627

Change-Id: I666f4072601cf7b66bcde632c31c632fabe6e684
2016-12-13 14:35:44 -06:00
Ashlesh Gawande c5fa320239 hello-protocol: re-calculate HR nexthops on status change of a neighbor
refs: #3874

Change-Id: I8295248d95e047e24cced9700eabd458ab3e9112
2016-12-05 12:06:25 -08:00
Eric Newberry 41330f4256 ci: set Travis CI Xcode version and update NODE_LABELS to 10.11
refs #3833

Change-Id: I4c9f98d11e01ce1b712295c884d49fc14def37e2
2016-11-01 15:33:36 -07:00
Alexander Afanasyev 96bf2f0db8 build: Do not fail the build in debug mode when using deprecated declarations
The original motivation of this change was to avoid compilation failure
in debug mode on macOS 10.12.

Change-Id: Ibc006a6be6f5d9aba80dfe4b5f9b13a758bafcc7
Refs: #3795
2016-11-01 15:33:20 -07:00
Laqin Fan 2b057af9e1 hello-protocol: delete redundant call to Nlsr::setStragies()
ref: #3743

Change-Id: Ic793b0e78639adceec0932ded5a87514b9af94ea
2016-09-27 18:32:02 +00:00
Nick Gordon b71684744f src: Fib and FaceMap now use map instead of list as their table data structure.
ref: #2781

Change-Id: I93ad23266ee7b79fd5c53b538c30af76565abc4b
2016-09-26 10:54:41 -05:00
Nick Gordon b50e51b374 Name prefix table entries keep pointers instead of keeping a copy of the object for routing table entries.
refs: #2863

Change-Id: I3271c9f96dfc8721a0ca7c900542c6ddb0b321ac
2016-09-12 10:36:32 -07:00
Junxiao Shi 3e5120c543 include ndn-cxx/mgmt/nfd/*
refs #3760

Change-Id: Iaa0e127a2035960fc96a7c6f958538d3bc3cdee6
2016-09-10 16:58:34 +00:00
Vince Lehman ef21d8eab0 src: Sort NextHops on NexthopList insertion
refs: #2721

Change-Id: I39893c5fb6b5fac93220901ab3190090f0d2cc57
2016-09-06 19:41:31 -05:00
Nick G 97e3494256 docs: improve Doxygen comments.
refs: #1435

Change-Id: I21624ef4eec393c82a50229a07e8277fb6ae4ddf
2016-09-02 12:11:42 -07:00
Nick G d69f9a3c82 Copied ndn-cxx's .jenkins script for better compatibility.
refs: #3695

Change-Id: I909fd9b486e16939a58f07d42e356885d809ef9a
2016-08-24 13:25:39 -05:00
Junxiao Shi 63bd0348b3 adapt to Controller::CommandFailCallback with ControlResponse
refs #3739

Change-Id: I193fb11fd96bd91808fc6e3af22a8da2511246e2
2016-08-17 16:57:14 +00:00
Muktadir R Chowdhury b9d43d06cc docs: Mention change in configuration file in release note.
Change-Id: I70dda0a904e03bdd93b3f2f4404f70ecd108b65d
2016-08-15 09:50:39 -07:00
Nick Gordon e2d3fe9d9a Brought script into POSIX-compliance for find.
refs: #3695

Change-Id: Id35218b560f55a19fec81409950fed5a4f8504d5
2016-08-12 14:00:52 -07:00
Nick Gordon 7b5872ec86 face-map.hpp: Fixed class formatting per style rule 1.4
refs: #3737

Change-Id: Iee14f98a967a3887c34700c3c2a004dcb8b6d97d
2016-08-12 13:57:01 -07:00
Nick Gordon fad8e257c0 Fixed namespace formatting across all files.
refs: #3735

Change-Id: Ia04f0895de9906e280d6140f775bb6609db714e6
2016-08-12 13:49:12 -07:00
Nick Gordon f8b5bcd27e Fixed copyright dates across all files.
refs: #3736

Change-Id: Ibe089fd2e8c4ddc8a4c68d073b435f7d3060d1a4
2016-08-11 15:14:18 -05:00
Muktadir R Chowdhury 800833b7ac docs+build+boilerplate: Prepare release of version 0.3.0
Change-Id: I60f359e73b049d844470670a0088a00522f7564e
2016-08-01 13:33:53 -05:00
Nick Gordon e8e03ac303 communication+route: Do not advertise Adjacency LSAs when hyperbolic routing is enabled
refs: #2402

Change-Id: If204807733f858606e31a0ff8231f140905063cf
2016-07-29 12:43:46 -07:00
Alexander Afanasyev 5ec9ae4271 ci: Update Travis CI script to build using Ubuntu 14.04 and OS X 10.9
Change-Id: Ib73bf5a5727c1d9b58a0f2a2fde66249cbc19e3d
2016-07-29 10:32:57 -07:00
Vince Lehman f7eec4f4c0 Make LSA buildable when one node is ACTIVE
refs: #2802

Change-Id: If3f99895522e22103130f32bb6634bf9a5691fe7
2016-07-28 12:41:43 -07:00
Nick Gordon 5c467f0ca8 Do not distribute coordinate LSAs when using link-state routing.
refs: #3661

Change-Id: I6a1467225def5ba04e2179480503cfe01968cede
2016-07-28 12:28:41 -05:00
Muktadir R Chowdhury aa3b085384 lsdb: Segment LSAs larger than max segment size
refs: #2965

Change-Id: I5dd091b663db2cc5e2d925144e57ee55a486b3cd
2016-07-26 12:27:55 -05:00
Ashlesh Gawande d02c3880d5 lsa: Accept LSA type argument in LSA base constructor
refs: #2788

Change-Id: I12d9b26fb9087b037134988f1594576ed7ba90f3
2016-07-25 18:28:39 -05:00
Muktadir R Chowdhury 3ac0728e5a publisher: set router-name command prefix correctly
refs: #3651

Change-Id: Ic3771de5161fc482f76df78035dcb9f5325e1a9d
2016-07-21 10:24:15 -05:00
Junxiao Shi c778e814db tests: don't use DummyClientFace::sentDatas
refs #3383

Change-Id: I7cbe7d147de0b0066ee0ab4c25f2ec707a081f79
2016-07-14 15:44:26 +00:00
Vince Lehman af909fcc13 build: Don't install unit tests; use brew version of openssl on OS X Jenkins
refs: #3359

Change-Id: I0b51ede8be0abafe4cbbe39274b291d3c8549872
2016-01-14 10:33:22 -06:00
Muktadir R Chowdhury c69da0a350 tests: Use ndn-cxx/DummyClientFace
refs: #2637

Change-Id: Ife16a81d08e538b4b0a82f1f5d4cc819fc764257
2016-01-11 12:05:24 -06:00
Vince Lehman 0ff5d45ba8 docs: Prepare version 0.2.2 release notes
Change-Id: I72a1847e7c20d9bac3d85b2263b974ddbcee3431
2016-01-04 17:23:06 -06:00
Ashlesh Gawande 5d9c0573c0 security: Remove unused disabled files
Change-Id: Ifbbe284f5e3586e6256ffa30902926c2d751743e
refs: #2960
2015-12-21 15:45:50 -06:00
Muktadir R Chowdhury 4c7caadb72 nlsrc: adapt to ndn-cxx SegmentFetcher API change
Refs: #2734
Change-Id: I76f1f1a6b95d2df18a8deef545be5027ad6bbc7c
2015-12-04 13:25:43 -08:00
Alexander Afanasyev f9f3910dd2 build+nsync+tests+docs: Fix compilation for boost 1.59, doxygen docs, and other fixes
Requires ndn-cxx:commit:e3e2505aa03e0b298e1a8dfc9876f1f8dafcaaba (ndn-cxx-0.4.0-beta2-11-ge3e2505)
or earlier commit.

Change-Id: I6ad359aa368b3346464f2aa74a1ab319fcd3ab7a
2015-12-04 13:25:28 -08:00
Vince Lehman 53c0e3e9ee Use MulticastStrategy instead of deprecated BroadcastStrategy
refs: #3011

Change-Id: I7c32cf13945853fe76008271a77878d2bf6e9215
2015-09-14 14:36:49 -05:00
Vince Lehman c57c64b633 Refactor initialization of NLSR instance
refs: #3091

Change-Id: I07108015dc0704e85f5c37b91b53838d7b0f41d0
2015-08-11 11:55:29 -05:00
Joao Pereira 97473d47fd nlsr: avoid deprecated prefix registration APIs
refs #2932

Change-Id: Id874d40d3b6209bedc6f92a44b5c49eb9ed31efe
2015-07-06 15:38:23 -04:00
Vince Lehman 5363c7946b docs: Prepare version 0.2.1 release notes
Change-Id: Ibde6faea916ca90f3c11b7d1189c7044ca9bc5ec
2015-06-30 06:51:31 -07:00
Vince Lehman f4772d4f21 Fix compilation after namespace change in ndn-cxx
refs: #2951

Change-Id: Ia9f3caee4733e7f137b5f6f22f7e154069b37f69
2015-06-29 15:06:29 -05:00
alvy 46ccaae829 tests: Remove FaceDestroyEvent test's reliance on nlsrSeqNo.txt
refs: #2881

Change-Id: I32d329d058e9715ca5cdca74867b6588775e93ff
2015-06-26 11:28:20 -05:00
alvy c69c9af931 tests: Check ACTIVE/INACTIVE Adjacencies in LSA construction
refs #2735

Change-Id: I5d0c4940c0bc688a895a71603c9ea93b87cfba42
2015-06-26 10:49:01 -05:00
Vince Lehman d33e5bc475 update: Disable PrefixUpdateProcessor when validator is not in config
refs: 2814

Change-Id: I2669dcd4af36ebe09f3e20189a99c812e0e6ad7b
2015-06-24 11:33:57 -07:00
alvy dce3f18229 src: Fix non-incrementing Adjacency number in AdjLsa::writeLog
refs #2594

Change-Id: I64ae57060ffb95c92e86da356eb6ba80f1d77f06
2015-06-24 10:54:43 -05:00
Vince Lehman cae33b69f2 route: Prevent incomplete removal of NPT entry
refs: #2785

Change-Id: Ic8ff955236784db76c55b94bf9300fb21ea9beae
2015-06-08 11:59:47 -05:00
Vince Lehman 18df0602d3 docs: Change toctree order
Change-Id: I121f41b54afc10225f90ebb0a98ad4e444058bfe
2015-05-13 14:32:29 -07:00
Vince Lehman 41b173ed54 route: Correct bidirectional links with differing costs
refs: #2801

Change-Id: Iacabcb5484f4ccab6c74700dd8ebcf7b1ad99917
2015-05-11 10:11:22 -05:00
Vince Lehman 9630fbf4e0 route: Fix component appending in NamePrefixTable::removeEntry
refs: #2322

Change-Id: I511414be322dccc713d3eaef737edd87a51e8b51
2015-05-09 11:13:42 -07:00
Alexander Afanasyev a6f3e645f5 build: Update waf to version 1.8.9 (with custom patches)
https://github.com/cawka/waf/tree/2a098b1e9bc626c19cbd47c1f670758c17edf54c

Change-Id: Ibacc49368d81e1d2b9059b8153a86bcfc026a295
Refs: #2792
2015-05-06 14:52:35 -07:00
Vince Lehman de5560cd3d docs: Prepare version 0.2.0 release notes
Change-Id: I80a660fe23bb1bf2bfc35265b68e287df8921fe5
2015-04-30 11:07:34 -05:00
Vince Lehman 9551edf4d8 docs: Add OpenSSL exemption to license
Change-Id: If03222c482655f78c6b7343122e40323723df419
2015-04-30 10:28:19 -05:00
Vince Lehman 52493c7c19 ci: Add OpenSSL to Jenkins' dependencies
Change-Id: Ia17bb38ac57b6cdc1cffa516ee058c8a43235162
2015-04-30 10:22:48 -05:00
Vince Lehman 59dfac3569 docs: add OpenSSL dependency
Change-Id: I9739a444db03c29281c024bce9fd512ccbe2fe42
2015-04-29 17:17:57 -05:00
Vince Lehman c2acdcbbb6 security: Add permanent certificate storage for validator
refs: #2779

Change-Id: I5d9588136474b7eff3adf258a60aff0b7909bead
2015-04-29 12:49:22 -07:00
Vince Lehman c439d66728 tools: Add nlsrc command line tool
refs: #1834

Change-Id: Ifbe75a3f49e2689930e61ebfd348d9932b04c975
2015-04-27 15:49:04 -05:00
Vince Lehman d6bb3fa306 publisher: Serve LSDB dataset on localhost prefix
refs: #2737

Change-Id: I4cc9bd1d07dea583937676dd491ab5c68fd821ea
2015-04-24 17:13:58 -05:00
alvy 297f4163c2 update: Process Name prefix update commands
refs #1834

Change-Id: I18c86d0743b4a10ce3a8681f202b59a86602e43f
2015-04-23 09:08:18 -07:00
Vince Lehman 9d09780605 comm: Create SyncSocket on initialization
refs: #2649

Change-Id: I9e5891b8ad5de9a6ff6ac4edab4bab1564a309c8
2015-04-11 13:19:11 -05:00
Vince Lehman 199e9cf8d9 Don't build Adjacency LSA when destroyed face belongs to INACTIVE node
refs: #2733

Change-Id: I2a53bce876486980b380e9d8226b410bc754b034
2015-04-09 11:04:11 -05:00
Alexander Afanasyev 24ed83aa5e ci: Update Jenkins-CI build scripts and adding script for Travis-CI
Change-Id: I333c6af0d92f57e222665a0ce982ada6c276ae52
2015-04-02 18:42:11 -07:00
Vince Lehman cec3885c43 route: Add sorting tiebreaker to NexthopList
refs: #2715

Change-Id: Ida39efcec9c6eb976edaffb235450ee30565c493
2015-04-01 08:31:07 -07:00
Alexander Afanasyev fb2adee968 build: Update waf to version 1.8.8-dev (with custom patches)
https://github.com/cawka/waf/tree/8f714a523d3b8c66f2949aaa8db91d6f7be55e55

This patch also embeds the default configuration for PKG_CONFIG_PATH variable.

Change-Id: Ia297fbc8c39ab77ce911e0a9d96dae605eb4cc6e
2015-03-31 22:55:49 -07:00
Jiewen Tan a0497d8f5c publisher: add LSDB dataset publishers
refs #2280

Change-Id: Ifb1920ef9b807610890b0d0a04f24141d39f011d
2015-03-19 07:43:26 -07:00
Vince Lehman 02e32996c7 Recalculate routing table after face destroy event
refs: #2635

Change-Id: I7abbb638515af4a55c4241c4242a496a8cf8ca88
2015-03-16 12:05:16 -05:00
Vince Lehman 50df6b7981 src: Fix first event-interval scheduling
refs: #2615, #2593

Change-Id: I17da4d9acb83299a5666159fb988c1a97220eda8
2015-03-03 12:13:46 -06:00
Jiewen Tan 7a56d1c7c1 tlv: add LSDB dataset tlv abstractions
refs #2280

Change-Id: I2d0d238686e28d1c25a7821a47352fcd589df823
2015-03-02 11:07:55 -06:00
Alexander Afanasyev 75b0ea543f communication: Avoid deprecated Name::set method
Change-Id: Ic9898c1c6afce65078ab57d8a3bfb8b94c20b9ab
Refs: #2505
2015-02-26 18:30:32 -08:00
Alexander Afanasyev c035206443 tests: Avoid deprecated Name::set method
Change-Id: I53b92fdac0ae5ca7949cc6b6446eeb0cc9d6bc1b
Refs: #2505
2015-02-26 00:39:23 -08:00
Spyridon Mastorakis c00650f1ad nsync: Change of ndn::ptr_lib to std namespace
Change-Id: I38c3ba68b701709a3a1b41cce327e030a391ba17
Refs: #2110
2015-02-22 23:21:15 -08:00
Vince Lehman 6151e957cf src: Correct bitmask used to copy Name LSA SeqNo
refs: #2323

Change-Id: Ie67513b6228039538666e218f0c9c868ec0c1af8
2015-02-16 14:17:04 -06:00
Vince Lehman 9dce0c9445 src: Log exceptions thrown in event loop
Change-Id: If6bbf71f82adc69db7678e5034a0e8729cf027f4
2015-02-10 09:57:57 -06:00
Vince Lehman 7ccf694ae1 tests: Rewrite FaceController tests to not use DNS
refs: #2449

Change-Id: I5fe7537e171d60fbec2ecb3f3cd36cd625a0c324
2015-02-10 09:54:59 -06:00
Vince Lehman f814205d5c src: Subscribe to notifications using connect
refs: #2350

Change-Id: Ic4acedf78d2a0ea035a433ce2a05016a884503c6
2015-01-23 14:01:05 -08:00
Vince Lehman c2e51f6b6b src: Update copyright notices for files modified in 2015
refs: #2398

Change-Id: I83b7ad4da70cf784aa478295a873bf6411428acb
2015-01-22 11:25:03 -06:00
alvy d5a13cdaea src: Make log-level in nlsr.conf optional
refs: #2335

Change-Id: I185b6200ad1d7f16e3ca4b646ec20af83f983787
2015-01-22 10:16:47 -06:00
alvy 49b1c0c23f src: Replace LSA string literals with constants
refs: #2310

Change-Id: I0823c320400fe03b6268982cec05578c04d82ca8
2015-01-22 08:01:13 -08:00
alvy 5a45495e3e src: ConfParameter variables should be consistent with their min and max values
refs: #2084

Change-Id: Iae71da80ae47fca44ec46f4a3f0d4d86c77e5094
2015-01-21 08:53:46 -08:00
Vince Lehman c11cc20948 comm: Fix sync update prefix initialization
refs: #2399

Change-Id: I35c454e46c0b9552dba2a38b674d1ad3629f8bef
2015-01-20 11:41:58 -06:00
Vince Lehman 0bcf9a361d comm: Make SyncLogic responsible for update prefix
refs: #2289

Change-Id: I7687e36c88853bdf58de654b1ca280662a826b4b
2015-01-15 10:07:39 -08:00
Junxiao Shi f09e2633a0 docs: minor documentation corrections
Change-Id: I2e7b2d385f44ce894dcc2981e0fc6670df74aff1
2015-01-14 09:29:55 -08:00
Vince Lehman b45eed2d28 build: Require OpenSSL
refs: #2375

Change-Id: I0fe7c44b9e025bbe9a2e58cf0cab95069e668945
2015-01-14 09:50:08 -06:00
alvy a2228c6e1f src: Make conf keys with default values optional
refs: #1949

Change-Id: Ia9ba8707d27f2db96264f0480ffc72fd44a75099
2014-12-18 08:06:22 -08:00
sfayer 93d9ec37ea build: Set appname correctly in wscript
Change-Id: Ie8af3c7db0c50cba7f53d975135f8aebd42abf5c
2014-12-16 13:15:31 -08:00
Vince Lehman fc7d5b6fc5 conf: Add router-dead-interval to conf
refs: #2277

Change-Id: Ie03159585f21fd1a1cf9d4d7f1f159b5e59a2269
2014-12-10 11:56:19 -06:00
alvy 2fe12879bd src: Check validity of FaceURIs while loading conf
refs: #2070

Change-Id: I2278ab0a6367910495208a48c801f3af83bd43ec
2014-12-02 11:11:21 -06:00
Muktadir R Chowdhury bfa2760c57 conf: Add log4cxx path to conf file
refs: #1950

Change-Id: I51f9217c6ee40fd49a53d5f8294b60fb306e82ee
2014-11-21 17:53:05 -06:00
Alexander Afanasyev b669f9c02d build: Fix compilation against the latest version of ndn-cxx
Change-Id: Ie19e6432231a586efa9be1975e5601cf78c2dce9
2014-11-14 12:41:54 -08:00
Vince Lehman c292d18cd9 docs: Update authors
refs: #2093

Change-Id: Id0369b04e57d351f2f623bfc37a8442147c7a687
2014-11-12 12:16:44 -08:00
Junxiao Shi ee29a03a66 utility: avoid deprecated ndn::nfd::Controller(Face&) constructor
refs #2039

Change-Id: I1ffa2219f86a3d704e67c018c9c3dd6f87476346
2014-11-12 00:48:59 -07:00
Vince Lehman b7079a11a3 route: Replace deprecated nfd::Controller(Face&)
refs: #2133

Change-Id: Ie369f50a6a2f9101dda3ec0b28a3f2705c24cde8
2014-11-04 12:47:41 -06:00
Vince Lehman 0a7da61b45 Always build in C++11 mode
refs: #1930

Change-Id: Iedad4a814e5c7e6a5486f2f7e16c45c356131792
2014-10-30 10:43:53 -07:00
Alexander Afanasyev 7c8882ffac sync: Avoid use of boost::serialization::null_deleter
Refs: #2072

Change-Id: Ie860c2d09d38025750be056d03d71b5de58f1c5b
2014-10-29 14:11:45 -07:00
Alexander Afanasyev 1cf1e10389 conf: Add general.router-dead-interval configuration setting
refs: #1878

Change-Id: I21f2837118cda424904e0b0e60708a12deeabc8e
2014-10-29 14:45:21 -05:00
Vince Lehman 7b616582ed conf: Make event intervals configurable
User can specify the intervals for the first Hello Interest,
AdjLsa building, and routing calculation in the conf file.

refs: #2071

Change-Id: Ic8eb29d433069086955178bc42b5f8fc8f4149d3
2014-10-22 17:56:20 -05:00
Vince Lehman 27f1add26d util: Create Face with canonical FaceUri
refs: #1911

Change-Id: I13cc6522b5456d91a793365e33b2e53f9bd13e46
2014-10-21 08:38:40 -07:00
Junxiao Shi 92e5ffba6e tests: avoid usage of deprecated namespace ndn::Tlv
refs #2079

Change-Id: Iab8865fb607f8f3f2e530397f6224f37b0fc6a05
2014-10-19 09:45:55 -07:00
Ashlesh Gawande 5bf83175c3 src: Stop outdated LSA retrieval
refs: #1987

Change-Id: I5c2bbe75e4bb0a09d971a35db87591873f81a84b
2014-10-16 10:24:16 -05:00
Vince Lehman 20fe4a9cb0 route: Fix hyperbolic cost adjustment
refs: #1974

Change-Id: Ic96c94d978487bbef2804235b75aa227c350d941
2014-10-09 13:33:06 -07:00
Vince Lehman 942eb7b67d route: Fix FIB next hop removal bug
refs: #2018

Change-Id: Id107c04d4cdce9cc756acad5d262e5c1e0cc29a8
2014-10-08 16:01:09 -07:00
Vince Lehman f1aa52389a src: Sort names before std::set_difference
refs: #2029

Change-Id: I170f17cd69fd5a109913c6ebe9a13ab5552132a3
2014-10-08 12:51:25 -07:00
Vince Lehman 0913112f4a src: Assign 0 cost to hyperbolic direct neighbors
refs: #1975

Change-Id: I4349a7935d1defca4772c0b4bf806a4dd12a8e50
2014-10-08 12:35:28 -07:00
Vince Lehman e875d1f0e6 tests: Fix keychain and NextHop rounding error
Change-Id: Idd19c9a218363304dcf9fecb37a5cc2009b58cd0
2014-10-07 15:10:35 -05:00
Vince Lehman 9a7090334d route: Allow 0 cost in hyperbolic calculation
refs: #1982

Change-Id: I6ffe677d59dcb559f344b7d648600e9537d9c4f5
2014-10-02 11:25:28 -05:00
Vince Lehman 904c2413b2 comm: Stop SyncLogicHandler from fetching own LSAs
refs: #2005

Change-Id: I717a5258673dd5308fdf6561dbdb626ae4c74e9f
2014-10-01 17:22:36 -05:00
Vince Lehman 9f51efdbcb conf: Fix typos in security section
refs: #1985

Change-Id: I585ff9d6436db3102bc6860e428c95ca12fd6724
2014-09-18 14:47:55 -05:00
Vince Lehman 7c60329b07 src: Remove Scheduler instance from Nlsr class
refs: #1981

Change-Id: Iecbe9f975c2740ce04df8593ccde03486d4b7be8
2014-09-11 17:54:26 -05:00
Alexander Afanasyev c0b97af1cc build: Fix build error with python3
Change-Id: I2a35d66744330feefeb2c7f95a0f6e4e4c339358
Refs: #1956
2014-09-01 13:34:08 -07:00
Vince Lehman cb76aded0a src: Change adjacency status from uint32_t to enum
refs: #1946

Change-Id: Ic1abd2610061860d0ac183074395a1d3796e870a
2014-08-29 12:28:43 -07:00
Vince Lehman f99b87fe07 src: Add additional log levels
refs: #1935

Change-Id: Ie3ef3f04fbcadd8fb9ee6f3aade4a35bd2a88105
2014-08-29 11:58:18 -05:00
Alexander Afanasyev 7decbbf274 docs: Documentation updates
Change-Id: I7e10ba6bd1f70e779d5c2fc0437ff0f15828b312
Refs: #1923
2014-08-25 09:45:47 -07:00
Vince Lehman b722b10127 docs: Update docs and add release notes
refs: #1923

Change-Id: I89968ef130e85068eb20cfd2b81e414a16d243b8
2014-08-24 19:53:11 -07:00
Vince Lehman 2afef66e23 docs: Update authors
Change-Id: I81fd43ce3127326f119bd5537ba3cfd121ea19ce
2014-08-24 19:37:24 -07:00
Vince Lehman 145064a15e route: Adjust cost to integer before registering
refs: #1907

Change-Id: I471cd2eafb65a8458b4f527a3c3d7ea6682f5627
2014-08-24 08:39:56 -07:00
Vince Lehman 1884108a33 route: Ensure nexthops are reregistered correctly
Reregister prefixes if nexthops don't change
Remove invalid nexthops instead of all of them
Cancel FibEntry expiration events before scheduling new ones
Remove FibEntry refreshing
Add grace period to LSA expiration

refs: #1892

Change-Id: I5136b6b0f52a47b6ba72e04b0cea81b85ebccd45
2014-08-24 10:30:12 -05:00
Vince Lehman 06cc3383dc src: Remove -p option from command line arguments
refs: #1904

Change-Id: I8e011281f7d0d9d41aa9e6797768f1756f48ff46
2014-08-22 13:06:28 -05:00
Alexander Afanasyev bc98fcfe37 ci: Add Jenkins build and testing scripts
Change-Id: Ifaa9dc8ba7c5185c0d20ea3a3784638cbb9efbaa
2014-08-20 10:26:40 -05:00
Alexander Afanasyev 411ee4bf23 config+lsdb: Retry retrieve each LSA for lsa-refresh-time
This commit also includes extension of the config file
(`lsa-interest-lifetime` parameter in general section)

Change-Id: Ifd01af8cc98d41f7bdc953799a280e4b4269a358
Refs: #1873, #1874
2014-08-20 10:26:34 -05:00
Alexander Afanasyev 8388ec6617 src: Small style corrections
Change-Id: I51d073e33f92c491667c2e3ac7ceab388db61a2e
2014-08-16 18:38:57 -07:00
Alexander Afanasyev db49f4e08b build: Add missing include
Change-Id: Ie02d8c3c1422f0652659a3674a0e3f06287e8a6d
2014-08-14 23:01:02 -07:00
akmhoque 060d302bf2 src: Changing prefix registration's flag and FaceMonitor
Refs: #1841 #1843

Change-Id: I7ab74d529cf6f9f54ec1db1415f54f36f2229723
2014-08-12 20:12:53 -05:00
akmhoque 48265996f2 src+docs: Clarifying README and remove unused option from usage
Refs: #1827

Change-Id: I171d7316548c0a94a81d9e8bdb73f6cdfc5f39f1
2014-08-10 09:13:17 -05:00
Yingdi Yu 191f5fa878 security: Change the starting time of NLSR certificate
Change-Id: I787964cb0200c6c91dea070154c91e5c55b8b478
2014-08-08 11:29:46 -07:00
akmhoque dcee936fe3 route: Fixing segfault issue for Hyperbolic Routing Table Calculation
Refs: #1815

Change-Id: I317259d299e4117f0846ed98c432b39d1404b643
2014-08-07 13:41:31 -05:00
akmhoque 102aea40d6 src: Adding retry in case of prefix registration fails
Change-Id: Ia124ab393c665b29f03216903128de98bd68de9d
2014-08-05 22:54:24 -05:00
akmhoque 443ad81ceb src: Deleting old NLSR's keys
Refs: #1804

Change-Id: I53438ea065f57470a05b30ee6332a38b1a56d4ba
2014-07-29 10:27:03 -05:00
akmhoque dfe615ffcb src: Fixing the unreachable faceUri issue
Refs: #1797

Change-Id: I002be1fcd54a0a443df93ed58dc01d335dba18ad
2014-07-29 10:18:51 -05:00
Todo Signorello 669d4a7ab7 docs: Wrong option to print FIB's content, instead you must provide -b
Change-Id: I8a7330d29bc0749bea06286f1a08f08e0654f056
2014-07-25 12:04:32 -07:00
akmhoque 0494c25213 src: Making NLSR a daemon process with -d option
Change-Id: Ia9a83adab0140d918ce6c4adc2023dd43fc0fe8d
2014-07-24 01:33:35 -05:00
akmhoque b5b3b4fb18 route: Fixing unregistration of fib entries
FaceMap was constructed from the face result of face registration.
But result gives a diffrent uri (instead of maia.cs.memphis.edu
it gives 141.225.11.107:6363). When unregistering it was not
working as NLSR tries to compare face uri of naming format. Fixed
that issue. Now unregistration of name prefixes works fine.

Change-Id: Iafb3790113f735b1bb0ea68360bf70d09ec54243
2014-07-23 16:36:59 -05:00
akmhoque 69c9aa98f0 src: Making shared_ptr<ndn::Data> to put to NFD
Change-Id: I2c8b0a322cbe2a848ba2be7d9e9639237a08878a
2014-07-23 15:15:05 -05:00
akmhoque bf11c5f1aa src: Setting neighbour router's FIB entry expiration to milliseconds::max()
Refs: #1786

Change-Id: I6d51338f9ceb358bb67cdb38feb148780f2f1577
2014-07-21 18:52:50 -05:00
akmhoque 393d4ffbb2 src: Fixing Fib refreshing
Change-Id: I14501dc1102cb68e75f31c0e2ea1b4600c0d5bcf
2014-07-16 19:12:50 -05:00
Alexander Afanasyev 1717b24efd route: Preventing small bug with accessing of unallocated memory
Change-Id: I79c2099b2400aca78bbdb6d7de2f68d3f659e2b6
2014-07-15 13:53:17 -07:00
akmhoque cc82753e8d docs: Adding README and details NLSR instructions
Change-Id: I038c7a07858a26ed97e64e98c259ad1fcc41c4b8
2014-07-11 10:21:41 -05:00
akmhoque 18f861a852 src: Added missing startNotification for face monitoring
Change-Id: Ib2aa3126c040a491353c175b77de5110dbd8414d
2014-07-07 18:32:04 -05:00
akmhoque 8e0252bf74 src: Error fixing
NLSR was crashing for using cref on local variable. Fixed that
and also added startNotification() in initialize method in nlsr.cpp

Change-Id: I2e326ae465f53bb518d83dfed3863882d4adcb98
2014-07-07 18:30:18 -05:00
akmhoque c04e7270d2 src: Recreating face in case of face deletion by NFD
Change-Id: Idd1d0b7f521e574ace38d6f671a682622d98209d
2014-07-04 10:04:03 -05:00
akmhoque dbee8e3766 src: Fix error in face creation
Change-Id: Ie9954ad9fad8871093b1801438c2ea6bfe30b986
2014-06-30 12:50:58 -05:00
akmhoque e176515758 src: Creating faces to neighbors explicitly by NLSR
Nlsr creates faces to all neighbors explicitly like nfdc create faces.
After successful creation of all faces Nlsr will proceed for further
processing. In case of failure in creating any face, Nlsr will exit
immediately by destroying the created faces.

Change-Id: If7f2ee2a406f4bfbacf0b7c51335a3dbbb44e167
2014-06-30 12:18:53 -05:00
akmhoque 50125a90f3 src: Changing LSA names to conform with specs
Change LSA names from /<network>/NLSR/LSA/<network>/<site>/<router-name>/<type>/<version>
to /<network>/NLSR/LSA/<site>/<router-name>/<type>/<version> to conform with the
NLSR specification document. http://redmine.named-data.net/projects/nlsr/wiki/Build_LSAs

Change-Id: I89c9aaee44cd1f3d286a29bd8eb5585bfa844b43
2014-06-30 08:54:24 -05:00
akmhoque 778f81b61b src: Replace implicit conversion of st::string to ndn::Name
Fixed two places where std::string was passed to function accepting ndn::Name.
Although no compilation error was shown, from NLSR log investigation it is
found that name is garbled in CentOs because of that string passing.

Refs: #1713

Change-Id: I8a9fc00144df383debaac1e1c418fca14617f113
2014-06-30 08:51:03 -05:00
akmhoque ad5fe95854 src: Configuration file processing bug fix
If configuration file not found NLSR should exit immediately. But It was not.
So fixed it by returning before loading if file not found.

Change-Id: Id824a2fab0c4556e6b45b928758b065c1fa5dc6f
2014-06-26 13:36:05 -05:00
Yingdi Yu 6a3a4ddb0a security: Adding test cases for validator
Change-Id: If89b0cafef7d03a3604073f2f2c05e3ea4edb600
2014-06-26 09:11:40 -07:00
akmhoque a816bee305 src: Changing nlsr to NLSR
Change-Id: I9df5b76b65ee3969f02612f4ec54a4e5a82673cf
2014-06-24 20:38:35 -07:00
akmhoque 3cb0cfc899 src: Registering /ndn/broadcast/KEYS prefix
Change-Id: Iea81e2d4778c8cdb3161aca9d410743ce9ba3da3
2014-06-24 12:18:43 -05:00
Alexander Afanasyev a7cc43e387 nsync: Replacing Scheduler::schedulePeriodicEvent with just scheduleEvent
Change-Id: I64defdd0d4169849c3e1be5de39816feb920c9c2
Refs: #1682
2014-06-19 18:55:45 -07:00
akmhoque 93f1a07547 src: Update info message name
Changed "info" component to "INFO" and added "NLSR" component
so now info interest is of form /<neighbor>/NLSR/INFO/<router>

Change-Id: I8458fd7f911d660ffeee7e8e928d25ce3259c01b
2014-06-19 16:24:35 -05:00
Yingdi Yu 9a18bfba1f security: generate KSK as NLSR default key
Change-Id: I57a602337733f672e39a3c51db6a193355913218
2014-06-19 14:06:21 -07:00
Yingdi Yu e024803565 security: fix the compilation error of ValidatorConfig
Change-Id: I4740b316bfde1c164aa3251c3bd92563448b01b8
2014-06-19 14:06:13 -07:00
akmhoque d57f3678c6 src: Bug fixes in configuration file processing
One bug fixes in configuration file processing. NLSR was getting stuck after
after loading the validator as the interator was not incremented, another
fix is in helloprotocol: although it does not affect the result but affect
performance

Change-Id: Ie484f9f468933d4eed6f02c5fe6b24a97cd9f890
2014-06-10 11:52:57 -05:00
akmhoque 2f4233531e src: Replace std::cout with log message
Change-Id: Idf49992711b4bb4a45d8f9665963feebf3b0a887
2014-06-08 14:56:23 -05:00
Yingdi Yu 20e3a6ee3f security: Add signing and validating process
Change-Id: Ic9edfcf56f044821e167d7e49b75a9023b67fbcd
2014-05-31 16:35:19 -07:00
akmhoque 3d06e79119 src: Adding copyright message
Change-Id: Ie511b5e0b54161cd9c428498de34d32ed40e74df
2014-05-28 08:22:57 -05:00
akmhoque 0698667cfc src: Lsa interest retransmission in case of timeout
Refs: #1634

Change-Id: Iceeb6921bcc360de50714d227e8f12c4d0514115
2014-05-27 13:56:01 -05:00
akmhoque c7a79b2adb src: Expiration time change for LSA and Fib entry
Changed lifetime of LSA and FIB Entry to ndn::time::system_clock::TimePoint
type expiration timepoint. And refreshing event is scheduled at that timepoint

Refs: #1594

Change-Id: Ib31fe7ca79e79174eb3a5a4956ed5334da093b1b
2014-05-27 13:49:33 -05:00
akmhoque 674b0b1ffe src: Adding log4cxx logging
Refs: #1505

Change-Id: Ib154d91f81acf3f1dd8bbcf552062a16d03fec74
2014-05-23 15:27:54 -05:00
akmhoque 157b0a473a src: configuration file parsing
used boost::property_tree::info_parser for parsing nlsr's configuration file and
changed configuration command style to info command style. Removed tokenizer from
nlsr

Refs: #1542

Change-Id: If017ddd7eef5caa59b33940bfc27a71aa4de266b
2014-05-20 12:47:44 -05:00
akmhoque 31d1d4b331 src: Replace Tokenizer with the methods of ndn::Name
Purpose of this commit is to replace Tokenizer in all
places except conf-file-processor.*pp with the methods
of ndn::Name. One static method in class NameHelper
is added. Tokenizer will be removed finally when
configuration file parsing commit is complete.

Refs: 1533

Change-Id: I14a67655eb963c5cc5b045c3c9f7d516e405ff19
2014-05-12 11:08:57 -05:00
akmhoque fdbddb114e src: Renaming class to spell out them (Adl, Nhl, Npl, Npt, Npte)
Refs: #1534

Change-Id: If4a205e8ad2419505cc796027a5c863471ef5439
2014-05-02 23:40:42 -07:00
Ashlesh Gawande eb582eb919 tests: Adding unit tests.
The purpose of this commit is to start pushing unit test I am writing. I will add more unit tests in each patch

Refs: #1496

Change-Id: Ic132adddfa06a95780712eba63966d3bab4743af
2014-05-01 14:47:06 -05:00
akmhoque c8a10f762b build: == Dependency change == NLSR now depends on ndn-cxx library
Refs: #1535

Change-Id: I4c7c0c3dcfcac6ee91648a46c07e426adbb5bd20
2014-04-25 22:05:39 -05:00
Yingdi Yu 0c21782b13 security: Disable security temporarily
Refs: #1530

Change-Id: If46346f424c7413d29aa312a2d924dbcb97ee04e
2014-04-24 19:24:00 -07:00
akmhoque b6450b1719 src: Discard usage of std::pair of reference type and rename functions
Refs: #1531

Change-Id: Ief2a525b8fb8addbd491d202d6b02d5db2b41ea4
2014-04-24 12:05:01 -05:00
akmhoque 53353465e9 File name format change and Removed warning messages (Except warning from boost for Logging)
Change-Id: If3a3a5411d377d925527fc3e8809c228a9a81e26
2014-04-23 13:54:22 -05:00
Yingdi Yu 40cd1c35c4 build: Making build system consistent with other NDN projects and adding unit-test framework
This commit aims only at correcting building system and adding unit-test framework.
Existing test cases (ChronoSync) are disabled temporarily and will be fixed later.
Minimum changes are made, so that the code can be built successfully.
Compiling warnings will be resolved in a later commit.

Refs: #1495

Change-Id: Ibf7119bbd77b6307cb58bbee47b61d7a7312df98
2014-04-21 12:15:37 -07:00
akmhoque 082403acec Fixing Coding Style 2014-04-15 15:32:07 -05:00
akmhoque c8df795fe7 Fixing Coding Style 2014-04-15 15:00:49 -05:00
akmhoque 05d5fcf0bb Fixing Coding Style 2014-04-15 14:58:45 -05:00
A K M Mahmudul Hoque 6e6b7fcb8d Update cert_tool.cpp 2014-04-03 13:25:08 -05:00
akmhoque e14bc49752 Identity delete 2014-04-03 13:14:50 -05:00
A K M Mahmudul Hoque 5f0e65f57e Update cert_tool.cpp 2014-03-28 15:12:57 -05:00
akmhoque 955d949d5a Content Verification and Certificate Verification Done 2014-03-14 09:06:56 -05:00
akmhoque fa8ee9b314 Content Verification and Certificate Verification Done 2014-03-14 09:06:24 -05:00
akmhoque 5a44dd4ecd NLSR - (Hello Protocol + FIB Update) 2014-03-12 18:11:32 -05:00
akmhoque 099495b524 Data Packet Verification Added 2014-03-11 16:01:19 -05:00
akmhoque eb764c5c0f Data Packet Verification Added 2014-03-11 16:01:09 -05:00
akmhoque 8264f5842c Directory Structuring 2014-02-28 11:47:48 -06:00
akmhoque ba09474389 Directory Structuring 2014-02-28 11:47:21 -06:00
akmhoque 2bb198edb8 Directory Structuring 2014-02-28 11:46:27 -06:00
akmhoque 50fda020fc Adding nsync for NLSR 2014-02-21 17:58:27 -06:00
akmhoque d36484c43e Merge branch 'nlsr-cpp' of https://github.com/NDN-Routing/NLSR0.0 into nlsr-cpp 2014-02-21 17:56:41 -06:00
akmhoque 66e661897c Adding nsync for NLSR 2014-02-21 17:56:03 -06:00
A K M Mahmudul Hoque 4e27b94a86 Update wscript 2014-02-20 17:09:51 -06:00
akmhoque fdfd11abe6 Indentation Final 2014-02-19 20:04:00 -06:00
akmhoque 1fd8c1e4a4 Indentation 2014-02-19 19:41:49 -06:00
akmhoque b1710aac0b Adding namespace nlsr 2014-02-19 17:13:36 -06:00
akmhoque 1a4810947f Changing class name nlsr to Nlsr 2014-02-19 16:34:22 -06:00
akmhoque 92afde42b5 NLSR Logging by BOOST.Log added 2014-02-18 14:04:07 -06:00
akmhoque ee79e4671e Adding boost logging support for NLSR 2014-02-17 21:17:52 -06:00
akmhoque 59c53c4532 Adding boost logging support for NLSR 2014-02-17 21:14:45 -06:00
akmhoque f2eef2cb10 Adding boost logging support for NLSR 2014-02-17 21:13:34 -06:00
akmhoque c52a46ccf0 Adding boost logging support for NLSR 2014-02-17 21:13:16 -06:00
akmhoque 3f4c7b0bed Adding boost logging support for NLSR 2014-02-17 21:13:07 -06:00
akmhoque 85d88339de Adding boost logging support for NLSR 2014-02-17 21:11:21 -06:00
akmhoque c4eb26cb09 Update wscript 2014-02-14 11:18:03 -06:00
akmhoque 1ec25f23e2 Adding waf script for building 2014-02-13 14:19:11 -06:00
akmhoque 298385ac96 Adding waf script for building 2014-02-13 14:13:09 -06:00
akmhoque 8ff29cc4e2 Adding waf script for building 2014-02-13 14:12:02 -06:00
akmhoque 9d19a49f2d Modification to Accomodate API changes in NDN-CPP 2014-02-11 19:44:29 -06:00
akmhoque e77d814bb4 LSA refreshing/Expiration, Fib Refreshing Added 2014-02-11 11:59:57 -06:00
akmhoque 4768f89c6e LSDB Operation Complete - Refresh 2014-02-08 23:58:07 -06:00
akmhoque 62a8e40aa2 FIB manipaulation done 2014-02-08 12:00:27 -06:00
akmhoque f7c2c7ca81 Routing Table Calculation Complete(Ls, Hp) 2014-02-06 11:32:43 -06:00
akmhoque 3fdf7618d1 Link State Routing Calculation 2014-02-04 21:18:23 -06:00
akmhoque 79d355f969 Added Routing Table Structures 2014-02-04 15:11:16 -06:00
akmhoque dfa4a5b758 Adding rt, rte, nh 2014-02-03 20:12:29 -06:00
akmhoque a002781aa3 Cleaning waf make script 2014-02-02 01:04:35 -06:00
akmhoque c717dd30f1 waf make script 2014-02-02 01:03:12 -06:00
akmhoque da62ec425c Cleaning waf make script 2014-02-01 23:57:59 -06:00
akmhoque 693c970800 Clean waf scripts 2014-02-01 23:56:43 -06:00
akmhoque 2e963a0c32 Adding waf make script 2014-02-01 23:55:20 -06:00
akmhoque fcf765daf3 Adding waf make script 2014-02-01 23:46:17 -06:00
akmhoque cd55247fad Schedule Adj LSA build and installation 2014-02-01 21:22:16 -06:00
akmhoque 3c6bd92fb7 Own Cor LSA installation 2014-02-01 17:10:17 -06:00
akmhoque bd7c8e6612 Own Name LSA installation 2014-02-01 14:57:40 -06:00
akmhoque faf9d9b8a6 Merge branch 'nlsr-cpp' of https://github.com/NDN-Routing/NLSR0.0 into nlsr-cpp 2014-02-01 01:12:04 -06:00
akmhoque fd1dd0a30a Adding LSAs 2014-02-01 01:11:35 -06:00
akmhoque dbfd7912b3 Create README.md 2014-01-31 20:15:39 -06:00
akmhoque a8cd6b97d9 Data Passing for Info Interest 2014-01-31 20:13:26 -06:00
akmhoque 204e754cd1 Change file Naming 2014-01-31 16:08:25 -06:00
akmhoque 95b7c8cbff Separate InterestManger and DataManager from nlsr 2014-01-31 15:53:09 -06:00
akmhoque 147f499cab Separate InterestManger and DataManager from nlsr 2014-01-31 15:52:49 -06:00
akmhoque 87347a35f6 First commit:CPP 2014-01-31 11:00:44 -06:00
akmhoque fc31641858 Clean UP old code 2014-01-31 10:57:53 -06:00
231 changed files with 32947 additions and 12977 deletions

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
- '.mailmap'
workflow_dispatch:
permissions: {}
jobs:
Ubuntu:
uses: named-data/actions/.github/workflows/jenkins-script-ubuntu.yml@v1
macOS:
uses: named-data/actions/.github/workflows/jenkins-script-macos.yml@v1
+21
View File
@@ -0,0 +1,21 @@
name: Docs
on:
push:
workflow_dispatch:
inputs:
skip-deploy:
description: 'Skip deployment?'
required: true
type: boolean
permissions: {}
jobs:
html:
uses: named-data/actions/.github/workflows/docs-html.yml@v1
with:
# Deploy only the master branch and release tags
deploy: ${{ !inputs.skip-deploy && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/NLSR-')) }}
secrets: inherit
man:
uses: named-data/actions/.github/workflows/docs-man.yml@v1
+32
View File
@@ -0,0 +1,32 @@
# Emacs
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
.\#*
# Visual Studio Code
.vscode/
# KDevelop
*.kdev*
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
# Waf build system
/build/
.waf-*-*/
.waf3-*-*/
.lock-waf*
# Compiled python code
__pycache__/
*.py[cod]
# Other
/VERSION.info
Executable
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -eo pipefail
case $(uname) in
Linux)
if [[ -e /etc/os-release ]]; then
source /etc/os-release
else
source /usr/lib/os-release
fi
export ID VERSION_ID
export ID_LIKE="${ID} ${ID_LIKE} linux"
export PATH="${HOME}/.local/bin${PATH:+:}${PATH}"
;;
Darwin)
# Emulate a subset of os-release(5)
export ID=macos
export VERSION_ID=$(sw_vers -productVersion)
export PATH="/usr/local/bin${PATH:+:}${PATH}"
if [[ -x /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [[ -x /usr/local/bin/brew ]]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
;;
esac
export CACHE_DIR=${CACHE_DIR:-/tmp}
if [[ $JOB_NAME == *"code-coverage" ]]; then
export DISABLE_ASAN=yes
export DISABLE_HEADERS_CHECK=yes
fi
# https://reproducible-builds.org/docs/source-date-epoch/
export SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
for file in .jenkins.d/*; do
[[ -f $file && -x $file ]] || continue
if [[ -n $GITHUB_ACTIONS ]]; then
label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
echo "::group::${label}"
fi
echo "\$ $file"
"$file"
if [[ -n $GITHUB_ACTIONS ]]; then
echo "::endgroup::"
fi
done
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -eo pipefail
APT_PKGS=(build-essential pkg-config python3-minimal
libboost-all-dev libssl-dev libsqlite3-dev)
FORMULAE=(boost openssl pkg-config)
PIP_PKGS=()
case $JOB_NAME in
*code-coverage)
APT_PKGS+=(lcov python3-pip)
PIP_PKGS+=('gcovr~=5.2')
;;
*Docs)
APT_PKGS+=(doxygen graphviz python3-pip)
FORMULAE+=(doxygen graphviz)
PIP_PKGS+=(sphinx sphinxcontrib-doxylink)
;;
esac
set -x
if [[ $ID == macos ]]; then
if [[ -n $GITHUB_ACTIONS ]]; then
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
fi
brew update
brew install --formula "${FORMULAE[@]}"
elif [[ $ID_LIKE == *debian* ]]; then
sudo apt-get -qq update
sudo apt-get -qy install "${APT_PKGS[@]}"
elif [[ $ID_LIKE == *fedora* ]]; then
sudo dnf -y install gcc-c++ libasan lld pkgconf-pkg-config python3 \
boost-devel openssl-devel sqlite-devel
fi
if (( ${#PIP_PKGS[@]} )); then
pip3 install --user --upgrade --upgrade-strategy=eager "${PIP_PKGS[@]}"
fi
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
set -exo pipefail
pushd "$CACHE_DIR" >/dev/null
INSTALLED_VERSION=
if [[ $ID == macos ]]; then
BOOST=$(brew list --formula --versions boost)
OLD_BOOST=$(cat boost.txt || :)
if [[ $OLD_BOOST != $BOOST ]]; then
echo "$BOOST" > boost.txt
INSTALLED_VERSION=NONE
fi
fi
if [[ -z $INSTALLED_VERSION ]]; then
INSTALLED_VERSION=$(git -C ndn-cxx rev-parse HEAD 2>/dev/null || echo NONE)
fi
sudo rm -rf ndn-cxx-latest
git clone --depth 1 https://github.com/named-data/ndn-cxx.git ndn-cxx-latest
LATEST_VERSION=$(git -C ndn-cxx-latest rev-parse HEAD 2>/dev/null || echo UNKNOWN)
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
sudo rm -rf ndn-cxx
mv ndn-cxx-latest ndn-cxx
else
sudo rm -rf ndn-cxx-latest
fi
sudo rm -f /usr/local/bin/ndnsec*
sudo rm -fr /usr/local/include/ndn-cxx
sudo rm -f /usr/local/lib{,64}/libndn-cxx*
sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
pushd ndn-cxx >/dev/null
./waf --color=yes configure --without-osx-keychain
./waf --color=yes build
sudo ./waf --color=yes install
popd >/dev/null
popd >/dev/null
if [[ $ID_LIKE == *fedora* ]]; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
if [[ $ID_LIKE == *linux* ]]; then
sudo ldconfig
fi
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -exo pipefail
PROJ=ChronoSync
pushd "$CACHE_DIR" >/dev/null
INSTALLED_VERSION=
NDN_CXX=$(ndnsec version)
OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
INSTALLED_VERSION=NONE
fi
if [[ -z $INSTALLED_VERSION ]]; then
INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
fi
sudo rm -rf "$PROJ-latest"
git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
sudo rm -rf "$PROJ"
mv "$PROJ-latest" "$PROJ"
else
sudo rm -rf "$PROJ-latest"
fi
sudo rm -fr /usr/local/include/"$PROJ"
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
pushd "$PROJ" >/dev/null
./waf --color=yes configure
./waf --color=yes build
sudo ./waf --color=yes install
popd >/dev/null
popd >/dev/null
if [[ $ID_LIKE == *fedora* ]]; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
if [[ $ID_LIKE == *linux* ]]; then
sudo ldconfig
fi
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -exo pipefail
PROJ=PSync
pushd "$CACHE_DIR" >/dev/null
INSTALLED_VERSION=
NDN_CXX=$(ndnsec version)
OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
INSTALLED_VERSION=NONE
fi
if [[ -z $INSTALLED_VERSION ]]; then
INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
fi
sudo rm -rf "$PROJ-latest"
git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
sudo rm -rf "$PROJ"
mv "$PROJ-latest" "$PROJ"
else
sudo rm -rf "$PROJ-latest"
fi
sudo rm -fr /usr/local/include/"$PROJ"
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
pushd "$PROJ" >/dev/null
./waf --color=yes configure
./waf --color=yes build
sudo ./waf --color=yes install
popd >/dev/null
popd >/dev/null
if [[ $ID_LIKE == *fedora* ]]; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
if [[ $ID_LIKE == *linux* ]]; then
sudo ldconfig
fi
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -exo pipefail
PROJ=ndn-svs
pushd "$CACHE_DIR" >/dev/null
INSTALLED_VERSION=
NDN_CXX=$(ndnsec version)
OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
INSTALLED_VERSION=NONE
fi
if [[ -z $INSTALLED_VERSION ]]; then
INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
fi
sudo rm -rf "$PROJ-latest"
git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
sudo rm -rf "$PROJ"
mv "$PROJ-latest" "$PROJ"
else
sudo rm -rf "$PROJ-latest"
fi
sudo rm -fr /usr/local/include/"$PROJ"
sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
pushd "$PROJ" >/dev/null
./waf --color=yes configure
./waf --color=yes build
sudo ./waf --color=yes install
popd >/dev/null
popd >/dev/null
if [[ $ID_LIKE == *fedora* ]]; then
sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
fi
if [[ $ID_LIKE == *linux* ]]; then
sudo ldconfig
fi
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -eo pipefail
if [[ -z $DISABLE_ASAN ]]; then
ASAN="--with-sanitizer=address"
fi
if [[ $JOB_NAME == *"code-coverage" ]]; then
COVERAGE="--with-coverage"
fi
set -x
if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
# Build in release mode with tests
./waf --color=yes configure --with-tests
./waf --color=yes build
# Cleanup
./waf --color=yes distclean
# Build in release mode without tests
./waf --color=yes configure
./waf --color=yes build
# Cleanup
./waf --color=yes distclean
fi
# Build in debug mode with tests
./waf --color=yes configure --debug --with-chronosync --with-psync --with-svs --with-tests $ASAN $COVERAGE
./waf --color=yes build
# (tests will be run against the debug version)
# Install
sudo ./waf --color=yes install
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -eo pipefail
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
ASAN_OPTIONS="color=always"
ASAN_OPTIONS+=":check_initialization_order=1"
ASAN_OPTIONS+=":detect_stack_use_after_return=1"
ASAN_OPTIONS+=":strict_init_order=1"
ASAN_OPTIONS+=":strict_string_checks=1"
ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
ASAN_OPTIONS+=":detect_container_overflow=0"
ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
export ASAN_OPTIONS
# https://www.boost.org/doc/libs/release/libs/test/doc/html/boost_test/runtime_config/summary.html
export BOOST_TEST_BUILD_INFO=1
export BOOST_TEST_COLOR_OUTPUT=1
export BOOST_TEST_DETECT_MEMORY_LEAK=0
export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
set -x
# Prepare environment
rm -rf ~/.ndn
# Run unit tests
./build/unit-tests-nlsr
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -exo pipefail
if [[ $JOB_NAME == *"code-coverage" ]]; then
# Generate an XML report (Cobertura format) and a detailed HTML report using gcovr
# Note: trailing slashes are important in the paths below. Do not remove them!
gcovr --object-directory build \
--filter src/ \
--exclude-throw-branches \
--exclude-unreachable-branches \
--cobertura build/coverage.xml \
--html-details build/gcovr/ \
--print-summary
# Generate a detailed HTML report using lcov
lcov --quiet \
--capture \
--directory . \
--exclude "$PWD/tests/*" \
--no-external \
--rc lcov_branch_coverage=1 \
--output-file build/coverage.info
genhtml --branch-coverage \
--demangle-cpp \
--legend \
--output-directory build/lcov \
--title "NLSR unit tests" \
build/coverage.info
fi
+36
View File
@@ -0,0 +1,36 @@
# Continuous Integration Scripts
## Environment Variables
- `ID`: lower-case string that identifies the operating system, for example: `ID=ubuntu`,
`ID=centos`. See [os-release(5)] for more information. On macOS, where `os-release` is
not available, we emulate it by setting `ID=macos`.
- `ID_LIKE`: space-separated list of operating system identifiers that are closely related
to the running OS. See [os-release(5)] for more information. The listed values are used
by the CI scripts to select the proper behavior for different platforms and OS flavors.
Examples:
- On CentOS, `ID_LIKE="centos rhel fedora linux"`
- On Ubuntu, `ID_LIKE="ubuntu debian linux"`
- `VERSION_ID`: identifies the operating system version, excluding any release code names.
See [os-release(5)] for more information. Examples: `VERSION_ID=42`, `VERSION_ID=22.04`.
- `JOB_NAME`: defines the type of the current CI job. Depending on the job type, the CI
scripts can perform different tasks.
Supported values:
- empty: default build task
- `code-coverage`: debug build with tests and code coverage analysis
- `limited-build`: only a single debug build with tests
- `CACHE_DIR`: directory containing cached files from previous builds, e.g., a compiled
version of ndn-cxx. If not set, `/tmp` is used.
- `DISABLE_ASAN`: disable building with AddressSanitizer. This is automatically set for
the `code-coverage` job type.
[os-release(5)]: https://www.freedesktop.org/software/systemd/man/os-release.html
+16
View File
@@ -0,0 +1,16 @@
A K M Mahmudul Hoque <akmhoque@gmail.com>
<agawande@memphis.edu> <ashu2493@gmail.com>
Nick Gordon <nmgordon@memphis.edu>
Laqin Fan <lfan1@memphis.edu>
Syed Obaid Amin <soamin@memphis.edu>
Syed Obaid Amin <soamin@memphis.edu> <obaidasyed@gmail.com>
Syed Obaid Amin <soamin@memphis.edu> <obaid@Obaids-MacBook.local>
Syed Obaid Amin <soamin@memphis.edu> <obaid@obaids-macbook.memphis.edu>
Syed Obaid Amin <soamin@memphis.edu> <soamin@mira.cs.memphis.edu>
Syed Obaid Amin <soamin@memphis.edu> <soamin@wd222yx4.memphis.edu>
Muktadir R Chowdhury <mrchwdhr@memphis.edu>
Muktadir R Chowdhury <mrchwdhr@memphis.edu> <muktadir.rahman.c@gmail.com>
<aa@cs.fiu.edu> <alexander.afanasyev@ucla.edu>
<davidepesa@gmail.com> <davide.pesavento@lip6.fr>
<enewberry@email.arizona.edu> <enewberry@cs.arizona.edu>
Md Ashiqur Rahman <marahman@email.arizona.edu>
+533
View File
@@ -0,0 +1,533 @@
#!/usr/bin/env python
# encoding: utf-8
#
# partially based on boost.py written by Gernot Vormayr
# written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008
# modified by Bjoern Michaelsen, 2008
# modified by Luca Fossati, 2008
# rewritten for waf 1.5.1, Thomas Nagy, 2008
# rewritten for waf 1.6.2, Sylvain Rouquette, 2011
'''
This is an extra tool, not bundled with the default waf binary.
To add the boost tool to the waf file:
$ ./waf-light --tools=compat15,boost
or, if you have waf >= 1.6.2
$ ./waf update --files=boost
When using this tool, the wscript will look like:
def options(opt):
opt.load('compiler_cxx boost')
def configure(conf):
conf.load('compiler_cxx boost')
conf.check_boost(lib='system filesystem')
def build(bld):
bld(source='main.cpp', target='app', use='BOOST')
Options are generated, in order to specify the location of boost includes/libraries.
The `check_boost` configuration function allows to specify the used boost libraries.
It can also provide default arguments to the --boost-mt command-line arguments.
Everything will be packaged together in a BOOST component that you can use.
When using MSVC, a lot of compilation flags need to match your BOOST build configuration:
- you may have to add /EHsc to your CXXFLAGS or define boost::throw_exception if BOOST_NO_EXCEPTIONS is defined.
Errors: C4530
- boost libraries will try to be smart and use the (pretty but often not useful) auto-linking feature of MSVC
So before calling `conf.check_boost` you might want to disabling by adding
conf.env.DEFINES_BOOST += ['BOOST_ALL_NO_LIB']
Errors:
- boost might also be compiled with /MT, which links the runtime statically.
If you have problems with redefined symbols,
self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
self.env['CXXFLAGS_%s' % var] += ['/MD', '/EHsc']
Passing `--boost-linkage_autodetect` might help ensuring having a correct linkage in some basic cases.
'''
import sys
import re
from waflib import Utils, Logs, Errors
from waflib.Configure import conf
from waflib.TaskGen import feature, after_method
BOOST_LIBS = ['/usr/lib', '/usr/local/lib', '/opt/homebrew/lib', '/opt/local/lib', '/sw/lib', '/lib']
BOOST_INCLUDES = ['/usr/include', '/usr/local/include', '/opt/homebrew/include', '/opt/local/include', '/sw/include']
BOOST_VERSION_FILE = 'boost/version.hpp'
BOOST_VERSION_CODE = '''
#include <iostream>
#include <boost/version.hpp>
int main() { std::cout << BOOST_LIB_VERSION << ":" << BOOST_VERSION << std::endl; }
'''
BOOST_ERROR_CODE = '''
#include <boost/system/error_code.hpp>
int main() { boost::system::error_code c; }
'''
PTHREAD_CODE = '''
#include <pthread.h>
static void* f(void*) { return 0; }
int main() {
pthread_t th;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_create(&th, &attr, &f, 0);
pthread_join(th, 0);
pthread_cleanup_push(0, 0);
pthread_cleanup_pop(0);
pthread_attr_destroy(&attr);
}
'''
BOOST_THREAD_CODE = '''
#include <boost/thread.hpp>
int main() { boost::thread t; }
'''
BOOST_LOG_CODE = '''
#include <boost/log/trivial.hpp>
int main() { BOOST_LOG_TRIVIAL(info) << "boost_log is working"; }
'''
BOOST_LOG_SETUP_CODE = '''
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/console.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
int main() {
using namespace boost::log;
add_common_attributes();
add_console_log(std::clog, keywords::format = "%Message%");
BOOST_LOG_TRIVIAL(info) << "boost_log_setup is working";
}
'''
# toolsets from {boost_dir}/tools/build/v2/tools/common.jam
PLATFORM = Utils.unversioned_sys_platform()
detect_intel = lambda env: (PLATFORM == 'win32') and 'iw' or 'il'
detect_clang = lambda env: (PLATFORM == 'darwin') and 'clang-darwin' or 'clang'
detect_mingw = lambda env: (re.search('MinGW', env.CXX[0])) and 'mgw' or 'gcc'
BOOST_TOOLSETS = {
'borland': 'bcb',
'clang': detect_clang,
'como': 'como',
'cw': 'cw',
'darwin': 'xgcc',
'edg': 'edg',
'g++': detect_mingw,
'gcc': detect_mingw,
'icpc': detect_intel,
'intel': detect_intel,
'kcc': 'kcc',
'kylix': 'bck',
'mipspro': 'mp',
'mingw': 'mgw',
'msvc': 'vc',
'qcc': 'qcc',
'sun': 'sw',
'sunc++': 'sw',
'tru64cxx': 'tru',
'vacpp': 'xlc'
}
def options(opt):
opt = opt.add_option_group('Boost Options')
opt.add_option('--boost-includes', type='string',
default='', dest='boost_includes',
help='''path to the directory where the boost includes are,
e.g., /path/to/boost_1_55_0/stage/include''')
opt.add_option('--boost-libs', type='string',
default='', dest='boost_libs',
help='''path to the directory where the boost libs are,
e.g., path/to/boost_1_55_0/stage/lib''')
opt.add_option('--boost-mt', action='store_true',
default=False, dest='boost_mt',
help='select multi-threaded libraries')
opt.add_option('--boost-abi', type='string', default='', dest='boost_abi',
help='''select libraries with tags (gd for debug, static is automatically added),
see doc Boost, Getting Started, chapter 6.1''')
opt.add_option('--boost-linkage_autodetect', action='store_true', dest='boost_linkage_autodetect',
help="auto-detect boost linkage options (don't get used to it / might break other stuff)")
opt.add_option('--boost-toolset', type='string',
default='', dest='boost_toolset',
help='force a toolset e.g. msvc, vc90, \
gcc, mingw, mgw45 (default: auto)')
py_version = '%d%d' % (sys.version_info[0], sys.version_info[1])
opt.add_option('--boost-python', type='string',
default=py_version, dest='boost_python',
help='select the lib python with this version \
(default: %s)' % py_version)
@conf
def __boost_get_version_file(self, d):
if not d:
return None
dnode = self.root.find_dir(d)
if dnode:
return dnode.find_node(BOOST_VERSION_FILE)
return None
@conf
def boost_get_version(self, d):
"""silently retrieve the boost version number"""
node = self.__boost_get_version_file(d)
if node:
try:
txt = node.read()
except EnvironmentError:
Logs.error('Could not read the file %r' % node.abspath())
else:
re_but1 = re.compile('^#define\\s+BOOST_LIB_VERSION\\s+"(.+)"', re.M)
m1 = re_but1.search(txt)
re_but2 = re.compile('^#define\\s+BOOST_VERSION\\s+(\\d+)', re.M)
m2 = re_but2.search(txt)
if m1 and m2:
return (m1.group(1), m2.group(1))
return self.check_cxx(fragment=BOOST_VERSION_CODE, includes=[d], execute=True, define_ret=True).split(':')
@conf
def boost_get_includes(self, *k, **kw):
includes = k and k[0] or kw.get('includes', None)
if includes and self.__boost_get_version_file(includes):
return includes
for d in self.environ.get('INCLUDE', '').split(';') + BOOST_INCLUDES:
if self.__boost_get_version_file(d):
return d
if includes:
self.end_msg('headers not found in %s' % includes, 'YELLOW')
self.fatal('The configuration failed')
else:
self.end_msg('headers not found, please provide a --boost-includes argument (see help)', 'YELLOW')
self.fatal('The configuration failed')
@conf
def boost_get_toolset(self, cc):
toolset = cc
if not cc:
build_platform = Utils.unversioned_sys_platform()
if build_platform in BOOST_TOOLSETS:
cc = build_platform
else:
cc = self.env.CXX_NAME
if cc in BOOST_TOOLSETS:
toolset = BOOST_TOOLSETS[cc]
return isinstance(toolset, str) and toolset or toolset(self.env)
@conf
def __boost_get_libs_path(self, *k, **kw):
''' return the lib path and all the files in it '''
if 'files' in kw:
return self.root.find_dir('.'), Utils.to_list(kw['files'])
libs = k and k[0] or kw.get('libs', None)
if libs:
path = self.root.find_dir(libs)
files = path.ant_glob('*boost_*')
if not libs or not files:
for d in self.environ.get('LIB', '').split(';') + BOOST_LIBS:
if not d:
continue
path = self.root.find_dir(d)
if path:
files = path.ant_glob('*boost_*')
if files:
break
path = self.root.find_dir(d + '64')
if path:
files = path.ant_glob('*boost_*')
if files:
break
if not path:
if libs:
self.end_msg('libs not found in %s' % libs, 'YELLOW')
self.fatal('The configuration failed')
else:
self.end_msg('libs not found, please provide a --boost-libs argument (see help)', 'YELLOW')
self.fatal('The configuration failed')
self.to_log('Found the boost path in %r with the libraries:' % path)
for x in files:
self.to_log(' %r' % x)
return path, files
@conf
def boost_get_libs(self, *k, **kw):
'''
return the lib path and the required libs
according to the parameters
'''
path, files = self.__boost_get_libs_path(**kw)
files = sorted(files, key=lambda f: (len(f.name), f.name), reverse=True)
toolset = self.boost_get_toolset(kw.get('toolset', ''))
toolset_pat = '(-%s[0-9]{0,3})' % toolset
version = '-%s' % self.env.BOOST_VERSION
def find_lib(re_lib, files):
for file in files:
if re_lib.search(file.name):
self.to_log('Found boost lib %s' % file)
return file
return None
def format_lib_name(name):
if name.startswith('lib') and self.env.CC_NAME != 'msvc':
name = name[3:]
return name[:name.rfind('.')]
def match_libs(lib_names, is_static):
libs = []
lib_names = Utils.to_list(lib_names)
if not lib_names:
return libs
t = []
if kw.get('mt', False):
t.append('-mt')
if kw.get('abi', None):
t.append('%s%s' % (is_static and '-s' or '-', kw['abi']))
elif is_static:
t.append('-s')
tags_pat = t and ''.join(t) or ''
ext = is_static and self.env.cxxstlib_PATTERN or self.env.cxxshlib_PATTERN
ext = ext.partition('%s')[2] # remove '%s' or 'lib%s' from PATTERN
for lib in lib_names:
if lib == 'python':
# for instance, with python='27',
# accepts '-py27', '-py2', '27' and '2'
# but will reject '-py3', '-py26', '26' and '3'
tags = '({0})?((-py{2})|(-py{1}(?=[^0-9]))|({2})|({1}(?=[^0-9]))|(?=[^0-9])(?!-py))'.format(tags_pat, kw['python'][0], kw['python'])
else:
tags = tags_pat
# Trying libraries, from most strict match to least one
for pattern in ['boost_%s%s%s%s%s$' % (lib, toolset_pat, tags, version, ext),
'boost_%s%s%s%s$' % (lib, tags, version, ext),
# Give up trying to find the right version
'boost_%s%s%s%s$' % (lib, toolset_pat, tags, ext),
'boost_%s%s%s$' % (lib, tags, ext),
'boost_%s%s$' % (lib, ext),
'boost_%s' % lib]:
self.to_log('Trying pattern %s' % pattern)
file = find_lib(re.compile(pattern), files)
if file:
libs.append(format_lib_name(file.name))
break
else:
self.end_msg('lib %s not found in %s' % (lib, path.abspath()), 'YELLOW')
self.fatal('The configuration failed')
return libs
return path.abspath(), match_libs(kw.get('lib', None), False), match_libs(kw.get('stlib', None), True)
@conf
def _check_pthread_flag(self, *k, **kw):
'''
Computes which flags should be added to CXXFLAGS and LINKFLAGS to compile in multi-threading mode
Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3,
boost/thread.hpp will trigger a #error if -pthread isn't used:
boost/config/requires_threads.hpp:47:5: #error "Compiler threading support
is not turned on. Please set the correct command line options for
threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
Based on _BOOST_PTHREAD_FLAG(): https://github.com/tsuna/boost.m4/blob/master/build-aux/boost.m4
'''
var = kw.get('uselib_store', 'BOOST')
self.start_msg('Checking the flags needed to use pthreads')
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# (none): in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -lpthreads: AIX (must check this before -lpthread)
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads)
# -pthreads: Solaris/GCC
# -mthreads: MinGW32/GCC, Lynx/GCC
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# -lpthread: GNU Linux, etc.
# --thread-safe: KAI C++
if Utils.unversioned_sys_platform() == 'sunos':
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
boost_pthread_flags = ['-pthreads', '-lpthread', '-mt', '-pthread']
else:
boost_pthread_flags = ['', '-lpthreads', '-Kthread', '-kthread', '-llthread', '-pthread',
'-pthreads', '-mthreads', '-lpthread', '--thread-safe', '-mt']
for boost_pthread_flag in boost_pthread_flags:
try:
self.env.stash()
self.env['CXXFLAGS_%s' % var] += [boost_pthread_flag]
self.env['LINKFLAGS_%s' % var] += [boost_pthread_flag]
self.check_cxx(code=PTHREAD_CODE, msg=None, use=var, execute=False, quiet=True)
self.end_msg(boost_pthread_flag)
return
except self.errors.ConfigurationError:
self.env.revert()
self.end_msg('none')
@conf
def check_boost(self, *k, **kw):
"""
Initialize boost libraries to be used.
Keywords: you can pass the same parameters as with the command line (without "--boost-").
Note that the command line has the priority, and should preferably be used.
"""
if not self.env['CXX']:
self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
params = {
'lib': k and k[0] or kw.get('lib', None),
'stlib': kw.get('stlib', None)
}
for key, value in self.options.__dict__.items():
if not key.startswith('boost_'):
continue
key = key[len('boost_'):]
params[key] = value and value or kw.get(key, '')
var = kw.get('uselib_store', 'BOOST')
if not self.env.DONE_FIND_BOOST_COMMON:
self.find_program('dpkg-architecture', var='DPKG_ARCHITECTURE', mandatory=False)
if self.env.DPKG_ARCHITECTURE:
deb_host_multiarch = self.cmd_and_log([self.env.DPKG_ARCHITECTURE[0], '-qDEB_HOST_MULTIARCH'])
BOOST_LIBS.insert(0, '/usr/lib/%s' % deb_host_multiarch.strip())
self.start_msg('Checking boost includes')
self.env['INCLUDES_%s' % var] = inc = self.boost_get_includes(**params)
versions = self.boost_get_version(inc)
self.env.BOOST_VERSION = versions[0]
self.env.BOOST_VERSION_NUMBER = int(versions[1])
self.end_msg('%d.%d.%d' % (int(versions[1]) / 100000,
int(versions[1]) / 100 % 1000,
int(versions[1]) % 100))
if Logs.verbose:
Logs.pprint('CYAN', ' path : %s' % self.env['INCLUDES_%s' % var])
self.env.DONE_FIND_BOOST_COMMON = True
if not params['lib'] and not params['stlib']:
return
if 'static' in kw or 'static' in params:
Logs.warn('boost: static parameter is deprecated, use stlib instead.')
self.start_msg('Checking boost libs')
path, libs, stlibs = self.boost_get_libs(**params)
self.env['LIBPATH_%s' % var] = [path]
self.env['STLIBPATH_%s' % var] = [path]
self.env['LIB_%s' % var] = libs
self.env['STLIB_%s' % var] = stlibs
self.end_msg(' '.join(libs + stlibs))
if Logs.verbose:
Logs.pprint('CYAN', ' path : %s' % path)
Logs.pprint('CYAN', ' shared libs : %s' % libs)
Logs.pprint('CYAN', ' static libs : %s' % stlibs)
def has_shlib(lib):
return params['lib'] and lib in params['lib']
def has_stlib(lib):
return params['stlib'] and lib in params['stlib']
def has_lib(lib):
return has_shlib(lib) or has_stlib(lib)
if has_lib('thread'):
# not inside try_link to make check visible in the output
self._check_pthread_flag(k, kw)
def try_link():
if has_lib('system'):
self.check_cxx(fragment=BOOST_ERROR_CODE, use=var, execute=False)
if has_lib('thread'):
self.check_cxx(fragment=BOOST_THREAD_CODE, use=var, execute=False)
if has_lib('log') or has_lib('log_setup'):
if not has_lib('thread'):
self.env['DEFINES_%s' % var] += ['BOOST_LOG_NO_THREADS']
if has_shlib('log') or has_shlib('log_setup'):
self.env['DEFINES_%s' % var] += ['BOOST_LOG_DYN_LINK']
if has_lib('log_setup'):
self.check_cxx(fragment=BOOST_LOG_SETUP_CODE, use=var, execute=False)
else:
self.check_cxx(fragment=BOOST_LOG_CODE, use=var, execute=False)
if params.get('linkage_autodetect', False):
self.start_msg('Attempting to detect boost linkage flags')
toolset = self.boost_get_toolset(kw.get('toolset', ''))
if toolset in ('vc',):
# disable auto-linking feature, causing error LNK1181
# because the code wants to be linked against
self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
# if no dlls are present, we guess the .lib files are not stubs
has_dlls = False
for x in Utils.listdir(path):
if x.endswith(self.env.cxxshlib_PATTERN % ''):
has_dlls = True
break
if not has_dlls:
self.env['STLIBPATH_%s' % var] = [path]
self.env['STLIB_%s' % var] = libs
del self.env['LIB_%s' % var]
del self.env['LIBPATH_%s' % var]
# we attempt to play with some known-to-work CXXFLAGS combinations
for cxxflags in (['/MD', '/EHsc'], []):
self.env.stash()
self.env['CXXFLAGS_%s' % var] += cxxflags
try:
try_link()
self.end_msg('ok: winning cxxflags combination: %s' % (self.env['CXXFLAGS_%s' % var]))
exc = None
break
except Errors.ConfigurationError as e:
self.env.revert()
exc = e
if exc is not None:
self.end_msg('Could not auto-detect boost linking flags combination, you may report it to boost.py author', ex=exc)
self.fatal('The configuration failed')
else:
self.end_msg('Boost linkage flags auto-detection not implemented (needed ?) for this toolchain')
self.fatal('The configuration failed')
else:
self.start_msg('Checking for boost linkage')
try:
try_link()
except Errors.ConfigurationError as e:
self.end_msg('Could not link against boost libraries using supplied options', 'YELLOW')
self.fatal('The configuration failed')
self.end_msg('ok')
@feature('cxx')
@after_method('apply_link')
def install_boost(self):
if install_boost.done or not Utils.is_win32 or not self.bld.cmd.startswith('install'):
return
install_boost.done = True
inst_to = getattr(self, 'install_path', '${BINDIR}')
for lib in self.env.LIB_BOOST:
try:
file = self.bld.find_file(self.env.cxxshlib_PATTERN % lib, self.env.LIBPATH_BOOST)
self.bld.install_files(inst_to, self.bld.root.find_node(file))
except:
continue
install_boost.done = False
+22
View File
@@ -0,0 +1,22 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
from waflib import TaskGen
def options(opt):
opt.add_option('--with-coverage', action='store_true', default=False,
help='Add compiler flags to enable code coverage information')
def configure(conf):
if conf.options.with_coverage:
if not conf.options.debug:
conf.fatal('Code coverage flags require debug mode compilation (add --debug)')
conf.check_cxx(cxxflags=['-fprofile-arcs', '-ftest-coverage', '-fPIC'],
linkflags=['-fprofile-arcs'], uselib_store='GCOV', mandatory=True)
@TaskGen.feature('cxx','cc')
@TaskGen.after('process_source')
def add_coverage(self):
if getattr(self, 'use', ''):
self.use += ' GCOV'
else:
self.use = 'GCOV'
+240
View File
@@ -0,0 +1,240 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import platform
from waflib import Configure, Logs, Utils
def options(opt):
opt.add_option('--debug', '--with-debug', action='store_true', default=False,
help='Compile in debugging mode with minimal optimizations (-Og)')
def configure(conf):
conf.start_msg('Checking C++ compiler version')
cxx = conf.env.CXX_NAME # generic name of the compiler
ccver = tuple(int(i) for i in conf.env.CC_VERSION)
ccverstr = '.'.join(conf.env.CC_VERSION)
errmsg = ''
warnmsg = ''
if cxx == 'gcc':
if ccver < (7, 4, 0):
errmsg = ('The version of gcc you are using is too old.\n'
'The minimum supported gcc version is 9.3.')
elif ccver < (9, 3, 0):
warnmsg = ('Using a version of gcc older than 9.3 is not '
'officially supported and may result in build failures.')
conf.flags = GccFlags()
elif cxx == 'clang':
if Utils.unversioned_sys_platform() == 'darwin':
if ccver < (10, 0, 0):
errmsg = ('The version of Xcode you are using is too old.\n'
'The minimum supported Xcode version is 12.4.')
elif ccver < (12, 0, 0):
warnmsg = ('Using a version of Xcode older than 12.4 is not '
'officially supported and may result in build failures.')
elif ccver < (7, 0, 0):
errmsg = ('The version of clang you are using is too old.\n'
'The minimum supported clang version is 7.0.')
conf.flags = ClangFlags()
else:
warnmsg = f'{cxx} compiler is unsupported'
conf.flags = CompilerFlags()
if errmsg:
conf.end_msg(ccverstr, color='RED')
conf.fatal(errmsg)
elif warnmsg:
conf.end_msg(ccverstr, color='YELLOW')
Logs.warn('WARNING: ' + warnmsg)
else:
conf.end_msg(ccverstr)
conf.areCustomCxxflagsPresent = len(conf.env.CXXFLAGS) > 0
# General flags are always applied (e.g., selecting C++ language standard)
generalFlags = conf.flags.getGeneralFlags(conf)
conf.add_supported_cxxflags(generalFlags['CXXFLAGS'])
conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
conf.env.DEFINES += generalFlags['DEFINES']
@Configure.conf
def check_compiler_flags(conf):
# Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
# corresponding environment variables are not set.
# DEFINES are always applied.
if conf.options.debug:
extraFlags = conf.flags.getDebugFlags(conf)
if conf.areCustomCxxflagsPresent:
missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS]
if missingFlags:
Logs.warn('Selected debug mode, but CXXFLAGS is set to a custom value "%s"'
% ' '.join(conf.env.CXXFLAGS))
Logs.warn('Default flags "%s" will not be used' % ' '.join(missingFlags))
else:
extraFlags = conf.flags.getOptimizedFlags(conf)
if not conf.areCustomCxxflagsPresent:
conf.add_supported_cxxflags(extraFlags['CXXFLAGS'])
conf.add_supported_linkflags(extraFlags['LINKFLAGS'])
conf.env.DEFINES += extraFlags['DEFINES']
@Configure.conf
def add_supported_cxxflags(self, cxxflags):
"""
Check which cxxflags are supported by the active compiler and add them to env.CXXFLAGS variable.
"""
if len(cxxflags) == 0:
return
self.start_msg('Checking supported CXXFLAGS')
supportedFlags = []
for flags in cxxflags:
flags = Utils.to_list(flags)
if self.check_cxx(cxxflags=['-Werror'] + flags, mandatory=False):
supportedFlags += flags
self.end_msg(' '.join(supportedFlags))
self.env.prepend_value('CXXFLAGS', supportedFlags)
@Configure.conf
def add_supported_linkflags(self, linkflags):
"""
Check which linkflags are supported by the active compiler and add them to env.LINKFLAGS variable.
"""
if len(linkflags) == 0:
return
self.start_msg('Checking supported LINKFLAGS')
supportedFlags = []
for flags in linkflags:
flags = Utils.to_list(flags)
if self.check_cxx(linkflags=['-Werror'] + flags, mandatory=False):
supportedFlags += flags
self.end_msg(' '.join(supportedFlags))
self.env.prepend_value('LINKFLAGS', supportedFlags)
class CompilerFlags:
def getCompilerVersion(self, conf):
return tuple(int(i) for i in conf.env.CC_VERSION)
def getGeneralFlags(self, conf):
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
return {
'CXXFLAGS': [],
'LINKFLAGS': [],
'DEFINES': ['BOOST_ASIO_NO_DEPRECATED', 'BOOST_FILESYSTEM_NO_DEPRECATED'],
}
def getDebugFlags(self, conf):
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in debug mode"""
return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['_DEBUG']}
def getOptimizedFlags(self, conf):
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in optimized mode"""
return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['NDEBUG']}
class GccClangCommonFlags(CompilerFlags):
"""
This class defines common flags that work for both gcc and clang compilers.
"""
def getGeneralFlags(self, conf):
flags = super().getGeneralFlags(conf)
flags['CXXFLAGS'] += ['-std=c++17']
if Utils.unversioned_sys_platform() != 'darwin':
flags['LINKFLAGS'] += ['-fuse-ld=lld']
return flags
__cxxFlags = [
'-fdiagnostics-color',
'-Wall',
'-Wextra',
'-Wpedantic',
'-Wenum-conversion',
'-Wextra-semi',
'-Wno-unused-parameter',
]
__linkFlags = ['-Wl,-O1']
def getDebugFlags(self, conf):
flags = super().getDebugFlags(conf)
flags['CXXFLAGS'] += ['-Og', '-g'] + self.__cxxFlags + [
'-Werror',
'-Wno-error=deprecated-declarations', # Bug #3795
'-Wno-error=maybe-uninitialized', # Bug #1615
]
flags['LINKFLAGS'] += self.__linkFlags
return flags
def getOptimizedFlags(self, conf):
flags = super().getOptimizedFlags(conf)
flags['CXXFLAGS'] += ['-O2', '-g1'] + self.__cxxFlags
flags['LINKFLAGS'] += self.__linkFlags
return flags
class GccFlags(GccClangCommonFlags):
__cxxFlags = [
'-Wcatch-value=2',
'-Wcomma-subscript', # enabled by default in C++20
'-Wduplicated-branches',
'-Wduplicated-cond',
'-Wlogical-op',
'-Wredundant-tags',
'-Wvolatile', # enabled by default in C++20
]
def getDebugFlags(self, conf):
flags = super().getDebugFlags(conf)
flags['CXXFLAGS'] += self.__cxxFlags
if platform.machine() == 'armv7l':
flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
return flags
def getOptimizedFlags(self, conf):
flags = super().getOptimizedFlags(conf)
flags['CXXFLAGS'] += self.__cxxFlags
if platform.machine() == 'armv7l':
flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
return flags
class ClangFlags(GccClangCommonFlags):
def getGeneralFlags(self, conf):
flags = super().getGeneralFlags(conf)
if Utils.unversioned_sys_platform() == 'darwin':
# Bug #4296
brewdir = '/opt/homebrew' if platform.machine() == 'arm64' else '/usr/local'
flags['CXXFLAGS'] += [
['-isystem', f'{brewdir}/include'], # for Homebrew
['-isystem', '/opt/local/include'], # for MacPorts
]
elif Utils.unversioned_sys_platform() == 'freebsd':
# Bug #4790
flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
return flags
__cxxFlags = [
'-Wundefined-func-template',
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
]
def getDebugFlags(self, conf):
flags = super().getDebugFlags(conf)
flags['CXXFLAGS'] += self.__cxxFlags
return flags
def getOptimizedFlags(self, conf):
flags = super().getOptimizedFlags(conf)
flags['CXXFLAGS'] += self.__cxxFlags
return flags
+214
View File
@@ -0,0 +1,214 @@
#! /usr/bin/env python
# encoding: UTF-8
# Thomas Nagy 2008-2010 (ita)
"""
Doxygen support
Variables passed to bld():
* doxyfile -- the Doxyfile to use
When using this tool, the wscript will look like:
def options(opt):
opt.load('doxygen')
def configure(conf):
conf.load('doxygen')
# check conf.env.DOXYGEN, if it is mandatory
def build(bld):
if bld.env.DOXYGEN:
bld(features="doxygen", doxyfile='Doxyfile', ...)
def doxygen(bld):
if bld.env.DOXYGEN:
bld(features="doxygen", doxyfile='Doxyfile', ...)
"""
from fnmatch import fnmatchcase
import os, os.path, re, stat
from waflib import Task, Utils, Node, Logs, Errors, Build
from waflib.TaskGen import feature
DOXY_STR = '"${DOXYGEN}" - '
DOXY_FMTS = 'html latex man rft xml'.split()
DOXY_FILE_PATTERNS = '*.' + ' *.'.join('''
c cc cxx cpp c++ java ii ixx ipp i++ inl h hh hxx hpp h++ idl odl cs php php3
inc m mm py f90c cc cxx cpp c++ java ii ixx ipp i++ inl h hh hxx
'''.split())
re_rl = re.compile('\\\\\r*\n', re.MULTILINE)
re_nl = re.compile('\r*\n', re.M)
def parse_doxy(txt):
tbl = {}
txt = re_rl.sub('', txt)
lines = re_nl.split(txt)
for x in lines:
x = x.strip()
if not x or x.startswith('#') or x.find('=') < 0:
continue
if x.find('+=') >= 0:
tmp = x.split('+=')
key = tmp[0].strip()
if key in tbl:
tbl[key] += ' ' + '+='.join(tmp[1:]).strip()
else:
tbl[key] = '+='.join(tmp[1:]).strip()
else:
tmp = x.split('=')
tbl[tmp[0].strip()] = '='.join(tmp[1:]).strip()
return tbl
class doxygen(Task.Task):
vars = ['DOXYGEN', 'DOXYFLAGS']
color = 'BLUE'
def runnable_status(self):
'''
self.pars are populated in runnable_status - because this function is being
run *before* both self.pars "consumers" - scan() and run()
set output_dir (node) for the output
'''
for x in self.run_after:
if not x.hasrun:
return Task.ASK_LATER
if not getattr(self, 'pars', None):
txt = self.inputs[0].read()
self.pars = parse_doxy(txt)
if not self.pars.get('OUTPUT_DIRECTORY'):
self.pars['OUTPUT_DIRECTORY'] = self.inputs[0].parent.get_bld().abspath()
# Override with any parameters passed to the task generator
if getattr(self.generator, 'pars', None):
for k, v in self.generator.pars.items():
self.pars[k] = v
self.doxy_inputs = getattr(self, 'doxy_inputs', [])
if not self.pars.get('INPUT'):
self.doxy_inputs.append(self.inputs[0].parent)
else:
for i in self.pars.get('INPUT').split():
if os.path.isabs(i):
node = self.generator.bld.root.find_node(i)
else:
node = self.generator.path.find_node(i)
if not node:
self.generator.bld.fatal('Could not find the doxygen input %r' % i)
self.doxy_inputs.append(node)
if not getattr(self, 'output_dir', None):
bld = self.generator.bld
# First try to find an absolute path, then find or declare a relative path
self.output_dir = bld.root.find_dir(self.pars['OUTPUT_DIRECTORY'])
if not self.output_dir:
self.output_dir = bld.path.find_or_declare(self.pars['OUTPUT_DIRECTORY'])
self.signature()
return Task.Task.runnable_status(self)
def scan(self):
exclude_patterns = self.pars.get('EXCLUDE_PATTERNS','').split()
file_patterns = self.pars.get('FILE_PATTERNS','').split()
if not file_patterns:
file_patterns = DOXY_FILE_PATTERNS
if self.pars.get('RECURSIVE') == 'YES':
file_patterns = ["**/%s" % pattern for pattern in file_patterns]
nodes = []
names = []
for node in self.doxy_inputs:
if os.path.isdir(node.abspath()):
for m in node.ant_glob(incl=file_patterns, excl=exclude_patterns):
nodes.append(m)
else:
nodes.append(node)
return (nodes, names)
def run(self):
dct = self.pars.copy()
dct['INPUT'] = ' '.join(['"%s"' % x.abspath() for x in self.doxy_inputs])
code = '\n'.join(['%s = %s' % (x, dct[x]) for x in self.pars])
code = code.encode() # for python 3
#fmt = DOXY_STR % (self.inputs[0].parent.abspath())
cmd = Utils.subst_vars(DOXY_STR, self.env)
env = self.env.env or None
proc = Utils.subprocess.Popen(cmd, shell=True, stdin=Utils.subprocess.PIPE, env=env, cwd=self.generator.bld.path.get_bld().abspath())
proc.communicate(code)
return proc.returncode
def post_run(self):
nodes = self.output_dir.ant_glob('**/*', quiet=True)
for x in nodes:
x.sig = Utils.h_file(x.abspath())
self.outputs += nodes
return Task.Task.post_run(self)
class tar(Task.Task):
"quick tar creation"
run_str = '${TAR} ${TAROPTS} ${TGT} ${SRC}'
color = 'RED'
after = ['doxygen']
def runnable_status(self):
for x in getattr(self, 'input_tasks', []):
if not x.hasrun:
return Task.ASK_LATER
if not getattr(self, 'tar_done_adding', None):
# execute this only once
self.tar_done_adding = True
for x in getattr(self, 'input_tasks', []):
self.set_inputs(x.outputs)
if not self.inputs:
return Task.SKIP_ME
return Task.Task.runnable_status(self)
def __str__(self):
tgt_str = ' '.join([a.nice_path(self.env) for a in self.outputs])
return '%s: %s\n' % (self.__class__.__name__, tgt_str)
@feature('doxygen')
def process_doxy(self):
if not getattr(self, 'doxyfile', None):
self.generator.bld.fatal('no doxyfile??')
node = self.doxyfile
if not isinstance(node, Node.Node):
node = self.path.find_resource(node)
if not node:
raise ValueError('doxygen file not found')
# the task instance
dsk = self.create_task('doxygen', node)
if getattr(self, 'doxy_tar', None):
tsk = self.create_task('tar')
tsk.input_tasks = [dsk]
tsk.set_outputs(self.path.find_or_declare(self.doxy_tar))
if self.doxy_tar.endswith('bz2'):
tsk.env['TAROPTS'] = ['cjf']
elif self.doxy_tar.endswith('gz'):
tsk.env['TAROPTS'] = ['czf']
else:
tsk.env['TAROPTS'] = ['cf']
def configure(conf):
'''
Check if doxygen and tar commands are present in the system
If the commands are present, then conf.env.DOXYGEN and conf.env.TAR
variables will be set. Detection can be controlled by setting DOXYGEN and
TAR environmental variables.
'''
conf.find_program('doxygen', var='DOXYGEN', mandatory=False)
conf.find_program('tar', var='TAR', mandatory=False)
# doxygen docs
from waflib.Build import BuildContext
class doxy(BuildContext):
cmd = "doxygen"
fun = "doxygen"
+22
View File
@@ -0,0 +1,22 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def options(opt):
opt.add_option('--with-sanitizer', action='store', default='', dest='sanitizers',
help='Comma-separated list of compiler sanitizers to enable [default=none]')
def configure(conf):
for san in conf.options.sanitizers.split(','):
if not san:
continue
sanflag = '-fsanitize=%s' % san
conf.start_msg('Checking if compiler supports %s' % sanflag)
if conf.check_cxx(cxxflags=['-Werror', sanflag, '-fno-omit-frame-pointer'],
linkflags=[sanflag], mandatory=False):
conf.end_msg('yes')
conf.env.append_unique('CXXFLAGS', [sanflag, '-fno-omit-frame-pointer'])
conf.env.append_unique('LINKFLAGS', [sanflag])
else:
conf.end_msg('no', color='RED')
conf.fatal('%s sanitizer is not supported by the current compiler' % san)
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/env python
# encoding: utf-8
# inspired by code by Hans-Martin von Gaudecker, 2012
import os
from waflib import Node, Task, TaskGen, Errors, Logs, Build, Utils
class sphinx_build(Task.Task):
color = 'BLUE'
run_str = '${SPHINX_BUILD} -D ${VERSION} -D ${RELEASE} -q -b ${BUILDERNAME} -d ${DOCTREEDIR} ${SRCDIR} ${OUTDIR}'
def __str__(self):
env = self.env
src_str = ' '.join([a.path_from(a.ctx.launch_node()) for a in self.inputs])
tgt_str = ' '.join([a.path_from(a.ctx.launch_node()) for a in self.outputs])
if self.outputs: sep = ' -> '
else: sep = ''
return'%s [%s]: %s%s%s\n'%(self.__class__.__name__.replace('_task',''),
self.env['BUILDERNAME'], src_str, sep, tgt_str)
@TaskGen.extension('.py', '.rst')
def sig_hook(self, node):
node.sig=Utils.h_file(node.abspath())
@TaskGen.feature("sphinx")
@TaskGen.before_method("process_source")
def apply_sphinx(self):
"""Set up the task generator with a Sphinx instance and create a task."""
inputs = []
for i in Utils.to_list(self.source):
if not isinstance(i, Node.Node):
node = self.path.find_node(node)
else:
node = i
if not node:
raise ValueError('[%s] file not found' % i)
inputs.append(node)
task = self.create_task('sphinx_build', inputs)
conf = self.path.find_node(self.config)
task.inputs.append(conf)
confdir = conf.parent.abspath()
buildername = getattr(self, 'builder', 'html')
srcdir = getattr(self, 'srcdir', confdir)
outdir = self.path.find_or_declare(getattr(self, 'outdir', buildername)).get_bld()
doctreedir = getattr(self, 'doctreedir', os.path.join(outdir.abspath(), '.doctrees'))
task.env['BUILDERNAME'] = buildername
task.env['SRCDIR'] = srcdir
task.env['DOCTREEDIR'] = doctreedir
task.env['OUTDIR'] = outdir.abspath()
task.env['VERSION'] = 'version=%s' % self.version
task.env['RELEASE'] = 'release=%s' % getattr(self, 'release', self.version)
import imp
confData = imp.load_source('sphinx_conf', conf.abspath())
if buildername == 'man':
for i in confData.man_pages:
target = outdir.find_or_declare('%s.%d' % (i[1], i[4]))
task.outputs.append(target)
if self.install_path:
self.bld.install_files('%s/man%d/' % (self.install_path, i[4]), target)
else:
task.outputs.append(outdir)
def configure(conf):
conf.find_program('sphinx-build', var='SPHINX_BUILD', mandatory=False)
# sphinx docs
from waflib.Build import BuildContext
class sphinx(BuildContext):
cmd = "sphinx"
fun = "sphinx"
+38
View File
@@ -0,0 +1,38 @@
# NLSR Authors
The following lists maintainers, primary developers, and all much-appreciated contributors to NLSR in alphabetical order.
The specific contributions of individual authors can be obtained from the git history of the [official NLSR repository](https://github.com/named-data/NLSR).
If you would like to become a contributor to the official repository, please follow the recommendations in <https://github.com/named-data/.github/blob/main/CONTRIBUTING.md>.
* Alexander Afanasyev <https://users.cs.fiu.edu/~afanasyev>
* Adam Alyyan <https://github.com/a64adam>
* Syed Obaid Amin <http://obaidamin.weebly.com/>
* Pedro David Arjona Villicaña <https://github.com/david-arjona>
* Muktadir R. Chowdhury <https://github.com/alvyC>
* Damian Coomes <https://github.com/dmcoomes>
* ***(Maintainer)*** Saurab Dulal <https://dulalsaurab.github.io>
* Laqin Fan <https://github.com/laqinfan>
* Simon Fayer <https://github.com/sfayer>
* ***(Former Maintainer)*** Ashlesh Gawande <https://www.linkedin.com/in/agawande>
* ***(Former Maintainer)*** Nicholas Gordon <https://github.com/gorgonical>
* ***(Former Maintainer)*** A. K. M. Mahmudul Hoque <https://sites.google.com/site/akmhoque/home>
* ***(Former Maintainer)*** Vince Lehman <http://vslehman.com>
* Tianxing Ma <https://github.com/matianxing1992>
* Spyridon Mastorakis <https://sites.google.com/site/spyridonmastorakis>
* Eric Newberry <https://ericnewberry.com>
* João Pereira <http://website.jpereira.co.uk>
* Davide Pesavento <https://github.com/Pesa>
* Md Ashiqur Rahman <https://ashiqrahman.com>
* Junxiao Shi <https://cs.arizona.edu/~shijunxiao>
* Salvatore Signorello <https://wwwen.uni.lu/snt/people/salvatore_signorello>
* Jiewen Tan <https://www.linkedin.com/in/jiewentan>
* Alejandro Gil Torres <https://github.com/gltorres>
* Ryan Wickman <http://rwickman.github.io>
* Yingdi Yu <https://irl.cs.ucla.edu/~yingdi>
* Minsheng Zhang <https://www.linkedin.com/in/minsheng-zhang-032023a1>
## Technical Advisors
* Lan Wang <http://www.cs.memphis.edu/~lanwang>
* Beichuan Zhang <https://cs.arizona.edu/~bzhang>
* Lixia Zhang <https://web.cs.ucla.edu/~lixia>
+703
View File
@@ -0,0 +1,703 @@
NLSR is licensed under the terms of the GNU General Public License,
version 3 or later.
NLSR relies on third-party software, licensed under the following licenses:
- The Boost libraries are licensed under the
[Boost Software License 1.0](https://www.boost.org/users/license.html)
- ndn-cxx is licensed under the terms of the
[GNU Lesser General Public License version 3](https://github.com/named-data/ndn-cxx/blob/master/COPYING.md)
- ChronoSync is licensed under the terms of the
[GNU General Public License version 3](https://github.com/named-data/ChronoSync/blob/master/COPYING.md)
- PSync is licensed under the terms of the
[GNU Lesser General Public License version 3](https://github.com/named-data/PSync/blob/master/COPYING.md)
- ndn-svs is licensed under the terms of the
[GNU Lesser General Public License v2.1](https://github.com/named-data/ndn-svs/blob/master/COPYING.md)
- The waf build system is licensed under the terms of the
[BSD license](https://github.com/named-data/NLSR/blob/master/waf)
The GPL license is provided below in this file.
For more information, see <https://www.gnu.org/licenses/>
--------------------------------------------------------------------------------
### GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
### Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom
to share and change all versions of a program--to make sure it remains
free software for all its users. We, the Free Software Foundation, use
the GNU General Public License for most of our software; it applies
also to any other work released this way by its authors. You can apply
it to your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you
have certain responsibilities if you distribute copies of the
software, or if you modify it: responsibilities to respect the freedom
of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so. This is fundamentally incompatible with the
aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products. If such problems arise substantially in
other domains, we stand ready to extend this provision to those
domains in future versions of the GPL, as needed to protect the
freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish
to avoid the special danger that patents applied to a free program
could make it effectively proprietary. To prevent this, the GPL
assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS
#### 0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a "modified version" of
the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays "Appropriate Legal Notices" to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
#### 1. Source Code.
The "source code" for a work means the preferred form of the work for
making modifications to it. "Object code" means any non-source form of
a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same
work.
#### 2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10 makes
it unnecessary.
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
#### 4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
#### 5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
- a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
- b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to "keep intact all notices".
- c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
- d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
#### 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
- a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
- b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
- c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
- d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
- e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
"normally used" refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
#### 7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
- a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
- b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
- c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
- d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or
- e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
- f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
#### 8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
#### 9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
#### 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
#### 11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
#### 12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree to
terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
#### 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
#### 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU General Public
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that numbered version or
of any later version published by the Free Software Foundation. If the
Program does not specify a version number of the GNU General Public
License, you may choose any version ever published by the Free
Software Foundation.
If the Program specifies that a proxy can decide which future versions
of the GNU General Public License can be used, that proxy's public
statement of acceptance of a version permanently authorizes you to
choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
#### 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
#### 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#### 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively state
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper
mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands \`show w' and \`show c' should show the
appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. For more information on this, and how to apply and follow
the GNU GPL, see <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
GNU Lesser General Public License instead of this License. But first,
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
-34
View File
@@ -1,34 +0,0 @@
CC = gcc
CFLAGS = -Wall -gdwarf-2 -g3
LIBS = -lccn -lccnsync -lcrypto
PROGRAMS = nlsrc nlsr
INSTALL_PATH=/usr/local/bin/
NLSR_SRCS=nlsr.c nlsr_ndn.c nlsr_npl.c nlsr_adl.c nlsr_lsdb.c nlsr_route.c nlsr_npt.c nlsr_fib.c nlsr_sync.c nlsr_face.c nlsr_km.c nlsr_km_util.c utility.c
NLSRC_SRCS=nlsrc.c
all: $(PROGRAMS)
nlsr: $(NLSR_SRCS)
$(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr
nlsrc: $(NLSRC_SRCS)
$(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc
install: $(PROGRAMS)
cp $(PROGRAMS) $(INSTALL_PATH)
cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS)
uninstall:
cd $(INSTALL_PATH); rm -f $(PROGRAMS)
clean:
rm -f *.o
rm -f $(PROGRAMS)
rm -rf *.dSYM
.c.o:
$(CC) $(CFLAGS) -c $<
.PHONY: all clean
-126
View File
@@ -1,126 +0,0 @@
Installation:
1: Getting NLSR:
https://github.com/NDN-Routing/NLSR0.0
2: run make to compile.
3: Start ccnx daemon (ccnd) and Repo (ccnr).
4: Add '/ndn/keys' route to your neighboring testbed nodes.
This can be done by adding routes in your ccnd.conf to all neigbors,
e.g.
add /ndn/keys udp 10.0.XX.XX
add /ndn/keys udp 10.0.YY.YY ...
add /ndn/keys udp 10.0.ZZ.ZZ
5: Create your keys and publish them through repo. Please have
a look at https://github.com/named-data/ndn-testbed-key-suite for details.
6: create a nlsr configuration file, have a look at
macbook.conf and 'Configuration Parameters' section for details
7: start nlsr
Configuration Parameter:
1. router-name </name/prefix/of/the/router>
It is a required configuration parameter that is used to set the router name.
Name prefix of the router must start with `/ndn' and followed by a strict
hierarchical order of name components up to the hostname of the router. For
e.g. if router has a hostname host.dept.org.edu pollux.cs.memphis.edu then the
router name can be `/ndn/org.edu/dept/host..
2. ccnneighbor </name/prefix/of/neighbor> [neighbor_ip_addrr]
This parameter is used to configure the neighboring router. Name prefix of a
neighbor must start with `/ndn. and followed by a strict hierarchical order of
name component as mentioned for router-name. If a router has a neighbor having
hostname `neighbor.dept.org.edu' then configuration command would be
`ccnneighbor /ndn/org.edu/dept/neighbor. The optional parameter,
[neighbor_ip_addrr], can be provided for explicitly connecting to a given
IP. This is useful if there is no entry of the hostname in the DNS.
3. ccnname </name/prefix/to/be/advertised>
ccnname is used to advertise the name prefix of the services hosted by the
router. Name prefix must follow the ccnx naming convention.
4. topo-prefix <name/prefix/of/repo/topo>
It is used to configure the topological prefix of the `sync. slice created for
nlsr in a repo. Prefix must follow the ccnx naming convention. Default value
for topo prefix is `/ndn/routing/nlsr'
5. slice-prefix <name/prefix/of/repo/slice>
This parameter is used to set the sync's slice prefix. All nlsr nodes `must'
have the same slice prefix and must follow the ccnx naming convention. Default
value for slice prefix is `/ndn/routing/nlsr/LSA'
6. lsa-refresh-time <sec>
It is the time in seconds, after which router will refresh its LSAs. Default
value = 1800 sec, Min = 240 sec
7. router-dead-interval <sec>
It is the time after which router will consider its neighbor dead if it does
not hear anything for that amount of time. If an LSA generated by neighbor has
a lifetime greater than router-dead-interval then router will simply discard
the LSA and update name prefix table, routing table and ccnd FIB accordingly.
Default value = 3600 sec, Min = 360 sec.
8. interest-retry <number>
interest-retry is maximum number of times a router will send same interest if
the interest is timed out. Default = 3, Min =1 and Max = 10
9. interest-resend-time <sec>
When an interest is timed out, NLSR waits for `interest-resend-time. before
sending another interest. The interest is retransmitted up to the value of
`interest-retry.. If the interest doesn.t get satisfied during this time the
neighbor will be considered as dead. Default value = 15 sec, Min = 1 sec, Max =
60 sec
10. max-faces-per-prefix <number>
By default NLSR calculates and add faces for all available faces to a prefix.
Number of faces can be restricted with this parameter, if this is configured
NLSR will add <number> or faces per prefixes in ccnd FIB.
11. debug <on/off>
Enable nlsr debugging by printing out detail messages on the standard output.
By default it is off.
12. logdir </directory/for/logging/>
NLSR will start writing log in logdir folder. If logdir is not configured NLSR
will create a log directory name nlsrLog in user home directory and write log
into that folder.
13. tunnel-type <udp | tcp>
This is used to specify the tunnel type that NLSR should create for building an
overlay network. By default NLSR creates udp tunnels.
**Following Commands are only required for hyperbolic routing**
14. hyperbolic-routing <on|dry_run>
This option enables hyperbolic routing. With option on, link state routing
doesn't work while with dry_run option route is calculated by Link State
routing and hyperbolic routes are just recorded only in log file.Following
field is required if hyperbolic routing is on.
15. hyperbolic-cordinate <radius> <theta>
Polar coordinates of a node in a form of radius and theta. Currently, calculation
of the polar coordinates is an offline process and done by
the operator of a site.
** Hyperbolic Commands End here **
16. keystore-path </path/to/keystore/file name(.ccnx_keystore)>
Path to the keystore. The keystore folder is usually created by
ccninitkeystore. Keys in this folder will be used by NLSR to sign the packets.
17. root-key-prefix </key/prefix>
Name prefix of the root key; the site key should be signed by this key.
e.g. root-key-prefix /ndn/keys
18. site-name </name/prefix/of/site>
Name of the site of which this router is a part.
19. network </name/of/network>
Name of the networks router belongs to
+40
View File
@@ -0,0 +1,40 @@
# Notes for NLSR developers
If you are new to the NDN software community, please read our
[Contributor's Guide](https://github.com/named-data/.github/blob/main/CONTRIBUTING.md).
## Licensing requirements
Contributions to NLSR must be licensed under the GPL v3 or a compatible license.
If you choose the GPL v3, please use the following license boilerplate in all `.hpp`
and `.cpp` files:
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) [Year(s)], [Copyright Holder(s)].
*
* This file is part of NLSR (Named-data Link State Routing).
* See AUTHORS.md for complete list of NLSR authors and contributors.
*
* NLSR is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
If you are affiliated with an NSF-supported NDN project institution, please use the [NDN Team License
Boilerplate](https://redmine.named-data.net/projects/nlsr/wiki/NDN_Team_License_Boilerplate_(NLSR)).
## Recommendations
NLSR code is subject to the code style defined
[here](https://redmine.named-data.net/projects/nfd/wiki/CodeStyle).
NLSR Developer's guide can be found
[here](https://github.com/named-data/NLSR/blob/developers-guide/NLSR-Developers-Guide.pdf).
+51
View File
@@ -0,0 +1,51 @@
# NLSR: Named Data Link State Routing Protocol
[![CI](https://github.com/named-data/NLSR/actions/workflows/ci.yml/badge.svg)](https://github.com/named-data/NLSR/actions/workflows/ci.yml)
[![Docs](https://github.com/named-data/NLSR/actions/workflows/docs.yml/badge.svg)](https://github.com/named-data/NLSR/actions/workflows/docs.yml)
![Language](https://img.shields.io/badge/C%2B%2B-17-blue)
![Latest version](https://img.shields.io/github/v/tag/named-data/NLSR?label=Latest%20version)
> For more extensive documentation, please visit the [NLSR homepage](https://docs.named-data.net/NLSR/current/).
## 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](https://github.com/named-data/NFD). NLSR continues to
evolve alongside the core [NDN protocol](https://docs.named-data.net/NDN-packet-spec/current/).
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 team](
https://named-data.net/project/participants/). See [`AUTHORS.md`](AUTHORS.md) for details.
## Source releases
The source code and installation instructions are available at the following locations:
- [Installation](https://docs.named-data.net/NLSR/current/INSTALL.html)
- [Getting started with NLSR](https://docs.named-data.net/NLSR/current/GETTING-STARTED.html)
- [NLSR GitHub repository](https://github.com/named-data/NLSR)
## Reporting bugs
Please submit any bug reports or feature requests to the
[NLSR issue tracker](https://redmine.named-data.net/projects/nlsr/issues).
## Additional resources
- [Contributor's Guide](https://github.com/named-data/.github/blob/main/CONTRIBUTING.md)
- [NLSR Wiki](https://redmine.named-data.net/projects/nlsr/wiki)
- [NLSR Issue Tracker](https://redmine.named-data.net/projects/nlsr/issues)
- [NLSR Mailing List Sign Up](https://listserv.memphis.edu/scripts/wa.exe?GETPW1)
- [NLSR Mailing List](https://listserv.memphis.edu/scripts/wa.exe?SUBED1=NLSR-HELP-L&A=1)
- [NLSR Mailing List Archives](https://listserv.memphis.edu/scripts/wa.exe?A0=NLSR-HELP-L)
- [NLSR Developer's guide](https://github.com/named-data/NLSR/blob/developers-guide/NLSR-Developers-Guide.pdf)
## License
NLSR is free software distributed under the GNU General Public License version 3.
See [`COPYING.md`](COPYING.md) for details.
+87
View File
@@ -0,0 +1,87 @@
Getting Started with NLSR
=========================
.. toctree::
..
Getting Source
--------------
- `GitHub NLSR repository <https://github.com/named-data/NLSR>`__
Installation
------------
:doc:`INSTALL`
Important Notes About Configuration
-----------------------------------
Since v0.4.0, NLSR no longer creates Faces for the neighbors that are
specified in ``nlsr.conf``. Instead, it relies on the pre-existence of
the Faces in NFD. NLSR will obtain this information from NFD, and
configure its neighbors using this information.
For users who were relying on NLSR to automagically configure their networks,
this must now be done with ``nfdc``. See ``man nfdc`` for its documentation
(`online version <https://docs.named-data.net/NFD/current/manpages/nfdc.html>`__).
Configuration
-------------
After installing NLSR from source, you need to create a configuration file for
NLSR. Please take a look at :doc:`manpages/nlsr.conf` for a sample configuration. For
details on configuring a router, please refer to :doc:`ROUTER-CONFIG`. For details on
security configuration, please refer to :doc:`SECURITY-CONFIG`.
Running
-------
Run nlsr with the following command:
::
nlsr
NLSR will look for the default configuration file, ``nlsr.conf``, in the current directory.
You can also run ``nlsr -f`` with the absolute path of the configuration file:
::
nlsr -f /usr/local/etc/ndn/nlsr.conf
Logging
-------
NLSR uses the ndn-cxx logging facility. All levels listed below the selected log-level
value are enabled.
::
Valid values:
TRACE trace messages (most verbose)
DEBUG debugging messages
INFO informational messages
WARN warning messages
ERROR error messages
FATAL fatal (will be logged unconditionally)
To obtain logs for NLSR, set the ``NDN_LOG`` environment variable with the correct prefix
and log-level settings. For example, running the following command will display all log
messages in NLSR with a DEBUG level or below.
.. code-block:: sh
NDN_LOG='nlsr.*=DEBUG' nlsr
If the user is presented with an error message "User does not have read and write
permission on the directory" it can be circumvented by running the application with sudo:
.. code-block:: sh
sudo env NDN_LOG='nlsr.*=DEBUG' nlsr
See ``man ndn-log`` for more details (`online version
<https://docs.named-data.net/ndn-cxx/current/manpages/ndn-log.html>`__).
+61
View File
@@ -0,0 +1,61 @@
NLSR Installation Instructions
==============================
.. toctree::
..
Prerequisites
-------------
- `NFD <https://github.com/named-data/NFD>`__ and its dependencies.
Check out the `documentation <https://docs.named-data.net/NFD/current/INSTALL.html>`__
for detailed installation and running instructions.
- PSync library [optional but recommended, enabled by default]
Download the PSync library and build it according to the instructions available at
https://github.com/named-data/PSync#build
- ChronoSync library [optional, deprecated]
For testing purposes, NLSR can be optionally built with ChronoSync support. Download
the ChronoSync library and build it according to the instructions available at
https://github.com/named-data/ChronoSync#build
- SVS library [optional]
NLSR can be used with State Vector Sync as the underlying Sync protocol. Download
the ndn-svs library and build it according to the instructions available at
https://github.com/named-data/ndn-svs#installation
Note that at least one Sync library must be enabled.
Build
-----
Execute the following commands to build NLSR:
.. code-block:: sh
./waf configure
./waf
sudo ./waf install
Refer to ``./waf --help`` for more options that can be used during the configure stage and
how to properly configure NLSR.
If your pkgconfig path is not set properly, you can do the following before running ``./waf
configure``:
.. code-block:: sh
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
# or
export PKG_CONFIG_PATH=/path/to/pkgconfig/on/your/machine
If ChronoSync support is desired, NLSR needs to be configured with the following option:
.. code-block:: sh
./waf configure --with-chronosync
+301
View File
@@ -0,0 +1,301 @@
Router Configuration
====================
.. toctree::
..
Example network and sample configuration
----------------------------------------
Assume that three routers in the same network, but at three different sites
(``memphis.edu``, ``arizona.edu``, and ``colostate.edu``), are connected to each other to
construct the following topology:
::
+-------------------------------------+
| /ndn/edu/memphis/%C1.Router/router1 |
+-------------------------------------+
/ 11 12\
/ \
route-cost = 25 / \ route-cost = 30
/ \
17 / \ 13
+-----------------------------------+ 7 10 +-------------------------------------+
|/ndn/edu/arizona/%C1.Router/router3|-------------------|/ndn/edu/colostate/%C1.Router/router2|
+-----------------------------------+ route-cost = 28 +-------------------------------------+
Figure: Network Topology
The number represents the connecting face id. For example,
``/ndn/edu/memphis/%C1.Router/router1`` is connected to
``/ndn/edu/arizona/%C1.Router/router3`` via face 11 and the route cost is 25. To reach
``/ndn/edu/colostate/%C1.Router/router2`` via face 12, the route cost is 30.
We will walk through setting up the faces and creating the configuration file for
``/ndn/edu/memphis/%C1.Router/router1``.
It is recommended to configure security as described at :doc:`SECURITY-CONFIG`, before
starting router configuration.
Step 1. Ensuring nfd is running
-------------------------------
Type the following in the terminal:
::
nfd-status
If you see ``error while connecting to the forwarder (No such file or directory)``,
``nfd`` is not running. Follow the instructions in `Getting started with NFD
<https://docs.named-data.net/NFD/current/INSTALL.html>`_ to run nfd.
Since v0.4.0, NLSR no longer creates Faces for the neighbors that are
specified in ``nlsr.conf``. Instead, it relies on the pre-existence of
the Faces in NFD. NLSR will obtain this information from NFD, and
configure its neighbors using this information.
To create faces it is now necessary to use the ``nfdc`` command. See ``man nfdc`` for
its documentation (`online version <https://docs.named-data.net/NFD/current/manpages/nfdc.html>`__).
Step 2. Determining FaceUri
---------------------------
Assume that ``/ndn/edu/arizona/%C1.Router/router3`` has hostname ``router3.arizona.edu`` and
``/ndn/edu/colostate/%C1.Router/router2`` has IP address ``79.123.10.145``.
``/ndn/edu/memphis/%C1.Router/router1`` will consider FaceUri
``udp4://router3.arizona.edu`` for router ``/ndn/edu/arizona/%C1.Router/router3`` and
FaceUri ``udp4://79.123.10.145`` for router ``/ndn/edu/colostate/%C1.Router/router2``.
Step 3: Creating configuration file
-----------------------------------
Now, assume that ``/ndn/memphis.edu/router1`` wants to advertise three name prefixes
(``/ndn/memphis/sports/basketball/grizzlies``, ``/ndn/memphis/entertainment/blues``,
``/ndn/news/memphis/politics/lutherking``). The configuration file with the necessary
configuration commands follows:
::
; nlsr.conf starts here
; the general section contains all the general settings for router
general
{
; mandatory configuration command section network, site and router
network /ndn/ ; name of the network the router belongs to in ndn URI format
site /edu/memphis/ ; name of the site the router belongs to in ndn URI format
router /%C1.Router/router1 ; name of the network the router belongs to in ndn URI format
; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs
lsa-refresh-time 1800 ; default value 1800. Valid values 240-7200
; InterestLifetime (in seconds) for LSA fetching
lsa-interest-lifetime 4 ; default value 4. Valid values 1-60
state-dir /var/lib/nlsr/ ; state directory to store all dynamic changes to NLSR
}
; the neighbors section contains the configuration for router's neighbors and hello's behavior
neighbors
{
; in case hello interest timed out, router will try 'hello-retries' times at 'hello-time-out'
; seconds interval before giving up for any neighbors (deciding link is down)
hello-retries 3 ; interest retries number in integer. Default value 3
; valid values 1-10
hello-timeout 1 ; interest time out value in integer. Default value 1
; Valid values 1-15
hello-interval 60 ; interest sending interval in seconds. Default value 60
; valid values 30-90
; adj-lsa-build-interval is the time to wait in seconds after an Adjacency LSA
; build is scheduled before actually building the Adjacency LSA
adj-lsa-build-interval 5 ; default value 5. Valid values 0-5. It is recommended that
; adj-lsa-build-interval have a lower value than
; routing-calc-interval
; first-hello-interval is the time to wait in seconds before sending the first Hello Interest
first-hello-interval 10 ; Default value 10. Valid values 0-10
; neighbor command is used to configure router's neighbor. Each neighbor will need
; one block of neighbor command
neighbor
{
name /ndn/edu/arizona/%C1.Router/router3 ; name prefix of the neighbor router consists
; of network, site-name and router-name
face-uri udp4://router3.arizona.edu ; face uri of the face connected to the neighbor
link-cost 25 ; cost of the connecting link to neighbor
}
neighbor
{
name /ndn/edu/colostate/%C1.Router/router2 ; name prefix of the neighbor router consists
; of network, site-name and router-name
face-uri udp4://79.123.10.145 ; face uri of the face connected to the neighbor
link-cost 30 ; cost of the connecting link to neighbor
}
}
; the hyperbolic section contains the configuration settings of enabling
a router to calculate ; routing table using `hyperbolic routing table
calculation`_ method
hyperbolic
{
; commands in this section follows a strict order
; the switch is used to set hyperbolic routing calculation in NLSR
state off ; default value 'off', set value 'on' to enable hyperbolic routing table
; calculation which turns link state routing 'off'. set value to 'dry-run'
; to test hyperbolic routing and compare with link state routing.
radius 123.456 ; radius of the router in hyperbolic coordinate system
angle 1.45 ; angle of the router in hyperbolic coordinate system
}
; the fib section is used to configure fib entry's type to ndn FIB updated by NLSR
fib
{
; the max-faces-per-prefix is used to limit the number of faces for each name prefixes
; by NLSR in ndn FIB
max-faces-per-prefix 3 ; default value 0. Valid value 0-60. By default (value 0) NLSR adds
; all available faces for each reachable name prefixes in NDN FIB
}
; the advertising section contains the configuration settings of the
name prefixes ; hosted by this router
advertising
{
; the ndnname is used to advertised name from the router. To advertise each name prefix
; configure one block of ndnname configuration command for every name prefix.
prefix /ndn/memphis/sports/basketball/grizzlies
prefix /ndn/memphis/entertainment/blues
prefix /ndn/news/memphis/politics/lutherking
}
By default NLSR's sequence file directory is set to ``/var/lib/nlsr/``. User must create this
directory before starting NLSR. Since this is a system directory, NLSR must either be executed
as root, or NLSR can be run as user "nlsr" after configuring the filesystem to grant "nlsr"
read and write permissions. If user lacks permissions, the following error will occur:
::
User does not have read and write permission on the directory
Error in configuration file processing! Exiting from NLSR
To avoid this, the directory can be set in a user-owned directory. For example:
::
general
{
...
state-dir /home/username/nlsr/log ; path for sequence directory and other dynamic changes (Absolute path)
}
...
The user will encounter errors such as the following if security is not configured:
::
Cannot read certificate from file: /home/username/NLSR/root.cert
To get rid of this and similar errors relating to security one has to configure security
as described in :doc:`SECURITY-CONFIG`. Security can be disabled for testing purposes as follows:
::
...
trust-anchor
{
type any
;file-name "root.cert"
}
...
trust-anchor
{
type any
;file-name "site.cert"
}
; cert-to-publish "root.cert"
; cert-to-publish "router.cert"
; cert-to-publish "site.cert"
; cert-to-publish "router.cert"
Or by simply replacing the whole security section with:
::
security
{
validator
{
trust-anchor
{
type any
}
}
prefix-update-validator
{
trust-anchor
{
type any
}
}
}
Step 4: Running NLSR on /ndn/memphis.edu/router1
-------------------------------------------------
Assuming the configuration file is saved as ``nlsr.conf``, type the following to run nlsr:
::
$ nlsr -f nlsr.conf
NLSR will look for nlsr.conf in the current directory. If nlsr.conf is not in the current
directory, please provide the absolute path with the file name as the value. If
``nlsr.conf`` resides in ``/home/ndnuser/configuration`` directory, type ``nlsr -f
/home/ndnuser/configuration/nlsr.conf`` to run nlsr.
The same process needs to be followed for ``/ndn/arizona.edu/router3`` and
``/ndn/colostate.edu/router2`` to run NLSR on these routers.
Expected Output
----------------
Assuming that all three routers are configured correctly and routing has converged,
``nfd-status`` in ``/ndn/edu/colostate/%C1.Router/router2`` will have the following (or similar)
entries for the name advertised by ``/ndn/edu/memphis/%C1.Router/router1``:
RIB:
::
/ndn/memphis/entertainment/blues route={faceid=17 (origin=128 cost=25 ChildInherit), faceid=7 (origin=128 cost=58 ChildInherit)}
/ndn/memphis/sports/basketball/grizzlies route={faceid=17 (origin=128 cost=25 ChildInherit), faceid=7 (origin=128 cost=58 ChildInherit)}
/ndn/news/memphis/politics/lutherking route={faceid=17 (origin=128 cost=25 ChildInherit, faceid=7 (origin=128 cost=58 ChildInherit)}
This output can be seen by typing ``nfdc route list`` in the terminal. Please refer to the
network figure for face IDs.
.. _hyperbolic routing table calculation: http://arxiv.org/abs/0805.1266
+70
View File
@@ -0,0 +1,70 @@
Security Configuration
=======================
.. toctree::
..
The trust model of NLSR is semi-hierarchical. An example certificate signing hierarchy is:
::
root
|
+--------------+---------------+
site1 site2
| |
+---------+---------+ +
operator1 operator2 operator3
| | |
+-----+-----+ +----+-----+ +-----+-----+--------+
router1 router2 router3 router4 router5 router6 router7
| | | | | | |
+ + + + + + +
NLSR NLSR NLSR NLSR NLSR NLSR NLSR
Each entity's name and corresponding certificate name follow the
convention below:
======== ===================================================== ================================= ===============================================
Entity Identity Name Example Certificate Name Example
-------- ----------------------------------------------------- --------------------------------- -----------------------------------------------
root /\<network\> /ndn /ndn/KEY/1/%00/%01
site /\<network\>/\<site\> /ndn/edu/ucla /ndn/edu/ucla/KEY/2/%00/%01
operator /\<network\>/\<site\>/%C1.Operator/\<operator-name\> /ndn/edu/ucla/%C1.Operator/op1 /ndn/edu/ucla/%C1.Operator/op1/KEY/3/%00/%01
router /\<network\>/\<site\>/%C1.Router/\<router-name\> /ndn/edu/ucla/%C1.Router/rt1 /ndn/edu/ucla/%C1.Router/rt1/KEY/4/%00/%01
NLSR /\<network\>/\<site\>/%C1.Router/\<router-name\>/NLSR /ndn/edu/ucla/%C1.Router/rt1/NLSR /ndn/edu/ucla/%C1.Router/rt1/NLSR/KEY/5/%00/%01
======== ===================================================== ================================= ===============================================
Users should create keys according to the naming and signing hierarchies above. The
``%C1.Operator`` and ``%C1.Router`` labels are NDN keywords that should not be modified
by the user.
.. note::
Detailed information about key setup is given in NLSR Developer's Guide and the
:doc:`beginners-guide`.
Certificate Publishing
----------------------
In a network, every router should have the root certificate configured as a trust
anchor. For each site, at least one router should publish the site certificate, and at
least one router should publish the certificate of the site operator. Each router should
publish its own certificate. All this information should be explicitly specified in the
nlsr.conf file. For example, the following configuration file indicates that NLSR should
publish the site certificate and the router certificate:
::
...
security
{
validator
{
...
}
cert-to-publish "site.cert" ; name of the file which contains the site certificate (optional).
cert-to-publish "router.cert" ; name of the file which contains the router certificate (required).
...
}
+887
View File
@@ -0,0 +1,887 @@
==========================================================
A beginners guide to installing and testing NLSR on Fedora
==========================================================
:Authors: David Arjona-Villicaña, Octavio Renteria-Vidales, Ashlesh Gawande
:Date: November, 2018
:Abstract: This is an easy to follow guide on how to install and test the NLSR routing protocol for NDN using two Fedora 28 machines. The commands and the paths used in this guide have been tested only in Fedora, although a similar procedure should be used for other linux systems. Specifically, the testing section (§ `5 <#test>`__) is platform independent. Therefore users who have NLSR already installed may skip to this section. Since neither NDN, NLSR nor Fedora are static software developments, it is expected that some commands and features in this guide will change over time. However, this guide is as accurate as it could be at the time it was published.
.. role:: raw-latex(raw)
:format: latex
.. _intro:
1. Introduction
===============
The following instructions are based on the information provided at the
Named Data Networking project web page [NDNmain]_.
Before installing NLSR it is necessary to install different libraries and
programs: ndn-cxx, NFD, ChronoSync [optional], ndn-svs [optional] and PSync.
This document describes the necessary steps to correctly install these
programs (§ `2 <#ndncxx>`__, `3 <#nfd>`__ and `4 <#nlsr>`__) and a brief
guide on how to configure and test NLSR using a simple two-node
network (§ `5 <#test>`__).
Many of the commands in this guide need to be executed as *root*.
Starting from Fedora 28, there is no need to set a root user
[Kolman2018]_. However it is possible to define it,
using the following command:
::
$ sudo -i
And then using the ``passwd`` command to set up a password. After setting
up the root user, it is possible to become root by employing the
following command and providing the root password when prompted:
::
$ su -
Fedora employs the ``dnf`` command to install and verify installed
packages. The following commands may become useful during the
installation process and should be executed as root:
- To verify that all installed packages are up to date
::
$ dnf update
- To verify if a package is already installed in the system
::
$ dnf list --installed <package-name>
- To search for information about a package or family of packages (not
necessarily installed in the system).
::
$ dnf info <package-name>
- To install a package in the system.
::
$ dnf install <package-name>
It is also a good installation practice to download and install all the
NDN programs in a common directory. Therefore, it is recommended to
create a directory at the home directory where all the following
programs may get installed. The name of this directory is not important.
However, the following are provided as suggestions: project, NDNproject,
NDNprograms. Each of the programs in the following sections should be
downloaded to their own directory using the ``git`` command, and then
compiled in this directory.
.. _ndncxx:
2. Installing ndn-cxx
=====================
2.1 Before installing ndn-cxx
-----------------------------
An updated list of the packages and programs that need to be installed
before installing ndn-cxx, is provided at [NDN-cxx]_.
This list is also reproduced below with the commands to verify that all
the packages have been installed in the system. The following commands
should be run as root:
#. gcc and gcc-c++
::
$ dnf list --installed gcc
$ dnf list --installed gcc-c++
#. Python version 3.8 or later
::
$ python3 -V
#. SQLite 3.x
::
$ dnf list --installed sqlite-devel
#. OpenSSL version 1.1.1 or later
::
$ dnf list --installed openssl-devel
#. pkgconf that replaces pkg-config
::
$ dnf list --installed pkgconf*
#. Boost libraries version 1.71.0 or later
::
$ dnf list --installed boost-devel
#. git
::
$ dnf list --installed git
#. doxygen (optional)
::
$ dnf list --installed doxygen
#. graphviz (optional)
::
$ dnf list --installed graphviz
#. python3-pip (optional)
::
$ dnf list --installed python3-pip
#. After verifying that the python3-pip package has been installed, it
is necessary to run the following command:
::
$ pip install sphinx sphinxcontrib-doxylink
2.2 Downloading and installing ndn-cxx
--------------------------------------
The ``git`` command allows to download the ndn-cxx library in its own
folder, also called *ndn-cxx*. Therefore it is recommended to execute
this command at the directory created at § `1 <#intro>`__:
::
$ git clone --depth 1 https://github.com/named-data/ndn-cxx.git
Move to the ndn-cxx directory:
::
$ cd ndn-cxx
Use the following command to verify that everything is ready to compile.
If an error message displays, it is necessary to fix it before
continuing:
::
$ ./waf configure --with-examples
Compile the ndn-cxx library and install the compiled files at the
system's directories:
::
$ ./waf
$ sudo ./waf install
2.3 Configuring ndn-cxx
-----------------------
The commands in this subsection need to be run as root. First, it is
necessary to create file *local.conf*, which contains a line with the
location for the ndn-cxx library:
::
$ echo /usr/local/lib64 >> /etc/ld.so.conf.d/local.conf
The following command configures the libraries:
::
$ ldconfig -v | grep ndn
This command should display a line similar to the following:
::
libndn-cxx.so.0.6.1 -> libndn-cxx.so.0.6.1
Configure the NDN path:
::
$ echo export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig >> /etc/profile.d/ndn.sh
After this command has been executed, it is necessary to apply the
changes by either logging out and back in, and then running the
following command:
::
$ printenv | grep PKG
Or by executing the following command:
::
$ ./etc/profile.d/ndn.sh
For more information and examples about how to compile and configure
this library, users should read the ndn-cxx guide at
[NDN-cxx]_.
.. _nfd:
3. Installing NFD
=================
3.1 Before installing NFD
-------------------------
An updated list of the packages and programs that need to be installed
before NFD is provided at [NDNNFD]_. Before installing
NFD it is necessary to verify that the following packages are installed:
#. pcap library
::
$ dnf list --installed libpcap-devel
3.2 Downloading and installing NFD
----------------------------------
This software is downloaded and installed in a folder called *NFD*, which
should be created at the directory defined at § `1 <#intro>`__. The
following commands need to be run as a regular user:
::
$ git clone --depth 1 https://github.com/named-data/NFD.git
$ cd NFD
$ ./waf configure
If the previous command prints an error message saying that waf cannot
find WebSocket, it is necessary to follow the instructions provided by
this same output, which tells the user to run the following command:
::
$ git submodule update --init
After executing these instructions, complete the configuration by running
``./waf configure`` again. Then complete the installation by means of the
following commands:
::
$ ./waf
$ sudo ./waf install
3.3 Configuring NFD
-------------------
Create a configuration file by running the following command as root:
::
$ cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf
After the configuration file has been created, NFD's behavior may be
changed by modifying this file. Once the configuration file has been
created, it is recommended to start NFD by using the following command:
::
$ nfd-start
This command does not properly allow to employ the command window to
enter new commands; however it displays the NFD logs. Therefore, it is
recommended to open a new command window. This second window may be used
to verify NDF's status and then stop NFD by using the following
commands:
::
$ nfd-status
$ nfd-stop
.. _nlsr:
4. Installing NLSR
==================
4.1 Installing PSync
--------------------
Before installing NLSR, it is also necessary to download and install
PSync. PSync is a synchronization library which allows NLSR to synchronize LSAs
similar to ChronoSync. More information about PSync may be found at [PSync]_.
This library may be installed by running the following commands as a regular
user and at the directory defined at § `1 <#intro>`__:
::
$ git clone --depth 1 https://github.com/named-data/PSync.git
$ cd PSync
$ ./waf configure
$ ./waf
$ sudo ./waf install
The following command needs to be used again to configure the libraries:
::
$ sudo ldconfig -v | grep -i psync
This command should display a line similar to the following:
::
libPSync.so.0.1.0 -> libPSync.so.0.1.0
4.2 [Optional] Installing ChronoSync
------------------------------------
By default NLSR no longer builds with ChronoSync support.
Since ChronoSync is deprecated, only install it for testing purposes.
Before installing NLSR, it is necessary to first download and install
ChronoSync, which is a synchronization library which allows NLSR routers
to synchronize Link State Advertisements (LSAs). More information about
ChronoSync may be found at [Chronosync]_. This library may be
installed by running the following commands as a regular user and at the
directory defined at § `1 <#intro>`__:
::
$ git clone --depth 1 https://github.com/named-data/ChronoSync.git
$ cd ChronoSync
$ ./waf configure
$ ./waf
$ sudo ./waf install
The following command needs to be used again to configure the libraries:
::
$ sudo ldconfig -v | grep -i chronosync
This command should display a line similar to the following:
::
libChronoSync.so.0.5.0 -> libChronoSync.so.0.5.0
4.3 [Optional] Installing SVS
-----------------------------
NLSR can also use State Vector Sync as the underlying Sync protocol,
using the ndn-svs library.
This library may be installed by running the following commands as a
regular user and at the directory defined at § `1 <#intro>`__:
::
$ git clone --depth 1 https://github.com/named-data/ndn-svs.git
$ cd ndn-svs
$ ./waf configure
$ ./waf
$ sudo ./waf install
The following command needs to be used again to configure the libraries:
::
$ sudo ldconfig -v | grep ndn-svs
This command should display a line similar to the following:
::
libndn-svs.so.0.0.1 -> libndn-svs.so.0.0.1
4.4 Downloading and installing NLSR
-----------------------------------
NLSR is downloaded and installed in a folder called *NLSR* which should
be created at the directory defined at § `1 <#intro>`__. The following
commands need to be run as a regular user:
::
$ git clone --depth 1 https://github.com/named-data/NLSR.git
$ cd NLSR
$ ./waf configure
$ ./waf
$ sudo ./waf install
If ChronoSync support is needed for testing, please configure NLSR with:
::
$ ./waf configure --with-chronosync
4.5 Configuring NLSR
--------------------
Create and configure the following directory by running the following
commands as root:
::
$ mkdir /var/lib/nlsr
$ chmod 777 /var/lib/nlsr
.. _test:
5. Configuring and Testing NLSR
===============================
To test NLSR, the first step is to configure the keys and certificates
that implement a secure communication between the routers. Then it is
necessary to verify that the computers in the test network are
connected, that NFD is running and the faces between the computers are
configured. Finally, the NLSR configuration file has to be edited before
running NLSR. The following subsections are provided as a guide to
define and configure a simple computer network between two computers:
router1 and router2.
.. _security:
5.1 Setting up the security
---------------------------
Configuring security in an NDN network requires to generate, exchange
and install, keys and certificates between the root, site, operator and
router computers that form the network
[NLSRsecconf]_, [NLSRdevguide]_, although in practice, it
is possible to keep more than one of these entities in a single machine.
The following example and *Figure 1* show how to configure security
for a single router, called Router X. In this example, the root, site,
operator and Router X are in different computers:
.. figure:: security_comp.png
:alt: Security configuration example for Router X.
:width: 19cm
:align: center
Fig. 1. Security configuration example for Router X.
#. At the root server, generate the root key:
::
$ ndnsec-key-gen /ndn/ > root.key
#. Generate the certificate for the root key at the root server:
::
$ ndnsec-cert-dump -i /ndn/ > root.cert
#. Install the root certificate at the root server:
::
$ ndnsec-cert-install -f root.cert
#. At the site server, generate the site key:
::
$ ndnsec-key-gen /ndn/edu/uaslp > site.key
#. Copy the site key to the root server and generate the certificate for
the site server:
::
$ ndnsec-cert-gen -s /ndn/ site.key > site.cert
#. Copy the site certificate to the site server and install it:
::
$ ndnsec-cert-install -f site.cert
#. At the operator server, generate the operator key:
::
$ ndnsec-key-gen /ndn/edu/uaslp/%C1.Operator/op > op.key
#. Copy the operator key to the site server and generate the certificate
for the operator server:
::
$ ndnsec-cert-gen -s /ndn/edu/uaslp op.key > op.cert
#. Copy the operator certificate to the operator server and install it:
::
$ ndnsec-cert-install -f op.cert
#. At the router, generate the router key:
::
$ ndnsec-key-gen /ndn/edu/uaslp/%C1.Router/routerX > routerX.key
#. Copy the router key to the operator server and generate the
certificate for the router:
::
$ ndnsec-cert-gen -s /ndn/edu/uaslp/%C1.Operator/op routerX.key >
routerX.cert
#. Copy the router certificate to the router and install it:
::
$ ndnsec-cert-install -f routerX.cert
In the previous steps, the *%C1.Router* and *%C1.Operator* labels are
NDN keywords and should not be changed. These labels will be also used
by the configuration file (§ `5.4 <#configfile>`__)
The following command may be used to verify that the certificates have
been installed in a computer:
::
$ ndnsec-list
This guide recommends that one machine functions as the root, site,
operator and router1, while a different computer only functions as
router2. *Figure 2* shows this
configuration. For router1, the twelve steps described before need to be
executed except for exchanging files between computers. For the router2,
only steps 10 to 12 are needed to generate this router's certificate.
Additionally, the following command may be used to print a list and a
brief description of all the ``ndnsec`` commands:
::
$ man ndnsec
.. figure:: netwk1.png
:alt: Example network.
:width: 19cm
:align: center
Fig. 2. Example network.
5.2 Configuring the network
---------------------------
The first step is to configure the physical network. If two computers
are going to get connected using a single Ethernet cable, it is
necessary to verify that this cable is a crossover. The other option is
to employ a switch between two computers that are then connected using
two regular Ethernet cables.
After the physical network has been assembled, it is necessary to
configure the network addresses and cards for all the computers in the
network. It is important to remember that computers that are connected
to each other should use the same subnetwork address. It is possible to
verify the network configuration in a Linux computer by means of the
``ip addr`` command.
Once the physical network and network cards have been configured, it is
necessary to verify that the computers can communicate with each other.
The simplest way to do this is by using the ``ping`` command:
::
$ ping <remote-ip-address>
5.3 Starting and configuring NFD
--------------------------------
To start and configure NFD it is necessary to open two terminal windows.
The first one will be used to start NFD by means of the ``nfd-start``
command. This terminal will also display the logs that NFD generates. By
default, NFD only generates informational logs (INFO). However, it is
possible to obtain different levels of verbosity for these logs. These
levels can be set before NFD starts by editing the
*/usr/local/etc/ndn/nfd.conf* file. Open this file using a regular text
editor, read the information provided about logging and then modify the
*default-level* variable at the *log* section according to the
instructions provided in the file. Additional information about NFD
configuration may be found at [NDNNFDusage]_.
The second terminal will be used to monitor the NFD status:
::
$ nfd-status
Employ the following command to configure each face that a computer uses
to connect to a neighboring computer:
::
$ nfdc face create udp4://<remote-ip-address>
The face id may be displayed by running:
::
$ nfdc face list
The status of the face may be verified by using the following command:
::
$ nfdc face show id <face-id>
After finishing NLSR testing, it is necessary to destroy the face before
stopping NFD. This operation is described at § `5.6 <#turn_off>`__. For
the two computer network provided as an example (*Figure 2*), it is necessary that both
machines run NFD and that each one configures a face that connects to
the other machine.
.. _configfile:
5.4 Setting up the configuration file
-------------------------------------
Instructions on how to use the configuration file are already provided
at the NLSR's Router Configuration page [NLSRrtrconf]_.
Read the information in this page to understand NLSR router
configuration. The following text describes the instructions that have
been modified at the default nlsr.conf file for router1:
::
; AT general SECTION:
{
network /ndn/ ; name of the network
site /edu/uaslp ; name of the site
router /%C1.Router/router1 ; name of the router: router1
}
;AT neighbors SECTION:
neighbors
{
neighbor
{
name /ndn/edu/uaslp/%C1.Router/router2 ; Neighbor router: router2
face-uri udp://140.220.80.124 ; face to the neighbor
link-cost 30 ; cost of the link
}
}
; AT advertising SECTION:
advertising
{
prefix /ndn/edu/uaslp/office/bldg1 ; Advertising destinations
prefix /ndn/edu/uaslp/office/bldg2 ; for router1
}
; AT security SECTION:
security
{
validator
{
...
trust-anchor
{
type file
file-name "root.cert" ; root certificate file
}
}
prefix-update-validator
{
...
trust-anchor
{
type file
file-name "site.cert" ; site certificate file
}
}
cert-to-publish "root.cert" ; root certificate file
cert-to-publish "site.cert" ; site certificate file
cert-to-publish "op.cert" ; operator certificate file
cert-to-publish "router1.cert" ; router1 certificate file
}
The following text shows the modified instructions for router2:
::
; AT general SECTION:
{
network /ndn/ ; name of the network
site /edu/uaslp ; name of the site
router /%C1.Router/router2 ; name of the router: router2
}
;AT neighbors SECTION:
neighbors
{
neighbor
{
name /ndn/edu/uaslp/%C1.Router/router1 ; Neighbor router: router1
face-uri udp://140.220.80.121 ; face to the neighbor
link-cost 30 ; cost of the link
}
}
; AT advertising SECTION:
advertising
{
prefix /ndn/edu/uaslp/labs/networks ; Advertising destinations
prefix /ndn/edu/uaslp/labs/hardware ; for router2
}
; AT security SECTION:
security
{
validator
{
...
trust-anchor
{
type file
file-name "root.cert" ; root certificate file
} ; this file needs to be copied to
} ; router2
prefix-update-validator
{
...
trust-anchor
{
type file
file-name "site.cert" ; site certificate file
} ; this file needs to be copied to
} ; router2
...
cert-to-publish "router2.cert" ; router2 certificate file
}
Notice that files *root.cert* and *site.cert*, which were generated at
router1, need to be copied to router2. Also notice that the *%C1.Router*
and *%C1.Operator* keywords employed at § `5.1 <#security>`__ are also
referenced by these configuration files.
.. _starting_nlsr:
5.5 Starting NLSR
-----------------
It is recommended to open a third command terminal and run NLSR in this
window. After the NLSR configuration file has been edited and saved as
*nlsr.conf*, it is possible to start NLSR by running either of the
following two commands:
::
$ nlsr
$ nlsr -f <configuration-file>
However, to verify what is NLSR doing, it becomes necessary to employ
NLSR's logging facility [NLSRstarting]_. A brief
description on how to use NDN's logging facility may be displayed by
entering the ``man ndn-log`` command. This guide recommends using one
of the following two instructions to start NLSR:
::
$ export NDN_LOG=nlsr.*=TRACE && nlsr
$ export NDN_LOG=nlsr.*=TRACE && nlsr -f <configuration-file>
The second terminal window may be used to run ``nfd-status`` again and
it should be possible to verify that the status has changed, specially
at the FIB and RIB sections of the generated report.
.. _turn_off:
5.6 Turning everything off
--------------------------
In order to stop NLSR and NFD, the following sequence of events is
recommended:
#. Stop NLSR by pressing the Ctrl+C keys at the third terminal window.
#. Destroy the face to the remote computers using either of the
following two commands at the second terminal window:
::
$ nfdc face destroy <face-id>
$ nfdc face destroy udp4://<remote-ip-address>
#. Stop NFD by entering the following command at the second terminal
window:
::
$ nfd-stop
#. The crossover Ethernet cable may be unplugged and the computers'
network configuration restored to its original settings.
5.7 Where to go from here
-------------------------
Users interested in building and configuring larger networks may want to
take a look at the NDN Ansible repository
[NDNAnsible]_. This repository uses Ansible, which is a
configuration management tool, to manage the official NDN testbed
deployment [NDNTestbed]_.
.. [NDNmain] *Named Data Networking*, https://named-data.net/, March 2018.
.. [Kolman2018] M. Kolman. *Anaconda improvements in Fedora 28*, Fedora Magazine, June 2018.
.. [NDN-cxx] *Getting started with ndn-cxx*, https://docs.named-data.net/ndn-cxx/current/INSTALL.html, April 2018.
.. [NDNNFD] *Getting started with NFD*, https://docs.named-data.net/NFD/current/INSTALL.html, April 2018.
.. [NDNNFDusage] *NFD usage*, https://docs.named-data.net/NFD/current/manpages/nfd.html, May 2018.
.. [Chronosync] Z. Zhu and A. Afanasyev. *Let's ChronoSync: Decentralized dataset state synchronization in Named Data Networking*, in IEEE ICNP, October 2013.
.. [PSync] M. Zhang, V. Lehman, and L. Wang. *Scalable Name-based Data Synchronization for Named Data Networking*, in IEEE INFOCOM, May 2017.
.. [NLSRsecconf] *NLSR Security Configuration*, https://docs.named-data.net/NLSR/current/SECURITY-CONFIG.html June 2018.
.. [NLSRdevguide] V. Lehman, M. Chowdhury, N. Gordon, A. Gawande. *NLSR Developer's Guide*, University of Memphis, November 2017.
.. [NLSRrtrconf] *NLSR Router Configuration*, https://docs.named-data.net/NLSR/current/ROUTER-CONFIG.html, April 2018.
.. [NLSRstarting] *Getting Started with NLSR*, https://docs.named-data.net/NLSR/current/GETTING-STARTED.html, May 2018.
.. [NDNAnsible] *NDN Ansible repository*, https://github.com/WU-ARL/NDN_Ansible, October 2018.
.. [NDNTestbed] *NDN Testbed*, https://named-data.net/ndn-testbed/, October 2018.
+92
View File
@@ -0,0 +1,92 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import importlib.util
import sys
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'Named Data Link State Routing Protocol (NLSR)'
copyright = 'Copyright © 2014-2023 Named Data Networking Project.'
author = 'Named Data Networking Project'
# The short X.Y version.
#version = ''
# The full version, including alpha/beta/rc tags.
#release = ''
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%Y-%m-%d'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
needs_sphinx = '4.0'
extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.todo',
]
def addExtensionIfExists(extension: str):
try:
if importlib.util.find_spec(extension) is None:
raise ModuleNotFoundError(extension)
except (ImportError, ValueError):
sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
'Some documentation may not build correctly.\n')
else:
extensions.append(extension)
addExtensionIfExists('sphinxcontrib.doxylink')
templates_path = ['_templates']
exclude_patterns = ['Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'named_data_theme'
html_theme_path = ['.']
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_copy_source = False
html_show_sourcelink = False
# Disable syntax highlighting of code blocks by default.
highlight_language = 'none'
# -- Options for manual page output ------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('manpages/nlsr', 'nlsr', 'Named Data Link State Routing daemon', [], 1),
('manpages/nlsr.conf', 'nlsr.conf', 'Named Data Link State Routing daemon configuration file', [], 5),
('manpages/nlsrc', 'nlsrc', 'command-line utility to interact with and collect statistics from NLSR', [], 1),
]
# -- Misc options ------------------------------------------------------------
doxylink = {
'nlsr': ('NLSR.tag', 'doxygen/'),
}
extlinks = {
'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
}
+2195
View File
File diff suppressed because it is too large. Load diff
+89
View File
@@ -0,0 +1,89 @@
NLSR: Named Data Link State Routing Protocol
============================================
.. toctree::
:hidden:
:maxdepth: 2
GETTING-STARTED
INSTALL
SECURITY-CONFIG
ROUTER-CONFIG
beginners-guide
manpages
release-notes
releases
**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 FIB. 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. The protocol design is presented in full detail in
the `NLSR Paper`_.
NLSR was mainly developed by members of the NSF-sponsored `NDN project team
<https://named-data.net/project/participants/>`__. See `AUTHORS.md
<https://github.com/named-data/NLSR/blob/master/AUTHORS.md>`__ for details.
Bug reports and feedback are highly appreciated and can be made through the `NLSR Redmine`_.
Documentation
-------------
- :doc:`GETTING-STARTED`
- :doc:`INSTALL`
- :doc:`SECURITY-CONFIG`
- :doc:`ROUTER-CONFIG`
- :doc:`beginners-guide`
- :doc:`manpages`
- :doc:`release-notes`
- :doc:`releases`
Downloading
-----------
- `Source code git repository <https://github.com/named-data/NLSR>`__
NLSR mailing list
-----------------
- `NLSR Mailing List`_
- `NLSR Mailing List Archives`_
`Sign up`_ is needed to post to the list or access the archives.
Additional resources
--------------------
- `NLSR Wiki`_
- `NLSR Redmine`_
Feature requests and bug reports
- `NLSR Paper`_
Detailed explanation of NLSR's design
- `NLSR Developer's Guide`_
For NLSR development
- `API documentation (doxygen) <doxygen/annotated.html>`__
License
-------
NLSR is free software distributed under the GNU General Public License version 3.
See `COPYING.md <https://github.com/named-data/NLSR/blob/master/COPYING.md>`__ for details.
.. _NDN protocol: https://docs.named-data.net/NDN-packet-spec/current/
.. _NFD: https://github.com/named-data/NFD
.. _NLSR Wiki: https://redmine.named-data.net/projects/nlsr/wiki
.. _NLSR Paper: https://named-data.net/wp-content/uploads/2016/01/ndn-0037-1-nlsr.pdf
.. _NLSR Mailing List: https://listserv.memphis.edu/scripts/wa.exe?SUBED1=NLSR-HELP-L&A=1
.. _NLSR Mailing List Archives: https://listserv.memphis.edu/scripts/wa.exe?A0=NLSR-HELP-L
.. _NLSR Developer's Guide: https://github.com/named-data/NLSR/blob/developers-guide/NLSR-Developers-Guide.pdf
.. _Sign up: https://listserv.memphis.edu/scripts/wa.exe?GETPW1
.. _NLSR Redmine: https://redmine.named-data.net/projects/nlsr
+8
View File
@@ -0,0 +1,8 @@
Man pages
=========
.. toctree::
:glob:
:maxdepth: 1
manpages/*
+13
View File
@@ -0,0 +1,13 @@
nlsr.conf
=========
Description
-----------
NLSR config file
Example
-------
.. literalinclude:: ../../nlsr.conf
:linenos:
+37
View File
@@ -0,0 +1,37 @@
nlsr
====
Usage
-----
::
nlsr [options]
Description
-----------
``nlsr`` is a process that implements routing protocol in NDN to populate NDN's Routing
Information Base.
Options:
--------
``-f <FILE>``
Specify configuration file name (default: ``./nlsr.conf``)
``-V``
Display version information
``-h``
Display this help message
Examples
--------
To run NLSR and use a configuration file from the ``/path/to`` directory.
::
nlsr -f /path/to/nlsr.conf
+94
View File
@@ -0,0 +1,94 @@
nlsrc
=====
Usage
-----
::
nlsrc [-h | -V]
nlsrc [-R <router prefix> [-c <nlsr.conf path> | -k]] COMMAND [<Command Options>]
Description
-----------
``nlsrc`` is a tool to retrieve link-state database (LSDB) status information from NLSR and
announce/withdraw Name prefixes advertised by NLSR.
Options
-------
``-h``
Print usage information
``-V``
Show NLSRC version information
``-R <router prefix>``
Target a remote NLSR instance.
The default is the local NLSR instance ``/localhost``.
``-c <nlsr.conf path>``
Verify remote status information with the trust schema loaded from ``security.validator`` section of specified nlsr.conf config file.
The default is loading from ``/etc/ndn/nlsr.conf``.
``-k``
Insecure: do not verify signature on status information retrieved from remote router.
``COMMAND``
``lsdb``
Retrieve LSDB status information
``routing``
Retrieve routing table status information
``status``
Retrieve LSDB status and routing table status information
``advertise``
Add a Name prefix to be advertised by NLSR
``advertise <name>``
``name``
The Name prefix to be advertised
``advertise <name> save``
``save``
Advertise a prefix and also save it to the nlsr.conf file residing in the state-dir for the next start of NLSR that operator may copy and use for the next start of NLSR
``withdraw``
Remove a Name prefix advertised through NLSR
``withdraw <name>``
``name``
The Name prefix to be withdrawn
``withdraw <name> delete``
``delete``
Withdraw a prefix and also delete it from the nlsr.conf file residing in the state-dir
Notes
-----
When security is enabled, NLSR will not be allowed to successfully
advertise/withdraw names without first setting a default identity of operator.
If default identity is not set as operator, the user will be presented with the
error message: "Name prefix update error (code: 403)". To remedy this
issue, use the command ``ndnsec set-default``. Example::
ndnsec set-default /ndn/a-site/%C1.Operator/op
Exit Status
-----------
nlsrc exits with one of the following values::
0 nlsrc exited successfully
1 generic error
2 bad command line
+86
View File
@@ -0,0 +1,86 @@
{#
named_data_theme/layout.html
~~~~~~~~~~~~~~~~~
#}
{% extends "basic/layout.html" %}
{% block header %}
<!--headercontainer-->
<div id="header_container">
<!--header-->
<div class="row">
<div class="three columns">
<div id="logo">
<a href="https://named-data.net" title="A Future Internet Architecture"><img src="https://named-data.net/wp-content/uploads/cropped-20130722_Logo2.png" alt="" /></a>
</div><!--logo end-->
</div>
<!--top menu-->
<div class="nine columns" id="menu_container" >
<h1><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a></h1>
</div>
</div>
</div><!--header container end-->
{% endblock %}
{% block content %}
<div class="content-wrapper">
<div class="content">
<div class="document">
{%- block document %}
{{ super() }}
{%- endblock %}
</div>
<div class="sidebar">
{%- block sidebartoc %}
<h3>{{ _('Table Of Contents') }}</h3>
{{ toctree(includehidden=True) }}
<h3>{{ _('Developer documentation') }}</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="doxygen/annotated.html">API documentation (doxygen)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://redmine.named-data.net/projects/nlsr/wiki">NLSR Wiki</a></li>
</ul>
{%- endblock %}
{%- block sidebarsearch %}
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" />
<input type="submit" value="{{ _('Go') }}" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
{{ _('Enter search terms or a module, class or function name.') }}
</p>
{%- endblock %}
</div>
<div class="clearer"></div>
</div>
</div>
{% endblock %}
{% block footer %}
<div id="footer-container">
<!--footer container-->
<div class="row">
</div><!-- footer container-->
</div>
<div id="footer-info">
<!--footer container-->
<div class="row">
<div class="twelve columns">
<div id="copyright">This research is partially supported by NSF (Award <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=1040868" target="_blank>">CNS-1040868</a>)<br/><br/><a rel="license" href="https://creativecommons.org/licenses/by/3.0/deed.en_US" target="_blank">Creative Commons Attribution 3.0 Unported License</a> except where noted.</div>
</div>
</div>
</div><!--footer info end-->
{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
@@ -0,0 +1,32 @@
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="https://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/>
<address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '@GOOGLE_ANALYTICS@', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
@@ -0,0 +1,24 @@
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="https://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/>
<address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
<script type="text/javascript">
</script>
</body>
</html>
@@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath$jquery.js"></script>
<script type="text/javascript" src="$relpath$dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
<link href="$relpath$named_data_doxygen.css" rel="stylesheet" type="text/css" />
<link href="$relpath$favicon.ico" rel="shortcut icon" type="image/ico" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<!--headercontainer-->
<div id="header_container">
<!--header-->
<div class="row">
<div class="three columns">
<div id="logo">
<a href="https://named-data.net" title="A Future Internet Architecture"><img src="https://named-data.net/wp-content/uploads/cropped-20130722_Logo2.png" alt="" /></a>
</div><!--logo end-->
</div>
<!--top menu-->
<div class="nine columns" id="menu_container" >
<h1><a href="https://named-data.net/doc/NLSR/$projectnumber/">$projectname $projectnumber documentation</a></h1>
</div>
</div>
</div><!--header container end-->
<!--END TITLEAREA-->
<!-- end header part -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

+71
View File
@@ -0,0 +1,71 @@
* {
margin: 0px;
padding: 0px;
}
html { font-size: 62.5%; }
body {
font-family: "Verdana", Arial, sans-serif;
background-color: #eeeeec;
color: #777;
border-top: 4px solid #fd7800;
}
body { background: white; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }
.clearer {
clear: both;
}
.left {
float: left;
}
.right {
float: right;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
h1, h2, h3, h4 {
font-family: "Georgia", "Times New Roman", serif;
font-weight: normal;
color: #3465a4;
margin-bottom: .8em;
}
h1 {
color: #204a87;
}
h2 {
padding-bottom: .5em;
border-bottom: 1px solid #3465a4;
}
a.headerlink {
visibility: hidden;
color: #dddddd;
padding-left: .3em;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
+459
View File
@@ -0,0 +1,459 @@
* {
margin: 0px;
padding: 0px;
}
html { font-size: 62.5%; }
body {
font-family: {{ theme_bodyfont }};
background-color: {{ theme_bgcolor }};
color: #777;
border-top: 4px solid #fd7800;
}
body { background: white; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }
/* Page layout */
div.header, div.content, div.footer {
width: 90%;
margin-left: auto;
margin-right: auto;
}
div.header-wrapper {
background: {{ theme_headerbg }};
border-bottom: 3px solid #2e3436;
}
/* Default body styles */
a {
color: {{ theme_linkcolor }};
}
div.bodywrapper a, div.footer a {
text-decoration: none;
}
.clearer {
clear: both;
}
.left {
float: left;
}
.right {
float: right;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
h1, h2, h3, h4 {
font-family: {{ theme_headerfont }};
font-weight: normal;
color: {{ theme_headercolor2 }};
margin-bottom: .8em;
}
h1 {
color: {{ theme_headercolor1 }};
}
h2 {
padding-bottom: .5em;
border-bottom: 1px solid {{ theme_headercolor2 }};
}
a.headerlink {
visibility: hidden;
color: #dddddd;
padding-left: .3em;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
img {
border: 0;
}
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 2px 7px 1px 7px;
border-left: 0.2em solid black;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
dt:target, .highlighted {
background-color: #fbe54e;
}
/* Header */
div.header {
padding-top: 10px;
padding-bottom: 10px;
}
div.header .headertitle {
font-family: {{ theme_headerfont }};
font-weight: normal;
font-size: 180%;
letter-spacing: .08em;
margin-bottom: .8em;
}
div.header .headertitle a {
color: white;
}
div.header div.rel {
margin-top: 1em;
}
div.header div.rel a {
color: {{ theme_headerlinkcolor }};
letter-spacing: .1em;
text-transform: uppercase;
}
p.logo {
float: right;
}
img.logo {
border: 0;
}
/* Content */
div.content-wrapper {
background-color: white;
padding-top: 20px;
padding-bottom: 20px;
}
div.document {
width: 70%;
float: left;
}
div.body {
padding-right: 2em;
text-align: left;
}
div.document h1 {
line-height: 120%;
}
div.document ul {
margin-left: 1.5em;
list-style-type: square;
}
div.document dd {
margin-left: 1.2em;
margin-top: .4em;
margin-bottom: 1em;
}
div.document .section {
margin-top: 1.7em;
}
div.document .section:first-child {
margin-top: 0px;
}
div.document div.highlight {
padding: 3px;
background-color: #eeeeec;
border-top: 2px solid #dddddd;
border-bottom: 2px solid #dddddd;
margin-bottom: .8em;
}
div.document h2 {
margin-top: .7em;
}
div.document p {
margin-bottom: .5em;
}
div.document li.toctree-l1 {
margin-bottom: 1em;
}
div.document .descname {
font-weight: bold;
}
div.document .docutils.literal {
background-color: #eeeeec;
padding: 1px;
}
div.document .docutils.xref.literal {
background-color: transparent;
padding: 0px;
}
div.document ol {
margin: 1.5em;
}
/* Sidebar */
div.sidebar {
width: 20%;
float: right;
font-size: .9em;
}
div.sidebar a, div.header a {
text-decoration: none;
}
div.sidebar a:hover, div.header a:hover {
text-decoration: none;
}
div.sidebar h3 {
color: #2e3436;
text-transform: uppercase;
font-size: 130%;
letter-spacing: .1em;
}
div.sidebar ul {
list-style-type: none;
}
div.sidebar li.toctree-l1 a {
display: block;
padding: 1px;
border: 1px solid #dddddd;
background-color: #eeeeec;
margin-bottom: .4em;
padding-left: 3px;
color: #2e3436;
}
div.sidebar li.toctree-l2 a {
background-color: transparent;
border: none;
margin-left: 1em;
border-bottom: 1px solid #dddddd;
}
div.sidebar li.toctree-l3 a {
background-color: transparent;
border: none;
margin-left: 2em;
border-bottom: 1px solid #dddddd;
}
div.sidebar li.toctree-l2:last-child a {
border-bottom: none;
}
div.sidebar li.toctree-l1.current a {
border-right: 5px solid {{ theme_headerlinkcolor }};
}
div.sidebar li.toctree-l1.current li.toctree-l2 a {
border-right: none;
}
div.sidebar input[type="text"] {
width: 170px;
}
div.sidebar input[type="submit"] {
width: 30px;
}
/* Footer */
div.footer-wrapper {
background: {{ theme_footerbg }};
border-top: 4px solid #babdb6;
padding-top: 10px;
padding-bottom: 10px;
min-height: 80px;
}
div.footer, div.footer a {
color: #888a85;
}
div.footer .right {
text-align: right;
}
div.footer .left {
text-transform: uppercase;
}
/* Styles copied from basic theme */
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
/* -- viewcode extension ---------------------------------------------------- */
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family:: {{ theme_bodyfont }};
}
div.viewcode-block:target {
margin: -1px -3px;
padding: 0 3px;
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
margin-top: -10pt;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

@@ -0,0 +1,14 @@
@import url("agogo.css");
pre {
padding: 10px;
background-color: #fafafa;
color: #222;
line-height: 1.2em;
border: 2px solid #C6C9CB;
font-size: 1.1em;
/* margin: 1.5em 0 1.5em 0; */
margin: 0;
border-right-style: none;
border-left-style: none;
}
File diff suppressed because it is too large. Load diff
+788
View File
@@ -0,0 +1,788 @@
.c-1, .c-2, .c-3, .c-4, .c-5, .c-6, .c-7, .c-8, .c-9, .c-10, .c-11, .c-12 { float: left; }
.c-1, .c-2, .c-3, .c-4, .c-5, .c-6, .c-7, .c-8, .c-9, .c-10, .c-11, .c-12 { position: relative; min-height: 1px; padding: 0 15px; }
.c-1 { width: 8.33333%; }
.c-2 { width: 16.66667%; }
.c-3 { width: 25%; }
.c-4 { width: 33.33333%; }
.c-5 { width: 41.66667%; }
.c-6 { width: 50%; }
.c-7 { width: 58.33333%; }
.c-8 { width: 66.66667%; }
.c-9 { width: 75%; }
.c-10 { width: 83.33333%; }
.c-11 { width: 91.66667%; }
.c-12 { width: 100%; }
/* Requires: normalize.css */
/* Global Reset & Standards ---------------------- */
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
html { font-size: 62.5%; }
body { background: white; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }
/* Links ---------------------- */
a { color: #fd7800; text-decoration: none; line-height: inherit; }
a:hover { color: #2795b6; }
a:focus { color: #fd7800; outline: none; }
p a, p a:visited { line-height: inherit; }
/* Misc ---------------------- */
.left { float: left; }
@media only screen and (max-width: 767px) { .left { float: none; } }
.right { float: right; }
@media only screen and (max-width: 767px) { .right { float: none; } }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hide { display: none; }
.highlight { background: #ffff99; }
#googlemap img, object, embed { max-width: none; }
#map_canvas embed { max-width: none; }
#map_canvas img { max-width: none; }
#map_canvas object { max-width: none; }
/* Reset for strange margins by default on <figure> elements */
figure { margin: 0; }
/* Base Type Styles Using Modular Scale ---------------------- */
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 14px; direction: ltr; }
p { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: normal; font-size: 14px; line-height: 1.6; margin-bottom: 17px; }
p.lead { font-size: 17.5px; line-height: 1.6; margin-bottom: 17px; }
aside p { font-size: 13px; line-height: 1.35; font-style: italic; }
h1, h2, h3, h4, h5, h6 { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-weight: bold; color: #222222; text-rendering: optimizeLegibility; line-height: 1.0; margin-bottom: 14px; margin-top: 14px; }
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 14px; }
h4 { font-size: 12px; }
h5 { font-weight: bold; font-size: 12px; }
h6 { font-style: italic; font-size: 12px; }
hr { border: solid #c6c6c6; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0; }
.subheader { line-height: 1.3; color: #6f6f6f; font-weight: 300; margin-bottom: 17px; }
em, i { font-style: italic; line-height: inherit; }
strong, b { font-weight: bold; line-height: inherit; }
small { font-size: 60%; line-height: inherit; }
code { font-weight: bold; background: #ffff99; }
/* Lists ---------------------- */
ul, ol { font-size: 14px; line-height: 1.6; margin-bottom: 17px; list-style-position: inside; }
ul li ul, ul li ol { margin-left: 20px; margin-bottom: 0; }
ul.square, ul.circle, ul.disc { margin-left: 17px; }
ul.square { list-style-type: square; }
ul.square li ul { list-style: inherit; }
ul.circle { list-style-type: circle; }
ul.circle li ul { list-style: inherit; }
ul.disc { list-style-type: disc; }
ul.disc li ul { list-style: inherit; }
ul.no-bullet { list-style: none; }
ul.large li { line-height: 21px; }
ol li ul, ol li ol { margin-left: 20px; margin-bottom: 0; }
/* Blockquotes ---------------------- */
blockquote, blockquote p { line-height: 1.5; }
blockquote { margin: 0 0 17px; padding: 9px 20px 0 19px; }
blockquote cite { display: block; font-size: 13pt; color: #555555; }
blockquote cite:before { content: "\2014 \0020"; }
blockquote cite a, blockquote cite a:visited { color: #555555; }
abbr, acronym { text-transform: uppercase; font-size: 90%; color: #222222; border-bottom: 1px solid #ddd; cursor: help; }
abbr { text-transform: none; }
/* Print styles. Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
*/
.print-only { display: none !important; }
@media print { * { background: transparent !important; color: black !important; box-shadow: none !important; text-shadow: none !important; filter: none !important; -ms-filter: none !important; }
/* Black prints faster: h5bp.com/s */
a, a:visited { text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
/* Don't show links for images, or javascript/internal links */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; }
/* h5bp.com/t */
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
.hide-on-print { display: none !important; }
.print-only { display: block !important; } }
/* Requires globals.css */
/* Standard Forms ---------------------- */
form { margin: 0 0 19.41641px; }
.row form .row { margin: 0 -6px; }
.row form .row .column, .row form .row .columns { padding: 0 6px; }
.row form .row.collapse { margin: 0; }
.row form .row.collapse .column, .row form .row.collapse .columns { padding: 0; }
label { font-size: 14px; color: #4d4d4d; cursor: pointer; display: block; font-weight: 500; margin-bottom: 3px; }
label.right { float: none; text-align: right; }
label.inline { line-height: 32px; margin: 0 0 12px 0; }
@media only screen and (max-width: 767px) { label.right { text-align: left; } }
.prefix, .postfix { display: block; position: relative; z-index: 2; text-align: center; width: 100%; padding-top: 0; padding-bottom: 0; height: 32px; line-height: 31px; }
a.button.prefix, a.button.postfix { padding-left: 0; padding-right: 0; text-align: center; }
span.prefix, span.postfix { background: #f2f2f2; border: 1px solid #cccccc; }
.prefix { left: 2px; -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; overflow: hidden; }
.postfix { right: 2px; -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; }
input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], textarea { font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; border: 1px solid #cccccc; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.75); display: block; font-size: 14px; margin: 0 0 12px 0; padding: 6px; height: 32px; width: 100%; -webkit-transition: all 0.15s linear; -moz-transition: all 0.15s linear; -o-transition: all 0.15s linear; transition: all 0.15s linear; }
input[type="text"].oversize, input[type="password"].oversize, input[type="date"].oversize, input[type="datetime"].oversize, input[type="email"].oversize, input[type="number"].oversize, input[type="search"].oversize, input[type="tel"].oversize, input[type="time"].oversize, input[type="url"].oversize, textarea.oversize { font-size: 17px; padding: 4px 6px; }
input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, textarea:focus { background: #fafafa; outline: none !important; border-color: #b3b3b3; }
input[type="text"][disabled], input[type="password"][disabled], input[type="date"][disabled], input[type="datetime"][disabled], input[type="email"][disabled], input[type="number"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="time"][disabled], input[type="url"][disabled], textarea[disabled] { background-color: #ddd; }
textarea { height: auto; }
select { width: 100%; }
/* Fieldsets */
fieldset { border: solid 1px #ddd; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; padding: 12px 12px 0; margin: 18px 0; }
fieldset legend { font-weight: bold; background: white; padding: 0 3px; margin: 0; margin-left: -3px; }
/* Errors */
.error input, input.error, .error textarea, textarea.error { border-color: #c60f13; background-color: rgba(198, 15, 19, 0.1); }
.error label, label.error { color: #c60f13; }
.error small, small.error { display: block; padding: 6px 4px; margin-top: -13px; margin-bottom: 12px; background: #c60f13; color: #fff; font-size: 12px; font-size: 1.2rem; font-weight: bold; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; }
@media only screen and (max-width: 767px) { input[type="text"].one, input[type="password"].one, input[type="date"].one, input[type="datetime"].one, input[type="email"].one, input[type="number"].one, input[type="search"].one, input[type="tel"].one, input[type="time"].one, input[type="url"].one, textarea.one, .row textarea.one { width: 100% !important; }
input[type="text"].two, .row input[type="text"].two, input[type="password"].two, .row input[type="password"].two, input[type="date"].two, .row input[type="date"].two, input[type="datetime"].two, .row input[type="datetime"].two, input[type="email"].two, .row input[type="email"].two, input[type="number"].two, .row input[type="number"].two, input[type="search"].two, .row input[type="search"].two, input[type="tel"].two, .row input[type="tel"].two, input[type="time"].two, .row input[type="time"].two, input[type="url"].two, .row input[type="url"].two, textarea.two, .row textarea.two { width: 100% !important; }
input[type="text"].three, .row input[type="text"].three, input[type="password"].three, .row input[type="password"].three, input[type="date"].three, .row input[type="date"].three, input[type="datetime"].three, .row input[type="datetime"].three, input[type="email"].three, .row input[type="email"].three, input[type="number"].three, .row input[type="number"].three, input[type="search"].three, .row input[type="search"].three, input[type="tel"].three, .row input[type="tel"].three, input[type="time"].three, .row input[type="time"].three, input[type="url"].three, .row input[type="url"].three, textarea.three, .row textarea.three { width: 100% !important; }
input[type="text"].four, .row input[type="text"].four, input[type="password"].four, .row input[type="password"].four, input[type="date"].four, .row input[type="date"].four, input[type="datetime"].four, .row input[type="datetime"].four, input[type="email"].four, .row input[type="email"].four, input[type="number"].four, .row input[type="number"].four, input[type="search"].four, .row input[type="search"].four, input[type="tel"].four, .row input[type="tel"].four, input[type="time"].four, .row input[type="time"].four, input[type="url"].four, .row input[type="url"].four, textarea.four, .row textarea.four { width: 100% !important; }
input[type="text"].five, .row input[type="text"].five, input[type="password"].five, .row input[type="password"].five, input[type="date"].five, .row input[type="date"].five, input[type="datetime"].five, .row input[type="datetime"].five, input[type="email"].five, .row input[type="email"].five, input[type="number"].five, .row input[type="number"].five, input[type="search"].five, .row input[type="search"].five, input[type="tel"].five, .row input[type="tel"].five, input[type="time"].five, .row input[type="time"].five, input[type="url"].five, .row input[type="url"].five, textarea.five, .row textarea.five { width: 100% !important; }
input[type="text"].six, .row input[type="text"].six, input[type="password"].six, .row input[type="password"].six, input[type="date"].six, .row input[type="date"].six, input[type="datetime"].six, .row input[type="datetime"].six, input[type="email"].six, .row input[type="email"].six, input[type="number"].six, .row input[type="number"].six, input[type="search"].six, .row input[type="search"].six, input[type="tel"].six, .row input[type="tel"].six, input[type="time"].six, .row input[type="time"].six, input[type="url"].six, .row input[type="url"].six, textarea.six, .row textarea.six { width: 100% !important; }
input[type="text"].seven, .row input[type="text"].seven, input[type="password"].seven, .row input[type="password"].seven, input[type="date"].seven, .row input[type="date"].seven, input[type="datetime"].seven, .row input[type="datetime"].seven, input[type="email"].seven, .row input[type="email"].seven, input[type="number"].seven, .row input[type="number"].seven, input[type="search"].seven, .row input[type="search"].seven, input[type="tel"].seven, .row input[type="tel"].seven, input[type="time"].seven, .row input[type="time"].seven, input[type="url"].seven, .row input[type="url"].seven, textarea.seven, .row textarea.seven { width: 100% !important; }
input[type="text"].eight, .row input[type="text"].eight, input[type="password"].eight, .row input[type="password"].eight, input[type="date"].eight, .row input[type="date"].eight, input[type="datetime"].eight, .row input[type="datetime"].eight, input[type="email"].eight, .row input[type="email"].eight, input[type="number"].eight, .row input[type="number"].eight, input[type="search"].eight, .row input[type="search"].eight, input[type="tel"].eight, .row input[type="tel"].eight, input[type="time"].eight, .row input[type="time"].eight, input[type="url"].eight, .row input[type="url"].eight, textarea.eight, .row textarea.eight { width: 100% !important; }
input[type="text"].nine, .row input[type="text"].nine, input[type="password"].nine, .row input[type="password"].nine, input[type="date"].nine, .row input[type="date"].nine, input[type="datetime"].nine, .row input[type="datetime"].nine, input[type="email"].nine, .row input[type="email"].nine, input[type="number"].nine, .row input[type="number"].nine, input[type="search"].nine, .row input[type="search"].nine, input[type="tel"].nine, .row input[type="tel"].nine, input[type="time"].nine, .row input[type="time"].nine, input[type="url"].nine, .row input[type="url"].nine, textarea.nine, .row textarea.nine { width: 100% !important; }
input[type="text"].ten, .row input[type="text"].ten, input[type="password"].ten, .row input[type="password"].ten, input[type="date"].ten, .row input[type="date"].ten, input[type="datetime"].ten, .row input[type="datetime"].ten, input[type="email"].ten, .row input[type="email"].ten, input[type="number"].ten, .row input[type="number"].ten, input[type="search"].ten, .row input[type="search"].ten, input[type="tel"].ten, .row input[type="tel"].ten, input[type="time"].ten, .row input[type="time"].ten, input[type="url"].ten, .row input[type="url"].ten, textarea.ten, .row textarea.ten { width: 100% !important; }
input[type="text"].eleven, .row input[type="text"].eleven, input[type="password"].eleven, .row input[type="password"].eleven, input[type="date"].eleven, .row input[type="date"].eleven, input[type="datetime"].eleven, .row input[type="datetime"].eleven, input[type="email"].eleven, .row input[type="email"].eleven, input[type="number"].eleven, .row input[type="number"].eleven, input[type="search"].eleven, .row input[type="search"].eleven, input[type="tel"].eleven, .row input[type="tel"].eleven, input[type="time"].eleven, .row input[type="time"].eleven, input[type="url"].eleven, .row input[type="url"].eleven, textarea.eleven, .row textarea.eleven { width: 100% !important; }
input[type="text"].twelve, .row input[type="text"].twelve, input[type="password"].twelve, .row input[type="password"].twelve, input[type="date"].twelve, .row input[type="date"].twelve, input[type="datetime"].twelve, .row input[type="datetime"].twelve, input[type="email"].twelve, .row input[type="email"].twelve, input[type="number"].twelve, .row input[type="number"].twelve, input[type="search"].twelve, .row input[type="search"].twelve, input[type="tel"].twelve, .row input[type="tel"].twelve, input[type="time"].twelve, .row input[type="time"].twelve, input[type="url"].twelve, .row input[type="url"].twelve, textarea.twelve, .row textarea.twelve { width: 100% !important; } }
/* Custom Forms ---------------------- */
form.custom { /* Custom input, disabled */ }
form.custom span.custom { display: inline-block; width: 16px; height: 16px; position: relative; top: 2px; border: solid 1px #ccc; background: #fff; }
form.custom span.custom.radio { -webkit-border-radius: 100px; -moz-border-radius: 100px; -ms-border-radius: 100px; -o-border-radius: 100px; border-radius: 100px; }
form.custom span.custom.checkbox:before { content: ""; display: block; line-height: 0.8; height: 14px; width: 14px; text-align: center; position: absolute; top: 0; left: 0; font-size: 14px; color: #fff; }
form.custom span.custom.radio.checked:before { content: ""; display: block; width: 8px; height: 8px; -webkit-border-radius: 100px; -moz-border-radius: 100px; -ms-border-radius: 100px; -o-border-radius: 100px; border-radius: 100px; background: #222; position: relative; top: 3px; left: 3px; }
form.custom span.custom.checkbox.checked:before { content: "\00d7"; color: #222; }
form.custom div.custom.dropdown { display: block; position: relative; width: auto; height: 28px; margin-bottom: 9px; margin-top: 2px; }
form.custom div.custom.dropdown a.current { display: block; width: auto; line-height: 26px; min-height: 28px; padding: 0; padding-left: 6px; padding-right: 38px; border: solid 1px #ddd; color: #141414; background-color: #fff; white-space: nowrap; }
form.custom div.custom.dropdown a.selector { position: absolute; width: 27px; height: 28px; display: block; right: 0; top: 0; border: solid 1px #ddd; }
form.custom div.custom.dropdown a.selector:after { content: ""; display: block; content: ""; display: block; width: 0; height: 0; border: solid 5px; border-color: #aaaaaa transparent transparent transparent; position: absolute; left: 50%; top: 50%; margin-top: -2px; margin-left: -5px; }
form.custom div.custom.dropdown:hover a.selector:after, form.custom div.custom.dropdown.open a.selector:after { content: ""; display: block; width: 0; height: 0; border: solid 5px; border-color: #222222 transparent transparent transparent; }
form.custom div.custom.dropdown.open ul { display: block; z-index: 10; }
form.custom div.custom.dropdown.small { width: 134px !important; }
form.custom div.custom.dropdown.medium { width: 254px !important; }
form.custom div.custom.dropdown.large { width: 434px !important; }
form.custom div.custom.dropdown.expand { width: 100% !important; }
form.custom div.custom.dropdown.open.small ul { width: 134px !important; }
form.custom div.custom.dropdown.open.medium ul { width: 254px !important; }
form.custom div.custom.dropdown.open.large ul { width: 434px !important; }
form.custom div.custom.dropdown.open.expand ul { width: 100% !important; }
form.custom div.custom.dropdown ul { position: absolute; width: auto; display: none; margin: 0; left: 0; top: 27px; margin: 0; padding: 0; background: #fff; background: rgba(255, 255, 255, 0.95); border: solid 1px #cccccc; }
form.custom div.custom.dropdown ul li { color: #555; font-size: 13px; cursor: pointer; padding: 3px; padding-left: 6px; padding-right: 38px; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none; }
form.custom div.custom.dropdown ul li.selected { background: #cdebf5; color: #000; }
form.custom div.custom.dropdown ul li.selected:after { content: "\2013"; position: absolute; right: 10px; }
form.custom div.custom.dropdown ul li:hover { background-color: #e3f4f9; color: #222; }
form.custom div.custom.dropdown ul li:hover:after { content: "\2013"; position: absolute; right: 10px; color: #8ed3e7; }
form.custom div.custom.dropdown ul li.selected:hover { background: #cdebf5; cursor: default; color: #000; }
form.custom div.custom.dropdown ul li.selected:hover:after { color: #000; }
form.custom div.custom.dropdown ul.show { display: block; }
form.custom .custom.disabled { background-color: #ddd; }
/* Correct FF custom dropdown height */
@-moz-document url-prefix() { form.custom div.custom.dropdown a.selector { height: 30px; } }
.lt-ie9 form.custom div.custom.dropdown a.selector { height: 30px; }
/* The Grid ---------------------- */
.row { width: 1000px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.row.collapse .column, .row.collapse .columns { padding: 0; }
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.row .row.collapse { margin: 0; }
.column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.column.centered, .columns.centered { float: none; margin: 0 auto; }
[class*="column"] + [class*="column"]:last-child { float: right; }
[class*="column"] + [class*="column"].end { float: left; }
.one, .row .one { width: 8.33333%; }
.two, .row .two { width: 16.66667%; }
.three, .row .three { width: 25%; }
.four, .row .four { width: 33.33333%; }
.five, .row .five { width: 41.66667%; }
.six, .row .six { width: 50%; }
.seven, .row .seven { width: 58.33333%; }
.eight, .row .eight { width: 66.66667%; }
.nine, .row .nine { width: 75%; }
.ten, .row .ten { width: 83.33333%; }
.eleven, .row .eleven { width: 91.66667%; }
.twelve, .row .twelve { width: 100%; }
.row .offset-by-one { margin-left: 8.33333%; }
.row .offset-by-two { margin-left: 16.66667%; }
.row .offset-by-three { margin-left: 25%; }
.row .offset-by-four { margin-left: 33.33333%; }
.row .offset-by-five { margin-left: 41.66667%; }
.row .offset-by-six { margin-left: 50%; }
.row .offset-by-seven { margin-left: 58.33333%; }
.row .offset-by-eight { margin-left: 66.66667%; }
.row .offset-by-nine { margin-left: 75%; }
.row .offset-by-ten { margin-left: 83.33333%; }
.push-two { left: 16.66667%; }
.pull-two { right: 16.66667%; }
.push-three { left: 25%; }
.pull-three { right: 25%; }
.push-four { left: 33.33333%; }
.pull-four { right: 33.33333%; }
.push-five { left: 41.66667%; }
.pull-five { right: 41.66667%; }
.push-six { left: 50%; }
.pull-six { right: 50%; }
.push-seven { left: 58.33333%; }
.pull-seven { right: 58.33333%; }
.push-eight { left: 66.66667%; }
.pull-eight { right: 66.66667%; }
.push-nine { left: 75%; }
.pull-nine { right: 75%; }
.push-ten { left: 83.33333%; }
.pull-ten { right: 83.33333%; }
img, object, embed { max-width: 100%; height: auto; }
object, embed { height: 100%; }
img { -ms-interpolation-mode: bicubic; }
#map_canvas img, .map_canvas img { max-width: none!important; }
/* Nicolas Gallagher's micro clearfix */
.row { *zoom: 1; }
.row:before, .row:after { content: ""; display: table; }
.row:after { clear: both; }
/* Mobile Grid and Overrides ---------------------- */
@media only screen and (max-width: 767px) { body { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; width: 100%; min-width: 0; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.row { width: auto; min-width: 0; margin-left: 0; margin-right: 0; }
.column, .columns { width: auto !important; float: none; }
.column:last-child, .columns:last-child { float: none; }
[class*="column"] + [class*="column"]:last-child { float: none; }
.column:before, .columns:before, .column:after, .columns:after { content: ""; display: table; }
.column:after, .columns:after { clear: both; }
.offset-by-one, .offset-by-two, .offset-by-three, .offset-by-four, .offset-by-five, .offset-by-six, .offset-by-seven, .offset-by-eight, .offset-by-nine, .offset-by-ten { margin-left: 0 !important; }
.push-two, .push-three, .push-four, .push-five, .push-six, .push-seven, .push-eight, .push-nine, .push-ten { left: auto; }
.pull-two, .pull-three, .pull-four, .pull-five, .pull-six, .pull-seven, .pull-eight, .pull-nine, .pull-ten { right: auto; }
/* Mobile 4-column Grid */
.row .mobile-one { width: 25% !important; float: left; padding: 0 15px; }
.row .mobile-one:last-child { float: right; }
.row.collapse .mobile-one { padding: 0; }
.row .mobile-two { width: 50% !important; float: left; padding: 0 15px; }
.row .mobile-two:last-child { float: right; }
.row.collapse .mobile-two { padding: 0; }
.row .mobile-three { width: 75% !important; float: left; padding: 0 15px; }
.row .mobile-three:last-child { float: right; }
.row.collapse .mobile-three { padding: 0; }
.row .mobile-four { width: 100% !important; float: left; padding: 0 15px; }
.row .mobile-four:last-child { float: right; }
.row.collapse .mobile-four { padding: 0; }
.push-one-mobile { left: 25%; }
.pull-one-mobile { right: 25%; }
.push-two-mobile { left: 50%; }
.pull-two-mobile { right: 50%; }
.push-three-mobile { left: 75%; }
.pull-three-mobile { right: 75%; } }
/* Block Grids ---------------------- */
/* These are 2-up, 3-up, 4-up and 5-up ULs, suited
for repeating blocks of content. Add 'mobile' to
them to switch them just like the layout grid
(one item per line) on phones
For IE7/8 compatibility block-grid items need to be
the same height. You can optionally uncomment the
lines below to support arbitrary height, but know
that IE7/8 do not support :nth-child.
-------------------------------------------------- */
.block-grid { display: block; overflow: hidden; padding: 0; }
.block-grid > li { display: block; height: auto; float: left; }
.block-grid.one-up { margin: 0; }
.block-grid.one-up > li { width: 100%; padding: 0 0 15px; }
.block-grid.two-up { margin: 0 -15px; }
.block-grid.two-up > li { width: 50%; padding: 0 15px 15px; }
.block-grid.two-up > li:nth-child(2n+1) { clear: both; }
.block-grid.three-up { margin: 0 -12px; }
.block-grid.three-up > li { width: 33.33%; padding: 0 12px 12px; }
.block-grid.three-up > li:nth-child(3n+1) { clear: both; }
.block-grid.four-up { margin: 0 -10px; }
.block-grid.four-up > li { width: 25%; padding: 0 10px 10px; }
.block-grid.four-up > li:nth-child(4n+1) { clear: both; }
.block-grid.five-up { margin: 0 -8px; }
.block-grid.five-up > li { width: 20%; padding: 0 8px 8px; }
.block-grid.five-up > li:nth-child(5n+1) { clear: both; }
/* Mobile Block Grids */
@media only screen and (max-width: 767px) { .block-grid.mobile > li { float: none; width: 100%; margin-left: 0; }
.block-grid > li { clear: none !important; }
.block-grid.mobile-two-up > li { width: 50%; }
.block-grid.mobile-two-up > li:nth-child(2n+1) { clear: both; }
.block-grid.mobile-three-up > li { width: 33.33%; }
.block-grid.mobile-three-up > li:nth-child(3n+1) { clear: both !important; }
.block-grid.mobile-four-up > li { width: 25%; }
.block-grid.mobile-four-up > li:nth-child(4n+1) { clear: both; }
.block-grid.mobile-five-up > li:nth-child(5n+1) { clear: both; } }
/* Requires globals.css */
/* Normal Buttons ---------------------- */
.button { width: auto; background: #fd7800; border: 1px solid #ce6200; -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; color: white; cursor: pointer; display: inline-block; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; line-height: 1; margin: 0; outline: none; padding: 10px 20px 11px; position: relative; text-align: center; text-decoration: none; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; /* Hovers */ /* Sizes */ /* Colors */ /* Radii */ /* Layout */ /* Disabled ---------- */ }
.button:hover { color: white; background-color: #ce6200; }
.button:active { -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; }
.button:focus { -webkit-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; color: white; }
.button.large { font-size: 17px; padding: 15px 30px 16px; }
.button.medium { font-size: 14px; }
.button.small { font-size: 11px; padding: 7px 14px 8px; }
.button.tiny { font-size: 10px; padding: 5px 10px 6px; }
.button.expand { width: 100%; text-align: center; }
.button.primary { background-color: #fd7800; border: 1px solid #1e728c; }
.button.primary:hover { background-color: #2284a1; }
.button.primary:focus { -webkit-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 4px #fd7800, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
.button.success { background-color: #5da423; border: 1px solid #396516; }
.button.success:hover { background-color: #457a1a; }
.button.success:focus { -webkit-box-shadow: 0 0 5px #5da423, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 5px #5da423, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 5px #5da423, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
.button.alert { background-color: #c60f13; border: 1px solid #7f0a0c; }
.button.alert:hover { background-color: #970b0e; }
.button.alert:focus { -webkit-box-shadow: 0 0 4px #c60f13, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 4px #c60f13, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 4px #c60f13, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
.button.secondary { background-color: #e9e9e9; color: #1d1d1d; border: 1px solid #c3c3c3; }
.button.secondary:hover { background-color: #d0d0d0; }
.button.secondary:focus { -webkit-box-shadow: 0 0 5px #e9e9e9, 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 0 5px #e9e9e9, 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 0 5px #e9e9e9, 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
.button.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
.button.round { -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
.button.full-width { width: 100%; text-align: center; padding-left: 0px !important; padding-right: 0px !important; }
.button.left-align { text-align: left; text-indent: 12px; }
.button.disabled, .button[disabled] { opacity: 0.6; cursor: default; background: #fd7800; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
.button.disabled :hover, .button[disabled] :hover { background: #fd7800; }
.button.disabled.success, .button[disabled].success { background-color: #5da423; }
.button.disabled.success:hover, .button[disabled].success:hover { background-color: #5da423; }
.button.disabled.alert, .button[disabled].alert { background-color: #c60f13; }
.button.disabled.alert:hover, .button[disabled].alert:hover { background-color: #c60f13; }
.button.disabled.secondary, .button[disabled].secondary { background-color: #e9e9e9; }
.button.disabled.secondary:hover, .button[disabled].secondary:hover { background-color: #e9e9e9; }
/* Don't use native buttons on iOS */
input[type=submit].button, button.button { -webkit-appearance: none; }
@media only screen and (max-width: 767px) { .button { display: block; }
button.button, input[type="submit"].button { width: 100%; padding-left: 0; padding-right: 0; } }
/* Correct FF button padding */
@-moz-document url-prefix() { button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner { border: none; padding: 0; }
input[type="submit"].tiny.button { padding: 3px 10px 4px; }
input[type="submit"].small.button { padding: 5px 14px 6px; }
input[type="submit"].button, input[type=submit].medium.button { padding: 8px 20px 9px; }
input[type="submit"].large.button { padding: 13px 30px 14px; } }
/* Buttons with Dropdowns ---------------------- */
.button.dropdown { position: relative; padding-right: 44px; /* Sizes */ /* Triangles */ /* Flyout List */ /* Split Dropdown Buttons */ }
.button.dropdown.large { padding-right: 60px; }
.button.dropdown.small { padding-right: 28px; }
.button.dropdown.tiny { padding-right: 20px; }
.button.dropdown:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: white transparent transparent transparent; position: absolute; top: 50%; right: 20px; margin-top: -2px; }
.button.dropdown.large:after { content: ""; display: block; width: 0; height: 0; border: solid 7px; border-color: white transparent transparent transparent; margin-top: -3px; right: 30px; }
.button.dropdown.small:after { content: ""; display: block; width: 0; height: 0; border: solid 5px; border-color: white transparent transparent transparent; margin-top: -2px; right: 14px; }
.button.dropdown.tiny:after { content: ""; display: block; width: 0; height: 0; border: solid 4px; border-color: white transparent transparent transparent; margin-top: -1px; right: 10px; }
.button.dropdown > ul { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; display: none; position: absolute; left: -1px; background: #fff; background: rgba(255, 255, 255, 0.95); list-style: none; margin: 0; padding: 0; border: 1px solid #cccccc; border-top: none; min-width: 100%; z-index: 40; }
.button.dropdown > ul li { width: 100%; cursor: pointer; padding: 0; min-height: 18px; line-height: 18px; margin: 0; white-space: nowrap; list-style: none; }
.button.dropdown > ul li a { display: block; color: #555; font-size: 13px; font-weight: normal; padding: 6px 14px; text-align: left; }
.button.dropdown > ul li:hover { background-color: #e3f4f9; color: #222; }
.button.dropdown > ul li.divider { min-height: 0; padding: 0; height: 1px; margin: 4px 0; background: #ededed; }
.button.dropdown.up > ul { border-top: 1px solid #cccccc; border-bottom: none; }
.button.dropdown ul.no-hover.show-dropdown { display: block !important; }
.button.dropdown:hover > ul.no-hover { display: none; }
.button.dropdown.split { padding: 0; position: relative; /* Sizes */ /* Triangle Spans */ /* Colors */ }
.button.dropdown.split:after { display: none; }
.button.dropdown.split:hover { background-color: #fd7800; }
.button.dropdown.split.alert:hover { background-color: #c60f13; }
.button.dropdown.split.success:hover { background-color: #5da423; }
.button.dropdown.split.secondary:hover { background-color: #e9e9e9; }
.button.dropdown.split > a { color: white; display: block; padding: 10px 50px 11px 20px; padding-left: 20px; padding-right: 50px; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; }
.button.dropdown.split > a:hover { background-color: #2284a1; }
.button.dropdown.split.large > a { padding: 15px 75px 16px 30px; padding-left: 30px; padding-right: 75px; }
.button.dropdown.split.small > a { padding: 7px 35px 8px 14px; padding-left: 14px; padding-right: 35px; }
.button.dropdown.split.tiny > a { padding: 5px 25px 6px 10px; padding-left: 10px; padding-right: 25px; }
.button.dropdown.split > span { background-color: #fd7800; position: absolute; right: 0; top: 0; height: 100%; width: 30px; border-left: 1px solid #1e728c; -webkit-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; }
.button.dropdown.split > span:hover { background-color: #2284a1; }
.button.dropdown.split > span:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: white transparent transparent transparent; position: absolute; top: 50%; left: 50%; margin-left: -6px; margin-top: -2px; }
.button.dropdown.split.secondary > span:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: #1d1d1d transparent transparent transparent; }
.button.dropdown.split.large span { width: 45px; }
.button.dropdown.split.small span { width: 21px; }
.button.dropdown.split.tiny span { width: 15px; }
.button.dropdown.split.large span:after { content: ""; display: block; width: 0; height: 0; border: solid 7px; border-color: white transparent transparent transparent; margin-top: -3px; margin-left: -7px; }
.button.dropdown.split.small span:after { content: ""; display: block; width: 0; height: 0; border: solid 4px; border-color: white transparent transparent transparent; margin-top: -1px; margin-left: -4px; }
.button.dropdown.split.tiny span:after { content: ""; display: block; width: 0; height: 0; border: solid 3px; border-color: white transparent transparent transparent; margin-top: -1px; margin-left: -3px; }
.button.dropdown.split.alert > span { background-color: #c60f13; border-left-color: #7f0a0c; }
.button.dropdown.split.success > span { background-color: #5da423; border-left-color: #396516; }
.button.dropdown.split.secondary > span { background-color: #e9e9e9; border-left-color: #c3c3c3; }
.button.dropdown.split.secondary > a { color: #1d1d1d; }
.button.dropdown.split.alert > a:hover, .button.dropdown.split.alert > span:hover { background-color: #970b0e; }
.button.dropdown.split.success > a:hover, .button.dropdown.split.success > span:hover { background-color: #457a1a; }
.button.dropdown.split.secondary > a:hover, .button.dropdown.split.secondary > span:hover { background-color: #d0d0d0; }
/* Button Groups ---------------------- */
ul.button-group { list-style: none; padding: 0; margin: 0 0 12px; *zoom: 1; }
ul.button-group:before, ul.button-group:after { content: ""; display: table; }
ul.button-group:after { clear: both; }
ul.button-group li { padding: 0; margin: 0 0 0 -1px; float: left; }
ul.button-group li:first-child { margin-left: 0; }
ul.button-group.radius li a.button, ul.button-group.radius li a.button.radius, ul.button-group.radius li a.button-rounded { -webkit-border-radius: 0px; -moz-border-radius: 0px; -ms-border-radius: 0px; -o-border-radius: 0px; border-radius: 0px; }
ul.button-group.radius li:first-child a.button, ul.button-group.radius li:first-child a.button.radius { -moz-border-radius-left3px: 5px; -webkit-border-left-3px-radius: 5px; border-left-3px-radius: 5px; }
ul.button-group.radius li:first-child a.button.rounded { -moz-border-radius-left1000px: 5px; -webkit-border-left-1000px-radius: 5px; border-left-1000px-radius: 5px; }
ul.button-group.radius li:last-child a.button, ul.button-group.radius li:last-child a.button.radius { -moz-border-radius-right3px: 5px; -webkit-border-right-3px-radius: 5px; border-right-3px-radius: 5px; }
ul.button-group.radius li:last-child a.button.rounded { -moz-border-radius-right1000px: 5px; -webkit-border-right-1000px-radius: 5px; border-right-1000px-radius: 5px; }
ul.button-group.even a.button { width: 100%; }
ul.button-group.even.two-up li { width: 50%; }
ul.button-group.even.three-up li { width: 33.3%; }
ul.button-group.even.three-up li:first-child { width: 33.4%; }
ul.button-group.even.four-up li { width: 25%; }
ul.button-group.even.five-up li { width: 20%; }
@media only screen and (max-width: 767px) { .button-group button.button, .button-group input[type="submit"].button { width: auto; padding: 10px 20px 11px; }
.button-group button.button.large, .button-group input[type="submit"].button.large { padding: 15px 30px 16px; }
.button-group button.button.medium, .button-group input[type="submit"].button.medium { padding: 10px 20px 11px; }
.button-group button.button.small, .button-group input[type="submit"].button.small { padding: 7px 14px 8px; }
.button-group button.button.tiny, .button-group input[type="submit"].button.tiny { padding: 5px 10px 6px; }
.button-group.even button.button, .button-group.even input[type="submit"].button { width: 100%; padding-left: 0; padding-right: 0; } }
div.button-bar { overflow: hidden; }
div.button-bar ul.button-group { float: left; margin-right: 8px; }
div.button-bar ul.button-group:last-child { margin-left: 0; }
/* CSS for jQuery Reveal Plugin Maintained for Foundation. foundation.zurb.com Free to use under the MIT license. http://www.opensource.org/licenses/mit-license.php */
/* Reveal Modals ---------------------- */
.reveal-modal-bg { position: fixed; height: 100%; width: 100%; background: #000; background: rgba(0, 0, 0, 0.45); z-index: 40; display: none; top: 0; left: 0; }
.reveal-modal { background: white; visibility: hidden; display: none; top: 100px; left: 50%; margin-left: -260px; width: 520px; position: absolute; z-index: 41; padding: 30px; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }
.reveal-modal *:first-child { margin-top: 0; }
.reveal-modal *:last-child { margin-bottom: 0; }
.reveal-modal .close-reveal-modal { font-size: 22px; font-size: 2.2rem; line-height: .5; position: absolute; top: 8px; right: 11px; color: #aaa; text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6); font-weight: bold; cursor: pointer; }
.reveal-modal.small { width: 30%; margin-left: -15%; }
.reveal-modal.medium { width: 40%; margin-left: -20%; }
.reveal-modal.large { width: 60%; margin-left: -30%; }
.reveal-modal.xlarge { width: 70%; margin-left: -35%; }
.reveal-modal.expand { width: 90%; margin-left: -45%; }
.reveal-modal .row { min-width: 0; margin-bottom: 10px; }
/* Mobile */
@media only screen and (max-width: 767px) { .reveal-modal-bg { position: absolute; }
.reveal-modal, .reveal-modal.small, .reveal-modal.medium, .reveal-modal.large, .reveal-modal.xlarge { width: 80%; top: 15px; left: 50%; margin-left: -40%; padding: 20px; height: auto; } }
/* NOTES Close button entity is &#215;
Example markup <div id="myModal" class="reveal-modal"> <h2>Awesome. I have it.</h2> <p class="lead">Your couch. I it's mine.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ultrices aliquet placerat. Duis pulvinar orci et nisi euismod vitae tempus lorem consectetur. Duis at magna quis turpis mattis venenatis eget id diam. </p> <a class="close-reveal-modal">&#215;</a> </div> */
/* Requires -globals.css -app.js */
/* Tabs ---------------------- */
dl.tabs { border-bottom: solid 1px #e6e6e6; display: block; height: 40px; padding: 0; margin-bottom: 20px; }
dl.tabs.contained { margin-bottom: 0; }
dl.tabs dt { color: #b3b3b3; cursor: default; display: block; float: left; font-size: 12px; height: 40px; line-height: 40px; padding: 0; padding-right: 9px; padding-left: 20px; width: auto; text-transform: uppercase; }
dl.tabs dt:first-child { padding: 0; padding-right: 9px; }
dl.tabs dd { display: block; float: left; padding: 0; margin: 0; }
dl.tabs dd a { color: #6f6f6f; display: block; font-size: 14px; height: 40px; line-height: 40px; padding: 0px 23.8px; }
dl.tabs dd a:focus { font-weight: bold; color: #fd7800; }
dl.tabs dd.active { border-top: 3px solid #fd7800; margin-top: -3px; }
dl.tabs dd.active a { cursor: default; color: #3c3c3c; background: #fff; border-left: 1px solid #e6e6e6; border-right: 1px solid #e6e6e6; font-weight: bold; }
dl.tabs dd:first-child { margin-left: 0; }
dl.tabs.vertical { height: auto; border-bottom: 1px solid #e6e6e6; }
dl.tabs.vertical dt, dl.tabs.vertical dd { float: none; height: auto; }
dl.tabs.vertical dd { border-left: 3px solid #cccccc; }
dl.tabs.vertical dd a { background: #f2f2f2; border: none; border: 1px solid #e6e6e6; border-width: 1px 1px 0 0; color: #555; display: block; font-size: 14px; height: auto; line-height: 1; padding: 15px 20px; -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
dl.tabs.vertical dd.active { margin-top: 0; border-top: 1px solid #4d4d4d; border-left: 4px solid #1a1a1a; }
dl.tabs.vertical dd.active a { background: #4d4d4d; border: none; color: #fff; height: auto; margin: 0; position: static; top: 0; -webkit-box-shadow: 0 0 0; -moz-box-shadow: 0 0 0; box-shadow: 0 0 0; }
dl.tabs.vertical dd:first-child a.active { margin: 0; }
dl.tabs.pill { border-bottom: none; margin-bottom: 10px; }
dl.tabs.pill dd { margin-right: 10px; }
dl.tabs.pill dd:last-child { margin-right: 0; }
dl.tabs.pill dd a { -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; background: #e6e6e6; height: 26px; line-height: 26px; color: #666; }
dl.tabs.pill dd.active { border: none; margin-top: 0; }
dl.tabs.pill dd.active a { background-color: #fd7800; border: none; color: #fff; }
dl.tabs.pill.contained { border-bottom: solid 1px #eee; margin-bottom: 0; }
dl.tabs.pill.two-up dd, dl.tabs.pill.three-up dd, dl.tabs.pill.four-up dd, dl.tabs.pill.five-up dd { margin-right: 0; }
dl.tabs.two-up dt a, dl.tabs.two-up dd a, dl.tabs.three-up dt a, dl.tabs.three-up dd a, dl.tabs.four-up dt a, dl.tabs.four-up dd a, dl.tabs.five-up dt a, dl.tabs.five-up dd a { padding: 0 17px; text-align: center; overflow: hidden; }
dl.tabs.two-up dt, dl.tabs.two-up dd { width: 50%; }
dl.tabs.three-up dt, dl.tabs.three-up dd { width: 33.33%; }
dl.tabs.four-up dt, dl.tabs.four-up dd { width: 25%; }
dl.tabs.five-up dt, dl.tabs.five-up dd { width: 20%; }
ul.tabs-content { display: block; margin: 0 0 20px; padding: 0; }
ul.tabs-content > li { display: none; }
ul.tabs-content > li.active { display: block; }
ul.tabs-content.contained { padding: 0; }
ul.tabs-content.contained > li { border: solid 0 #e6e6e6; border-width: 0 1px 1px 1px; padding: 20px; }
ul.tabs-content.contained.vertical > li { border-width: 1px 1px 1px 1px; }
.no-js ul.tabs-content > li { display: block; }
@media only screen and (max-width: 767px) { dl.tabs.mobile { width: auto; margin: 20px -20px 40px; height: auto; }
dl.tabs.mobile dt, dl.tabs.mobile dd { float: none; height: auto; }
dl.tabs.mobile dd a { display: block; width: auto; height: auto; padding: 18px 20px; line-height: 1; border: solid 0 #ccc; border-width: 1px 0 0; margin: 0; color: #555; background: #eee; font-size: 15px; font-size: 1.5rem; }
dl.tabs.mobile dd a.active { height: auto; margin: 0; border-width: 1px 0 0; }
.tabs.mobile { border-bottom: solid 1px #ccc; height: auto; }
.tabs.mobile dd a { padding: 18px 20px; border: none; border-left: none; border-right: none; border-top: 1px solid #ccc; background: #fff; }
.tabs.mobile dd a.active { border: none; background: #fd7800; color: #fff; margin: 0; position: static; top: 0; height: auto; }
.tabs.mobile dd:first-child a.active { margin: 0; }
dl.contained.mobile { margin-bottom: 0; }
dl.contained.tabs.mobile dd a { padding: 18px 20px; }
dl.tabs.mobile + ul.contained { margin-left: -20px; margin-right: -20px; border-width: 0 0 1px 0; } }
/* Requires: globals.css */
/* Table of Contents
:: Visibility
:: Alerts
:: Labels
:: Tooltips
:: Panels
:: Accordion
:: Side Nav
:: Sub Nav
:: Pagination
:: Breadcrumbs
:: Lists
:: Link Lists
:: Keystroke Chars
:: Image Thumbnails
:: Video
:: Tables
:: Microformats
:: Progress Bars
*/
/* Visibility Classes ---------------------- */
/* Standard (large) display targeting */
.show-for-small, .show-for-medium, .show-for-medium-down, .hide-for-large, .hide-for-large-up, .show-for-xlarge { display: none !important; }
.hide-for-xlarge, .show-for-large, .show-for-large-up, .hide-for-small, .hide-for-medium, .hide-for-medium-down { display: block !important; }
/* Very large display targeting */
@media only screen and (min-width: 1441px) { .hide-for-small, .hide-for-medium, .hide-for-medium-down, .hide-for-large, .show-for-large-up, .show-for-xlarge { display: block !important; }
.show-for-small, .show-for-medium, .show-for-medium-down, .show-for-large, .hide-for-large-up, .hide-for-xlarge { display: none !important; } }
/* Medium display targeting */
@media only screen and (max-width: 1279px) and (min-width: 768px) { .hide-for-small, .show-for-medium, .show-for-medium-down, .hide-for-large, .hide-for-large-up, .hide-for-xlarge { display: block !important; }
.show-for-small, .hide-for-medium, .hide-for-medium-down, .show-for-large, .show-for-large-up, .show-for-xlarge { display: none !important; } }
/* Small display targeting */
@media only screen and (max-width: 767px) { .show-for-small, .hide-for-medium, .show-for-medium-down, .hide-for-large, .hide-for-large-up, .hide-for-xlarge { display: block !important; }
.hide-for-small, .show-for-medium, .hide-for-medium-down, .show-for-large, .show-for-large-up, .show-for-xlarge { display: none !important; } }
/* Orientation targeting */
.show-for-landscape, .hide-for-portrait { display: block !important; }
.hide-for-landscape, .show-for-portrait { display: none !important; }
@media screen and (orientation: landscape) { .show-for-landscape, .hide-for-portrait { display: block !important; }
.hide-for-landscape, .show-for-portrait { display: none !important; } }
@media screen and (orientation: portrait) { .show-for-portrait, .hide-for-landscape { display: block !important; }
.hide-for-portrait, .show-for-landscape { display: none !important; } }
/* Touch-enabled device targeting */
.show-for-touch { display: none !important; }
.hide-for-touch { display: block !important; }
.touch .show-for-touch { display: block !important; }
.touch .hide-for-touch { display: none !important; }
/* Specific overrides for elements that require something other than display: block */
table.show-for-xlarge, table.show-for-large, table.hide-for-small, table.hide-for-medium { display: table !important; }
@media only screen and (max-width: 1279px) and (min-width: 768px) { .touch table.hide-for-xlarge, .touch table.hide-for-large, .touch table.hide-for-small, .touch table.show-for-medium { display: table !important; } }
@media only screen and (max-width: 767px) { table.hide-for-xlarge, table.hide-for-large, table.hide-for-medium, table.show-for-small { display: table !important; } }
/* Alerts ---------------------- */
div.alert-box { display: block; padding: 6px 7px 7px; font-weight: bold; font-size: 14px; color: white; background-color: #fd7800; border: 1px solid rgba(0, 0, 0, 0.1); margin-bottom: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); position: relative; }
div.alert-box.success { background-color: #5da423; color: #fff; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); }
div.alert-box.alert { background-color: #c60f13; color: #fff; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); }
div.alert-box.secondary { background-color: #e9e9e9; color: #505050; text-shadow: 0 1px rgba(255, 255, 255, 0.3); }
div.alert-box a.close { color: #333; position: absolute; right: 4px; top: -1px; font-size: 17px; opacity: 0.2; padding: 4px; }
div.alert-box a.close:hover, div.alert-box a.close:focus { opacity: 0.4; }
/* Labels ---------------------- */
/* Tooltips ---------------------- */
.has-tip { border-bottom: dotted 1px #cccccc; cursor: help; font-weight: bold; color: #333333; }
.has-tip:hover { border-bottom: dotted 1px #196177; color: #fd7800; }
.has-tip.tip-left, .has-tip.tip-right { float: none !important; }
.tooltip { display: none; background: black; background: rgba(0, 0, 0, 0.85); position: absolute; color: white; font-weight: bold; font-size: 12px; font-size: 1.2rem; padding: 5px; z-index: 999; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; line-height: normal; }
.tooltip > .nub { display: block; width: 0; height: 0; border: solid 5px; border-color: transparent transparent black transparent; border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent; position: absolute; top: -10px; left: 10px; }
.tooltip.tip-override > .nub { border-color: transparent transparent black transparent !important; border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent !important; top: -10px !important; }
.tooltip.tip-top > .nub { border-color: black transparent transparent transparent; border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent; top: auto; bottom: -10px; }
.tooltip.tip-left, .tooltip.tip-right { float: none !important; }
.tooltip.tip-left > .nub { border-color: transparent transparent transparent black; border-color: transparent transparent transparent rgba(0, 0, 0, 0.85); right: -10px; left: auto; }
.tooltip.tip-right > .nub { border-color: transparent black transparent transparent; border-color: transparent rgba(0, 0, 0, 0.85) transparent transparent; right: auto; left: -10px; }
.tooltip.noradius { -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; }
.tooltip.opened { color: #fd7800 !important; border-bottom: dotted 1px #196177 !important; }
.tap-to-close { display: block; font-size: 10px; font-size: 1rem; color: #888888; font-weight: normal; }
@media only screen and (max-width: 767px) { .tooltip { font-size: 14px; font-size: 1.4rem; line-height: 1.4; padding: 7px 10px 9px 10px; }
.tooltip > .nub, .tooltip.top > .nub, .tooltip.left > .nub, .tooltip.right > .nub { border-color: transparent transparent black transparent; border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent; top: -12px; left: 10px; } }
/* Panels ---------------------- */
.panel { background: #f2f2f2; border: solid 1px #e6e6e6; margin: 0 0 22px 0; padding: 20px; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel.callout { background: #fd7800; color: #fff; border-color: #2284a1; -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); }
.panel.callout a { color: #fff; }
.panel.callout .button { background: white; border: none; color: #fd7800; text-shadow: none; }
.panel.callout .button:hover { background: rgba(255, 255, 255, 0.8); }
.panel.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
/* Accordion ---------------------- */
ul.accordion { margin: 0 0 22px 0; border-bottom: 1px solid #e9e9e9; }
ul.accordion > li { list-style: none; margin: 0; padding: 0; border-top: 1px solid #e9e9e9; }
ul.accordion > li .title { cursor: pointer; background: #f6f6f6; padding: 15px; margin: 0; position: relative; border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; -webkit-transition: 0.15s background linear; -moz-transition: 0.15s background linear; -o-transition: 0.15s background linear; transition: 0.15s background linear; }
ul.accordion > li .title h1, ul.accordion > li .title h2, ul.accordion > li .title h3, ul.accordion > li .title h4, ul.accordion > li .title h5 { margin: 0; }
ul.accordion > li .title:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: transparent #9d9d9d transparent transparent; position: absolute; right: 15px; top: 21px; }
ul.accordion > li .content { display: none; padding: 15px; }
ul.accordion > li.active { border-top: 3px solid #fd7800; }
ul.accordion > li.active .title { background: white; padding-top: 13px; }
ul.accordion > li.active .title:after { content: ""; display: block; width: 0; height: 0; border: solid 6px; border-color: #9d9d9d transparent transparent transparent; }
ul.accordion > li.active .content { background: white; display: block; border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; }
/* Side Nav ---------------------- */
ul.side-nav { display: block; list-style: none; margin: 0; padding: 17px 0; }
ul.side-nav li { display: block; list-style: none; margin: 0 0 7px 0; }
ul.side-nav li a { display: block; }
ul.side-nav li.active a { color: #4d4d4d; font-weight: bold; }
ul.side-nav li.divider { border-top: 1px solid #e6e6e6; height: 0; padding: 0; }
/* Sub Navs http://www.zurb.com/article/292/how-to-create-simple-and-effective-sub-na ---------------------- */
dl.sub-nav { display: block; width: auto; overflow: hidden; margin: -4px 0 18px; margin-right: 0; margin-left: -9px; padding-top: 4px; }
dl.sub-nav dt, dl.sub-nav dd { float: left; display: inline; margin-left: 9px; margin-bottom: 10px; }
dl.sub-nav dt { color: #999; font-weight: normal; }
dl.sub-nav dd a { text-decoration: none; -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
dl.sub-nav dd.active a { font-weight: bold; background: #fd7800; color: #fff; padding: 3px 9px; cursor: default; }
/* Pagination ---------------------- */
ul.pagination { display: block; height: 24px; margin-left: -5px; }
ul.pagination li { float: left; display: block; height: 24px; color: #999; font-size: 14px; margin-left: 5px; }
ul.pagination li a { display: block; padding: 1px 7px 1px; color: #555; }
ul.pagination li:hover a, ul.pagination li a:focus { background: #e6e6e6; }
ul.pagination li.unavailable a { cursor: default; color: #999; }
ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus { background: transparent; }
ul.pagination li.current a { background: #fd7800; color: white; font-weight: bold; cursor: default; }
ul.pagination li.current a:hover { background: #fd7800; }
/* Breadcrums ---------------------- */
ul.breadcrumbs { display: block; background: #f6f6f6; padding: 6px 10px 7px; border: 1px solid #e9e9e9; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; overflow: hidden; }
ul.breadcrumbs li { margin: 0; padding: 0 12px 0 0; float: left; list-style: none; }
ul.breadcrumbs li a, ul.breadcrumbs li span { text-transform: uppercase; font-size: 11px; font-size: 1.1rem; padding-left: 12px; }
ul.breadcrumbs li:first-child a, ul.breadcrumbs li:first-child span { padding-left: 0; }
ul.breadcrumbs li:before { content: "/"; color: #aaa; }
ul.breadcrumbs li:first-child:before { content: " "; }
ul.breadcrumbs li.current a { cursor: default; color: #333; }
ul.breadcrumbs li:hover a, ul.breadcrumbs li a:focus { text-decoration: underline; }
ul.breadcrumbs li.current:hover a, ul.breadcrumbs li.current a:focus { text-decoration: none; }
ul.breadcrumbs li.unavailable a { color: #999; }
ul.breadcrumbs li.unavailable:hover a, ul.breadcrumbs li.unavailable a:focus { text-decoration: none; color: #999; cursor: default; }
/* Link List */
ul.link-list { margin: 0 0 17px -22px; padding: 0; list-style: none; overflow: hidden; }
ul.link-list li { list-style: none; float: left; margin-left: 22px; display: block; }
ul.link-list li a { display: block; }
/* Keytroke Characters ---------------------- */
.keystroke, kbd { font-family: "Consolas", "Menlo", "Courier", monospace; font-size: 13px; padding: 2px 4px 0px; margin: 0; background: #ededed; border: solid 1px #dbdbdb; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
/* Image Thumbnails ---------------------- */
.th { display: block; }
.th img { display: block; border: solid 4px #fff; -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-transition-property: border, box-shadow; -moz-transition-property: border, box-shadow; -o-transition-property: border, box-shadow; transition-property: border, box-shadow; -webkit-transition-duration: 300ms; -moz-transition-duration: 300ms; -o-transition-duration: 300ms; transition-duration: 300ms; }
.th:hover img { -webkit-box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); -moz-box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); }
/* Video - Mad props to http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ ---------------------- */
.flex-video { position: relative; padding-top: 25px; padding-bottom: 67.5%; height: 0; margin-bottom: 16px; overflow: hidden; }
.flex-video.widescreen { padding-bottom: 57.25%; }
.flex-video.vimeo { padding-top: 0; }
.flex-video iframe, .flex-video object, .flex-video embed, .flex-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
@@ -0,0 +1,776 @@
@import url("base.css");
@import url("foundation.css");
table {
border: 0;
}
pre {
padding: 10px;
background-color: #fafafa;
color: #222;
line-height: 1.0em;
border: 2px solid #C6C9CB;
font-size: 0.9em;
/* margin: 1.5em 0 1.5em 0; */
margin: 0;
border-right-style: none;
border-left-style: none;
}
/* General */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:active,
a:hover {
text-decoration: none;
}
h1,h2,h3,h4,h5,h6 {
color: #000;
margin-bottom: 18px;
}
h1 { font-weight: normal; font-size: 24px; line-height: 24px; }
h2 { font-weight: normal; font-size: 18px; line-height: 18px; }
h3 { font-weight: bold; font-size: 18px; line-height: 18px; }
h4 { font-weight: normal; font-size: 18px; line-height: 178px; }
hr {
background-color: #c6c6c6;
border:0;
height: 1px;
margin-bottom: 18px;
clear:both;
}
div.hr {
height: 1px;
background: #c6c6c6;
}
div.hr2 {
height: 1px;
background: #c6c6c6;
}
div.hr hr, div.hr2 hr {
display: none;
}
p {
padding: 0 0 0.5em;
line-height:1.6em;
}
ul {
list-style: square;
margin: 0 0 18px 0;
}
ol {
list-style: decimal;
margin: 0 0 18px 1.5em;
}
ol ol {
list-style:upper-alpha;
}
ol ol ol {
list-style:lower-roman;
}
ol ol ol ol {
list-style:lower-alpha;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
dl {
margin:0 0 24px 0;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 18px;
}
strong {
font-weight: bold;
color: #000;
}
cite,
em,
i {
font-style: italic;
border: none;
}
big {
font-size: 131.25%;
}
ins {
background: #FFFFCC;
border: none;
color: #333;
}
del {
text-decoration: line-through;
color: #555;
}
blockquote {
font-style: italic;
padding: 0 3em;
}
blockquote cite,
blockquote em,
blockquote i {
font-style: normal;
}
pre {
background: #f7f7f7;
color: #222;
padding: 1.5em;
}
abbr,
acronym {
border-bottom: 1px solid #666;
cursor: help;
}
ins {
text-decoration: none;
}
sup,
sub {
height: 0;
line-height: 1;
vertical-align: baseline;
position: relative;
font-size: 10px;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
p,
ul,
ol,
dd,
hr {
margin-bottom:10px;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
pre,
kbd,
tt,
var {
}
code {
font-size: 13px;
}
strong,
b,
dt,
th {
color: #000;
}
/* main_container */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#wrapper {
padding: 0px 0px;
margin-top: 20px;
}
/* header*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#search-header{
margin-top:15px;
padding-bottom:13px;
}
#search-header #search{
background: #222;
}
#search-header #search #s{
background: #222;
font-size:12px;
color: #aaa;
}
#header_container{
padding-bottom: 25px;
padding-top: 0px;
background: #fff;
}
#header {
}
#header2 {
}
#content_container{
padding-top: 15px;
}
#left-col {
padding: 10px 20px;
padding-left: 0px;
background: #fff;
}
/*footer*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#footer {
padding: 5px 20px;
background: #ddd;
}
#footer-container{
padding: 5px 20px;
background: #303030;
border-top: 8px solid #000;
font-size:11px;
}
#footer-info {
color:#ccc;
text-align:left;
background: #1b1b1b;
padding: 20px 0;
}
#footer-info a{
text-decoration:none;
color: #fff;
}
#footer-info a:hover{
color: #ebebeb;
}
#copyright{float: left;}
.scroll-top {
text-align:right;
}
#footer-widget{
padding: 8px 0px 8px 0px;
color:#6f6f6f;
}
#footer-widget #search {
width:120px;
height:28px;
background: #222;
margin-left: 0px;
position: relative;
border: 1px solid #666;
}
#footer-widget #search #s {
width:110px;
height:23px;
border:0px;
margin-left:7px;
margin-right:10px;
margin-top:3px;
color:#fff;
display: inline;
background: #222;
float: left;
}
#footer-widget #calendar_wrap {
padding: 8px 0px;
}
#footer-widget #wp-calendar td{
padding:2px;
}
#footer-widget .textwidget {
padding: 5px 0px;
line-height: 23px;
}
#footer-widget .widget_tag_cloud a{
text-decoration: none;
margin: 5px;
line-height: 24px;
margin-left: 0px;
color: #6f6f6f;
}
#footer-widget .widget_tag_cloud a:hover{
color: #fff;
}
#footer-widget .widget-container ul li a {
color:#fd7800;
}
#footer-widget .widget-container ul li a:hover {
color: #ccc;
}
#footer-widget .widget-container h3 {
color: #a5a5a5;
text-transform: uppercase;
margin-bottom: 0px;
padding-top: 10px;
padding-left: 0px;
font-size: 25px;
padding-bottom: 8px;
font-weight: bold;
}
#footer-widget .widget-container ul li {
padding: 5px 0px;
background: none;
}
#footer-widget ul {
margin-left: 0px;
}
#footer-bar1 {
padding-right: 40px;
}
#footer-bar2 {
padding-right: 40px;
}
#footer-bar3 {
}
#footer-bar4 {
}
span#follow-box{
position: absolute;
right: 100px;
}
span#follow-box img{
margin: 0 2px;
}
/*logo*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#logo {
margin: 0px 0px 0px 0px;
}
#logo2 {
margin: 0px 0px 0px 0px;
}
#logo img{
border: none;
}
#logo2{
text-decoration: none;
font-size: 42px;
letter-spacing: -1pt;
font-weight: bold;
font-family:arial, "Times New Roman", Times, serif;
text-align: left;
line-height: 57px;
padding-left: 0px;
}
#logo2 a, #slogan{
color: #fd7800;
}
#slogan{
text-align: left;
padding-left: 0px;
}
/*search*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#search {
width:180px;
height:28px;
border: 1px solid #ccc;
margin-left: 10px;
position: relative;
}
#sidebar #search {
margin-top: 20px;
}
#search #searchsubmit {
background:url(images/go-btn.png) no-repeat top right;
width:28px;
height:28px;
border:0px;
position:absolute;
right: -35px;
}
#search #s {
width:170px;
height:23px;
border:0px;
margin-left:7px;
margin-right:10px;
margin-top:3px;
color:#000;
display: inline;
float: left;
}
/*menu bar*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#menu_container{
padding-top: 0px;
}
/*responsive menu*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
/* default style */
.selectnav { display: none; }
/* small screen */
@media screen and (max-width: 600px) {
.js #nav { display: none; }
.js #nav2 { display: none; }
.js .selectnav { display: block; }
}
/*welcome*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#welcome_container h1{
margin-top: 0px;
}
/*homepage boxes*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#box_container{
padding-top: 35px;
padding-bottom: 15px;
}
.box-head {
float: left;
padding-bottom: 20px;
}
.box-head img{
}
.title-head{
padding-top:2px;
}
.title-box{
color: #333;
line-height: 15px;
text-transform: uppercase;
}
.title-box h1 {
font-size: 18px;
margin-bottom: 3px;
}
.box-content {
float: left;
padding-top: 10px;
line-height: 20px;
}
/* POST */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
.post {
overflow: hidden;
}
.post-shadow{
background: url("images/post_shadow.png") no-repeat bottom;
height: 9px;
margin-bottom: 25px;
}
.post ol{
margin-left: 20px;
}
.post ul {
margin-left: 15px;
}
.post-entry ul { margin: 0 0 10px 10px; }
.post-entry ul li {
display: block;
margin: 5px 0;
padding: 0 0 0 20px;
/*background: url(images/bullet.png) no-repeat 0 7px;*/
}
.post-entry ol {
list-style: decimal;
margin: 0 0 18px 1.6em;
}
.post-entry ol li {
list-style: decimal;
}
.post-entry {
padding-bottom: 10px;
padding-top: 10px;
overflow: hidden;
}
.post-head {
margin-bottom: 5px;
padding-top: 15px;
}
.post-head h1 a, .post-head h1 {
text-decoration:none;
color:#000;
margin: 0px;
font-size: 27px;
}
.post-head h1 a:hover {
color:#777;
}
.post-head-notfound h1, .post-head-404 h1, .post-head-archive h1, .post-head-search h1 {
margin-bottom: 10px;
font-weight:normal;
text-decoration:none;
color:#000;
font-size: 27px;
}
.post-thumb img {
border: 0px solid #ebebeb;
}
.post-entry img{
margin-bottom: 10px;
height:auto;
max-width:100% !important;
}
.meta-data{
line-height: 16px;
padding: 6px 3px;
margin-bottom: 3px;
font-size: 11px;
border-bottom: 1px solid #e9e9e9;
}
.meta-data a{
color: #fd7800;
}
.meta-data a:hover{
color: #777;
}
.read-more {
color: #000;
background: #fff;
padding: 4px 8px;
border-radius: 3px;
display: inline-block;
font-size: 11px;
font-weight: bold;
text-decoration: none;
text-transform: capitalize;
cursor: pointer;
margin-top: 20px;
}
.read-more:hover{
background: #fff;
color: #666;
}
.clear {
clear:both;
}
.sticky {
}
/* content */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#content_container table {
border: 1px solid #e7e7e7;
margin: 0 -1px 24px 0;
text-align: left;
width: 100%;
}
#content_container tr th,
#content_container thead th {
color: #888;
font-size: 12px;
font-weight: bold;
line-height: 18px;
padding: 9px 10px;
}
#content_container tr td {
padding: 6px 10px;
}
#content_container tr.odd td {
background: #f2f7fc;
}
/*--navigation--*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
.navigation {
float: left;
width: 100%;
margin: 20px 0;
}
.navigation .alignleft a {
float: left;
}
.navigation .alignright a {
float: right;
}
#nav-single {
overflow:hidden;
margin-top:20px;
margin-bottom:10px;
}
.nav-previous {
float: left;
width: 50%;
}
.nav-next {
float: right;
text-align: right;
width: 50%;
}
/*--sub head and breadcrumbs--*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#subhead_container{
padding: 7px 0px;
}
#subhead h1{
color: #000;
padding-top: 10px;
padding-left: 0px;
font-size: 30px;
}
#breadcrumbs {
padding-left: 25px;
margin-bottom: 15px;
color: #9e9e9e;
margin:0 auto;
width: 964px;
font-size: 10px;
}
#breadcrumbs a{
text-decoration: none;
color: #9e9e9e;
}
/*Alignments */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
.alignleft,
img.alignleft {
display: inline;
float: left;
margin-right: 22px;
margin-top: 9px;
}
.alignright,
img.alignright {
display: inline;
float: right;
margin-left: 22px;
margin-top: 8px;
}
.aligncenter,
img.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
.alignleft,
.alignright,
.aligncenter,
img.alignleft,
img.alignright,
img.aligncenter
{
margin-bottom: 10px;
}
a img.aligncenter {
display:block;
margin-left:auto;
margin-right:auto;
}
img { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; }
@@ -0,0 +1,813 @@
@import url("base.css");
@import url("foundation.css");
table {
border: 0;
}
pre {
padding: 10px;
background-color: #fafafa;
color: #222;
/* line-height: 1.0em; */
border: 2px solid #C6C9CB;
font-size: 0.9em;
/* margin: 1.5em 0 1.5em 0; */
margin: 0;
border-right-style: none;
border-left-style: none;
}
/* General */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:active,
a:hover {
text-decoration: none;
}
h1,h2,h3,h4,h5,h6 {
color: #000;
margin-bottom: 18px;
}
h1 { font-weight: bold; font-size: 24px; }
h2 { font-weight: bold; font-size: 18px; }
h3 { font-weight: bold; font-size: 16px; }
h4 { font-weight: bold; font-size: 14px; }
hr {
background-color: #c6c6c6;
border:0;
height: 1px;
margin-bottom: 18px;
clear:both;
}
div.hr {
height: 1px;
background: #c6c6c6;
}
div.hr2 {
height: 1px;
background: #c6c6c6;
}
div.hr hr, div.hr2 hr {
display: none;
}
p {
padding: 0;
line-height:1.6em;
}
ul {
list-style: square;
margin: 0 0 18px 0;
}
ol {
list-style: decimal;
margin: 0 0 18px 1.5em;
}
ol ol {
list-style:upper-alpha;
}
ol ol ol {
list-style:lower-roman;
}
ol ol ol ol {
list-style:lower-alpha;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
dl {
margin:0 0 24px 0;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 18px;
}
strong {
font-weight: bold;
color: #000;
}
cite,
em,
i {
font-style: italic;
border: none;
}
big {
font-size: 131.25%;
}
ins {
background: #FFFFCC;
border: none;
color: #333;
}
del {
text-decoration: line-through;
color: #555;
}
blockquote {
padding: 0 3em;
}
blockquote cite,
blockquote em,
blockquote i {
font-style: normal;
}
pre {
background: #f7f7f7;
color: #222;
padding: 1.5em;
}
abbr,
acronym {
border-bottom: 1px solid #666;
cursor: help;
}
ins {
text-decoration: none;
}
sup,
sub {
height: 0;
line-height: 1;
vertical-align: baseline;
position: relative;
font-size: 10px;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
p,
ul,
ol,
dd,
hr {
margin-bottom:10px;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
pre,
kbd,
tt,
var {
}
code {
font-size: 13px;
}
strong,
b,
dt,
th {
color: #000;
}
/* main_container */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#wrapper {
padding: 0px 0px;
margin-top: 20px;
}
/* header*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#search-header{
margin-top:15px;
padding-bottom:13px;
}
#search-header #search{
background: #222;
}
#search-header #search #s{
background: #222;
font-size:12px;
color: #aaa;
}
#header_container{
padding-bottom: 25px;
padding-top: 0px;
background: #fff;
}
#header {
}
#header2 {
}
#content_container{
padding-top: 15px;
}
#left-col {
padding: 10px 20px;
padding-left: 0px;
background: #fff;
}
/*footer*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#footer {
padding: 5px 20px;
background: #ddd;
}
#footer-container{
padding: 5px 20px;
background: #303030;
border-top: 8px solid #000;
font-size:11px;
}
#footer-info {
color:#ccc;
text-align:left;
background: #1b1b1b;
padding: 20px 0;
}
#footer-info a{
text-decoration:none;
color: #fff;
}
#footer-info a:hover{
color: #ebebeb;
}
#copyright{float: left;}
.scroll-top {
text-align:right;
}
#footer-widget{
padding: 8px 0px 8px 0px;
color:#6f6f6f;
}
#footer-widget #search {
width:120px;
height:28px;
background: #222;
margin-left: 0px;
position: relative;
border: 1px solid #666;
}
#footer-widget #search #s {
width:110px;
height:23px;
border:0px;
margin-left:7px;
margin-right:10px;
margin-top:3px;
color:#fff;
display: inline;
background: #222;
float: left;
}
#footer-widget #calendar_wrap {
padding: 8px 0px;
}
#footer-widget #wp-calendar td{
padding:2px;
}
#footer-widget .textwidget {
padding: 5px 0px;
line-height: 23px;
}
#footer-widget .widget_tag_cloud a{
text-decoration: none;
margin: 5px;
line-height: 24px;
margin-left: 0px;
color: #6f6f6f;
}
#footer-widget .widget_tag_cloud a:hover{
color: #fff;
}
#footer-widget .widget-container ul li a {
color:#fd7800;
}
#footer-widget .widget-container ul li a:hover {
color: #ccc;
}
#footer-widget .widget-container h3 {
color: #a5a5a5;
text-transform: uppercase;
margin-bottom: 0px;
padding-top: 10px;
padding-left: 0px;
font-size: 25px;
padding-bottom: 8px;
font-weight: bold;
}
#footer-widget .widget-container ul li {
padding: 5px 0px;
background: none;
}
#footer-widget ul {
margin-left: 0px;
}
#footer-bar1 {
padding-right: 40px;
}
#footer-bar2 {
padding-right: 40px;
}
#footer-bar3 {
}
#footer-bar4 {
}
span#follow-box{
position: absolute;
right: 100px;
}
span#follow-box img{
margin: 0 2px;
}
/*logo*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#logo {
margin: 0px 0px 0px 0px;
}
#logo2 {
margin: 0px 0px 0px 0px;
}
#logo img{
border: none;
}
#logo2{
text-decoration: none;
font-size: 42px;
letter-spacing: -1pt;
font-weight: bold;
font-family:arial, "Times New Roman", Times, serif;
text-align: left;
line-height: 57px;
padding-left: 0px;
}
#logo2 a, #slogan{
color: #fd7800;
}
#slogan{
text-align: left;
padding-left: 0px;
}
/*search*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#search {
width:180px;
height:28px;
border: 1px solid #ccc;
margin-left: 10px;
position: relative;
}
#sidebar #search {
margin-top: 20px;
}
#search #searchsubmit {
background:url(images/go-btn.png) no-repeat top right;
width:28px;
height:28px;
border:0px;
position:absolute;
right: -35px;
}
#search #s {
width:170px;
height:23px;
border:0px;
margin-left:7px;
margin-right:10px;
margin-top:3px;
color:#000;
display: inline;
float: left;
}
/*menu bar*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#menu_container{
padding-top: 0px;
}
/*responsive menu*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
/* default style */
.selectnav { display: none; }
/* small screen */
@media screen and (max-width: 600px) {
.js #nav { display: none; }
.js #nav2 { display: none; }
.js .selectnav { display: block; }
}
/*welcome*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#welcome_container h1{
margin-top: 0px;
}
/*homepage boxes*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#box_container{
padding-top: 35px;
padding-bottom: 15px;
}
.box-head {
float: left;
padding-bottom: 20px;
}
.box-head img{
}
.title-head{
padding-top:2px;
}
.title-box{
color: #333;
line-height: 15px;
text-transform: uppercase;
}
.title-box h1 {
font-size: 18px;
margin-bottom: 3px;
}
.box-content {
float: left;
padding-top: 10px;
line-height: 20px;
}
/* POST */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
.post {
overflow: hidden;
}
.post-shadow{
background: url("images/post_shadow.png") no-repeat bottom;
height: 9px;
margin-bottom: 25px;
}
.post ol{
margin-left: 20px;
}
.post ul {
margin-left: 15px;
}
.post-entry ul { margin: 0 0 10px 10px; }
.post-entry ul li {
display: block;
margin: 5px 0;
padding: 0 0 0 20px;
/*background: url(images/bullet.png) no-repeat 0 7px;*/
}
.post-entry ol {
list-style: decimal;
margin: 0 0 18px 1.6em;
}
.post-entry ol li {
list-style: decimal;
}
.post-entry {
padding-bottom: 10px;
padding-top: 10px;
overflow: hidden;
}
.post-head {
margin-bottom: 5px;
padding-top: 15px;
}
.post-head h1 a, .post-head h1 {
text-decoration:none;
color:#000;
margin: 0px;
font-size: 27px;
}
.post-head h1 a:hover {
color:#777;
}
.post-head-notfound h1, .post-head-404 h1, .post-head-archive h1, .post-head-search h1 {
margin-bottom: 10px;
font-weight:normal;
text-decoration:none;
color:#000;
font-size: 27px;
}
.post-thumb img {
border: 0px solid #ebebeb;
}
.post-entry img{
margin-bottom: 10px;
height:auto;
max-width:100% !important;
}
.meta-data{
line-height: 16px;
padding: 6px 3px;
margin-bottom: 3px;
font-size: 11px;
border-bottom: 1px solid #e9e9e9;
}
.meta-data a{
color: #fd7800;
}
.meta-data a:hover{
color: #777;
}
.read-more {
color: #000;
background: #fff;
padding: 4px 8px;
border-radius: 3px;
display: inline-block;
font-size: 11px;
font-weight: bold;
text-decoration: none;
text-transform: capitalize;
cursor: pointer;
margin-top: 20px;
}
.read-more:hover{
background: #fff;
color: #666;
}
.clear {
clear:both;
}
.sticky {
}
/* content */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#content_container table {
border: 1px solid #e7e7e7;
margin: 0 -1px 24px 0;
text-align: left;
width: 100%;
}
#content_container tr th,
#content_container thead th {
color: #888;
font-size: 12px;
font-weight: bold;
line-height: 18px;
padding: 9px 10px;
}
#content_container tr td {
padding: 6px 10px;
}
#content_container tr.odd td {
background: #f2f7fc;
}
/* sidebar*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#sidebar {
padding:0px 20px 20px 0px;
}
#sidebar ul {
list-style: none;
}
#sidebar { word-wrap: break-word;}
/*--navigation--*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
.navigation {
float: left;
width: 100%;
margin: 20px 0;
}
.navigation .alignleft a {
float: left;
}
.navigation .alignright a {
float: right;
}
#nav-single {
overflow:hidden;
margin-top:20px;
margin-bottom:10px;
}
.nav-previous {
float: left;
width: 50%;
}
.nav-next {
float: right;
text-align: right;
width: 50%;
}
/*--slider--*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#slider_container {
background: #fff;
}
.flex-caption{
background: #232323;
color: #fff;
padding: 7px;
}
.flexslider p{
margin: 0px;
}
/*--sub head and breadcrumbs--*/
/*////////////////////////////////////////////////////////////////////////////////////////////*/
#subhead_container{
padding: 7px 0px;
}
#subhead h1{
color: #000;
padding-top: 10px;
padding-left: 0px;
font-size: 30px;
}
#breadcrumbs {
padding-left: 25px;
margin-bottom: 15px;
color: #9e9e9e;
margin:0 auto;
width: 964px;
font-size: 10px;
}
#breadcrumbs a{
text-decoration: none;
color: #9e9e9e;
}
/*Alignments */
/*////////////////////////////////////////////////////////////////////////////////////////////*/
.alignleft,
img.alignleft {
display: inline;
float: left;
margin-right: 22px;
margin-top: 9px;
}
.alignright,
img.alignright {
display: inline;
float: right;
margin-left: 22px;
margin-top: 8px;
}
.aligncenter,
img.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
.alignleft,
.alignright,
.aligncenter,
img.alignleft,
img.alignright,
img.aligncenter
{
margin-bottom: 10px;
}
a img.aligncenter {
display:block;
margin-left:auto;
margin-right:auto;
}
table {
border-collapse:collapse;
}
table, th, td {
border: 1px solid black;
padding: 5px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

+15
View File
@@ -0,0 +1,15 @@
[theme]
inherit = agogo
stylesheet = named_data_style.css
# pygments_style = sphinx
theme_bodyfont = "normal 12px Verdana, sans-serif"
theme_bgcolor = "#ccc"
theme_documentwidth = "100%"
theme_textalign = "left"
[options]
stickysidebar = true
collapsiblesidebar = true
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

+4
View File
@@ -0,0 +1,4 @@
Release Notes
=============
.. include:: release-notes/release-notes-0.7.0.rst
@@ -0,0 +1,31 @@
NLSR version 0.1.0 (initial release)
++++++++++++++++++++++++++++++++++++
Release date: August 25, 2014
The main design goal of NLSR is to provide a routing protocol to populate `NFD's
<https://github.com/named-data/NFD>`__ 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.
Included features
^^^^^^^^^^^^^^^^^
- Advertise availability of content through the configured router
- Use `ChronoSync <https://github.com/named-data/ChronoSync>`__ to synchronize routers' LSA sequence numbers and Interest/Data to retrieve LSAs
- Produce a list of ranked forwarding options for each name prefix to facilitate NDN's adaptive forwarding strategies
- Configure maximum number of faces per prefix in NFD's RIB
- Set up NFD tunnels to neighbors automatically and maintain the tunnels to neighbors
- Provide two routing protocols:
+ Link State routing: calculate route cost based on link costs
+ Hyperbolic routing: calculate route cost based on hyperbolic coordinates
- Use a hierarchical trust model for routing within a single administrative domain
- Keep NFD's RIB updated on failure and recovery
@@ -0,0 +1,94 @@
NLSR version 0.2.0 (changes since version 0.1.0)
++++++++++++++++++++++++++++++++++++++++++++++++
Release date: April 30, 2015
**Build**:
- The code now requires C++11. The minimum supported gcc version is 4.6, as earlier versions do not have proper support for C++11 features. (:issue:`1930`)
- Require OpenSSL (:issue:`2375`)
**New features**:
- Add nlsrc command-line tool (:issue:`1834`)
- Advertise/Withdraw name prefixes at runtime (:issue:`1834`)
- Assign zero cost to hyperbolic direct neighbors (:issue:`1975`)
- Only hyperbolic costs are adjusted before registering (:issue:`1974`)
- Add ability to specify different logging levels (:issue:`1935`)
- Add LSDB dataset publishers (:issue:`2280`)
- Add LSDB dataset tlv abstractions (:issue:`2280`)
- Allow zero cost neighbors for hyperbolic routing table calculation (:issue:`1982`)
- Faces are now created with canonical Face URI (:issue:`1911`)
- Add configurable router event intervals (:issue:`2071`)
- Add router-dead-interval configuration setting (:issue:`1878`)
- Add log formatting specified by log4cxx configuration file (:issue:`1950`)
- Face URIs in configuration file are checked for validity on load (:issue:`2070`)
- Configuration variables with default values are now optional (:issue:`1949`)
- Recalculate routing table after face destroy event (:issue:`2635`)
- Add Travis-CI build script
**Code changes**:
- Change adjacency status from uint32_t to enum (:issue:`1946`)
- Remove scheduler from NLSR class (:issue:`1981`)
- Change hyperbolic cost adjustment factor from 100 to 1000 (:issue:`1974`)
- Remove use of outdated namespace ``ndn::Tlv`` (:issue:`2079`)
- Remove use of deprecated ``ndn::nfd::Controller(Face&)`` constructor (:issue:`2133`)
- Routing update publishing is abstracted to SyncLogicHandler (:issue:`2289`)
- Make ConfParameter variable types consistent with min and max values (:issue:`2084`)
- Replace LSA string literals with constants (:issue:`2310`)
- Subscribe to FaceMonitor notifications using connect (:issue:`2350`)
- Log exceptions thrown in event loop
- Change ``ndn::ptr_lib::shared_ptr`` to ``std::shared_ptr`` (:issue:`2110`)
- Avoid deprecated ``ndn::Name::set`` method (:issue:`2505`)
- Update waf to version 1.8.8-dev
- Add sorting tiebreaker to NexthopList (:issue:`2715`)
- Update Jenkins-CI build scripts
**Bug fixes**:
- Fix python3 build error (:issue:`1956`)
- Fix typos in nlsr.conf security section (:issue:`1985`)
- Stop SyncLogicHandler from fetching a router’s own LSAs (:issue:`2005`)
- Fix Name LSA comparison which could cause incorrect advertised names to be removed (:issue:`2029`)
- Fix issue where more faces than max-faces-per-prefix could be applied to a prefix (:issue:`2018`)
- Stop LSDB from retrieving and out of date LSA when a new one is detected (:issue:`1987`)
- Correct mistakes in documentation
- Correct bitmask used to copy Name LSA sequence number (:issue:`2323`)
@@ -0,0 +1,20 @@
NLSR version 0.2.1 (changes since version 0.2.0)
++++++++++++++++++++++++++++++++++++++++++++++++
Release date: June 30, 2015
**Code changes**:
- Using a configuration file without ``prefix-update-validator`` disables runtime advertise/withdraw instead of exiting (:issue:`2814`)
**Bug fixes**:
- Prevent incomplete removal of NPT entry (:issue:`2785`)
- Correct bidirectional links with differing costs (:issue:`2801`)
- Fix non-incrementing Adjacency number in AdjLsa::writeLog (:issue:`2594`)
- Remove FaceDestroyEvent test's reliance on nlsrSeqNo.txt (:issue:`2881`)
- Test ACTIVE/INACTIVE Adjacencies in LSA construction (:issue:`2735`)
@@ -0,0 +1,8 @@
NLSR version 0.2.2 (changes since version 0.2.1)
++++++++++++++++++++++++++++++++++++++++++++++++
Release date: January 5, 2016
**Code changes**:
- Adapt code to changes in NFD/ndn-cxx version 0.4.0 release
@@ -0,0 +1,26 @@
NLSR version 0.3.0 (changes since version 0.2.2)
++++++++++++++++++++++++++++++++++++++++++++++++
Release date: August 1, 2016
**Code changes**:
- Updated validation checker for LSA rule in the configuration file (:issue:`2965`)
- Do not advertise Adjacency LSAs when hyperbolic routing is enabled (:issue:`2402`)
- Do not distribute coordinate LSAs when using link-state routing. (:issue:`3661`)
- LSAs should be segmented before they are published (:issue:`2965`)
- Don't use DummyClientFace::sentDatas (:issue:`3383`)
- Remove disabled security files (:issue:`2960`)
- Lsa type should be argument for base class LSA constructor (:issue:`2788`)
- Use ndn-cxx/DummyClientFace (:issue:`2637`)
**Bug fixes**:
- Unit tests cases are installed with `./waf install` (:issue:`3359`)
@@ -0,0 +1,34 @@
NLSR version 0.3.1 (changes since version 0.3.0)
++++++++++++++++++++++++++++++++++++++++++++++++
Release date: January 22, 2017
**Changes**
- **breaking change** Sync uses /localhop component in prefix to reduce duplicate NACKs (:issue:`3627`)
- **breaking change** LSA uses /localhop component in prefix to reduce duplicate NACKs (:issue:`3899`)
**Code Changes**:
- Fib and FaceMap use std::map instead of std::list (:issue:`2781`)
- NamePrefixTableEntries store RoutingTableEntries using a pointer (:issue:`2863`)
- Namespace closing comments are now consistent with ndn-cxx guidelines (:issue:`3735`)
- Update copyright date across all files (:issue:`3736`, `3909`, `3923`)
- Improve formatting of FaceMap and FaceMapEntry (:issue:`3737`)
- Sort NextHops on NexthopList insertion (:issue:`2721`)
**Bug fixes**:
- HR now recalculates paths after status change of a neighbor (:issue:`3874`)
- NLSR no longer sets strategies multiple times (:issue:`3743`)
- NLSR should enable use of ndn-cxx dispatcher (:issue:`3930`)
- Fix typos in the sample configuration file (:issue:`3113`)
@@ -0,0 +1,20 @@
NLSR version 0.3.2 (changes since version 0.3.1)
++++++++++++++++++++++++++++++++++++++++++++++++
Release date: March 15, 2017
**Changes**
- NLSR constructor now accept a KeyChain argument. (:issue:`3742`)
- Fix security rule for /localhop LSA prefix (:issue:`3899`)
- Use ndn::nfd::ROUTE_ORIGIN_NLSR instead of a magic number. (:issue:`3903`)
- Handle "Face Already Exists" error (error code 409) in NFD. (:issue:`3976`)
- Enable NLSR to register localhost prefix with dispatcher before top-level prefix. (:issue:`3938`)
- Don't use ndn aliases provided by ndn-cxx/common.hpp. (:issue:`3983`)
- Remove use of deprecated code. (:issue:`3988`)
@@ -0,0 +1,79 @@
NLSR version 0.4.0
++++++++++++++++++
**New features**:
- **breaking change** Discover Faces from NFD (:issue:`2954`)
- **breaking change** Accommodate n-Dimensional HR coordinates (:issue:`3751`)
**Changes**:
- **breaking change** Make chronosync a dependency (:issue:`2400`)
- **breaking change** Use separate name prefix and sequence number
for each LSA type (:issue:`3964`)
- **breaking change** Convert to ``v2::security`` and adapt to ndn-cxx changes (:issue:`3964`)
- Use unix timestamp as default (:issue:`4187`)
**Bug Fixes**:
- Add support for sources to NamePrefixList (:issue:`4177`)
- Fix incorrect error on face-dataset-fetch-interval valid values (:issue:`4211`)
- Fix prefix advertise runtime error (:issue:`4215`)
- Fix heap buffer overflow error (:issue:`4217`)
**Code Changes**:
- LSA getData() now uses ostream instead of manually building the string (:issue:`2346`)
- Refresh FIB entries independently of routing table calculation (:issue:`2778`)
- Change configuration parameter output level to info (:issue:`2850`)
- Updates to name prefixes are more efficient (:issue:`2864`)
- Implement statistics collector/recorder (:issue:`2956`)
- Implement ``NameLsa::isEqualContent`` (:issue:`2962`)
- Refactor ``Fib::removeOldNextHopsFromFibEntryAndNfd()`` for simplicity, readability. (:issue:`3820`)
- Improve logging throughout lsdb.cpp and others (:issue:`3934`)
- Enable dispatcher for LOCALHOST_PREFIX (:issue:`3938`)
- Don't use ndn aliases provided by ndn-cxx/common.hpp (:issue:`3983`)
- Canonize Adjacent FaceURIs on startup (:issue:`4063`)
- Refactor AdjacencyList to use iterators instead of bare ptrs (:issue:`4068`)
- Merge redundant functions (:issue:`4105`)
- Remove writeLog in NamePrefixList (:issue:`4131`)
- Check for self in ChronoSync updates (:issue:`4134`)
- Install nlsr.conf as sample in the system (:issue:`4197`)
- Enable AddressSanitizer and LeakSanitizer for unit tests (:issue:`4206`)
- Resolve all ASan errors in unit tests (:issue:`4230`)
- Simplified LSDB dataset interest handler. (:issue:`4235`)
- Made map more container-agnostic (:issue:`4239`)
- Improved routing map data structure. (:issue:`4240`)
- Increased independence of SyncLogicHandler (:issue:`4264`)
- Use unique_ptr for signal container (:issue:`4268`)
- Use network name in sync prefix to avoid sync leaks from other networks (:issue:`4101`)
@@ -0,0 +1,24 @@
NLSR version 0.4.1
++++++++++++++++++
**New features**:
- The routing table dataset publisher (:issue:`3630`)
- Use ndn-cxx logging facility, remove log4cxx dependency (:issue:`3949`)
- Automatic serving of other routers' certificates (:issue:`4448`)
**Bug Fixes**:
- Hard-code a fixed session name for ChronoSync sockets (:issue:`4513`)
- Fix encoding bug in the routing table publisher (:issue:`4453`)
- Fix NLSR not converging without content store (:issue:`4430`)
**Miscellaneous Changes**:
- Make ChronoSync's sync interest lifetime configurable (:issue:`4490`)
- Print labels on adjacency matrix when logging (:issue:`2045`)
@@ -0,0 +1,6 @@
NLSR version 0.4.2
++++++++++++++++++
**Bug Fixes**:
- Fix segfault in scheduled erase of lsa segment (:issue:`4520`)
@@ -0,0 +1,14 @@
NLSR version 0.4.3
++++++++++++++++++
**Changes**:
- **breaking change** Change NLSR to nlsr for various prefixes (:issue:`4543`)
**Bug Fixes**:
- Fix dry-run mode not working (:issue:`4394`)
- Fix convergence w/o content store (:issue:`4430`)
- Register router prefix to fix remote requests (:issue:`4543`)
- Fix build with clang-5.0 (:issue:`4547`)
- Avoid misaligned memory access (:issue:`4609`)
@@ -0,0 +1,35 @@
NLSR version 0.5.0
++++++++++++++++++
**New Features**
- Set CanBePrefix to false on Hello Interest (:issue:`4581`)
- Optionally write prefixes to a copy of config file via nlsrc advertise (:issue:`4303`)
- Use SegmentPublisher utility from PSync to publish LSA data (:issue:`4760`)
- Add PSync as a dependency and switch it as default in conf file. (:issue:`4082`)
**Changes**
- Decouple classes from Nlsr object for easier unit testing (:issue:`1952`)
- Set sequence number file in SequencingManager constructor. (:issue:`4288`)
- Read conf file in test prefix update processor instead of static string (:issue:`3960`)
- Canonize FaceUri in conf file processor (:issue:`4817`)
- Remove redundant function "calculateHypDryRoutingTable" (:issue:`4811`)
- In dry run mode, print HR and LS routing table in nlsrc separately (:issue:`4452`)
- Fix ASan memory leaks in unit tests (:issue:`4682`)
- Systemd service files dependency corrections for Ubuntu 18.04 (:issue:`4594`)
**Bug Fixes**
- Fix processing of interest w/ segments for segmented LSA data (:issue:`4784`)
- Fib: don't refresh neighbor router's FIB entry (:issue:`4799`)
- Disable Interest filter loopback where ever not needed (:issue:`4768`)
- Avoid crash when ndn-cxx is compiled with tests by setting canBePrefix (:issue:`4691`)
- Make sure NLSR is not using any deprecated API (:issue:`4679`)
- Fix crash in equals operator of adjacency-list (:issue:`4705`)
- Fix error handling and normalize exit codes
**Miscellaneous**
- Improving documentation for NLSR
- A beginners' guide to installing and testing on Fedora
@@ -0,0 +1,15 @@
NLSR version 0.5.1
++++++++++++++++++
**Changes**
- Set best-route strategy for certificate prefixes (:issue:`4881`)
- Use ndn-cxx InMemoryStorage for LsaSegmentStorage (:issue:`4788`)
- Switch from ndn::EventId to ndn::scheduler::EventId (:issue:`4883`)
- Add FreshnessPeriod where MustBeFresh is used (:issue:`4913`)
**Bug Fixes**
- Fix canonization by resetting io service after each neighbor (:issue:`4872`)
- Disable network interest in while fetching NLSR certificate (:issue:`4879`)
@@ -0,0 +1,23 @@
NLSR version 0.5.2
++++++++++++++++++
**Breaking Changes**
The following breaking changes make this release incompatible with the previous version.
- Use PSync version 0.2.0, sync data compression in full sync is enabled by default (:issue:`5061`, :issue:`4917`)
- Use the floating point encoding/decoding functions for hyperbolic coordinates (:issue:`4615`)
**New Features**
- Handle zero cost links in Link State Routing (:issue:`4978`)
**Improvements and Bug Fixes**
- Remove support for old combined seq no file (:issue:`4143`)
- Sync common test infrastructure with ndn-cxx
- Refactor Certificate Storage class (:issue:`5075`)
- Avoid crashing NLSR if identity cannot be created
- Change init order to register sync routes after hello data has been verified (:issue:`5009`)
- Fix empty file creation if conf file is same as dynamic (:issue:`5071`)
- On face event notification, only proceed if face id was zero or updated (:issue:`4394`)
@@ -0,0 +1,12 @@
NLSR version 0.6.0
------------------
Improvements and bug fixes
^^^^^^^^^^^^^^^^^^^^^^^^^^
- *(breaking change)* Major changes in the TLV structure and classes. Reduced codebase size and
improved compilation times. LSA de/serialize functions are replaced by wireEncode/Decode.
Updated LSA wire formats and TLV assignments. Updated nlsrc to print using the new encoding.
(:issue:`4787`, :issue:`5116`)
- LSDB refactor: switch to ``boost::multi_index`` to replace 3 LSA lists (:issue:`4127`)
- Fix wrong reaction on hello Interest timeout (:issue:`5139`)
@@ -0,0 +1,44 @@
NLSR version 0.7.0
------------------
Release date: August 18, 2023
New features
^^^^^^^^^^^^
- Add experimental support for State Vector Sync (SVS) (:issue:`5248`)
- ``nlsrc``: Add an option to query the status from remote routers (:issue:`4544`)
Notable changes and improvements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- **Deprecate ChronoSync support**: ChronoSync support is now optional and excluded from the
default build; it remains available mainly for testing purposes (:issue:`5147`)
- Switched to the C++17 standard
- The minimum build requirements have been increased as follows:
- Either GCC >= 7.4.0 or Clang >= 6.0 is required on Linux
- On macOS, Xcode 11.3 or later is recommended; older versions may still work but are not
officially supported
- Boost >= 1.65.1 and ndn-cxx >= 0.8.1 are required on all platforms
- Sphinx 4.0 or later is required to build the documentation
- Refactor LSDB for readability and add signals to notify of modifications (:issue:`4127`)
- Retrieve LSA from the face that triggered the notification of LSA changes
- Accommodate certificate name in ``KeyLocator`` (:issue:`5195`)
- Change ``sig-type`` to ``ecdsa-sha256`` in ``nlsr.conf`` as ndn-cxx now has strict checking for it
- Improve error handling and reporting
- Stop using the ``gold`` linker on Linux; prefer instead linking with ``lld`` if installed
- Update waf build system to version 2.0.24
- Various test suite and documentation improvements
Bug fixes
^^^^^^^^^
- lsdb: Fix for issues involving incorrect retransmission behavior in segment fetcher
- Prevent NLSR from unregistering route during update for router that advertised it initially
(:issue:`5179`)
- NameLsa: fix LSDB update bug by sorting the NPLs before difference
- Fix recurring sync prefix registration on every hello data (:issue:`5157`)
- Return the appropriate exit codes when executing ``nlsrc`` advertise/withdraw commands
(:issue:`5271`)
+106
View File
@@ -0,0 +1,106 @@
All NLSR Releases
=================
.. toctree::
:glob:
:hidden:
:maxdepth: 1
:reversed:
release-notes/*
* **NLSR version 0.7.0**
(:doc:`Release Notes <release-notes/release-notes-0.7.0>`, `Documentation <https://docs.named-data.net/NLSR/0.7.0/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.7.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.7.0.tar.xz>`__ (`checksum <https://named-data.net/downloads/nlsr-0.7.0.tar.xz.sha256>`__)
* **NLSR version 0.6.0**
(:doc:`Release Notes <release-notes/release-notes-0.6.0>`, `Documentation <https://docs.named-data.net/NLSR/0.6.0/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.6.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.6.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.6.0.tar.bz2.sha256>`__)
* **NLSR version 0.5.2**
(:doc:`Release Notes <release-notes/release-notes-0.5.2>`, `Documentation <https://docs.named-data.net/NLSR/0.5.2/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.5.2>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.5.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.5.2.tar.bz2.sha256>`__)
* **NLSR version 0.5.1**
(:doc:`Release Notes <release-notes/release-notes-0.5.1>`, `Documentation <https://docs.named-data.net/NLSR/0.5.1/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.5.1>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.5.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.5.1.tar.bz2.sha256>`__)
* **NLSR version 0.5.0**
(:doc:`Release Notes <release-notes/release-notes-0.5.0>`, `Documentation <https://docs.named-data.net/NLSR/0.5.0/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.5.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.5.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.5.0.tar.bz2.sha256>`__)
* **NLSR version 0.4.3**
(:doc:`Release Notes <release-notes/release-notes-0.4.3>`, `Documentation <https://docs.named-data.net/NLSR/0.4.3/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.3>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.3.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.3.tar.bz2.sha256>`__)
* **NLSR version 0.4.2**
(:doc:`Release Notes <release-notes/release-notes-0.4.2>`, `Documentation <https://docs.named-data.net/NLSR/0.4.2/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.2>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.2.tar.bz2.sha256>`__)
* **NLSR version 0.4.1**
(:doc:`Release Notes <release-notes/release-notes-0.4.1>`, `Documentation <https://docs.named-data.net/NLSR/0.4.1/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.1>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.1.tar.bz2.sha256>`__)
* **NLSR version 0.4.0**
(:doc:`Release Notes <release-notes/release-notes-0.4.0>`, `Documentation <https://docs.named-data.net/NLSR/0.4.0/>`__)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.4.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.4.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.4.0.tar.bz2.sha256>`__)
* **NLSR version 0.3.2**
(:doc:`Release Notes <release-notes/release-notes-0.3.2>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.3.2>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.3.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.3.2.tar.bz2.sha256>`__)
* **NLSR version 0.3.1**
(:doc:`Release Notes <release-notes/release-notes-0.3.1>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.3.1>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.3.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.3.1.tar.bz2.sha256>`__)
* **NLSR version 0.3.0**
(:doc:`Release Notes <release-notes/release-notes-0.3.0>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.3.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.3.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.3.0.tar.bz2.sha256>`__)
* **NLSR version 0.2.2**
(:doc:`Release Notes <release-notes/release-notes-0.2.2>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.2.2>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.2.2.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.2.2.tar.bz2.sha256>`__)
* **NLSR version 0.2.1**
(:doc:`Release Notes <release-notes/release-notes-0.2.1>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.2.1>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.2.1.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.2.1.tar.bz2.sha256>`__)
* **NLSR version 0.2.0**
(:doc:`Release Notes <release-notes/release-notes-0.2.0>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.2.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.2.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.2.0.tar.bz2.sha256>`__)
* **NLSR version 0.1.0**
(:doc:`Release Notes <release-notes/release-notes-0.1.0>`)
`src (git) <https://github.com/named-data/NLSR/releases/tag/NLSR-0.1.0>`__,
`src (tarball) <https://named-data.net/downloads/nlsr-0.1.0.tar.bz2>`__ (`checksum <https://named-data.net/downloads/nlsr-0.1.0.tar.bz2.sha256>`__)
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

-75
View File
@@ -1,75 +0,0 @@
#Use this script to setup your keys.
#!/bin/bash
EXPECTED_ARGS=3 #site, operator, router
E_BADARGS=65
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: `basename $0` <site name> <operator name> <router name>"
echo "Example: `basename $0` memphis.edu user1 memphis.edu/cs/rtr1 (full router name without /ndn/ prefix"
exit $E_BADARGS
fi
RESULT=`ps -a | sed -n /ccnr/p`
if [ "${RESULT:-null}" = null ]; then
echo "ccnr not running, quitting"
exit
fi
KSUITE=${HOME}/ndn-testbed-key-suite
echo $KSUITE
if [ ! -d ${KSUITE} ]; then
echo "This script requires key signing suite available at:"
echo "git://github.com/named-data/ndn-testbed-key-suite.git"
echo "If you already have it, set the variable KSUITE of the script accordingly"
exit
fi
SITE=$1
OP=$2
RTR=$3
if [ ! -d ${SITE}_key ]; then
mkdir ${SITE}_key
ccninitkeystore ${SITE}_key
fi
if [ ! -d ${OP}_key ]; then
mkdir ${OP}_key
ccninitkeystore ${OP}_key
fi
if [ ! -d "router_key" ]; then
mkdir router_key
ccninitkeystore router_key
fi
if [ ! -d "nlsr_key" ]; then
mkdir nlsr_key
ccninitkeystore nlsr_key
fi
$KSUITE/bin/ndn-extract-public-key.sh -i ${SITE}_key/.ccnx/.ccnx_keystore -o ${SITE}_key/$SITE.pem
$KSUITE/bin/ndn-extract-public-key.sh -i ${OP}_key/.ccnx/.ccnx_keystore -o ${OP}_key/$OP.pem
$KSUITE/bin/ndn-extract-public-key.sh -i router_key/.ccnx/.ccnx_keystore -o router_key/router.pem
$KSUITE/bin/ndn-extract-public-key.sh -i nlsr_key/.ccnx/.ccnx_keystore -o nlsr_key/nlsr.pem
.$KSUITE/sign.sh -s
#signing operator key
echo "$KSUITE/bin/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365"
$KSUITE/bin/ndn-publish-key.sh -i "$OP" -a "$SITE" -f ${OP}_key/$OP.pem -F ${SITE}_key/.ccnx/ -P /ndn/keys/$SITE -p /ndn/keys/$SITE/%C1.O.N.Start/$OP -x 365
#signing routing key
echo "$KSUITE/bin/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR -x 365"
$KSUITE/bin/ndn-publish-key.sh -i "$RTR" -a "$SITE" -f router_key/router.pem -F ${OP}_key/.ccnx/ -P /ndn/keys/$SITE/%C1.O.N.Start/$OP -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR -x 365
#signing nlsr key
echo "$KSUITE/bin/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR/nlsr -x 365"
$KSUITE/bin/ndn-publish-key.sh -i "NLSR" -a "$RTR" -f nlsr_key/nlsr.pem -F router_key/.ccnx/ -P /ndn/keys/$SITE/%C1.R.N.Start/ndn/$SITE/$RTR -p /ndn/keys/$SITE/%C1.R.N.Start/ndn/$RTR/nlsr -x 365
-28
View File
@@ -1,28 +0,0 @@
#----configuration file for macbook----------
#
router-name /ndn/memphis.edu/cs/pollux
ccnneighbor /ndn/memphis.edu/cs/gemeni
ccnneighbor /ndn/memphis.edu/cs/altair
#ccnneighbor /ndn/memphis.edu/cs/pollux 141.225.11.132
ccnname /ndn/memphis.edu/macbook/patterson
ccnname /ndn/memphis.edu/macbook/houston/
#------lsdb-synch-interval-----
#lsdb-synch-interval 350
interest-retry 2
interest-resend-time 5
lsa-refresh-time 600
router-dead-interval 900
max-faces-per-prefix 1
debug on
#hyperbolic-routing on
hyperbolic-cordinate 1234.0 0.875
tunnel-type udp
keystore-path /Users/akmhoque/CCN_KEY/nlsr_key_store/.ccnx/.ccnx_keystore
root-key-prefix /ndn/keys
site-name memphis.edu
topo-prefix /ndn/routing/nlsr/
slice-prefix /ndn/routing/nlsr/LSA
logdir /Users/akmhoque/NLSR2.0
-1505
View File
File diff suppressed because it is too large. Load diff
+330 -8
View File
@@ -1,10 +1,332 @@
router-name /ndn/memphis.edu/netlab/macbook
ccnneighbor /ndn/memphis.edu/netlab/pollux face2 10
ccnneighbor /ndn/memphis.edu/netlab/castor face3 8
ccnname /ndn/memphis.edu/netlab/macbook/name1
ccnname /ndn/memphis.edu/netlab/macbook/test
lsdb-synch-interval 310
interest-retry 4
interest-resend-time 5
; the general section contains all the general settings for router
general
{
; mandatory configuration command section network, site and router
network /ndn ; name of the network the router belongs to in ndn URI format
site /edu/memphis ; name of the site the router belongs to in ndn URI format
router /%C1.Router/cs/pollux ; name of the router in ndn URI format
; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs
lsa-refresh-time 1800 ; default value 1800. Valid values 240-7200
; router-dead-interval is the time in seconds after which an inactive routers
; LSAs are removed
;router-dead-interval 3600 ; default value: 2*lsa-refresh-time. Value must be larger
; than lsa-refresh-time
; InterestLifetime (in seconds) for LSA fetching
lsa-interest-lifetime 4 ; default value 4. Valid values 1-60
; select sync protocol: chronosync / psync / svs
sync-protocol psync
; sync interest lifetime of ChronoSync/PSync in milliseconds
sync-interest-lifetime 60000 ; default value 60000. Valid values 1000-120,000
state-dir /var/lib/nlsr ; path for intermediate state files including sequence directory (Absolute path)
}
; the neighbors section contains the configuration for router's neighbors and hello protocol behavior
neighbors
{
; in case hello interest timed out, router will try 'hello-retries' times at 'hello-timeout'
; seconds interval before giving up for any neighbors (deciding link is down)
hello-retries 3 ; interest retries number in integer. Default value 3
; valid values 1-10
hello-timeout 1 ; interest time out value in seconds. Default value 1
; Valid values 1-15
hello-interval 60 ; interest sending interval in seconds. Default value 60
; valid values 30-90
; adj-lsa-build-interval is the time to wait in seconds after an Adjacency LSA build is scheduled
; before actually building the Adjacency LSA
adj-lsa-build-interval 10 ; default value 10. Valid values 5-30.
face-dataset-fetch-tries 3 ; default is 3. Valid values 1-10. The FaceDataset is
; gotten from NFD, and is needed to configure NLSR
; correctly. It is recommended not to set this
; variable too high, because it could cause
; congestion for NFD.
face-dataset-fetch-interval 3600 ; default is 3600. Valid values 1800-5400.
; This controls how often (in seconds) NLSR will attempt to
; fetch a FaceStatus dataset from NFD.
; neighbor command is used to configure router's neighbor. Each neighbor will need
; one block of neighbor command
neighbor
{
name /ndn/edu/memphis/%C1.Router/cs/castor ; name prefix of the neighbor router consists
; of network, site-name and router-name
face-uri udp://castor.cs.memphis.edu ; face uri of the face connected to the neighbor
link-cost 25 ; cost of the connecting link to neighbor
}
neighbor
{
name /ndn/edu/memphis/%C1.Router/cs/mira ; name prefix of the neighbor router consists
; of network, site-name and router-name
face-uri udp://mira.cs.memphis.edu ; face uri of the face connected to the neighbor
link-cost 30 ; cost of the connecting link to neighbor
}
}
; the hyperbolic section contains the configuration settings of enabling a router to calculate
; routing table using [hyperbolic routing table calculation](http://arxiv.org/abs/0805.1266) method
hyperbolic
{
; commands in this section follows a strict order
; the switch is used to set hyperbolic routing calculation in NLSR
state off ; default value 'off', set value 'on' to enable hyperbolic routing table
; calculation which turns link state routing 'off'. set value to 'dry-run'
; to test hyperbolic routing and compare with link state routing.
radius 123.456 ; radius of the router in hyperbolic coordinate system
angle 1.45,2.36 ; angle of the router in hyperbolic coordinate system
}
; the fib section is used to configure fib entrys type to ndn FIB updated by NLSR
fib
{
; the max-faces-per-prefix is used to limit the number of faces for each name prefixes
; by NLSR in ndn FIB
max-faces-per-prefix 3 ; default value 0. Valid value 0-60. By default (value 0) NLSR adds
; all available faces for each reachable name prefixes in NDN FIB
; routing-calc-interval is the time to wait in seconds after a routing table calculation is
; scheduled before actually performing the routing table calculation
routing-calc-interval 15 ; default value 15. Valid values 0-15. It is recommended that
; routing-calc-interval have a higher value than adj-lsa-build-interval
}
; the advertising section contains the configuration settings of the name prefixes
; hosted by this router
advertising
{
; the ndnname is used to advertised name from the router. To advertise each name prefix
; configure one block of ndnname configuration command for every name prefix.
prefix /ndn/edu/memphis/cs/netlab ; name in ndn URI format
prefix /ndn/edu/memphis/sports/basketball
}
security
{
validator
{
rule
{
id "NLSR Hello Rule"
for data
filter
{
type name
regex ^[^<nlsr><INFO>]*<nlsr><INFO><><>$
}
checker
{
type customized
sig-type ecdsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<KEY><nlsr>]*)<nlsr><KEY><>{1,3}$
k-expand \\1
h-relation equal
p-regex ^([^<nlsr><INFO>]*)<nlsr><INFO><><>$
p-expand \\1
}
}
}
}
rule
{
id "NLSR LSA Rule"
for data
filter
{
type name
regex ^[^<nlsr><LSA>]*<nlsr><LSA>
}
checker
{
type customized
sig-type ecdsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<KEY><nlsr>]*)<nlsr><KEY><>{1,3}$
k-expand \\1
h-relation equal
; the last four components in the prefix should be <lsaType><seqNo><version><segmentNo>
p-regex ^<localhop>([^<nlsr><LSA>]*)<nlsr><LSA>(<>*)<><><><>$
p-expand \\1\\2
}
}
}
}
rule
{
id "NLSR datasets"
for data
filter
{
type name
regex ^[^<nlsr>]*<nlsr>[<lsdb><routing-table>]
}
checker
{
type customized
sig-type ecdsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<KEY>]*)<KEY><>{1,3}$ ; router key or certificate
k-expand \\1
h-relation equal
p-regex ^([^<nlsr>]*)<nlsr>[<lsdb><routing-table>]
p-expand \\1
}
}
}
}
rule
{
id "NLSR Hierarchy Exception Rule"
for data
filter
{
type name
regex ^[^<KEY><%C1.Router>]*<%C1.Router>[^<KEY><nlsr>]*<KEY><><><>$
}
checker
{
type customized
sig-type ecdsa-sha256
key-locator
{
type name
hyper-relation
{
k-regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><>{1,3}$
k-expand \\1
h-relation equal
p-regex ^([^<KEY><%C1.Router>]*)<%C1.Router>[^<KEY>]*<KEY><><><>$
p-expand \\1
}
}
}
}
rule
{
id "NLSR Hierarchical Rule"
for data
filter
{
type name
regex ^[^<KEY>]*<KEY><><><>$
}
checker
{
type hierarchical
sig-type ecdsa-sha256
}
}
trust-anchor
{
type file
file-name "root.cert"
}
}
prefix-update-validator
{
rule
{
id "NLSR ControlCommand Rule"
for interest
filter
{
type name
; /<prefix>/<management-module>/<command-verb>/<control-parameters>
; /<timestamp>/<random-value>/<signed-interests-components>
regex ^<localhost><nlsr><prefix-update>[<advertise><withdraw>]<><><>$
}
checker
{
type customized
sig-type ecdsa-sha256
key-locator
{
type name
regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><>{1,3}$
}
}
}
rule
{
id "NLSR Hierarchy Rule"
for data
filter
{
type name
regex ^[^<KEY>]*<KEY><><><>$
}
checker
{
type hierarchical
sig-type ecdsa-sha256
}
}
trust-anchor
{
type file
file-name "site.cert"
}
}
; cert-to-publish "root.cert" ; optional, a file containing the root certificate
; Only the router that is designated to publish the root cert
; needs to specify this
; cert-to-publish "site.cert" ; optional, a file containing the site certificate
; Only the router that is designated to publish the site cert
; needs to specify this
; cert-to-publish "operator.cert" ; optional, a file containing the operator certificate
; Only the router that is designated to publish the operator
; cert needs to specify this
cert-to-publish "router.cert" ; required, a file containing the router certificate.
}
-136
View File
@@ -1,136 +0,0 @@
#ifndef _NLSR_H_
#define _NLSR_H_
#define LSDB_SYNCH_INTERVAL 300
#define INTEREST_RETRY 3
#define INTEREST_RESEND_TIME 15
#define NLSR_LOCKED 1
#define NLSR_UNLOCKED 0
#define LSA_REFRESH_TIME 1800
#define ROUTER_DEAD_INTERVAL 3600
#define MAX_FACES_PER_PREFIX 0
#define LINK_METRIC 10
#define NAME_LSA_VALID 1
#define NAME_LSA_INVALID 0
#define API_PORT 9999
struct name_prefix
{
char *name;
int length;
};
struct linkStateDatabase
{
struct hashtb *name_lsdb;
struct hashtb *adj_lsdb;
struct hashtb *cor_lsdb;
char *lsdb_version;
};
struct pending_interest
{
char *int_name;
int timed_out;
};
struct nlsr
{
struct ccn_closure in_interest;
struct ccn_closure in_content;
struct ccns_name_closure *closure;
struct ccns_slice *slice;
struct ccns_handle *ccns;
struct ccn_schedule *sched;
struct ccn_scheduled_event *event;
struct ccn_scheduled_event *event_send_info_interest;
struct ccn_scheduled_event *event_send_lsdb_interest;
struct ccn_scheduled_event *event_build_adj_lsa;
struct ccn_scheduled_event *event_calculate_route;
struct hashtb *adl;
struct hashtb *npl;
struct hashtb *map;
struct hashtb *rev_map;
struct hashtb *npt;
struct hashtb *routing_table;
struct hashtb *keys;
struct linkStateDatabase *lsdb;
struct ccn *ccn;
char *router_name;
int is_synch_init;
long int nlsa_id;
int adj_build_flag;
long int adj_build_count;
int is_build_adj_lsa_sheduled;
int is_send_lsdb_interest_scheduled;
int is_route_calculation_scheduled;
int interest_retry;
long int interest_resend_time;
long int lsa_refresh_time;
long int router_dead_interval;
long int max_faces_per_prefix;
char *logDir;
int detailed_logging;
int debugging;
int semaphor;
int nlsr_api_server_sock_fd;
fd_set readfds;
int api_port;
char *topo_prefix;
char *slice_prefix;
char *root_key_prefix;
char *keystore_path;
char *keystore_passphrase;
char *site_name;
int is_hyperbolic_calc;
double cor_r;
double cor_theta;
int isStrictHierchicalKeyCheck;
int tunnel_type;
};
struct nlsr *nlsr;
void process_command_ccnneighbor(char *command);
void process_command_ccnname(char *command);
void process_command_lsdb_synch_interval(char *command);
void process_command_interest_retry(char *command);
void process_command_interest_resend_time(char *command);
void process_conf_command(char *command);
int readConfigFile(const char *filename);
void nlsr_lock(void);
void nlsr_unlock(void);
int init_nlsr(void);
void nlsr_destroy( void );
void nlsr_stop_signal_handler(int sig);
#endif
-769
View File
@@ -1,769 +0,0 @@
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/time.h>
#include <assert.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include <ccn/signing.h>
#include <ccn/schedule.h>
#include <ccn/hashtb.h>
#include "nlsr.h"
#include "nlsr_npl.h"
#include "nlsr_adl.h"
#include "utility.h"
#include "nlsr_npt.h"
void
add_nbr_to_adl(struct name_prefix *new_nbr,int face,char *ip)
{
struct ndn_neighbor *nbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
int res;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, new_nbr->name, new_nbr->length, 0);
if(res == HT_NEW_ENTRY )
{
nbr = e->data;
nbr->neighbor=(struct name_prefix *)malloc(sizeof( struct name_prefix ));
nbr->neighbor->name=(char *)malloc(new_nbr->length);
memcpy(nbr->neighbor->name,new_nbr->name,new_nbr->length);
nbr->neighbor->length=new_nbr->length;
nbr->face=face;
nbr->status=NBR_DOWN;
nbr->info_interest_timed_out=0;
nbr->lsdb_interest_timed_out=0;
nbr->lsdb_random_time_component=(int)(LSDB_SYNCH_INTERVAL/2);
nbr->lsdb_synch_interval=LSDB_SYNCH_INTERVAL;
nbr->metric=LINK_METRIC;
nbr->is_lsdb_send_interest_scheduled=0;
nbr->ip_address=(char *)calloc(strlen(ip)+1,sizeof(char));
memcpy(nbr->ip_address,ip,strlen(ip)+1);
char *time_stamp=(char *)malloc(20);
get_current_timestamp_micro(time_stamp);
nbr->last_lsdb_version=(char *)calloc(strlen(time_stamp)+1,sizeof(char));
memcpy(nbr->last_lsdb_version,"0000000000000000",16);
nbr->last_info_version=(char *)calloc(strlen(time_stamp)+1,sizeof(char));
memcpy(nbr->last_info_version,"0000000000000000",16);
free(time_stamp);
nbr->last_lsdb_requested=0;
}
hashtb_end(e);
}
void
print_adjacent(struct ndn_neighbor *nbr)
{
if ( nlsr->debugging )
{
printf("print_adjacent called\n");
printf("--------Neighbor---------------------------\n");
printf(" Neighbor: %s \n",nbr->neighbor->name);
printf(" Length : %d \n",nbr->neighbor->length);
printf(" Ip Address: %s \n",nbr->ip_address);
printf(" Face : %d \n",nbr->face);
printf(" Metric : %d \n",nbr->metric);
printf(" Status : %d \n",nbr->status);
printf(" LSDB Version: %s \n",nbr->last_lsdb_version);
printf(" Info Version: %s \n",nbr->last_info_version);
printf(" Info Interest Timed Out : %d \n",nbr->info_interest_timed_out);
printf(" LSDB Interest Timed Out : %d \n",nbr->lsdb_interest_timed_out);
printf(" LSDB Synch Interval : %ld \n",nbr->lsdb_synch_interval);
printf(" LSDB Random Time comp : %d \n",nbr->lsdb_random_time_component);
printf(" Las Time LSDB Requested: %ld \n",nbr->last_lsdb_requested);
printf(" IS_lsdb_send_interest_scheduled : %d \n",nbr->is_lsdb_send_interest_scheduled);
printf("\n");
}
if ( nlsr->detailed_logging )
{
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_adjacent called\n");
writeLogg(__FILE__,__FUNCTION__,__LINE__,"--------Neighbor---------------------------\n");
writeLogg(__FILE__,__FUNCTION__,__LINE__," Neighbor: %s \n",nbr->neighbor->name);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Length : %d \n",nbr->neighbor->length);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Face : %d \n",nbr->face);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Metric : %d \n",nbr->metric);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Status : %d \n",nbr->status);
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Version: %s \n",nbr->last_lsdb_version);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Info Version: %s \n",nbr->last_info_version);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Info Interest Timed Out : %d \n",nbr->info_interest_timed_out);
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Interest Timed Out : %d \n",nbr->lsdb_interest_timed_out);
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Synch Interval : %ld \n",nbr->lsdb_synch_interval);
writeLogg(__FILE__,__FUNCTION__,__LINE__," LSDB Random Time comp : %d \n",nbr->lsdb_random_time_component);
writeLogg(__FILE__,__FUNCTION__,__LINE__," Las Time LSDB Requested: %ld \n",nbr->last_lsdb_requested);
writeLogg(__FILE__,__FUNCTION__,__LINE__," IS_lsdb_send_interest_scheduled : %d \n",nbr->is_lsdb_send_interest_scheduled);
writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
}
}
void
print_adjacent_from_adl(void)
{
if ( nlsr->debugging )
printf("print_adjacent_from_adl called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_adjacent_from_adl called \n");
int i, adl_element;
struct ndn_neighbor *nbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
adl_element=hashtb_n(nlsr->adl);
for(i=0;i<adl_element;i++)
{
nbr=e->data;
print_adjacent(nbr);
hashtb_next(e);
}
hashtb_end(e);
}
int
get_adjacent_status(struct name_prefix *nbr)
{
if ( nlsr->debugging )
printf("get_adjacent_status called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"get_adjacent_status called \n");
int res;
int status=-1;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if (res == HT_OLD_ENTRY)
{
nnbr=e->data;
status=nnbr->status;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
return status;
}
int
get_timed_out_number(struct name_prefix *nbr)
{
if ( nlsr->debugging )
printf("get_timed_out_number called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"get_timed_out_number called \n");
int res,ret=-1;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if( res == HT_OLD_ENTRY )
{
nnbr=e->data;
ret=nnbr->info_interest_timed_out;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
return ret;
}
int
get_lsdb_interest_timed_out_number(struct name_prefix *nbr)
{
if ( nlsr->debugging )
printf("get_lsdb_interest_timed_out_number called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"get_lsdb_interest_timed_out_number called \n");
int res,ret=-1;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if( res == HT_OLD_ENTRY )
{
nnbr=e->data;
ret=nnbr->lsdb_interest_timed_out;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
return ret;
}
void
update_adjacent_timed_out_to_adl(struct name_prefix *nbr, int increment)
{
if ( nlsr->debugging )
printf("update_adjacent_timed_out_to_adl called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_timed_out_to_adl called \n");
int res;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if( res == HT_OLD_ENTRY )
{
nnbr=e->data;
nnbr->info_interest_timed_out += increment;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
}
void
update_adjacent_timed_out_zero_to_adl(struct name_prefix *nbr)
{
if ( nlsr->debugging )
printf("update_adjacent_timed_out_zero_to_adl called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_timed_out_zero_to_adl called \n");
int time_out_number=get_timed_out_number(nbr);
update_adjacent_timed_out_to_adl(nbr,-time_out_number);
}
void
update_lsdb_interest_timed_out_to_adl(struct name_prefix *nbr, int increment)
{
if ( nlsr->debugging )
printf("update_lsdb_interest_timed_out_to_adl called\n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_lsdb_interest_timed_out_to_adl called \n");
int res;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if( res == HT_OLD_ENTRY )
{
nnbr=e->data;
nnbr->lsdb_interest_timed_out += increment;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
}
void
update_lsdb_interest_timed_out_zero_to_adl(struct name_prefix *nbr)
{
if ( nlsr->debugging )
printf("update_adjacent_timed_out_zero_to_adl called\n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_timed_out_zero_to_adl called\n");
int time_out_number=get_lsdb_interest_timed_out_number(nbr);
update_lsdb_interest_timed_out_to_adl(nbr,-time_out_number);
}
void
update_adjacent_status_to_adl(struct name_prefix *nbr, int status)
{
if ( nlsr->debugging )
printf("update_adjacent_status_to_adl called\n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_adjacent_status_to_adl called \n");
int res;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if (res == HT_OLD_ENTRY)
{
nnbr=e->data;
if ( nnbr->status!=status )
{
nnbr->status=status;
nlsr->adj_build_flag++;
}
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
}
void
delete_nbr_from_adl(struct name_prefix *nbr)
{
if ( nlsr->debugging )
printf("delete_nbr_from_adl called\n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"delete_nbr_from_adl called \n");
int res;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if (res == HT_OLD_ENTRY)
{
struct ndn_neighbor *nbr=e->data;
/*free(nbr->neighbor->name);
free(nbr->neighbor);
free(nbr->last_lsdb_version);
free(nbr->last_info_version);
free(nbr->ip_address);
*/
destroy_nbr_component(nbr);
hashtb_delete(e);
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
}
void
update_lsdb_synch_interval_to_adl(struct name_prefix *nbr, long int interval)
{
if ( nlsr->debugging )
printf("update_lsdb_synch_interval_to_adl called\n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"update_lsdb_synch_interval_to_adl called \n");
int res;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr->name, nbr->length, 0);
if (res == HT_OLD_ENTRY)
{
nnbr=e->data;
if ( nnbr->lsdb_synch_interval!= interval )
{
nnbr->lsdb_synch_interval=interval;
nnbr->lsdb_random_time_component=(int)(interval/2);
}
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
}
int
no_active_nbr(void)
{
int i, adl_element;
int no_link=0;
struct ndn_neighbor *nbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
adl_element=hashtb_n(nlsr->adl);
for(i=0;i<adl_element;i++)
{
nbr=e->data;
if( nbr->status == 1 )
no_link++;
hashtb_next(e);
}
hashtb_end(e);
return no_link;
}
int
is_adj_lsa_build(void)
{
int ret=0;
int nbr_count=0;
int i, adl_element;
struct ndn_neighbor *nbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
adl_element=hashtb_n(nlsr->adl);
for(i=0;i<adl_element;i++)
{
nbr=e->data;
if(nbr->status == 1 )
{
nbr_count++;
}
else if ( (nbr->status == 0) && (nbr->info_interest_timed_out >= nlsr->interest_retry || nbr->lsdb_interest_timed_out >= nlsr->interest_retry))
{
nbr_count++;
}
hashtb_next(e);
}
hashtb_end(e);
if(nbr_count == adl_element)
ret=1;
return ret;
}
void
get_active_nbr_adj_data(struct ccn_charbuf *c)
{
int i, adl_element;
struct ndn_neighbor *nbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
adl_element=hashtb_n(nlsr->adl);
for(i=0;i<adl_element;i++)
{
nbr=e->data;
if( nbr->status == 1 )
{
ccn_charbuf_append_string(c,nbr->neighbor->name);
ccn_charbuf_append_string(c,"|");
char *temp_length=(char *)malloc(20);
memset(temp_length,0,20);
sprintf(temp_length,"%d",nbr->neighbor->length);
ccn_charbuf_append_string(c,temp_length);
free(temp_length);
ccn_charbuf_append_string(c,"|");
char *temp_metric=(char *)malloc(20);
memset(temp_metric,0,20);
sprintf(temp_metric,"%d",nbr->metric);
ccn_charbuf_append_string(c,temp_metric);
free(temp_metric);
ccn_charbuf_append_string(c,"|");
}
hashtb_next(e);
}
hashtb_end(e);
}
int
get_next_hop_face_from_adl(char *nbr)
{
int res;
int connecting_face=NO_FACE;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
if( res == HT_OLD_ENTRY )
{
nnbr=e->data;
connecting_face=nnbr->face;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
return connecting_face;
}
void
update_face_to_adl_for_nbr(char *nbr, int face)
{
int res;
struct ndn_neighbor *nnbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
if( res == HT_OLD_ENTRY )
{
nnbr=e->data;
nnbr->face=face;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
}
int
is_neighbor(char *nbr)
{
int ret=0;
int res;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
if( res == HT_OLD_ENTRY )
{
ret=1;
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
return ret;
}
int
is_active_neighbor(char *nbr)
{
int ret=0;
int res;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
res = hashtb_seek(e, nbr, strlen(nbr)+1, 0);
if( res == HT_OLD_ENTRY )
{
struct ndn_neighbor *nnbr;
nnbr=e->data;
if (nnbr->status == NBR_ACTIVE )
{
ret=1;
}
}
else if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
}
hashtb_end(e);
return ret;
}
void
get_host_name_from_command_string(struct name_prefix *name_part,
char *nbr_name_uri, int offset)
{
int res,i;
int len=0;
const unsigned char *comp_ptr1;
size_t comp_size;
struct ccn_charbuf *name=ccn_charbuf_create();
res = ccn_name_from_uri(name,nbr_name_uri);
if (res < 0) {
fprintf(stderr, "Bad ccn URI: %s\n", nbr_name_uri);
exit(1);
}
//struct ccn_indexbuf cid={0};
//struct ccn_indexbuf *components=&cid;
struct ccn_indexbuf *components=ccn_indexbuf_create();
ccn_name_split (name, components);
for(i=components->n-2;i> (0+offset);i--)
{
res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
len+=1;
len+=(int)comp_size;
}
len++;
char *neighbor=(char *)malloc(len);
memset(neighbor,0,len);
for(i=components->n-2;i> (0+offset);i--)
{
res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
if ( i != components->n-2)
memcpy(neighbor+strlen(neighbor),".",1);
memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,
strlen((char *)comp_ptr1));
}
name_part->name=(char *)calloc(strlen(neighbor)+1,sizeof(char));
memcpy(name_part->name,neighbor,strlen(neighbor)+1);
name_part->length=strlen(neighbor)+1;
// 01/31/2013
free(neighbor);
ccn_charbuf_destroy(&name);
ccn_indexbuf_destroy(&components);
}
void
destroy_nbr_component(struct ndn_neighbor *nbr)
{
if ( nbr->neighbor->name )
free(nbr->neighbor->name);
if ( nbr->neighbor )
free(nbr->neighbor);
if ( nbr->last_lsdb_version)
free(nbr->last_lsdb_version);
if ( nbr->last_info_version)
free(nbr->last_info_version);
if ( nbr->ip_address)
free(nbr->ip_address);
}
void
destroy_adl(void)
{
int i, adl_element;
struct ndn_neighbor *nbr;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->adl, e);
adl_element=hashtb_n(nlsr->adl);
for(i=0;i<adl_element;i++)
{
nbr=e->data;
destroy_nbr_component(nbr);
hashtb_next(e);
}
hashtb_end(e);
if( nlsr->adl )
hashtb_destroy(&nlsr->adl);
}
-58
View File
@@ -1,58 +0,0 @@
#ifndef _NLSR_ADL_H_
#define _NLSR_ADL_H_
#define NBR_DOWN 0
#define NBR_ACTIVE 1
struct ndn_neighbor
{
struct name_prefix *neighbor;
int face;
int status;
char * last_lsdb_version;
char * last_info_version;
char *ip_address;
int info_interest_timed_out;
int lsdb_interest_timed_out;
int lsdb_random_time_component;
long int lsdb_synch_interval;
long int last_lsdb_requested;
int is_lsdb_send_interest_scheduled;
int metric;
};
void add_nbr_to_adl(struct name_prefix *new_nbr,int face,char *ip);
void delete_nbr_from_adl(struct name_prefix *nbr);
void print_adjacent(struct ndn_neighbor *nbr);
void print_adjacent_from_adl(void);
int get_adjacent_status(struct name_prefix *nbr);
int get_timed_out_number(struct name_prefix *nbr);
int get_lsdb_interest_timed_out_number(struct name_prefix *nbr);
void update_adjacent_timed_out_to_adl(struct name_prefix *nbr, int increment);
void update_adjacent_timed_out_zero_to_adl(struct name_prefix *nbr);
void update_lsdb_interest_timed_out_to_adl(struct name_prefix *nbr, int increment);
void update_lsdb_interest_timed_out_zero_to_adl(struct name_prefix *nbr);
void update_adjacent_status_to_adl(struct name_prefix *nbr, int status);
void update_lsdb_synch_interval_to_adl(struct name_prefix *nbr, long int interval);
int no_active_nbr(void);
int is_adj_lsa_build(void);
void get_active_nbr_adj_data(struct ccn_charbuf *c);
long int get_nbr_time_diff_lsdb_req(char *nbr);
long int get_nbr_last_lsdb_requested(char *nbr);
long int get_nbr_last_lsdb_requested(char *nbr);
long int get_lsdb_synch_interval(char *nbr);
int get_nbr_random_time_component(char *nbr);
char * get_nbr_lsdb_version(char *nbr);
void update_adjacent_last_lsdb_requested_to_adl(char *nbr, long int timestamp);
void set_is_lsdb_send_interest_scheduled_to_zero(char *nbr);
void update_adjacent_lsdb_version_to_adl(struct name_prefix *nbr, char *version);
void adjust_adjacent_last_lsdb_requested_to_adl(char *nbr, long int sec);
int get_next_hop_face_from_adl(char *nbr);
int is_neighbor(char *nbr);
int is_active_neighbor(char *nbr);
void update_face_to_adl_for_nbr(char *nbr, int face);
void get_host_name_from_command_string(struct name_prefix *name_part,char *nbr_name_uri, int offset);
void destroy_nbr_component(struct ndn_neighbor *nbr);
void destroy_adl(void);
#endif
-410
View File
@@ -1,410 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/face_mgmt.h>
#include <ccn/reg_mgmt.h>
#include <ccn/charbuf.h>
#include "nlsr_face.h"
static void
ccn_fib_warn(int lineno, const char *format, ...)
{
struct timeval t;
va_list ap;
va_start(ap, format);
gettimeofday(&t, NULL);
fprintf(stderr, "%d.%06d ccn_fib[%d]:%d: ", (int)t.tv_sec, (unsigned)t.tv_usec, (int)getpid(), lineno);
vfprintf(stderr, format, ap);
va_end(ap);
}
static void
ccn_fib_fatal(int lineno, const char *format, ...)
{
struct timeval t;
va_list ap;
va_start(ap, format);
gettimeofday(&t, NULL);
fprintf(stderr, "%d.%06d ccn_fib[%d]:%d: ", (int)t.tv_sec, (unsigned)t.tv_usec, (int)getpid(), lineno);
vfprintf(stderr, format, ap);
va_end(ap);
exit(1);
}
#define ON_ERROR_EXIT(resval, msg) on_error_exit((resval), __LINE__, msg)
static void
on_error_exit(int res, int lineno, const char *msg)
{
if (res >= 0)
return;
ccn_fib_fatal(lineno, "fatal error, res = %d, %s\n", res, msg);
}
#define ON_ERROR_CLEANUP(resval) \
{ \
if ((resval) < 0) { \
ccn_fib_warn (__LINE__, "OnError cleanup\n"); \
goto cleanup; \
} \
}
#define ON_NULL_CLEANUP(resval) \
{ \
if ((resval) == NULL) { \
ccn_fib_warn(__LINE__, "OnNull cleanup\n"); \
goto cleanup; \
} \
}
/**
*
* Bind a prefix to a face
*
*/
static int
register_unregister_prefix(struct ccn *h, struct ccn_charbuf *local_scope_template,
struct ccn_charbuf *no_name, struct ccn_charbuf *name_prefix,
struct ccn_face_instance *face_instance, int operation)
{
struct ccn_charbuf *temp = NULL;
struct ccn_charbuf *resultbuf = NULL;
struct ccn_charbuf *signed_info = NULL;
struct ccn_charbuf *name = NULL;
struct ccn_charbuf *prefixreg = NULL;
struct ccn_parsed_ContentObject pcobuf = {0};
struct ccn_forwarding_entry forwarding_entry_storage = {0};
struct ccn_forwarding_entry *forwarding_entry = &forwarding_entry_storage;
struct ccn_forwarding_entry *new_forwarding_entry;
const unsigned char *ptr = NULL;
size_t length = 0;
int res;
/* Register or unregister the prefix */
forwarding_entry->action = (operation == OP_REG) ? "prefixreg" : "unreg";
forwarding_entry->name_prefix = name_prefix;
forwarding_entry->ccnd_id = face_instance->ccnd_id;
forwarding_entry->ccnd_id_size = face_instance->ccnd_id_size;
forwarding_entry->faceid = face_instance->faceid;
forwarding_entry->flags = -1;
forwarding_entry->lifetime = (~0U) >> 1;
prefixreg = ccn_charbuf_create();
ccnb_append_forwarding_entry(prefixreg, forwarding_entry);
temp = ccn_charbuf_create();
res = ccn_sign_content(h, temp, no_name, NULL, prefixreg->buf, prefixreg->length);
resultbuf = ccn_charbuf_create();
/* construct Interest containing prefixreg request */
name = ccn_charbuf_create();
ccn_name_init(name);
ccn_name_append_str(name, "ccnx");
ccn_name_append(name, face_instance->ccnd_id, face_instance->ccnd_id_size);
ccn_name_append_str(name, (operation == OP_REG) ? "prefixreg" : "unreg");
ccn_name_append(name, temp->buf, temp->length);
/* send Interest, get Data */
res = ccn_get(h, name, local_scope_template, 1000, resultbuf, &pcobuf, NULL, 0);
ON_ERROR_CLEANUP(res);
res = ccn_content_get_value(resultbuf->buf, resultbuf->length, &pcobuf, &ptr, &length);
ON_ERROR_CLEANUP(res);
/* extract new forwarding entry from Data */
new_forwarding_entry = ccn_forwarding_entry_parse(ptr, length);
ON_NULL_CLEANUP(new_forwarding_entry);
res = new_forwarding_entry->faceid;
ccn_forwarding_entry_destroy(&new_forwarding_entry);
ccn_charbuf_destroy(&signed_info);
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
ccn_charbuf_destroy(&prefixreg);
return res;
cleanup:
ccn_forwarding_entry_destroy(&new_forwarding_entry);
ccn_charbuf_destroy(&signed_info);
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
ccn_charbuf_destroy(&prefixreg);
return -1;
}
/**
*
* Create new face by sending out a request Interest
* The actual new face instance is returned
*
*/
static
struct ccn_face_instance *create_face(struct ccn *h, struct ccn_charbuf *local_scope_template,
struct ccn_charbuf *no_name, struct ccn_face_instance *face_instance)
{
struct ccn_charbuf *newface = NULL;
struct ccn_charbuf *signed_info = NULL;
struct ccn_charbuf *temp = NULL;
struct ccn_charbuf *name = NULL;
struct ccn_charbuf *resultbuf = NULL;
struct ccn_parsed_ContentObject pcobuf = {0};
struct ccn_face_instance *new_face_instance = NULL;
const unsigned char *ptr = NULL;
size_t length = 0;
int res = 0;
/* Encode the given face instance */
newface = ccn_charbuf_create();
ccnb_append_face_instance(newface, face_instance);
temp = ccn_charbuf_create();
res = ccn_sign_content(h, temp, no_name, NULL, newface->buf, newface->length);
resultbuf = ccn_charbuf_create();
/* Construct the Interest name that will create the face */
name = ccn_charbuf_create();
ccn_name_init(name);
ccn_name_append_str(name, "ccnx");
ccn_name_append(name, face_instance->ccnd_id, face_instance->ccnd_id_size);
ccn_name_append_str(name, face_instance->action);
ccn_name_append(name, temp->buf, temp->length);
/* send Interest to retrieve Data that contains the newly created face */
res = ccn_get(h, name, local_scope_template, 1000, resultbuf, &pcobuf, NULL, 0);
ON_ERROR_CLEANUP(res);
/* decode Data to get the actual face instance */
res = ccn_content_get_value(resultbuf->buf, resultbuf->length, &pcobuf, &ptr, &length);
ON_ERROR_CLEANUP(res);
new_face_instance = ccn_face_instance_parse(ptr, length);
ccn_charbuf_destroy(&newface);
ccn_charbuf_destroy(&signed_info);
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
return new_face_instance;
cleanup:
ccn_charbuf_destroy(&newface);
ccn_charbuf_destroy(&signed_info);
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
return NULL;
}
/**
*
* Get ccnd id
*
*/
static int
get_ccndid(struct ccn *h, struct ccn_charbuf *local_scope_template,
unsigned char *ccndid)
{
struct ccn_charbuf *name = NULL;
struct ccn_charbuf *resultbuf = NULL;
struct ccn_parsed_ContentObject pcobuf = {0};
char ccndid_uri[] = "ccnx:/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY";
const unsigned char *ccndid_result;
static size_t ccndid_result_size;
int res;
name = ccn_charbuf_create();
resultbuf = ccn_charbuf_create();
res = ccn_name_from_uri(name, ccndid_uri);
ON_ERROR_EXIT(res, "Unable to parse service locator URI for ccnd key\n");
/* get Data */
res = ccn_get(h, name, local_scope_template, 4500, resultbuf, &pcobuf, NULL, 0);
ON_ERROR_EXIT(res, "Unable to get key from ccnd\n");
/* extract from Data */
res = ccn_ref_tagged_BLOB(CCN_DTAG_PublisherPublicKeyDigest,
resultbuf->buf,
pcobuf.offset[CCN_PCO_B_PublisherPublicKeyDigest],
pcobuf.offset[CCN_PCO_E_PublisherPublicKeyDigest],
&ccndid_result, &ccndid_result_size);
ON_ERROR_EXIT(res, "Unable to parse ccnd response for ccnd id\n");
memcpy((void *)ccndid, ccndid_result, ccndid_result_size);
ccn_charbuf_destroy(&name);
ccn_charbuf_destroy(&resultbuf);
return (ccndid_result_size);
}
/**
* Construct a new face instance based on the given address and port
* This face instance is only used to send new face request
*/
static struct
ccn_face_instance *construct_face(const unsigned char *ccndid, size_t ccndid_size,
const char *address, const char *port, unsigned int tunnel_proto)
{
struct ccn_face_instance *fi = calloc(1, sizeof(*fi));
char rhostnamebuf[NI_MAXHOST];
char rhostportbuf[NI_MAXSERV];
struct addrinfo hints = {.ai_family = AF_UNSPEC, .ai_flags = (AI_ADDRCONFIG),
.ai_socktype = SOCK_DGRAM};
struct addrinfo *raddrinfo = NULL;
struct ccn_charbuf *store = ccn_charbuf_create();
int host_off = -1;
int port_off = -1;
int res;
res = getaddrinfo(address, port, &hints, &raddrinfo);
if (res != 0 || raddrinfo == NULL)
{
fprintf(stderr, "Error: getaddrinfo\n");
return NULL;
}
res = getnameinfo(raddrinfo->ai_addr, raddrinfo->ai_addrlen,
rhostnamebuf, sizeof(rhostnamebuf),
rhostportbuf, sizeof(rhostportbuf),
NI_NUMERICHOST | NI_NUMERICSERV);
freeaddrinfo(raddrinfo);
if (res != 0)
{
fprintf(stderr, "Error: getnameinfo\n");
return NULL;
}
fi->store = store;
fi->descr.ipproto = tunnel_proto;
fi->descr.mcast_ttl = CCN_FIB_MCASTTTL;
fi->lifetime = CCN_FIB_LIFETIME;
ccn_charbuf_append(store, "newface", strlen("newface") + 1);
host_off = store->length;
ccn_charbuf_append(store, rhostnamebuf, strlen(rhostnamebuf) + 1);
port_off = store->length;
ccn_charbuf_append(store, rhostportbuf, strlen(rhostportbuf) + 1);
char *b = (char *)store->buf;
fi->action = b;
fi->descr.address = b + host_off;
fi->descr.port = b + port_off;
fi->descr.source_address = NULL;
fi->ccnd_id = ccndid;
fi->ccnd_id_size = ccndid_size;
return fi;
}
/**
* initialize local data
*/
static void
init_data(struct ccn_charbuf *local_scope_template,
struct ccn_charbuf *no_name)
{
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Interest, CCN_DTAG);
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Name, CCN_DTAG);
ccn_charbuf_append_closer(local_scope_template); /* </Name> */
ccnb_tagged_putf(local_scope_template, CCN_DTAG_Scope, "1");
ccn_charbuf_append_closer(local_scope_template); /* </Interest> */
ccn_name_init(no_name);
}
static int
add_delete_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int p, int operation,unsigned int tunnel_proto)
{
struct ccn_charbuf *prefix;
char port[6];
struct ccn_charbuf *local_scope_template = ccn_charbuf_create();
struct ccn_charbuf *no_name = ccn_charbuf_create();
unsigned char ccndid_storage[32] = {0};
unsigned char *ccndid = ccndid_storage;
size_t ccndid_size = 0;
struct ccn_face_instance *fi;
struct ccn_face_instance *nfi;
int res;
prefix = ccn_charbuf_create();
res = ccn_name_from_uri(prefix, uri);
ON_ERROR_CLEANUP(res);
memset(port, 0, 6);
sprintf(port, "%d", p);
init_data(local_scope_template, no_name);
ccndid_size = get_ccndid(h, local_scope_template, ccndid);
if (ccndid_size != sizeof(ccndid_storage))
{
fprintf(stderr, "Incorrect size for ccnd id in response\n");
ON_ERROR_CLEANUP(-1);
}
/* construct a face instance for new face request */
fi = construct_face(ccndid, ccndid_size, address, port,tunnel_proto);
ON_NULL_CLEANUP(fi);
/* send new face request to actually create a new face */
nfi = create_face(h, local_scope_template, no_name, fi);
ON_NULL_CLEANUP(nfi);
res = register_unregister_prefix(h, local_scope_template, no_name, prefix, nfi, operation);
ON_ERROR_CLEANUP(res);
int faceid=nfi->faceid;
ccn_charbuf_destroy(&local_scope_template);
ccn_charbuf_destroy(&no_name);
ccn_face_instance_destroy(&fi);
ccn_face_instance_destroy(&nfi);
ccn_charbuf_destroy(&prefix);
return faceid;
cleanup:
ccn_charbuf_destroy(&prefix);
ccn_charbuf_destroy(&local_scope_template);
ccn_charbuf_destroy(&no_name);
ccn_face_instance_destroy(&fi);
ccn_face_instance_destroy(&nfi);
return -1;
}
int
add_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port, unsigned int tunnel_proto)
{
return add_delete_ccn_face(h, uri, address, port, OP_REG,tunnel_proto);
}
int
delete_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port,unsigned int tunnel_proto)
{
return add_delete_ccn_face(h, uri, address, port, OP_UNREG,tunnel_proto);
}
-12
View File
@@ -1,12 +0,0 @@
#ifndef _NLSR_FACE_H_
#define _NLSR_FACE_H_
#define CCN_FIB_LIFETIME ((~0U) >> 1)
#define CCN_FIB_MCASTTTL (-1)
#define OP_REG 0
#define OP_UNREG 1
int add_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port,unsigned int tunnel_proto);
int delete_ccn_face(struct ccn *h, const char *uri, const char *address, const unsigned int port,unsigned int tunnel_proto);
#endif
-236
View File
@@ -1,236 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/face_mgmt.h>
#include <ccn/reg_mgmt.h>
#include <ccn/charbuf.h>
#include "nlsr_fib.h"
#include "nlsr.h"
static void
ccn_fib_warn(int lineno, const char *format, ...)
{
struct timeval t;
va_list ap;
va_start(ap, format);
gettimeofday(&t, NULL);
fprintf(stderr, "%d.%06d ccn_fib[%d]:%d: ", (int)t.tv_sec, (unsigned)t.tv_usec, (int)getpid(), lineno);
vfprintf(stderr, format, ap);
va_end(ap);
}
#define ON_ERROR_CLEANUP(resval) \
{ \
if ((resval) < 0) { \
ccn_fib_warn (__LINE__, "OnError cleanup\n"); \
goto cleanup; \
} \
}
#define ON_NULL_CLEANUP(resval) \
{ \
if ((resval) == NULL) { \
ccn_fib_warn(__LINE__, "OnNull cleanup\n"); \
goto cleanup; \
} \
}
static int
register_unregister_prefix(struct ccn *h, struct ccn_charbuf *local_scope_template,
struct ccn_charbuf *no_name, struct ccn_charbuf *name_prefix,
const unsigned char *ccndid, size_t ccnd_id_size, int faceid,
int operation, long int lifetime)
{
struct ccn_charbuf *temp = NULL;
struct ccn_charbuf *resultbuf = NULL;
struct ccn_charbuf *signed_info = NULL;
struct ccn_charbuf *name = NULL;
struct ccn_charbuf *prefixreg = NULL;
struct ccn_parsed_ContentObject pcobuf = {0};
struct ccn_forwarding_entry forwarding_entry_storage = {0};
struct ccn_forwarding_entry *forwarding_entry = &forwarding_entry_storage;
struct ccn_forwarding_entry *new_forwarding_entry;
const unsigned char *ptr = NULL;
size_t length = 0;
int res;
/* Register or unregister the prefix */
forwarding_entry->action = (operation == OP_REG) ? "prefixreg" : "unreg";
forwarding_entry->name_prefix = name_prefix;
forwarding_entry->ccnd_id = ccndid;
forwarding_entry->ccnd_id_size =ccnd_id_size;
forwarding_entry->faceid = faceid;
forwarding_entry->flags = -1;
forwarding_entry->lifetime = lifetime;
prefixreg = ccn_charbuf_create();
ccnb_append_forwarding_entry(prefixreg, forwarding_entry);
temp = ccn_charbuf_create();
res = ccn_sign_content(h, temp, no_name, NULL, prefixreg->buf, prefixreg->length);
resultbuf = ccn_charbuf_create();
/* construct Interest containing prefixreg request */
name = ccn_charbuf_create();
ccn_name_init(name);
ccn_name_append_str(name, "ccnx");
ccn_name_append(name, ccndid, ccnd_id_size);
ccn_name_append_str(name, (operation == OP_REG) ? "prefixreg" : "unreg");
ccn_name_append(name, temp->buf, temp->length);
/* send Interest, get Data */
res = ccn_get(h, name, local_scope_template, 1000, resultbuf, &pcobuf, NULL, 0);
ON_ERROR_CLEANUP(res);
res = ccn_content_get_value(resultbuf->buf, resultbuf->length, &pcobuf, &ptr, &length);
ON_ERROR_CLEANUP(res);
/* extract new forwarding entry from Data */
new_forwarding_entry = ccn_forwarding_entry_parse(ptr, length);
ON_NULL_CLEANUP(new_forwarding_entry);
res = new_forwarding_entry->faceid;
ccn_forwarding_entry_destroy(&new_forwarding_entry);
ccn_charbuf_destroy(&signed_info);
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
ccn_charbuf_destroy(&prefixreg);
return res;
cleanup:
if ( signed_info )
ccn_charbuf_destroy(&signed_info);
if ( temp )
ccn_charbuf_destroy(&temp);
if ( resultbuf )
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
if ( prefixreg )
ccn_charbuf_destroy(&prefixreg);
return -1;
}
static int
get_ccndid(struct ccn *h, struct ccn_charbuf *local_scope_template,
unsigned char *ccndid)
{
struct ccn_charbuf *name = NULL;
struct ccn_charbuf *resultbuf = NULL;
struct ccn_parsed_ContentObject pcobuf = {0};
char ccndid_uri[] = "ccnx:/%C1.M.S.localhost/%C1.M.SRV/ccnd/KEY";
const unsigned char *ccndid_result;
static size_t ccndid_result_size;
int res;
name = ccn_charbuf_create();
resultbuf = ccn_charbuf_create();
res = ccn_name_from_uri(name, ccndid_uri);
ON_ERROR_CLEANUP(res);
/* get Data */
res = ccn_get(h, name, local_scope_template, 4500, resultbuf, &pcobuf, NULL, 0);
ON_ERROR_CLEANUP(res);
/* extract from Data */
res = ccn_ref_tagged_BLOB(CCN_DTAG_PublisherPublicKeyDigest,
resultbuf->buf,
pcobuf.offset[CCN_PCO_B_PublisherPublicKeyDigest],
pcobuf.offset[CCN_PCO_E_PublisherPublicKeyDigest],
&ccndid_result, &ccndid_result_size);
ON_ERROR_CLEANUP(res);
memcpy((void *)ccndid, ccndid_result, ccndid_result_size);
ccn_charbuf_destroy(&name);
ccn_charbuf_destroy(&resultbuf);
return (ccndid_result_size);
cleanup:
ccn_charbuf_destroy(&name);
ccn_charbuf_destroy(&resultbuf);
return -1;
}
static void
init_data(struct ccn_charbuf *local_scope_template,
struct ccn_charbuf *no_name)
{
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Interest, CCN_DTAG);
ccn_charbuf_append_tt(local_scope_template, CCN_DTAG_Name, CCN_DTAG);
ccn_charbuf_append_closer(local_scope_template); /* </Name> */
ccnb_tagged_putf(local_scope_template, CCN_DTAG_Scope, "1");
ccn_charbuf_append_closer(local_scope_template); /* </Interest> */
ccn_name_init(no_name);
}
int
add_delete_ccn_face_by_face_id(struct ccn *h, const char *uri, int operation, int faceid, long int lifetime)
{
if ( nlsr->debugging )
{
printf("add_delete_ccn_face_by_face_id called\n");
printf("Uri: %s Face: %d Operation: %s \n",(char *)uri , faceid, operation == OP_REG ? "Registration" : "Unregistration");
}
struct ccn_charbuf *prefix;
struct ccn_charbuf *local_scope_template = ccn_charbuf_create();
struct ccn_charbuf *no_name = ccn_charbuf_create();
unsigned char ccndid_storage[32] = {0};
unsigned char *ccndid = ccndid_storage;
size_t ccndid_size = 0;
int res;
prefix = ccn_charbuf_create();
res = ccn_name_from_uri(prefix, uri);
ON_ERROR_CLEANUP(res);
init_data(local_scope_template, no_name);
ccndid_size = get_ccndid(h, local_scope_template, ccndid);
if (ccndid_size != sizeof(ccndid_storage))
{
fprintf(stderr, "Incorrect size for ccnd id in response\n");
ON_ERROR_CLEANUP(-1);
}
res = register_unregister_prefix(h, local_scope_template, no_name, prefix,ccndid, ccndid_size,faceid, operation,lifetime);
ON_ERROR_CLEANUP(res);
ccn_charbuf_destroy(&local_scope_template);
ccn_charbuf_destroy(&no_name);
ccn_charbuf_destroy(&prefix);
return 0;
cleanup:
ccn_charbuf_destroy(&prefix);
ccn_charbuf_destroy(&local_scope_template);
ccn_charbuf_destroy(&no_name);
return -1;
}
-12
View File
@@ -1,12 +0,0 @@
#ifndef _NLSR_FIB_H_
#define _NLSR_FIB_H_
#define CCN_FIB_LIFETIME ((~0U) >> 1)
#define CCN_FIB_MCASTTTL (-1)
#define OP_REG 0
#define OP_UNREG 1
int add_delete_ccn_face_by_face_id(struct ccn *h, const char *uri, int operation,
int faceid, long int lifetime);
#endif
-564
View File
@@ -1,564 +0,0 @@
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include <unistd.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include <ccn/signing.h>
#include <ccn/schedule.h>
#include <ccn/hashtb.h>
#include "nlsr.h"
#include "nlsr_km.h"
#include "nlsr_km_util.h"
#include "utility.h"
int
sign_content_with_user_defined_keystore(struct ccn_charbuf *content_name,
struct ccn_charbuf *resultbuf,
const void *data,
size_t data_size,
char *keystore_path,
char *keystore_passphrase,
char *key_repo_name,
char *site_name,
char *router_name,
long int freshness){
if ( nlsr->debugging )
printf("sign_content_with_user_defined_keystore called\n");
int res;
struct ccn_charbuf * pubid_out=ccn_charbuf_create();
struct ccn_charbuf * keyname;
struct ccn_keystore *keystore = NULL;
keystore=ccn_keystore_create();
res=ccn_keystore_init(keystore, keystore_path,keystore_passphrase );
if ( res < 0 ){
if ( nlsr->debugging )
printf("Error in initiating keystore :(\n");
ccn_keystore_destroy(&keystore);
return -1;
}
res=ccn_load_private_key (nlsr->ccn,
keystore_path,
keystore_passphrase,
pubid_out);
if(res < 0 ){
if ( nlsr->debugging )
printf("Error in loading keystore :( \n");
ccn_charbuf_destroy(&pubid_out);
return -1;
}
char *baseuri=(char *)calloc(strlen(key_repo_name)+strlen(site_name)+
strlen(router_name)+strlen("/%C1.R.N.Start")+5,sizeof(char));
memcpy(baseuri,key_repo_name,strlen(key_repo_name)+1);
if ( site_name[0] != '/')
memcpy(baseuri+strlen(baseuri),"/",1);
memcpy(baseuri+strlen(baseuri),site_name,strlen(site_name)+1);
memcpy(baseuri+strlen(baseuri),"/%C1.R.N.Start",strlen("/%C1.R.N.Start"));
memcpy(baseuri+strlen(baseuri),router_name,strlen(router_name)+1);
baseuri[strlen(baseuri)]='\0';
keyname=ccn_charbuf_create();
if(keyname == NULL ){
ccn_charbuf_destroy(&pubid_out);
free(baseuri);
return -1;
}
ccn_name_from_uri(keyname,baseuri);
if ( res < 0 ){
if ( nlsr->debugging )
printf("Bad URI format: %s\n",baseuri);
ccn_charbuf_destroy(&pubid_out);
ccn_charbuf_destroy(&keyname);
free(baseuri);
return -1;
}
ccn_name_append_str(keyname,"nlsr");
struct ccn_charbuf *keyid = ccn_charbuf_create();
ccn_charbuf_append_value(keyid, CCN_MARKER_CONTROL, 1);
ccn_charbuf_append_string(keyid, ".M.K");
ccn_charbuf_append_value(keyid, 0, 1);
ccn_charbuf_append_charbuf(keyid, pubid_out);
ccn_name_append(keyname, keyid->buf, keyid->length);
struct ccn_charbuf *uri = ccn_charbuf_create();
ccn_uri_append(uri, keyname->buf, keyname->length, 0);
if ( nlsr->debugging )
printf("Key Name Included when processing content: %s\n", ccn_charbuf_as_string(uri));
ccn_charbuf_destroy(&uri);
struct ccn_signing_params sp = CCN_SIGNING_PARAMS_INIT;
sp.type = CCN_CONTENT_DATA;
sp.template_ccnb = ccn_charbuf_create();
ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_SignedInfo, CCN_DTAG);
ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_KeyLocator, CCN_DTAG);
ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_KeyName, CCN_DTAG);
ccn_charbuf_append(sp.template_ccnb, keyname->buf, keyname->length);
ccn_charbuf_append_closer(sp.template_ccnb); // KeyName closer
ccn_charbuf_append_closer(sp.template_ccnb); // KeyLocator closer
ccn_charbuf_append_closer(sp.template_ccnb); // SignedInfo closer
sp.sp_flags |= CCN_SP_TEMPL_KEY_LOCATOR;
sp.sp_flags |= CCN_SP_FINAL_BLOCK;
sp.freshness = freshness;
if (pubid_out->length != sizeof(sp.pubid)){
if ( nlsr->debugging )
printf("Size of pubid and sp.pubid is not equal");
ccn_charbuf_destroy(&keyname);
ccn_charbuf_destroy(&pubid_out);
free(baseuri);
return -1;
}
memcpy(sp.pubid, pubid_out->buf, pubid_out->length);
res=ccn_sign_content(nlsr->ccn,resultbuf,content_name,&sp,data,data_size);
if( res < 0 ){
if ( nlsr->debugging )
printf("Content signing error \n");
ccn_charbuf_destroy(&sp.template_ccnb);
ccn_charbuf_destroy(&keyid);
ccn_charbuf_destroy(&keyname);
ccn_charbuf_destroy(&pubid_out);
free(baseuri);
return -1;
}
ccn_keystore_destroy(&keystore);
ccn_charbuf_destroy(&sp.template_ccnb);
ccn_charbuf_destroy(&keyid);
ccn_charbuf_destroy(&keyname);
ccn_charbuf_destroy(&pubid_out);
free(baseuri);
return 0;
}
char *
get_orig_router_from_lsa_name(struct ccn_charbuf * content_name)
{
int start=0;
size_t comp_size;
const unsigned char *second_last_comp;
char *second_comp_type;
char *sep=".";
char *rem;
struct ccn_indexbuf *components=ccn_indexbuf_create();
struct ccn_charbuf *name=ccn_charbuf_create();
ccn_name_from_uri(name,nlsr->slice_prefix);
ccn_name_split (name, components);
start=components->n-2;
ccn_charbuf_destroy(&name);
ccn_indexbuf_destroy(&components);
struct ccn_indexbuf *comps=ccn_indexbuf_create();
ccn_name_split (content_name, comps);
ccn_name_comp_get( content_name->buf, comps,
comps->n-1-2, &second_last_comp, &comp_size);
second_comp_type=strtok_r((char *)second_last_comp, sep, &rem);
if ( strcmp( second_comp_type, "lsId" ) == 0 ){
ccn_name_chop(content_name,comps,-3);
}
else{
ccn_name_chop(content_name,comps,-2);
}
struct ccn_charbuf *temp=ccn_charbuf_create();
ccn_name_init(temp);
ccn_name_append_components( temp, content_name->buf,
comps->buf[start+1],
comps->buf[comps->n - 1]);
struct ccn_charbuf *temp1=ccn_charbuf_create();
ccn_uri_append(temp1, temp->buf, temp->length, 0);
char *orig_router=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
sizeof(char));
memcpy(orig_router,ccn_charbuf_as_string(temp1),
strlen(ccn_charbuf_as_string(temp1)));
orig_router[strlen(orig_router)]='\0';
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&temp1);
ccn_indexbuf_destroy(&comps);
return orig_router;
}
char *
get_orig_router_from_info_content_name(struct ccn_charbuf * content_name)
{
int start,end;
start=0;
struct ccn_indexbuf *comps=ccn_indexbuf_create();
ccn_name_split (content_name, comps);
end=check_for_name_component_in_name(content_name,comps,"nlsr");
struct ccn_charbuf *temp=ccn_charbuf_create();
ccn_name_init(temp);
ccn_name_append_components( temp, content_name->buf,
comps->buf[start],
comps->buf[end]);
struct ccn_charbuf *temp1=ccn_charbuf_create();
ccn_uri_append(temp1, temp->buf, temp->length, 0);
char *orig_router=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
sizeof(char));
memcpy(orig_router,ccn_charbuf_as_string(temp1),
strlen(ccn_charbuf_as_string(temp1)));
orig_router[strlen(orig_router)]='\0';
ccn_charbuf_destroy(&temp);
ccn_charbuf_destroy(&temp1);
ccn_indexbuf_destroy(&comps);
return orig_router;
}
int
check_key_name_hierarchy(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco,
int key_type, int content_type){
if ( nlsr->debugging )
printf("check_key_name_hierarchy called\n");
if (key_type == UNKNOWN_KEY ){
return 1;
}
//int res;
struct ccn_charbuf *key_name=get_key_name(ccnb, pco);
struct ccn_charbuf *key_uri = ccn_charbuf_create();
ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
if ( nlsr->debugging )
printf("Key Name: %s\n",ccn_charbuf_as_string(key_uri));
ccn_charbuf_destroy(&key_uri);
struct ccn_charbuf *content_name=ccn_charbuf_create();
ccn_charbuf_append(content_name, ccnb + pco->offset[CCN_PCO_B_Name],
pco->offset[CCN_PCO_E_Name] - pco->offset[CCN_PCO_B_Name]);
struct ccn_charbuf *content_uri = ccn_charbuf_create();
ccn_uri_append(content_uri, content_name->buf, content_name->length, 0);
if ( nlsr->debugging )
printf("Content Name: %s\n",ccn_charbuf_as_string(content_uri));
ccn_charbuf_destroy(&content_uri);
if ( key_type == NLSR_KEY){
char *orig_router_key_name=get_orig_router_from_key_name(key_name,0,0);
char *orig_router_content_name;
if ( content_type == 1 ){
orig_router_content_name=get_orig_router_from_lsa_name(content_name);
}
else if ( content_type == 0 ){
orig_router_content_name=get_orig_router_from_info_content_name(content_name);
}
if ( nlsr->debugging ){
printf("Orig Router (Key Name):%s\n",orig_router_key_name);
printf("Orig Router (Content Name):%s\n",orig_router_content_name);
}
if (strcmp(orig_router_key_name,orig_router_content_name) == 0 ){
free(orig_router_key_name);
free(orig_router_content_name);
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&content_name);
return 1;
}
}
if ( key_type == ROUTING_KEY){
char *orig_router_key_name=get_orig_router_from_key_name(key_name,1,0);
char *orig_router_content_name=get_orig_router_from_key_name(content_name,1,1);
if ( nlsr->debugging ){
printf("Orig Router (Key Name):%s\n",orig_router_key_name);
printf("Orig Router (Content Name):%s\n",orig_router_content_name);
}
if (strcmp(orig_router_key_name,orig_router_content_name) == 0 ){
free(orig_router_key_name);
free(orig_router_content_name);
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&content_name);
return 1;
}
}
if ( key_type == OPERATOR_KEY){
struct ccn_indexbuf *key_name_comps;
key_name_comps = ccn_indexbuf_create();
ccn_name_split(key_name, key_name_comps);
int last_indx=check_for_tag_component_in_name(key_name,key_name_comps,"O.N.Start");
char *site_key_prefix_key=get_name_segments_from_name(key_name,0,last_indx);
if ( nlsr->debugging )
printf("Site key prefix(key Name):%s\n",site_key_prefix_key);
ccn_indexbuf_destroy(&key_name_comps);
struct ccn_indexbuf *content_name_comps;
content_name_comps = ccn_indexbuf_create();
ccn_name_split(content_name, content_name_comps);
int last_indx_rtr=check_for_tag_component_in_name(content_name,content_name_comps,"R.N.Start");
char *site_key_prefix_content=get_name_segments_from_name(key_name,0,last_indx_rtr);
if ( nlsr->debugging )
printf("Site key prefix(Content Name):%s\n",site_key_prefix_content);
ccn_indexbuf_destroy(&content_name_comps);
if( strcmp(site_key_prefix_key,site_key_prefix_content) == 0 ){
free(site_key_prefix_key);
free(site_key_prefix_content);
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&content_name);
return 1;
}
}
if ( key_type == SITE_KEY){
struct ccn_indexbuf *key_name_comps;
key_name_comps = ccn_indexbuf_create();
ccn_name_split(key_name, key_name_comps);
int last_indx=check_for_tag_component_in_name(key_name,key_name_comps,"M.K");
char *site_key_prefix_key=get_name_segments_from_name(key_name,0,last_indx);
if ( nlsr->debugging )
printf("Site key prefix(key Name):%s\n",site_key_prefix_key);
ccn_indexbuf_destroy(&key_name_comps);
struct ccn_indexbuf *content_name_comps;
content_name_comps = ccn_indexbuf_create();
ccn_name_split(content_name, content_name_comps);
int last_indx_rtr=check_for_tag_component_in_name(content_name,content_name_comps,"O.N.Start");
char *site_key_prefix_content=get_name_segments_from_name(key_name,0,last_indx_rtr);
if ( nlsr->debugging )
printf("Site key prefix(Content Name):%s\n",site_key_prefix_content);
ccn_indexbuf_destroy(&content_name_comps);
if( strcmp(site_key_prefix_key,site_key_prefix_content) == 0 ){
free(site_key_prefix_key);
free(site_key_prefix_content);
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&content_name);
return 1;
}
}
if ( key_type == ROOT_KEY){
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&content_name);
return 1;
}
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&content_name);
return 0;
}
int
verify_key(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco,
int content_type){
if ( nlsr->debugging )
printf("verify key called\n");
int ret=-1;
if ( contain_key_name(ccnb, pco) == 1){
struct ccn_charbuf *key_name=get_key_name(ccnb, pco);
struct ccn_charbuf *key_uri = ccn_charbuf_create();
ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
if ( nlsr->debugging )
printf("Key Name from Incoming Content: %s\n",ccn_charbuf_as_string(key_uri));
int key_type=get_key_type_from_key_name(key_name);
if ( nlsr->debugging )
printf("Key Type: %d \n",key_type);
struct ccn_charbuf *result = ccn_charbuf_create();
struct ccn_parsed_ContentObject temp_pco = {0};
int get_flags = 0;
get_flags |= CCN_GET_NOKEYWAIT;
int counter = 0;
while(ccn_get(nlsr->ccn, key_name, NULL, 500, result, &temp_pco, NULL,
get_flags) < 0 && counter < 3) counter++;
int chk_verify=ccn_verify_content(nlsr->ccn,ccnb,pco);
if ( chk_verify == 0 ){
if ( nlsr->debugging )
printf("Content verification Successful :)\n");
if ( counter == 3){
if ( nlsr->debugging )
printf("Could not retrieve key by name !!!\n");
}
else{
if ( key_type == ROOT_KEY ){
ret=0;
}
else{
if ( nlsr->isStrictHierchicalKeyCheck ){
int key_name_test=check_key_name_hierarchy(ccnb,
pco,
key_type,
content_type);
if ( key_name_test == 1){
ret=verify_key(result->buf,&temp_pco,content_type);
}
}
else{
ret=verify_key(result->buf,&temp_pco,content_type);
}
}
}
}
ccn_charbuf_destroy(&result);
ccn_charbuf_destroy(&key_uri);
ccn_charbuf_destroy(&key_name);
return ret;
}
return ret;
}
void
destroy_keys(void)
{
int i, key_element;
struct nlsr_key *key;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->keys, e);
key_element=hashtb_n(nlsr->keys);
for(i=0;i<key_element;i++)
{
key=e->data;
free(key->key_name);
hashtb_next(e);
}
hashtb_end(e);
if( nlsr->keys )
hashtb_destroy(&nlsr->keys);
}
void
print_keys(void){
if ( nlsr->debugging )
printf("print_keys called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_keys called \n");
int i, key_element;
struct nlsr_key *key;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->keys, e);
key_element=hashtb_n(nlsr->keys);
for(i=0;i<key_element;i++)
{
key=e->data;
if ( nlsr->debugging )
printf("Key : %s \n",key->key_name);
hashtb_next(e);
}
hashtb_end(e);
}
int
does_key_exist(char *keyname){
if (nlsr->debugging)
{
printf("does_key_exist called\n");
printf("Keyname : %s \n",keyname);
}
int ret=0;
unsigned *v;
v = hashtb_lookup(nlsr->keys, keyname, strlen(keyname));
if (v != NULL){
ret = 1;
if (nlsr->debugging)
printf("Key Found\n");
}
return ret;
}
void
add_key(char *keyname){
if (nlsr->debugging)
{
printf("add_key called\n");
printf("Keyname : %s \n",keyname);
}
struct nlsr_key *key;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
int res;
hashtb_start(nlsr->keys, e);
res = hashtb_seek(e, keyname, strlen(keyname), 0);
if(res == HT_NEW_ENTRY )
{
key=e->data;
key->key_name=(char *)calloc(strlen(keyname)+1,sizeof(char));
memcpy(key->key_name,keyname,strlen(keyname)+1);
}
if (nlsr->debugging)
print_keys();
}
-45
View File
@@ -1,45 +0,0 @@
#ifndef _NLSR_KM_H_
#define _NLSR_KM_H_
enum key_type{
ROOT_KEY, //0
SITE_KEY, //1
OPERATOR_KEY,//2
ROUTING_KEY,//3
NLSR_KEY,//4
UNKNOWN_KEY//5
};
struct nlsr_key{
char *key_name;
};
int
sign_content_with_user_defined_keystore(struct ccn_charbuf *content_name,
struct ccn_charbuf *resultbuf,
const void *data,
size_t data_size,
char *keystore_path,
char *keystore_passphrase,
char *key_repo_name,
char *site_name,
char *router_name,
long int freshness);
int contain_key_name(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco);
struct ccn_charbuf * get_key_name(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco);
int verify_key(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco,
int content_type);
void add_key(char *keyname);
int does_key_exist(char *keyname);
void destroy_keys(void);
#endif
-265
View File
@@ -1,265 +0,0 @@
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include <unistd.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include <ccn/signing.h>
#include <ccn/schedule.h>
#include <ccn/hashtb.h>
#include "nlsr.h"
#include "nlsr_km_util.h"
#include "nlsr_km.h"
int
appendLifetime(struct ccn_charbuf *cb, int lifetime)
{
unsigned char buf[sizeof(int32_t)];
int32_t dreck = lifetime << 12;
int pos = sizeof(int32_t);
int res = 0;
while (dreck > 0 && pos > 0)
{
pos--;
buf[pos] = dreck & 255;
dreck = dreck >> 8;
}
res |= ccnb_append_tagged_blob(cb, CCN_DTAG_InterestLifetime, buf+pos,
sizeof(buf)-pos);
return res;
}
int
contain_key_name(const unsigned char *ccnb, struct ccn_parsed_ContentObject *pco)
{
if (pco->offset[CCN_PCO_B_KeyLocator] == pco->offset[CCN_PCO_E_KeyLocator])
return -1;
struct ccn_buf_decoder decoder;
struct ccn_buf_decoder *d;
d = ccn_buf_decoder_start(&decoder, ccnb +
pco->offset[CCN_PCO_B_Key_Certificate_KeyName],
pco->offset[CCN_PCO_E_Key_Certificate_KeyName] -
pco->offset[CCN_PCO_B_Key_Certificate_KeyName]);
if (ccn_buf_match_dtag(d, CCN_DTAG_KeyName))
return 1;
return -1;
}
struct ccn_charbuf *
get_key_name(const unsigned char *ccnb, struct ccn_parsed_ContentObject *pco)
{
struct ccn_charbuf *key_name = ccn_charbuf_create();
ccn_charbuf_append(key_name, ccnb + pco->offset[CCN_PCO_B_KeyName_Name],
pco->offset[CCN_PCO_E_KeyName_Name] - pco->offset[CCN_PCO_B_KeyName_Name]);
return key_name;
}
int
check_for_name_component_in_name(const struct ccn_charbuf *name,
const struct ccn_indexbuf *indx,
const char *component){
int res,i;
int result_position=0;
int name_comps=(int)indx->n;
for(i=0;i<name_comps;i++){
res=ccn_name_comp_strcmp(name->buf,indx,i,component);
if( res == 0){
result_position=i;
break;
}
}
return result_position;
}
int
check_for_tag_component_in_name(const struct ccn_charbuf *name,
const struct ccn_indexbuf *indx,
const char *component){
int res,i;
int result_position=0;
int name_comps=(int)indx->n;
for(i=0;i<name_comps;i++){
const unsigned char *comp_ptr;
size_t comp_size;
res=ccn_name_comp_get(name->buf, indx,i,&comp_ptr, &comp_size);
if( res == 0){
if ( strstr((char *)comp_ptr,component) != NULL ){
result_position=i;
break;
}
}
}
return result_position;
}
enum key_type
get_key_type_from_key_name(struct ccn_charbuf *keyname)
{
if ( nlsr->debugging )
printf("get_key_type_from_key_name called\n");
int res;
int return_key=UNKNOWN_KEY;
struct ccn_indexbuf *indx=ccn_indexbuf_create();
if ( indx == NULL ){
if ( nlsr->debugging )
printf("Error in creating index for key name \n");
return UNKNOWN_KEY;
}
res=ccn_name_split(keyname,indx);
if ( res < 0 ){
if ( nlsr->debugging )
printf("Error in parsing key name \n");
ccn_indexbuf_destroy(&indx);
return UNKNOWN_KEY;
}
else if ( res == 3){
int chk_ndn=check_for_name_component_in_name(keyname,indx,"ndn");
int chk_key=check_for_name_component_in_name(keyname,indx,"keys");
if ( chk_ndn == 0 && chk_key == 1)
return_key=ROOT_KEY;
}
else{
int check_op,check_rt;
check_op=check_for_tag_component_in_name(keyname,indx,
"O.N.Start");
check_rt=check_for_tag_component_in_name(keyname,indx,
"R.N.Start");
if ( check_op > 0){
return_key=OPERATOR_KEY;
}
else if(check_rt >0){
int check_nlsr;
check_nlsr=check_for_name_component_in_name(keyname,indx,
"nlsr");
if ( check_rt > 0 ){
if ( check_nlsr > 0){
return_key=NLSR_KEY;
}
else{
return_key=ROUTING_KEY;
}
}
}
else if ( check_rt == 0 && check_op == 0 && res > 3){
return_key=SITE_KEY;
}
}
ccn_indexbuf_destroy(&indx);
return return_key;
}
char *
get_name_segments_from_name(struct ccn_charbuf *name, int start_indx, int end_indx)
{
int res;
struct ccn_indexbuf *name_comps;
struct ccn_charbuf *orig_router;
char *name_seg=NULL;
name_comps = ccn_indexbuf_create();
res = ccn_name_split(name, name_comps);
if ( res < 0 ){
ccn_indexbuf_destroy(&name_comps);
return name_seg;
}
else{
orig_router=ccn_charbuf_create();
ccn_name_init(orig_router);
ccn_name_append_components(orig_router,name->buf,
name_comps->buf[start_indx],
name_comps->buf[end_indx]);
struct ccn_charbuf *temp1=ccn_charbuf_create();
ccn_uri_append(temp1, orig_router->buf, orig_router->length, 0);
name_seg=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
sizeof(char));
memcpy(name_seg,ccn_charbuf_as_string(temp1),
strlen(ccn_charbuf_as_string(temp1)));
name_seg[strlen(name_seg)]='\0';
ccn_charbuf_destroy(&orig_router);
ccn_charbuf_destroy(&temp1);
}
ccn_indexbuf_destroy(&name_comps);
return name_seg;
}
char *
get_orig_router_from_key_name(struct ccn_charbuf *name, int more, int type)
{
int res;
struct ccn_indexbuf *name_comps;
struct ccn_charbuf *orig_router;
char *router=NULL;
name_comps = ccn_indexbuf_create();
res = ccn_name_split(name, name_comps);
if ( res < 0 ){
ccn_indexbuf_destroy(&name_comps);
return router;
}
else{
res=ccn_name_chop(name, name_comps, -(2-more));
if ( more > 0 && type==1)
res=ccn_name_chop(name, name_comps, -3);
if ( res < 0 ){
ccn_indexbuf_destroy(&name_comps);
return NULL;
}
else{
res=check_for_tag_component_in_name(name,name_comps,"R.N.Start");
if ( res > 0 ){
orig_router=ccn_charbuf_create();
ccn_name_init(orig_router);
ccn_name_append_components(orig_router,name->buf,
name_comps->buf[res+1],
name_comps->buf[name_comps->n - 1]);
struct ccn_charbuf *temp1=ccn_charbuf_create();
ccn_uri_append(temp1, orig_router->buf, orig_router->length, 0);
router=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
sizeof(char));
memcpy(router,ccn_charbuf_as_string(temp1),
strlen(ccn_charbuf_as_string(temp1)));
router[strlen(router)]='\0';
ccn_charbuf_destroy(&temp1);
ccn_charbuf_destroy(&orig_router);
}
else{
ccn_indexbuf_destroy(&name_comps);
return NULL;
}
}
}
ccn_indexbuf_destroy(&name_comps);
return router;
}
-36
View File
@@ -1,36 +0,0 @@
#ifndef _NLSR_KM_UTIL_H_
#define _NLSR_KM_UTIL_H_
int
contain_key_name(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco);
struct ccn_charbuf *
get_key_name(const unsigned char *ccnb,
struct ccn_parsed_ContentObject *pco);
int
check_for_name_component_in_name(const struct ccn_charbuf *name,
const struct ccn_indexbuf *indx,
const char *component);
int
check_for_tag_component_in_name(const struct ccn_charbuf *name,
const struct ccn_indexbuf *indx,
const char *component);
enum key_type
get_key_type_from_key_name(struct ccn_charbuf *keyname);
int
appendLifetime(struct ccn_charbuf *cb, int lifetime);
char *
get_orig_router_from_key_name(struct ccn_charbuf *name, int more, int type);
char *
get_name_segments_from_name(struct ccn_charbuf *name,
int start_indx, int end_indx);
#endif
-2862
View File
File diff suppressed because it is too large. Load diff
-110
View File
@@ -1,110 +0,0 @@
#ifndef _NLSR_LSDB_H_
#define _NLSR_LSDB_H_
#define LS_TYPE_ADJ 1
#define LS_TYPE_NAME 2
#define LS_TYPE_COR 3
struct link
{
struct name_prefix *nbr;
int face;
int metric;
};
struct alsa_header
{
unsigned int ls_type;
char *orig_time;
struct name_prefix *orig_router;
};
struct alsa
{
struct alsa_header *header;
int no_link;
struct link *links;
char * body;
};
struct nlsa_header
{
unsigned int ls_type;
char *orig_time;
long int ls_id;
struct name_prefix *orig_router;
unsigned int isValid;
};
struct nlsa
{
struct nlsa_header *header;
struct name_prefix *name_prefix;
};
struct clsa
{
struct alsa_header *header;
double cor_r;
double cor_theta;
};
void set_new_lsdb_version(void);
void build_and_install_name_lsas(void);
void build_and_install_single_name_lsa(struct name_prefix *np);
void build_name_lsa(struct nlsa *name_lsa, struct name_prefix *np);
void install_name_lsa(struct nlsa *name_lsa);
void print_name_lsa(struct nlsa *name_lsa);
void write_log_for_name_lsa(struct nlsa *name_lsa);
void print_name_lsdb(void);
void build_and_install_others_name_lsa(char *orig_router,int ls_type,long int ls_id,char *orig_time, int isValid,char *np);
void build_others_name_lsa(struct nlsa *name_lsa, char *orig_router,int ls_type,long int ls_id, char *orig_time, int isValid, char *np);
void make_name_lsa_key(char *key, char *orig_router, int ls_type, long int ls_id);
int refresh_lsdb(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
int build_and_install_adj_lsa(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
void build_adj_lsa(struct alsa * adj_lsa);
void install_adj_lsa(struct alsa * adj_lsa);
void print_adj_lsa_body(const char *body, int no_link);
void print_adj_lsa(struct alsa * adj_lsa);
void write_log_for_adj_lsa(struct alsa * adj_lsa);
void print_adj_lsdb(void);
void make_adj_lsa_key(char *key,struct alsa *adj_lsa);
void build_and_install_others_adj_lsa(char *orig_router,int ls_type,char *orig_time, int no_link,char *data);
void build_others_adj_lsa(struct alsa *adj_lsa,char *orig_router,int ls_type,char *orig_time,int no_link,char *data);
long int get_name_lsdb_num_element(void);
long int get_adj_lsdb_num_element(void);
int check_is_new_name_lsa(char *orig_router,char *lst,char *lsid,char *orig_time);
int check_is_new_adj_lsa(char *orig_router,char *lst,char *orig_time);
int check_is_new_cor_lsa(char *orig_router,char *lst,char *orig_time);
void get_name_lsa_data(struct ccn_charbuf *lsa_data,struct name_prefix *lsaId);
void get_adj_lsa_data(struct ccn_charbuf *lsa_data,struct name_prefix *lsaId);
void make_name_lsa_invalid(struct name_prefix *np,int ls_type, long int ls_id);
void build_and_install_cor_lsa();
void print_cor_lsdb();
void write_name_lsdb_to_repo(char *slice_prefix);
void write_name_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id);
void make_name_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, long int ls_id,char *orig_time,char *slice_prefix);
void write_adj_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id);
void write_cor_lsa_to_repo(struct clsa *cor_lsa);
void build_and_install_others_cor_lsa(char *orig_router,int ls_type,char *orig_time, double cor_r, double cor_theta);
double get_hyperbolic_r(char *router);
double get_hyperbolic_theta(char *router);
void destroy_lsdb(void);
void
get_lsdb_summary(struct ccn_charbuf *lsdb_data);
#endif
-1301
View File
File diff suppressed because it is too large. Load diff
-31
View File
@@ -1,31 +0,0 @@
#ifndef _NLSR_NDN_H_
#define _NLSR_NDN_H_
int appendLifetime(struct ccn_charbuf *cb, int lifetime);
void get_nbr(struct name_prefix *nbr,struct ccn_closure *selfp, struct ccn_upcall_info *info);
void get_lsa_identifier(struct name_prefix *lsaId,struct ccn_closure *selfp, struct ccn_upcall_info *info,int offset);
//void get_lsdb_version(char *lsdb_version,struct ccn_closure *selfp, struct ccn_upcall_info *info );
//int get_ls_type(struct ccn_closure *selfp, struct ccn_upcall_info *info);
enum ccn_upcall_res incoming_interest(struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info);
void process_incoming_interest(struct ccn_closure *selfp, struct ccn_upcall_info *info);
void process_incoming_interest_info(struct ccn_closure *selfp, struct ccn_upcall_info *info);
enum ccn_upcall_res incoming_content(struct ccn_closure* selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info* info);
void process_incoming_content(struct ccn_closure *selfp, struct ccn_upcall_info* info);
void process_incoming_content_info(struct ccn_closure *selfp, struct ccn_upcall_info* info);
void process_incoming_timed_out_interest(struct ccn_closure* selfp, struct ccn_upcall_info* info);
void process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct ccn_upcall_info* info);
int send_info_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
void send_info_interest_to_neighbor(struct name_prefix *nbr);
void process_incoming_interest_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info *info);
void process_incoming_interest_lsa(struct ccn_closure *selfp, struct ccn_upcall_info *info);
int send_lsdb_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
#endif
-199
View File
@@ -1,199 +0,0 @@
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/time.h>
#include <assert.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include <ccn/signing.h>
#include <ccn/schedule.h>
#include <ccn/hashtb.h>
#include "nlsr.h"
#include "nlsr_npl.h"
#include "utility.h"
void
add_name_to_npl(struct name_prefix *np)
{
struct name_prefix_list_entry *npe;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
int res;
hashtb_start(nlsr->npl, e);
res = hashtb_seek(e, np->name, np->length, 0);
if(res == HT_NEW_ENTRY)
{
npe=e->data;
npe->np=(struct name_prefix *)calloc(1,sizeof(struct name_prefix ));
npe->np->length=np->length;
npe->np->name=(char *)calloc(np->length,sizeof(char));
memcpy(npe->np->name,np->name,np->length);
npe->name_lsa_id=0;
}
hashtb_end(e);
}
int
does_name_exist_in_npl(struct name_prefix *np)
{
int ret=0;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
int res;
hashtb_start(nlsr->npl, e);
res = hashtb_seek(e, np->name, np->length, 0);
if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
ret=0;
}
else
{
ret=1;
}
hashtb_end(e);
return ret;
}
long int
get_lsa_id_from_npl(struct name_prefix *np)
{
int ret=0;
struct name_prefix_list_entry *npe;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
int res;
hashtb_start(nlsr->npl, e);
res = hashtb_seek(e, np->name, np->length, 0);
if(res == HT_NEW_ENTRY)
{
hashtb_delete(e);
ret=0;
}
else
{
npe=e->data;
ret=npe->name_lsa_id;
}
hashtb_end(e);
return ret;
}
void
print_name_prefix_from_npl(void)
{
if ( nlsr->debugging )
printf("print_name_prefix_from_npl called \n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"print_name_prefix_from_npl called\n");
int i, npl_element;
//struct name_prefix *np;
struct name_prefix_list_entry *npe;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->npl, e);
npl_element=hashtb_n(nlsr->npl);
for(i=0;i<npl_element;i++)
{
npe=e->data;
if ( nlsr->debugging )
printf("Name Prefix: %s and Length: %d and LSA Id: %ld\n",npe->np->name,npe->np->length,npe->name_lsa_id);
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"Name Prefix: %s and Length: %d \n",npe->np->name,npe->np->length);
hashtb_next(e);
}
hashtb_end(e);
if ( nlsr->debugging )
printf("\n");
if ( nlsr->detailed_logging )
writeLogg(__FILE__,__FUNCTION__,__LINE__,"\n");
}
void
update_nlsa_id_for_name_in_npl(struct name_prefix *np, long int nlsa_id)
{
struct name_prefix_list_entry *npe;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
int res;
hashtb_start(nlsr->npl, e);
res = hashtb_seek(e, np->name, np->length, 0);
if(res == HT_OLD_ENTRY)
{
npe=e->data;
npe->name_lsa_id=nlsa_id;
}
else
{
hashtb_delete(e);
}
hashtb_end(e);
}
void
destroy_npl_entry_component(struct name_prefix_list_entry *npe)
{
if (npe->np->name)
free(npe->np->name);
if(npe->np)
free(npe->np);
}
void
destroy_npl(void)
{
int i, npl_element;
struct name_prefix_list_entry *npe;
struct hashtb_enumerator ee;
struct hashtb_enumerator *e = &ee;
hashtb_start(nlsr->npl, e);
npl_element=hashtb_n(nlsr->npl);
for(i=0;i<npl_element;i++)
{
npe=e->data;
destroy_npl_entry_component(npe);
hashtb_next(e);
}
hashtb_end(e);
if ( nlsr->npl)
hashtb_destroy(&nlsr->npl);
}
-17
View File
@@ -1,17 +0,0 @@
#ifndef _NLSR_NPL_H_
#define _NLSR_NPL_H_
struct name_prefix_list_entry
{
struct name_prefix *np;
long int name_lsa_id;
};
void add_name_to_npl(struct name_prefix *np);
void print_name_prefix_from_npl(void);
int does_name_exist_in_npl(struct name_prefix *np);
void update_nlsa_id_for_name_in_npl(struct name_prefix *np, long int nlsa_id);
long int get_lsa_id_from_npl(struct name_prefix *np);
void destroy_npl(void);
void destroy_npl_entry_component(struct name_prefix_list_entry *npe);
#endif
-1152
View File
File diff suppressed because it is too large. Load diff
-33
View File
@@ -1,33 +0,0 @@
#ifndef _NLSR_NPT_H_
#define _NLSR_NPT_H_
#define NO_FACE -12345
#define ZERO_FACE 0
struct npt_entry
{
char *orig_router;
struct hashtb *name_list;
struct hashtb *face_list;
};
struct name_list_entry
{
char *name;
};
int add_npt_entry(char *orig_router, char *name_prefix, int num_face, int *faces, int *route_costs);
int delete_npt_entry_by_router_and_name_prefix(char *orig_router, char *name_prefix);
void print_npt(void);
void delete_orig_router_from_npt(char *orig_router);
void update_npt_with_new_route(void);
void destroy_all_face_by_nlsr(void);
void sort_faces_by_distance(int *faces,int *route_costs,int start,int element);
void update_ccnd_fib_for_orig_router(char *orig_router);
void get_all_faces_for_orig_router_from_npt(char *orig_router, int *faces, int *route_costs, int num_faces);
void destroy_name_list(struct hashtb *name_list);
void destroy_face_list(struct hashtb *face_list);
void destroy_npt(void);
#endif
-1489
View File
File diff suppressed because it is too large. Load diff
-76
View File
@@ -1,76 +0,0 @@
#ifndef _NLSR_ROUTE_H_
#define _NLSR_ROUTE_H_
#define EMPTY_PARENT -12345
#define INF_DISTANCE 2147483647
#define NO_NEXT_HOP -12345
#define NO_MAPPING_NUM -1
struct map_entry
{
char *router;
int mapping;
};
struct routing_table_entry
{
char *dest_router;
struct hashtb *face_list;
};
struct face_list_entry
{
int next_hop_face;
double route_cost;
};
int route_calculate(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
void make_map(void);
void add_map_entry(char *router);
void add_adj_data_to_map(char *orig_router, char *body, int no_link);
void print_map(void);
void assign_mapping_number(void);
void make_adj_matrix(int **adj_matrix,int map_element);
void init_adj_matrix(int **adj_matrix,int map_element);
void print_adj_matrix(int **adj_matrix, int map_element);
int get_mapping_no(char *router);
void calculate_path(int **adj_matrix, long int *parent,long int *dist, long int V, long int S);
void sort_queue_by_distance(long int *Q,long int *dist,long int start,long int element);
int is_not_explored(long int *Q, long int u,long int start, long int element);
void print_path(long int *parent, long int dest);
void print_all_path_from_source(long int *parent,long int source);
void add_rev_map_entry(long int mapping_number, char *router);
void print_rev_map(void);
char * get_router_from_rev_map(long int mapping_number);
int get_no_link_from_adj_matrix(int **adj_matrix,long int V, long int S);
void get_links_from_adj_matrix(int **adj_matrix, long int V ,long int *links, long int *link_costs,long int S);
void adjust_adj_matrix(int **adj_matrix, long int V, long int S, long int link,long int link_cost);
/* Routing Table Relates function */
int get_next_hop(char *dest_router,int *faces, int *route_costs);
int get_number_of_next_hop(char *dest_router);
void add_next_hop_router(char *dest_router);
void add_next_hop_from_lsa_adj_body(char *body, int no_link);
void print_routing_table(void);
void do_old_routing_table_updates(void);
void clear_old_routing_table(void);
void update_routing_table_with_new_route(long int *parent,long int *dist, long int source);
long int get_next_hop_from_calculation(long int *parent, long int dest,long int source);
void print_all_next_hop(long int *parent,long int source);
int does_face_exist_for_router(char *dest_router, int face_id);
double get_hyperbolic_distance(long int source, long int dest);
void sort_hyperbolic_route(double *dist_dest,double *dist_nbr, long int *faces,long int start,long int element);
void update_routing_table_with_new_hyperbolic_route(long int dest_router_rev_map_index, long int face, double nbr_to_dest_dist);
void destroy_routing_table_entry_comp(struct routing_table_entry *rte);
void destroy_routing_table_entry(struct routing_table_entry *rte);
void destroy_routing_table(void);
void destroy_map(void);
void destroy_rev_map(void);
#endif
-874
View File
@@ -1,874 +0,0 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <assert.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include <ccn/signing.h>
#include <ccn/schedule.h>
#include <ccn/hashtb.h>
#include <ccn/sync.h>
#include <ccn/seqwriter.h>
#include "nlsr.h"
#include "nlsr_sync.h"
#include "nlsr_lsdb.h"
#include "utility.h"
#include "nlsr_km.h"
#include "nlsr_km_util.h"
char *
hex_string(unsigned char *s, size_t l)
{
const char *hex_digits = "0123456789abcdef";
char *r;
int i;
r = calloc(1, 1 + 2 * l);
for (i = 0; i < l; i++) {
r[2*i] = hex_digits[(s[i]>>4) & 0xf];
r[1+2*i] = hex_digits[s[i] & 0xf];
}
return(r);
}
/**
* call back function from sync. Receive notification of updates in sync.
* This function calls process_content_from_sync to handle incoming content
* from sync.
*/
int
sync_cb(struct ccns_name_closure *nc,
struct ccn_charbuf *lhash,
struct ccn_charbuf *rhash,
struct ccn_charbuf *name)
{
nlsr_lock();
int res;
struct ccn_charbuf *content_name;
struct ccn_indexbuf *content_comps;
struct ccn_indexbuf *name_comps;
content_comps = ccn_indexbuf_create();
res = ccn_name_split(name, content_comps);
if ( res < 0 )
return 0;
if (content_comps->n < 2)
return 0;
content_name = ccn_charbuf_create();
ccn_name_init(content_name);
res = ccn_name_append_components( content_name, name->buf,
content_comps->buf[0], content_comps->buf[content_comps->n - 1]);
if ( res < 0)
return 0;
// for debugging
struct ccn_charbuf *temp=ccn_charbuf_create();
ccn_uri_append(temp, content_name->buf, content_name->length, 0);
if ( nlsr->debugging )
printf("Name before chopping: %s \n",ccn_charbuf_as_string(temp));
ccn_charbuf_destroy(&temp);
name_comps = ccn_indexbuf_create();
res=ccn_name_split (content_name, name_comps);
if (res < 0)
return 0;
if ( nlsr->debugging )
{
printf("Number of components in name = %d \n",res);
printf("Number of components in name as indexbuf->n = %d \n",
(int)name_comps->n);
}
ccn_name_chop(content_name, name_comps, -3);
if ( nlsr->debugging )
printf("Number of components in name as indexbuf->n after chopping= %d \n"
, (int)name_comps->n);
//for debugging
struct ccn_charbuf *temp1=ccn_charbuf_create();
ccn_uri_append(temp1, content_name->buf, content_name->length, 0);
if ( nlsr->debugging )
printf("Name after chopping: %s \n",ccn_charbuf_as_string(temp1));
ccn_charbuf_destroy(&temp1);
//main method that processes contents from the sync
process_content_from_sync(content_name, name_comps);
ccn_charbuf_destroy(&content_name);
ccn_indexbuf_destroy(&content_comps);
ccn_indexbuf_destroy(&name_comps);
nlsr_unlock();
return(0);
}
/**
* this function retrieve part of name from interest name and put it in name_part
*/
void
get_name_part(struct name_prefix *name_part,struct ccn_charbuf * interest_ccnb,
struct ccn_indexbuf *interest_comps, int offset)
{
int lsa_position=0;
struct ccn_indexbuf *components=ccn_indexbuf_create();
struct ccn_charbuf *name=ccn_charbuf_create();
ccn_name_from_uri(name,nlsr->slice_prefix);
ccn_name_split (name, components);
lsa_position=components->n-2;
ccn_charbuf_destroy(&name);
struct ccn_charbuf *temp=ccn_charbuf_create();
ccn_name_init(temp);
ccn_name_append_components( temp, interest_ccnb->buf,
interest_comps->buf[lsa_position+1],
interest_comps->buf[interest_comps->n - 1]);
struct ccn_charbuf *temp1=ccn_charbuf_create();
ccn_uri_append(temp1, temp->buf, temp->length, 0);
name_part->name=(char *)calloc(strlen(ccn_charbuf_as_string(temp1))+1,
sizeof(char));
memcpy(name_part->name,ccn_charbuf_as_string(temp1),
strlen(ccn_charbuf_as_string(temp1)));
name_part->name[strlen(ccn_charbuf_as_string(temp1))]='\0';
name_part->length=strlen(ccn_charbuf_as_string(temp1))+1;
ccn_charbuf_destroy(&temp1);
ccn_charbuf_destroy(&temp);
ccn_indexbuf_destroy(&components);
if ( nlsr->debugging )
printf("Name Part: %s \n",name_part->name);
}
/**
* Get content value by content name and put the content value in content_data
*/
int
get_content_by_content_name(char *content_name, unsigned char **content_data,
char *orig_router)
{
int ret=-1;
struct ccn_charbuf *name = NULL;
struct ccn_charbuf *templ = NULL;
struct ccn_charbuf *resultbuf = NULL;
struct ccn_parsed_ContentObject pcobuf = { 0 };
int res;
int allow_stale = 1;
int content_only = 1;
int scope = -1;
const unsigned char *ptr,*ptr_in;
size_t length,length_in;
int resolve_version = CCN_V_HIGHEST;
int timeout_ms = 3000;
const unsigned lifetime_default = CCN_INTEREST_LIFETIME_SEC << 12;
unsigned lifetime_l12 = lifetime_default;
int get_flags = 0;
name = ccn_charbuf_create();
res = ccn_name_from_uri(name,content_name);
if (res < 0) {
fprintf(stderr, "Bad ccn URI: %s\n", content_name);
ccn_charbuf_destroy(&name);
return ret;
}
if (allow_stale || lifetime_l12 != lifetime_default || scope != -1) {
templ = ccn_charbuf_create();
ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
ccn_charbuf_append_closer(templ); /* </Name> */
if (allow_stale) {
ccn_charbuf_append_tt(templ, CCN_DTAG_AnswerOriginKind, CCN_DTAG);
ccnb_append_number(templ,
CCN_AOK_DEFAULT | CCN_AOK_STALE);
ccn_charbuf_append_closer(templ); /* </AnswerOriginKind> */
}
if (scope != -1) {
ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
}
if (lifetime_l12 != lifetime_default) {
/*
* Choose the interest lifetime so there are at least 3
* expressions (in the unsatisfied case).
*/
unsigned char buf[3] = { 0 };
int i;
for (i = sizeof(buf) - 1; i >= 0; i--, lifetime_l12 >>= 8)
buf[i] = lifetime_l12 & 0xff;
ccnb_append_tagged_blob(templ, CCN_DTAG_InterestLifetime, buf,
sizeof(buf));
}
ccn_charbuf_append_closer(templ); /* </Interest> */
}
resultbuf = ccn_charbuf_create();
if (resolve_version != 0) {
res = ccn_resolve_version(nlsr->ccn, name, resolve_version, 500);
if (res >= 0) {
ccn_uri_append(resultbuf, name->buf, name->length, 1);
resultbuf->length = 0;
}
}
res = ccn_get(nlsr->ccn, name, templ, timeout_ms, resultbuf, &pcobuf, NULL,
get_flags);
if (res >= 0) {
ptr = resultbuf->buf;
length = resultbuf->length;
if (content_only){
ccn_content_get_value(ptr, length, &pcobuf, &ptr, &length);
struct ccn_parsed_ContentObject pcobuf1 = { 0 };
int chk_cont=ccn_parse_ContentObject(ptr,length,&pcobuf1,NULL);
if ( nlsr->debugging )
printf("Content Parsing result: %d\n",chk_cont);
if ( contain_key_name(ptr, &pcobuf1) == 1){
int res_verify=-1;
int key_exists=0;
struct ccn_charbuf *key_name=get_key_name(ptr, &pcobuf1);
struct ccn_charbuf *key_uri = ccn_charbuf_create();
ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
key_exists=does_key_exist(ccn_charbuf_as_string(key_uri));
int key_type=get_key_type_from_key_name(key_name);
if ( key_exists == 1 && key_type == NLSR_KEY ){
res_verify=0;
}
else{
res_verify=verify_key(ptr,&pcobuf1,1);
}
if ( res_verify != 0 ){
if ( nlsr->debugging )
printf("Error in verfiying keys !! :( \n");
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&key_uri);
}
else{
if ( key_exists == 0 )
add_key(ccn_charbuf_as_string(key_uri));
ccn_charbuf_destroy(&key_name);
ccn_charbuf_destroy(&key_uri);
if ( nlsr->debugging )
printf("Key verification is successful :)\n");
ptr_in=ptr;
length_in=length;
ccn_content_get_value(ptr_in, length_in, &pcobuf1,
&ptr_in, &length_in);
*content_data = (unsigned char *) calloc(length_in+1,
sizeof(char *));
memcpy (*content_data, ptr_in, length_in);
ret=0;
}
}
}
}
ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&templ);
ccn_charbuf_destroy(&name);
return ret;
}
/**
* Handle incoming lsa content, Calls functions to install lsa into lsdb
*/
void
process_incoming_sync_content_lsa( unsigned char *content_data)
{
if ( nlsr->debugging )
printf("process_incoming_sync_content_lsa called \n");
char *sep="|";
char *rem;
char *orig_router;
char *orl;
int orig_router_length;
char *lst;
int ls_type;
char *lsid;
long int ls_id;
char *isvld;
int isValid;
char *num_link;
int no_link;
char *np;
char *np_length;
int name_length;
char *data;
char *orig_time;
if ( nlsr->debugging )
printf("LSA Data \n");
if( strlen((char *)content_data ) > 0 )
{
orig_router=strtok_r((char *)content_data,sep,&rem);
orl=strtok_r(NULL,sep,&rem);
orig_router_length=atoi(orl);
if ( nlsr->debugging )
{
printf(" Orig Router Name : %s\n",orig_router);
printf(" Orig Router Length: %d\n",orig_router_length);
}
lst=strtok_r(NULL,sep,&rem);
ls_type=atoi(lst);
if ( nlsr->debugging )
printf(" LS Type : %d\n",ls_type);
if ( ls_type == LS_TYPE_NAME )
{
lsid=strtok_r(NULL,sep,&rem);
ls_id=atoi(lsid);
orig_time=strtok_r(NULL,sep,&rem);
isvld=strtok_r(NULL,sep,&rem);
isValid=atoi(isvld);
np=strtok_r(NULL,sep,&rem);
np_length=strtok_r(NULL,sep,&rem);
name_length=atoi(np_length);
if ( nlsr->debugging )
{
printf(" LS ID : %ld\n",ls_id);
printf(" isValid : %d\n",isValid);
printf(" Name Prefix : %s\n",np);
printf(" Orig Time : %s\n",orig_time);
printf(" Name Prefix length: %d\n",name_length);
}
build_and_install_others_name_lsa(orig_router,ls_type,ls_id,
orig_time,isValid,np);
print_name_lsdb();
}
else if ( ls_type == LS_TYPE_ADJ )
{
orig_time=strtok_r(NULL,sep,&rem);
num_link=strtok_r(NULL,sep,&rem);
no_link=atoi(num_link);
data=rem;
if ( nlsr->debugging )
{
printf(" Orig Time : %s\n",orig_time);
printf(" No Link : %d\n",no_link);
printf(" Data : %s\n",data);
}
build_and_install_others_adj_lsa(orig_router,ls_type,orig_time,
no_link,data);
}
else if ( ls_type == LS_TYPE_COR )
{
orig_time=strtok_r(NULL,sep,&rem);
char *cor_r=strtok_r(NULL,sep,&rem);
char *cor_theta=strtok_r(NULL,sep,&rem);
double r, theta;
r=strtod(cor_r,NULL);
theta=strtod(cor_theta,NULL);
if ( nlsr->debugging )
{
printf(" Orig Time : %s\n",orig_time);
printf(" Cor R : %f\n",r);
printf(" Cor Theta : %f\n",theta);
}
build_and_install_others_cor_lsa(orig_router,ls_type,orig_time,
(double)r, (double)theta);
}
}
}
/**
* Check LSA whether its new. If new retrieve the LSA content and call
* process_incoming_sync_content_lsa with content_data
*/
void
process_content_from_sync (struct ccn_charbuf *content_name,
struct ccn_indexbuf *components)
{
if (nlsr->debugging)
printf("process_content_from_sync called \n");
size_t comp_size;
char *lst;
char *lsid;
const unsigned char *second_last_comp;
const unsigned char *third_last_comp;
const unsigned char *origtime;
char *sep=".";
char *rem;
char *second_comp_type;
int ls_type;
long int ls_id=0;
unsigned char *content_data = NULL;
char *time_stamp=get_current_timestamp_micro_v2();
struct ccn_charbuf *uri = ccn_charbuf_create();
ccn_uri_append(uri, content_name->buf, content_name->length, 0);
struct name_prefix *orig_router=(struct name_prefix *)
calloc( 1, sizeof(struct name_prefix));
ccn_name_comp_get( content_name->buf, components,
components->n-1-2, &second_last_comp, &comp_size);
if (nlsr->debugging)
printf("2nd Last Component: %s \n", second_last_comp);
second_comp_type=strtok_r((char *)second_last_comp, sep, &rem);
if (second_comp_type == NULL || rem == NULL)
{
printf ("Error: unable to tokenize the string: %s, calling exit()\n",
(char *)second_last_comp);
exit(0);
}
if ( strcmp( second_comp_type, "lsId" ) == 0 )
{
lsid=rem;
ls_id=atoi(rem);
ccn_name_comp_get(content_name->buf, components,components->n-2-2,
&third_last_comp, &comp_size);
lst=strtok_r((char *)third_last_comp,sep,&rem);
lst=rem;
ls_type=atoi(lst);
ccn_name_comp_get(content_name->buf, components,components->n-2,
&origtime, &comp_size);
ccn_name_chop(content_name,components,-3);
get_name_part(orig_router,content_name,components,0);
if ( nlsr->debugging )
printf("Orig Router: %s Ls Type: %d Ls id: %ld Orig Time: %s\n",
orig_router->name,ls_type,ls_id,origtime);
int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
if ( nlsr->debugging )
printf("LSA Life time: %d\n",lsa_life_time);
if ( strcmp(orig_router->name,nlsr->router_name) != 0
&& (lsa_life_time < nlsr->router_dead_interval) )
{
int is_new_name_lsa=check_is_new_name_lsa(orig_router->name,
(char *)lst,(char *)lsid,(char *)origtime);
if ( is_new_name_lsa == 1 )
{
if ( nlsr->debugging )
printf("New NAME LSA.....\n");
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
&content_data,orig_router->name);
if ( chk_con == 0 ){
if ( nlsr->debugging )
printf("Content Data: %s \n",content_data);
process_incoming_sync_content_lsa(content_data);
}
else{
if ( nlsr->debugging )
printf("Verification failed. No content given back\n");
}
}
else
{
if ( nlsr->debugging )
printf("Name LSA / Newer Name LSA already xists in LSDB\n");
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri)
, &content_data,orig_router->name);
if ( chk_con == 0 ){
if ( nlsr->debugging )
printf("Content Data: %s \n",content_data);
process_incoming_sync_content_lsa(content_data);
}
else{
if ( nlsr->debugging )
printf("Verification failed. No content given back\n");
}
}
}
else
{
if ( nlsr->debugging )
printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
}
}
else
{
ls_type=atoi(rem);
lst=rem;
if(ls_type == LS_TYPE_ADJ)
{
ccn_name_comp_get(content_name->buf, components,components->n-2,
&origtime, &comp_size);
ccn_name_chop(content_name,components,-2);
get_name_part(orig_router,content_name,components,0);
if ( nlsr->debugging )
printf("Orig Router: %s Ls Type: %d Orig Time: %s\n",
orig_router->name,ls_type,origtime);
int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
if ( nlsr->debugging )
printf("LSA Life time: %d\n",lsa_life_time);
if ( strcmp(orig_router->name,nlsr->router_name) != 0
&& (lsa_life_time < nlsr->router_dead_interval) )
{
int is_new_adj_lsa = check_is_new_adj_lsa( orig_router->name,
(char *)lst, (char *)origtime);
if ( is_new_adj_lsa == 1 )
{
if ( nlsr->debugging )
printf("New Adj LSA.....\n");
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
&content_data,orig_router->name);
if ( chk_con == 0 ){
if ( nlsr->debugging )
printf("Content Data: %s \n",content_data);
process_incoming_sync_content_lsa(content_data);
}
else{
if ( nlsr->debugging )
printf("Verification failed. No content given back\n");
}
}
else
{
if ( nlsr->debugging )
printf("Adj LSA / Newer Adj LSA already exists in LSDB\n");
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
&content_data,orig_router->name);
if ( chk_con == 0 ){
if ( nlsr->debugging )
printf("Content Data: %s \n",content_data);
process_incoming_sync_content_lsa(content_data);
}
else{
if ( nlsr->debugging )
printf("Verification failed. No content given back\n");
}
}
}
else
{
if ( nlsr->debugging )
printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
}
}
else if(ls_type == LS_TYPE_COR)
{
ccn_name_comp_get(content_name->buf, components, components->n-2,
&origtime, &comp_size);
ccn_name_chop(content_name,components,-2);
get_name_part(orig_router,content_name,components,0);
if ( nlsr->debugging )
printf("Orig Router: %s Ls Type: %d Orig Time: %s\n",
orig_router->name,ls_type,origtime);
int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
if ( nlsr->debugging )
printf("LSA Life time: %d\n",lsa_life_time);
if ( strcmp(orig_router->name,nlsr->router_name) != 0
&& (lsa_life_time < nlsr->router_dead_interval) )
{
int is_new_cor_lsa=check_is_new_cor_lsa( orig_router->name,
(char *)lst,(char *) origtime);
if ( is_new_cor_lsa == 1 )
{
if ( nlsr->debugging )
printf("New Cor LSA.....\n");
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
&content_data,
orig_router->name);
if ( chk_con == 0 ){
if ( nlsr->debugging )
printf("Content Data: %s \n",content_data);
process_incoming_sync_content_lsa(content_data);
}
else{
if ( nlsr->debugging )
printf("Verification failed. No content given back\n");
}
}
else
{
if ( nlsr->debugging )
printf("Cor LSA / Newer Cor LSA already exists in LSDB\n");
int chk_con=get_content_by_content_name(ccn_charbuf_as_string(uri),
&content_data,orig_router->name);
if ( chk_con == 0 ){
if ( nlsr->debugging )
printf("Content Data: %s \n",content_data);
process_incoming_sync_content_lsa(content_data);
}
else{
if ( nlsr->debugging )
printf("Verification failed. No content given back\n");
}
}
}
else
{
if ( nlsr->debugging )
printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
}
}
}
if(content_data)
free(content_data);
if (orig_router->name)
free(orig_router->name);
if (orig_router)
free(orig_router);
ccn_charbuf_destroy(&uri);
//01/31/2013
free(time_stamp);
}
/**
* This function performs same functionality as ccnsyncwatch
*/
int
sync_monitor(char *topo_prefix, char *slice_prefix)
{
struct ccn_charbuf *prefix = ccn_charbuf_create();
struct ccn_charbuf *topo = ccn_charbuf_create();
nlsr->closure=(struct ccns_name_closure *)
calloc(1,sizeof(struct ccns_name_closure)); // leak
nlsr->slice = ccns_slice_create();
ccn_charbuf_reset(prefix);
ccn_name_from_uri(prefix, slice_prefix);
ccn_charbuf_reset(topo);
ccn_name_from_uri(topo, topo_prefix);
ccns_slice_set_topo_prefix(nlsr->slice, topo, prefix);
nlsr->closure->callback = &sync_cb;
nlsr->ccns = ccns_open(nlsr->ccn, nlsr->slice, nlsr->closure, NULL, NULL);
ccn_charbuf_destroy(&prefix);
ccn_charbuf_destroy(&topo);
return 0;
}
struct ccn_charbuf *
make_template(int scope)
{
struct ccn_charbuf *templ = NULL;
templ = ccn_charbuf_create();
ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
ccn_charbuf_append_closer(templ); /* </Name> */
if (0 <= scope && scope <= 2)
ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
ccn_charbuf_append_closer(templ); /* </Interest> */
return(templ);
}
/**
* Write signed data to repo
*/
int
write_data_to_repo(char *data, char *name_prefix)
{
nlsr_lock();
if ( nlsr->debugging )
{
printf("write_data_to_repo called\n");
printf("Content Name: %s \n",name_prefix);
printf("Content Data: %s \n",data);
}
struct ccn *temp_ccn;
temp_ccn=ccn_create();
int ccn_fd=ccn_connect(temp_ccn, NULL);
if(ccn_fd == -1)
{
fprintf(stderr,"Could not connect to ccnd for Data Writing\n");
writeLogg(__FILE__,__FUNCTION__,__LINE__,
"Could not connect to ccnd for Data Writing\n");
return -1;
}
struct ccn_charbuf *name = NULL;
struct ccn_seqwriter *w = NULL;
int blocksize = 4096;
int freshness = -1;
int scope = 1;
int res;
size_t blockread;
struct ccn_charbuf *templ;
name = ccn_charbuf_create();
res = ccn_name_from_uri(name, name_prefix);
if (res < 0) {
fprintf(stderr, "bad CCN URI: %s\n",name_prefix);
return -1;
}
w = ccn_seqw_create(temp_ccn, name);
if (w == NULL) {
fprintf(stderr, "ccn_seqw_create failed\n");
return -1;
}
ccn_seqw_set_block_limits(w, blocksize, blocksize);
if (freshness > -1)
ccn_seqw_set_freshness(w, freshness);
struct ccn_charbuf *name_v = ccn_charbuf_create();
ccn_seqw_get_name(w, name_v);
ccn_name_from_uri(name_v, "%C1.R.sw");
ccn_name_append_nonce(name_v);
templ = make_template(scope);
res = ccn_get(temp_ccn, name_v, templ, 60000, NULL, NULL, NULL, 0);
ccn_charbuf_destroy(&templ);
ccn_charbuf_destroy(&name_v);
if (res < 0) {
fprintf(stderr, "No response from repository\n");
return -1;
}
struct ccn_charbuf *resultbuf=ccn_charbuf_create();
sign_content_with_user_defined_keystore(name,
resultbuf,
data,
strlen(data),
nlsr->keystore_path,
nlsr->keystore_passphrase,
nlsr->root_key_prefix,
nlsr->site_name,
nlsr->router_name,
60);
blockread=resultbuf->length;
if (blockread > 0) {
res = ccn_seqw_write(w, resultbuf->buf, resultbuf->length);
while (res == -1) {
ccn_run(temp_ccn,1);
res = ccn_seqw_write(w, resultbuf->buf, resultbuf->length);
}
}
ccn_seqw_close(w);
ccn_run(temp_ccn, 1);
ccn_charbuf_destroy(&name);
ccn_destroy(&temp_ccn);
ccn_charbuf_destroy(&resultbuf);
nlsr_unlock();
return 0;
}
/**
* Create slice for sync/repo
*/
int
create_sync_slice(char *topo_prefix, char *slice_prefix)
{
int res;
struct ccn *handle;
struct ccns_slice *slice;
struct ccn_charbuf *prefix = ccn_charbuf_create();
struct ccn_charbuf *topo = ccn_charbuf_create();
struct ccn_charbuf *clause = ccn_charbuf_create();
struct ccn_charbuf *slice_name = ccn_charbuf_create();
struct ccn_charbuf *slice_uri = ccn_charbuf_create();
if (prefix == NULL || topo == NULL || clause == NULL ||
slice_name == NULL || slice_uri == NULL) {
fprintf(stderr, "Unable to allocate required memory.\n");
return -1;
}
handle = ccn_create();
res = ccn_connect(handle, NULL);
if (0 > res) {
fprintf(stderr, "Unable to connect to ccnd.\n");
return -1;
}
slice = ccns_slice_create();
ccn_charbuf_reset(topo);
ccn_name_from_uri(topo, topo_prefix);
ccn_charbuf_reset(prefix);
ccn_name_from_uri(prefix,slice_prefix );
ccns_slice_set_topo_prefix(slice, topo, prefix);
res = ccns_write_slice(handle, slice, slice_name);
//01/31/2013
ccns_slice_destroy(&slice);
ccn_destroy(&handle);
ccn_charbuf_destroy(&prefix);
ccn_charbuf_destroy(&topo);
ccn_charbuf_destroy(&clause);
ccn_charbuf_destroy(&slice_name);
ccn_charbuf_destroy(&slice_uri);
return 0;
}
Loaded 100 of 231 files, more files were not shown because too many files have changed in this diff. Show more