Commit Graph

42 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 71d12148c8 daemon: display extended exception information in NfdRunner::run
refs #2541

Change-Id: I1fdc22571e7bce74d430b7938951170765b72bff
2016-07-23 20:10:18 +00:00
Junxiao Shi b260017fec rib+tools: delete NRD
refs #3570

Change-Id: I9a6e8eb6c74ea5e09a2e724805f07ca4e58af51c
2016-07-11 08:53:53 +00:00
Davide Pesavento cafae24473 build: require gcc >= 4.8.2 and boost >= 1.54.0
Change-Id: I6778f55f43e517a3d1d28387e953412a5292f063
Refs: #3599
2016-04-27 12:15:06 -07:00
Spyridon Mastorakis d374c406b2 daemon: display extended exception information in top-level catch
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4912cb
Refs: #2541
2015-09-27 11:36:42 -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 f08a7376e9 daemon+rib: Merge nrd and nfd into a single process (separate threads)
Change-Id: I41952d5b8ee29f109130c570e0d13ccad6970d2f
Refs: #2489
2015-02-15 12:43:49 -08:00
Alexander Afanasyev 31367925c6 rib: Refactor initialization of NRD instance
This commit also makes Face used inside NRD be adaptive to nfd.conf.
More specifically, it will use the same unix socket path as specified in
face_system.unix section.  If this section is not present, it will use
the same tcp port as specified in face_system.tcp section.  If tcp
section is also absent, nrd will abort execution.

Change-Id: I48f75ddf972f259055cd61824e3c228ca1d6a639
Refs: #2496
2015-02-11 16:13:26 -08:00
Alexander Afanasyev 31c781e453 daemon: Refactor initialization of NFD instance
Change-Id: Ie4181a0b65e249c7067a11e941dcea77f010e4b1
Refs: #2496
2015-02-10 19:12:05 -08: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 7b984c6d8e face: reserved FaceIds and NullFace
refs #1620, #1622

Change-Id: I315ae262c7e0813a64b69d3e7d67de61b7b88c55
2014-07-20 14:58:26 -07:00
Steve DiBenedetto 9bcc88fe8d mgmt,main: configure tables with defaults when missing config section/values
refs: #1743

Change-Id: Id0c24bd2b2e86df763892d194f9c04777a369d0c
2014-07-08 12:51:15 -07:00
Steve DiBenedetto 3a4f83dc7e mgmt, main: add "tables" configuration file section and processor
refs: #1623

Change-Id: If54097ba738381f7a75d755933e20b35387ff1d4
2014-06-13 17:10:41 -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
Alexander Afanasyev f6980284e6 src: Remove unnecessary uses of boost::cref in make_shared and replace boost::cref/boost::ref with just cref/ref
In some cases, due to argument-dependent lookup, it is necessary to use
ndn::ref, instead of just ref.

Change-Id: I682180a007609535855f77511b49622154ad4f11
Refs: #1591
2014-05-15 09:52:28 -07:00
Steve DiBenedetto 24b9a64298 core: add support for temporary privilege drop and elevation
Added "user" and "group" options to general section of configuration file.
NFD will attempt to set the effective group and user id to these values
after initializing all management modules.

Added privilege helper to drop and temporarily elevate privileges on demand.

Updated README.md with instructions to configure NFD to drop privileges.

Added handler for general confguration file section.

refs: #1370

Change-Id: Id27140ad2dc2ca14751058691511132a35649d58
2014-05-08 17:14:52 -07:00
Alexander Afanasyev b47d53842a build+core: Add printing of version number in daemons and tools
This commit also changes how version number is handled.  Version is now
fully controlled from top-level wscript.  In addition to that, a new
NFD_VERSION_BUILD_STRING macro is set to include more detailed
information, including commit ID (e.g., "0.1.0-rc1-1-g5c86570").

Change-Id: I448eb627e0c42dc814de1107cf7bb0dc94fa2a89
Refs: #1575
2014-05-06 18:42:04 -07:00
Yingdi Yu e5224e9343 rib: Separate trust models for /localhost and /localhop RIB management commands
Change-Id: I10fd9a1c8a2e0e572ea28f6e97d57b0b5b9750c8
Refs: #1557
Refs: #1558
2014-04-30 17:51:11 -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 89cf5e0b0c rib: Making single configuration file for both nrd and nfd
Change-Id: I4f03896459e8dc8564c44a7b610cd1351473d966
Refs: #1486, #1412
2014-04-17 18:01:42 -07: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 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
Steve DiBenedetto bf6a93da4e core: change logging from environment variable to configuration file-based
GlobalConfigurationFixture uses unit-tests.conf to determine default
and module specific logging levels. Logging will gracefully default to
INFO if unit-tests.conf is not found. See unit-tests.conf.sample for a
sample configuration file.

refs: #1375, #1267

Change-Id: Ib0c4eb4149748e6658f94ef1afa23ddd3072c0fa
2014-03-31 20:46:51 -06:00
Junxiao Shi 98e29f4731 core: delete deprecated getGlobalScheduler() API
refs #1290

