Commit Graph

76 Commits

Author SHA1 Message Date
Junxiao Shi 9f5b01dfd8 core: move common.hpp to core/
Headers in core/ are now included as `#include "core/*.hpp"`.
This allows NFD to rely less on include paths when used as a submodule in
another codebase, such as ndnSIM and NFD-Android.

refs #3127

Change-Id: Ia38f3c97427e17ff7b5401281f1fe875b5d5313e
2016-08-05 03:54:28 +00:00
Junxiao Shi 221b6fec69 tests: don't use makeDummyClientFace
refs #3383

Change-Id: I1803a6f482a4e6bf43363cd08a73c4bbcb26d0a2
2016-07-14 18:21:56 +00:00
Alexander Afanasyev 6ca6cf7474 core: Specify fully-qualified namespaces in logging macros
Without the full specification, compilation may fail if the logging
used outside ::nfd namespace, e.g., in NFD tools.

Change-Id: I24d733acf920bc90521ac457ae1fe6c846a1fe3e
2016-06-17 16:24:01 -07:00
Alexander Afanasyev e0d71b0bc0 build+tests: Correct detection of privilege elevation/drop and the corresponding test case
Change-Id: I005c2846474a00aeeb3e63a1e9761a3f8bc0a572
Refs: #3494, #3632, #3633
2016-05-25 19:07:11 -07:00
Yumin Xia ab49745afe core: use Boost.Log for logging
This makes the logging backend asynchronous

Change-Id: Ib3417e2ae424c5ae7237c071dc4698ca9769a33c
Refs: #2513
2016-05-11 11:33:13 +08:00
Yanbiao Li df846e5904 core: allow ManagerBase be inherited by RibManager
Change-Id: Ie2613e32460fb109a9f9302a0cc4b4b3400ba9f4
refs: #2857
2016-04-12 14:10:55 -07:00
Junxiao Shi 57df288f5b face: LinkService and Transport counters
refs #3177

Change-Id: Idc495c58c3103dae5f01a2b6ebbff47a2c4a5d2b
2015-11-11 06:12:35 -07:00
Davide Pesavento 077df8fbb6 tests: delete unused SimpleNotification class
Change-Id: I6e574146d335f05a247ec25d0c9bd355c955d945
Refs: #2144
2015-11-11 02:27:58 +01:00
Junxiao Shi 94735f99cb core: delete NotificationStream
nfd::NotificationStream is no longer necessary because NFD Management
has switched to ndn::util::NotificationStream from ndn-cxx.

refs #2144

Change-Id: I30678c58dea4ea0b41c88a0ef7e660b116579e44
2015-10-04 13:33:50 -07:00
Spyridon Mastorakis 149e02cf7d Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4919aa
Refs: #2541
2015-08-17 16:17:33 -07:00
Alexander Afanasyev dbe4f9fefe tests: Fix compilation errors because of changes ndn-cxx library
Change-Id: I10fb7eb366a03c2e06e6d2efefdde8a9dd0da724
Refs: #2951
2015-06-28 11:24:51 -07:00
Davide Pesavento db9d37edab Fix several "defined but not used" warnings with gcc-5
GCC 5 is able to prove that in some translation units the static Logger
instance is defined but never used, and generates an unused variable
warning for each one of them. These warnings become fatal errors when
building in debug mode, due to -Werror.

Silence the compiler by not declaring the unused variables.

refs #2767

Change-Id: Icacc579d917d660582221ef090954ec827f46149
2015-04-24 10:25:56 -07:00
Spyridon Mastorakis d0381c05a6 tests: Change to updated naming conventions
Change-Id: I9351c669282c3c02fd533237489beeb10fe7d15e
Refs: #2497
2015-02-21 13:02:47 -08:00
Alexander Afanasyev 63df436e5f core: Make global random generator thread-local
Change-Id: Ib17ea05592445cf99af9726ef7799ead813ca0fe
Refs: #2489
2015-02-15 11:58:52 -08:00
Alexander Afanasyev 6b34ab9cec core: Make logger thread-safe
Change-Id: Ic45dc0912da9c2e3f074d3f74921bfe33741bf63
Refs: #2489
2015-02-14 12:26:32 -08:00
Alexander Afanasyev 5d57f97fa7 core: Make global io_service and scheduler thread-local
Change-Id: I3d6b6cd3ca7a6e53b0dc0f4cae7a2f3270c7fd50
Refs: #2489
2015-02-14 12:25:19 -08:00
Alexander Afanasyev 95ff7112aa tests: Fix compilation due to refactoring of EncodingImpl in ndn-cxx library
Change-Id: I3b96dd01fef810dfd2cd57d910a46f137a13879e
Refs: #2494
2015-02-10 19:11:33 -08:00
Alexander Afanasyev c0273e3505 core: Extend ConfigFile to support passing a parsed ConfigSection
Change-Id: I955220c08d8e6ed07c77d82149f6ff3ae48b2b12
Refs: #2495
2015-02-09 13:33:45 -08:00
Steve DiBenedetto 8919abe4c4 core: set FreshnessPeriod on segment publisher Data
refs #2438

