rib: Integrating NRD code into NFD codebase

Change-Id: I3e548f974255f62a4680cfc6c12be3bb7a3db4d2
Refs: #1486
diff --git a/docs/conf.py b/docs/conf.py
index 11d8a52..647cca4 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -230,6 +230,7 @@
 # (source start file, name, description, authors, manual section).
 man_pages = [
     ('manpages/nfd', 'nfd', u'Named Data Networking Forwarding Daemon', None, 1),
+    ('manpages/nrd', 'nrd', u'NFD RIB Daemon', None, 1),
     ('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server',
         u'NFD Auto-configuration Server', None, 1),
     ('manpages/ndn-autoconfig', 'ndn-autoconfig',
diff --git a/docs/manpages.rst b/docs/manpages.rst
index da28853..ff5630a 100644
--- a/docs/manpages.rst
+++ b/docs/manpages.rst
@@ -3,5 +3,6 @@
 
 .. toctree::
    manpages/nfd
+   manpages/nrd
    manpages/ndn-autoconfig
    manpages/ndn-autoconfig-server
diff --git a/docs/manpages/nrd.rst b/docs/manpages/nrd.rst
new file mode 100644
index 0000000..a825575
--- /dev/null
+++ b/docs/manpages/nrd.rst
@@ -0,0 +1,67 @@
+NRD (NFD RIB Daemon)
+========================
+
+NRD is a complementary daemon designed to work in parallel with NFD
+and to provide services for Routing Information Base management and
+constructing NFD's FIB:
+
+* prefix registration from applications;
+* manual prefix registration;
+* prefix registrations from multiple dynamic routing protocols.
+
+Running and Configuring NRD
+---------------------------
+
+NRD's runtime settings may be modified via configuration file. After
+installation, a working sample configuration is provided at
+``SYSCONFDIR/ndn/nrd.conf.sample``. At startup, NRD will attempt to read
+the default configuration file from following location:
+``SYSCONFDIR/ndn/nrd.conf``.
+
+You may also specify an alternative configuration file location by
+running NRD with:
+
+::
+
+    nrd --config </path/to/nrd.conf>
+
+Currently, nrd.conf contains only a security section, which is well
+documented in the sample configuration file.
+
+Starting experiments
+--------------------
+
+1. Build, install and setup NFD by following the directions provided in
+   README.md in NFD root folder.
+
+2. Create certificates by following the instructions in NFD's README.md
+
+3. Build and install NRD by following the directions in INSTALL.md
+
+4. Create nrd.conf file. You can simply copy the provided sample file in
+   ``SYSCONFDIR/ndn/nrd.conf``.
+
+5. Setup the trust-anchors in nrd.conf. Ideally, the prefix registration
+   Interest should be signed by application/user key, and this
+   application/user key should be used as trust-anchor. However,
+   currently the default certificate is used to sign the registration
+   Interests. Therefore, for initial testing the default certificate
+   should be set as the trust-anchor. For doing so, the default
+   certificate should be copied in the same folder where the nrd.conf
+   is. Secondly, the trust-anchor should point to the copied certificate
+   in nrd.conf. To know the id of default certificate you can use:
+
+   ~$ ndnsec-get-default
+
+6. Start NFD (assuming the NFD's conf file exist in
+   ``SYSCONFDIR/ndn/nfd.conf``):
+
+   ~$ nfd
+
+7. Start NRD (assuming the conf file exist in
+   ``SYSCONFDIR/ndn/nrd.conf``):
+
+   ~$ nrd
+
+8. Try to connect any application to NFD. For example, producer
+   application that is provided ndn-cpp-dev examples.