Change-Id: If994e3bd303f0788d8e945351c182bbd4ab5e0b2
2014-03-31 10:27:26 -07:00
Alexander Afanasyev 5a4388a829 main: Enabling system signal handling and small reorganization
Change-Id: I568c5b57e787d44b9d6a758fd7e8cdf22222234e
Refs: 1380
2014-03-27 23:26:19 -07:00
Steve DiBenedetto 7564d97d13 mgmt: refactor management modules to conform to NFD Management Protocol
Refactor management protocol specific option types to ControlParameters
Add control parameter field enforcement
Add missing control response "success" message bodies
Update fib management protocol response codes and behavior
Merge local control header manager into face manager
Refactor references of nfd::LocalControlHeaderFeature enum to ndn::nfd::LocalControlFeature
Remove "control-header" privilege from default configuration

refs: #1397, #1399, #1400

Change-Id: Id042daf00b3cee1f1c7fa38d2e4a4ff6d95c15c6
2014-03-25 17:46:31 -06:00
Junxiao Shi ea48d8bb7c mgmt: StatusServer
refs #1199

Change-Id: Idf2181dde857970f026e8147b60d09dea45007a1
2014-03-17 11:11:44 -07:00
Steve DiBenedetto 84da5bfa3f mgmt: add sample configuration file and install default configuration
refs: #1332

Change-Id: Ic50aac57382b9760aa3b1c22b7dd2a9fec589cf9
2014-03-12 17:13:05 -06:00
Steve DiBenedetto 4aca99c601 mgmt: add UDP IPv4 and ethernet multicast face creation to face manager
refs: #1195

Change-Id: I693772d6a5c79873c5715718a6cacd80dc8c74e1
2014-03-12 16:07:39 -06:00
Steve DiBenedetto 2c2b889ea2 mgmt, main: add support for authorized commands
refs: #1227

Change-Id: I907d1fa6e78775470c5376fcdfe898be4c311001
2014-03-11 17:08:31 -07:00
Steve DiBenedetto 5330e0dda1 mgmt, main: add strategy choice management and deprecate fib/set-strategy
refs: #1311

Change-Id: Icc88f201f3c13a5a25ec1bdadec35f93c76b2b94
2014-03-08 21:45:28 -07:00
Steve DiBenedetto abe9e97a5e mgmt: added FaceManager to create and destroy faces
Change-Id: I5a7ca67faed1bfd850943fe4c93675d84c79ac39
Refs: #1195
2014-03-08 14:10:49 -07:00
Alexander Afanasyev d665530904 face: Adding new 'createFace' method in all Factories
This method accepts parsed URI object and attempts to create Face on the
right channel (e.g., if hostname in URI resolved to IPv6, IPv6 TCP channel
will be used).

Factories that do not support 'createFace' operation will throw an exception.

As of this commit, *Factory::create methods are renamed to more explicit
*Factory::createChannel, and *Factory::connect to *Factory::createFace.
All other Factory-specific methods should denote what exactly is
created: channel, face, or multicast face.

Change-Id: I6396dc84c4cd8bbcdde9f55cfac90635d99e93e9
Refs: #1195
2014-02-28 16:12:12 -08:00
Alexander Afanasyev 0eb70659f7 face: Rename all ChannelFactories to protocol Factories
Base class is ProtocolFactory and implementations are TcpFactory,
UnixStreamFactory, EthernetFactory.

Since Factories are doing more than just creating channels (some can
create faces directly), more general name is more appropriate.

Change-Id: I3d6c2460a1b29e244f8462453720f4e7785893ca
2014-02-28 12:54:16 -08:00
Alexander Afanasyev 7329e02f60 face: Convert to use the global IO service by all ChannelFactories
Change-Id: Ibd8d5cea142171b5700d8920eb3eedc084bbd588
2014-02-28 11:04:40 -08:00
Alexander Afanasyev 472acbe31e main: Enabling LocalControlHeader manager
Change-Id: I3e72a6913cbf62689bd36cefd73f5d6f237dbf85
Refs: #1210
2014-02-26 19:40:10 -08:00
Junxiao Shi c041ca36ed core: global io_service and scheduler
Scheduler and time are imported from ndn-cpp-dev.
Forwarder is using the new scheduler API.
Face system is not transitioned yet.

refs #1290

Change-Id: I5679cb50bbf9890a105f663b038f13951403c2b6
2014-02-26 12:40:22 -07:00
Alexander Afanasyev c78b141e7e build: Detecting if UNIX socket is available and disabling it if it is not
Change-Id: Iacdffe36223c085136a4fe09587ce304a3029853
2014-02-19 16:16:10 -08:00
Alexander Afanasyev 062dfb4212 main: Enabling UnixStreamSocket in nfd app
Change-Id: I5a860e5445413cb72e71ecdffb158970809a0fe5
2014-02-17 20:01:50 -08:00
Steve DiBenedetto 214563c2e9 main: Added fib manager to management initialization
Change-Id: Ib0553998aee8e47f79180acdb20f75e15f765aac
refs: #1139
2014-02-04 14:10:11 -08:00
Junxiao Shi 09bf7c4321 daemon: mock program integration
Change-Id: I77940c7efb7a52251a8f25f6104717ba5253dc1c
refs #1140, #1139
2014-02-01 17:08:03 -08:00
Alexander Afanasyev 2aa396272b Adding build system, README, COPYING, basic INSTALL.md, and skeleton for unit tests
Change-Id: I00a58106e43f6eaaec6eedf9fa7d217a22c19d2b
2014-01-22 13:34:03 -08:00