Change-Id: Ibf46dad33b0483f0716bbfef6697d73cc00a117b
2015-01-29 11:52:31 -08:00
Alexander Afanasyev 49343f6fab build: Add conditional compilation
Two conditionals are introduced in this commit:
- if <ifaddrs.h> is not available, NetworkInterface helper will always return
  an empty set of interfaces
- If dropping/elevating effective user/group is not supported, an error
  will be thrown if used (e.g., if general.user or general.group is
  configured)

Both conditionals are necessary on Android platform.

Change-Id: Ib360e03514af97ed2d68032fbcbe279a8dc84682
2015-01-27 18:13:50 -08:00
Junxiao Shi 04cf5a99d9 Merge branch 'feature-cs' into master
refs #2254

Change-Id: Iafd4b8d51477fc11340156cc65c2732923e16354
2015-01-22 17:35:49 -07:00
Chengyu Fan 4381fb6b11 core: use ndn::dns from ndn-cxx
refs #2207

Change-Id: Ice97c9203283b5b89982049cb29c0ccfed0ef422
2015-01-19 23:08:52 -08:00
Junxiao Shi 5640ec8934 table: better ContentStore findRightmost algorithm
refs #2254

Change-Id: Ib8f473f0cce1a1636b600a98494292499d71972e
2015-01-15 21:43:55 -07:00
Junxiao Shi 1e46be30e4 core: rename nfd::EventId to nfd::scheduler::EventId
refs #2298

Change-Id: I5d4f4c5234fd370666e81a8a8e7d312694a6ad5d
2015-01-09 09:52:56 -07:00
Junxiao Shi 27533da4f1 core: scheduler::ScopedEventId
refs #2295

Change-Id: I17bc949882bebadbf4d19aaede4c634a12121787
2014-12-15 20:44:47 -08:00
Alexander Afanasyev 70aaf8ad81 face: Prevent infinite loop in TcpFactory and UdpFactory
Change-Id: Idd694bc08033c524f3c0e569ed74341aa33fce31
Refs: #2292
2014-12-14 17:32:29 -08:00
Junxiao Shi afbd74d9f1 core: eliminate MapValueIterator in favor of boost::adaptors::map_values
refs #2239

Change-Id: Ifcc03513b1cbe580de12725baa4338f822a71417
2014-12-04 03:39:16 -08:00
Junxiao Shi 759f7060e3 build: disable assertions in release builds
refs #2139

Change-Id: Id4cc0b360848d06a0d1e5759cf2017cd1b4227ec
2014-11-29 10:19:22 -07:00
Davide Pesavento b499a601b5 core: ignore non-Ethernet AF_LINK addresses when enumerating NICs.
Also modernize the code with some C++11 features.

Change-Id: Ibd29b39c37fdce8f87f917ab0cf48750e631e76c
2014-11-22 20:15:28 -08:00
Junxiao Shi 376f73762a tests: use DummyClientFace from ndn-cxx
refs #2186

Change-Id: Ie6f959b846202f201514d757d12d96921fc19bd6
2014-11-19 06:03:28 -08:00
Junxiao Shi a1937bf54c core: use FaceUri from ndn-cxx
refs #2143

Change-Id: Ida06daf406f941a699c9f1013450951db3cd28e9
2014-11-14 12:44:55 -08:00
Alexander Afanasyev 689f0e9d52 tools+core: Moving Network class implementation to core
Change-Id: I312b827215c8ec3d13aff61584f162125fc48d2a
Refs: #2153
2014-11-09 19:17:11 -08:00
Junxiao Shi 3ffe66d4ef core: use ethernet::Address from ndn-cxx
refs #2142

Change-Id: I1258a0a1cadbedb31c506c69c84b7906a61fc761
2014-11-06 20:27:23 -08:00
Junxiao Shi cf1e6e7465 core: use EventEmitter from ndn-cxx
Deleting EventEmitter in core/.

refs #2117

Change-Id: Ieab631c0b3101e313a0af44af7085bcf090596b0
2014-11-02 21:38:22 -07:00
Junxiao Shi 67f11acf5c all: avoid usage of deprecated namespace ndn::Tlv
refs #2079

Change-Id: I3d8748929706726b55fe1a9a0f6ae00857ea3547
2014-10-20 06:52:36 -07:00
Alexander Afanasyev 585e5a6ff8 rib+tools: Make use of ndn::nfd::FaceMonitor from the ndn-cxx library
NFD still uses its own NotificationStream, as ApiFace needs to be
changed to use library's version of the class.

Change-Id: Ifc5727a555528a1aa48ccf7379fcbb61a33049d7
2014-08-12 11:50:17 -07:00
Junxiao Shi 15b12e759d core: use markers in StatusDataset and NotificationStream
This commit also refactors FaceMonitor as generic NotificationSubscriber,
and refactors AutoregServer to use FaceMonitor.

refs #1837 #1838

Change-Id: I8b40dfae118853d1224c8290cf92e7cc0daa116f
2014-08-10 19:23:09 -07:00
Wentao Shang e612e2f9bf face: increment link layer byte counters in WebSocketFace
Change-Id: I88b7dea1cbd291765345982ce193700aacd73eb3
Refs: #1781
2014-08-04 17:40:51 -07:00
Alexander Afanasyev 4e9a98f392 core: Force SegmentPublisher to publish at least one Data packet, which could have empty content
Change-Id: I8338f78ebfa4c2641eaae606b28c1112f06619c9
Refs: #1662
2014-07-23 16:02:26 -07:00
Vince Lehman 5144f829b9 mgmt+core: Moving SegmentPublisher to core/ and removing KeyChain from nfd::AppFace
This change ensures interface uniformity between nfd::AppFace and
ndn::Face and allow now templated version of SegmentPublisher to be used
with either.

Change-Id: I82e29528b13b37bd2ae27ef47db30e8c87c15a38
Refs: #1749
2014-07-23 16:01:27 -07:00
Junxiao Shi 6b597e7e23 core: bump version to 0.2.0
refs #1709

Change-Id: I52dadd87ebc1f36f2b48070a4e809f07716369d7
2014-06-30 10:16:38 -07:00
Alexander Afanasyev 5959b014c5 mgmt: Reinitialize multicast faces and partially reload config file on HUP signal
The following elements from the config file are reloaded:
- effective user/group
- log levels
- multicast faces (enable/disable)
- security

Change-Id: I6ddf124702b30610dd0404d8fbaa9a9d800f02bf
Refs: #1584
2014-06-04 09:15:03 +03:00
Junxiao Shi 5cc1e34aca core: FaceUri recognizes IPv4-mapped IPv6 address
refs #1635

Change-Id: I5fc54b3945fc77869a4531a31c1fc27e7c434447
2014-05-29 06:32:16 -07:00
Chengyu Fan 514ed5e913 nfd-status: Define format and implement --xml option
The ether URI format "ether://01:00:5e:00:17:aa" violates
the URI specification, so it has been changed to
ether://[01:00:5e:00:17:aa] in this commit.

refs: #1438

Change-Id: I1218374b75f919a5e1ab158bbab2e217e64aced3
2014-05-08 17:16:43 -07:00
Steve DiBenedetto 6ad48ca754 core: change LoggerFactory to log error on unknown module
refs: #1524

Change-Id: Ic61b361237429992e647ddf194a3c11f2dd2929b
2014-04-22 17:19:54 -07:00
Steve DiBenedetto 34c95f71bd core, main: make missing config file section behavior configurable
refs: #1499

Change-Id: I01cce3c73214f592d8c342d8aeda4fbafc6804b8
2014-04-18 12:16:35 -06:00
Alexander Afanasyev 613e2a9ba3 src: Reorganizing source code in preparation to merge NRD code
Note that as of this commit, there are several changes in location of
compiled binaries in `build/` folder:

* `nfd` has been moved to `build/bin/nfd`
* `unit-tests` has been split into `unit-tests-core` and `unit-tests-daemon`

Change-Id: I2c830c117879edbaa5457d6423c13f0273285919
Refs: #1486
2014-04-16 11:54:35 -07:00
Alexander Afanasyev 885a85bf90 build+face: Fixing regression that broke ethernet support
As of this commit, libpcap is required unless specifically disabled
using --without-libpcap parameter during configure stage.

Change-Id: Iec6f8bd9babfe4da193c98a49043b08319311106
Refs: #1472
2014-04-13 21:15:31 -07:00
Davide Pesavento 52a18f9428 all: cleanup common.hpp and import typenames from ndn namespace.
This allows us to compile NFD in C++11 mode, making use of std::shared_ptr,
std::function, std::bind, etc. rather than their boost equivalents
(provided that ndn-cpp-dev is also compiled in C++11 mode). This is an
experimental feature and may not work properly.

Change-Id: I310529f78e1e428a8530b087983130d1ef3a9d88
2014-04-10 15:14:15 -07:00
Alexander Afanasyev 9bcbc7c130 docs: Update of copyright and license statement in all .hpp and .cpp files
Change-Id: I4082db67f2390482615a780d91a513f09d57a9a4
Refs: #1266
2014-04-07 09:18:25 -07:00