rib: move entire subdir to daemon/rib

Refs: #4528
Change-Id: I7de03631ddef0f014f12f979373aa449f42486d1
diff --git a/rib/fib-update.cpp b/daemon/rib/fib-update.cpp
similarity index 100%
rename from rib/fib-update.cpp
rename to daemon/rib/fib-update.cpp
diff --git a/rib/fib-update.hpp b/daemon/rib/fib-update.hpp
similarity index 92%
rename from rib/fib-update.hpp
rename to daemon/rib/fib-update.hpp
index fb4c338..5339a37 100644
--- a/rib/fib-update.hpp
+++ b/daemon/rib/fib-update.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_FIB_UPDATE_HPP
-#define NFD_RIB_FIB_UPDATE_HPP
+#ifndef NFD_DAEMON_RIB_FIB_UPDATE_HPP
+#define NFD_DAEMON_RIB_FIB_UPDATE_HPP
 
 #include "core/common.hpp"
 
@@ -93,4 +93,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_FIB_UPDATE_HPP
+#endif // NFD_DAEMON_RIB_FIB_UPDATE_HPP
diff --git a/rib/fib-updater.cpp b/daemon/rib/fib-updater.cpp
similarity index 100%
rename from rib/fib-updater.cpp
rename to daemon/rib/fib-updater.cpp
diff --git a/rib/fib-updater.hpp b/daemon/rib/fib-updater.hpp
similarity index 97%
rename from rib/fib-updater.hpp
rename to daemon/rib/fib-updater.hpp
index 90a788e..a404853 100644
--- a/rib/fib-updater.hpp
+++ b/daemon/rib/fib-updater.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_FIB_UPDATER_HPP
-#define NFD_RIB_FIB_UPDATER_HPP
+#ifndef NFD_DAEMON_RIB_FIB_UPDATER_HPP
+#define NFD_DAEMON_RIB_FIB_UPDATER_HPP
 
 #include "core/common.hpp"
 #include "fib-update.hpp"
@@ -44,11 +44,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
 public:
@@ -276,4 +272,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_FIB_UPDATER_HPP
+#endif // NFD_DAEMON_RIB_FIB_UPDATER_HPP
diff --git a/rib/readvertise/client-to-nlsr-readvertise-policy.cpp b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
similarity index 100%
rename from rib/readvertise/client-to-nlsr-readvertise-policy.cpp
rename to daemon/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
diff --git a/rib/readvertise/client-to-nlsr-readvertise-policy.hpp b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
similarity index 86%
rename from rib/readvertise/client-to-nlsr-readvertise-policy.hpp
rename to daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
index fd87360..b1c5e29 100644
--- a/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
-#define NFD_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
+#define NFD_DAEMON_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
 
 #include "readvertise-policy.hpp"
 
@@ -51,4 +51,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
diff --git a/rib/readvertise/host-to-gateway-readvertise-policy.cpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
similarity index 100%
rename from rib/readvertise/host-to-gateway-readvertise-policy.cpp
rename to daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
diff --git a/rib/readvertise/host-to-gateway-readvertise-policy.hpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
similarity index 87%
rename from rib/readvertise/host-to-gateway-readvertise-policy.hpp
rename to daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
index a2961b3..69e914a 100644
--- a/rib/readvertise/host-to-gateway-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
-#define NFD_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
+#define NFD_DAEMON_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
 
 #include "readvertise-policy.hpp"
 #include "core/config-file.hpp"
@@ -57,4 +57,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
diff --git a/rib/readvertise/nfd-rib-readvertise-destination.cpp b/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
similarity index 100%
rename from rib/readvertise/nfd-rib-readvertise-destination.cpp
rename to daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
diff --git a/rib/readvertise/nfd-rib-readvertise-destination.hpp b/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
similarity index 90%
rename from rib/readvertise/nfd-rib-readvertise-destination.hpp
rename to daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
index d31e81b..9c5bce6 100644
--- a/rib/readvertise/nfd-rib-readvertise-destination.hpp
+++ b/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,11 +23,11 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
-#define NFD_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
+#define NFD_DAEMON_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
 
 #include "readvertise-destination.hpp"
-#include "../rib.hpp"
+#include "rib/rib.hpp"
 
 #include <ndn-cxx/mgmt/nfd/command-options.hpp>
 #include <ndn-cxx/mgmt/nfd/controller.hpp>
@@ -89,4 +89,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
diff --git a/rib/readvertise/readvertise-destination.cpp b/daemon/rib/readvertise/readvertise-destination.cpp
similarity index 100%
rename from rib/readvertise/readvertise-destination.cpp
rename to daemon/rib/readvertise/readvertise-destination.cpp
diff --git a/rib/readvertise/readvertise-destination.hpp b/daemon/rib/readvertise/readvertise-destination.hpp
similarity index 89%
rename from rib/readvertise/readvertise-destination.hpp
rename to daemon/rib/readvertise/readvertise-destination.hpp
index d909026..1c4fb76 100644
--- a/rib/readvertise/readvertise-destination.hpp
+++ b/daemon/rib/readvertise/readvertise-destination.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_READVERTISE_DESTINATION_HPP
-#define NFD_RIB_READVERTISE_READVERTISE_DESTINATION_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_READVERTISE_DESTINATION_HPP
+#define NFD_DAEMON_RIB_READVERTISE_READVERTISE_DESTINATION_HPP
 
 #include "readvertised-route.hpp"
 
@@ -71,4 +71,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_READVERTISE_DESTINATION_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_READVERTISE_DESTINATION_HPP
diff --git a/rib/readvertise/readvertise-policy.hpp b/daemon/rib/readvertise/readvertise-policy.hpp
similarity index 88%
rename from rib/readvertise/readvertise-policy.hpp
rename to daemon/rib/readvertise/readvertise-policy.hpp
index 0f63745..99deccb 100644
--- a/rib/readvertise/readvertise-policy.hpp
+++ b/daemon/rib/readvertise/readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,10 +23,11 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_READVERTISE_POLICY_HPP
-#define NFD_RIB_READVERTISE_READVERTISE_POLICY_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_READVERTISE_POLICY_HPP
+#define NFD_DAEMON_RIB_READVERTISE_READVERTISE_POLICY_HPP
 
-#include "../rib.hpp"
+#include "rib/rib.hpp"
+
 #include <ndn-cxx/security/signing-info.hpp>
 
 namespace nfd {
@@ -62,4 +63,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_READVERTISE_POLICY_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_READVERTISE_POLICY_HPP
diff --git a/rib/readvertise/readvertise.cpp b/daemon/rib/readvertise/readvertise.cpp
similarity index 100%
rename from rib/readvertise/readvertise.cpp
rename to daemon/rib/readvertise/readvertise.cpp
diff --git a/rib/readvertise/readvertise.hpp b/daemon/rib/readvertise/readvertise.hpp
similarity index 92%
rename from rib/readvertise/readvertise.hpp
rename to daemon/rib/readvertise/readvertise.hpp
index c1a3b58..80dbbc7 100644
--- a/rib/readvertise/readvertise.hpp
+++ b/daemon/rib/readvertise/readvertise.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,13 +23,13 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_READVERTISE_HPP
-#define NFD_RIB_READVERTISE_READVERTISE_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_READVERTISE_HPP
+#define NFD_DAEMON_RIB_READVERTISE_READVERTISE_HPP
 
 #include "readvertise-destination.hpp"
 #include "readvertise-policy.hpp"
 #include "readvertised-route.hpp"
-#include "../rib.hpp"
+#include "rib/rib.hpp"
 
 namespace nfd {
 namespace rib {
@@ -91,4 +91,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_READVERTISE_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_READVERTISE_HPP
diff --git a/rib/readvertise/readvertised-route.hpp b/daemon/rib/readvertise/readvertised-route.hpp
similarity index 92%
rename from rib/readvertise/readvertised-route.hpp
rename to daemon/rib/readvertise/readvertised-route.hpp
index 50be0c4..7dc02ae 100644
--- a/rib/readvertise/readvertised-route.hpp
+++ b/daemon/rib/readvertise/readvertised-route.hpp
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_READVERTISE_READVERTISED_ROUTE_HPP
-#define NFD_RIB_READVERTISE_READVERTISED_ROUTE_HPP
+#ifndef NFD_DAEMON_RIB_READVERTISE_READVERTISED_ROUTE_HPP
+#define NFD_DAEMON_RIB_READVERTISE_READVERTISED_ROUTE_HPP
 
 #include "core/common.hpp"
 
@@ -66,4 +66,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_READVERTISE_READVERTISED_ROUTE_HPP
+#endif // NFD_DAEMON_RIB_READVERTISE_READVERTISED_ROUTE_HPP
diff --git a/rib/rib-entry.cpp b/daemon/rib/rib-entry.cpp
similarity index 100%
rename from rib/rib-entry.cpp
rename to daemon/rib/rib-entry.cpp
diff --git a/rib/rib-entry.hpp b/daemon/rib/rib-entry.hpp
similarity index 97%
rename from rib/rib-entry.hpp
rename to daemon/rib/rib-entry.hpp
index 60da09b..45d5a87 100644
--- a/rib/rib-entry.hpp
+++ b/daemon/rib/rib-entry.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_RIB_ENTRY_HPP
-#define NFD_RIB_RIB_ENTRY_HPP
+#ifndef NFD_DAEMON_RIB_RIB_ENTRY_HPP
+#define NFD_DAEMON_RIB_RIB_ENTRY_HPP
 
 #include "route.hpp"
 
@@ -285,4 +285,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_RIB_ENTRY_HPP
+#endif // NFD_DAEMON_RIB_RIB_ENTRY_HPP
diff --git a/rib/rib-manager.cpp b/daemon/rib/rib-manager.cpp
similarity index 100%
rename from rib/rib-manager.cpp
rename to daemon/rib/rib-manager.cpp
diff --git a/rib/rib-manager.hpp b/daemon/rib/rib-manager.hpp
similarity index 98%
rename from rib/rib-manager.hpp
rename to daemon/rib/rib-manager.hpp
index 0b4eb6f..503dc2f 100644
--- a/rib/rib-manager.hpp
+++ b/daemon/rib/rib-manager.hpp
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_RIB_MANAGER_HPP
-#define NFD_RIB_RIB_MANAGER_HPP
+#ifndef NFD_DAEMON_RIB_RIB_MANAGER_HPP
+#define NFD_DAEMON_RIB_RIB_MANAGER_HPP
 
 #include "fib-updater.hpp"
 #include "rib.hpp"
@@ -265,4 +265,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_RIB_MANAGER_HPP
+#endif // NFD_DAEMON_RIB_RIB_MANAGER_HPP
diff --git a/rib/rib-update-batch.cpp b/daemon/rib/rib-update-batch.cpp
similarity index 100%
rename from rib/rib-update-batch.cpp
rename to daemon/rib/rib-update-batch.cpp
diff --git a/rib/rib-update-batch.hpp b/daemon/rib/rib-update-batch.hpp
similarity index 90%
rename from rib/rib-update-batch.hpp
rename to daemon/rib/rib-update-batch.hpp
index 12636a8..f72a9e8 100644
--- a/rib/rib-update-batch.hpp
+++ b/daemon/rib/rib-update-batch.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_RIB_UPDATE_BATCH_HPP
-#define NFD_RIB_RIB_UPDATE_BATCH_HPP
+#ifndef NFD_DAEMON_RIB_RIB_UPDATE_BATCH_HPP
+#define NFD_DAEMON_RIB_RIB_UPDATE_BATCH_HPP
 
 #include "rib-update.hpp"
 
@@ -74,4 +74,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_RIB_UPDATE_BATCH_HPP
+#endif // NFD_DAEMON_RIB_RIB_UPDATE_BATCH_HPP
diff --git a/rib/rib-update.cpp b/daemon/rib/rib-update.cpp
similarity index 100%
rename from rib/rib-update.cpp
rename to daemon/rib/rib-update.cpp
diff --git a/rib/rib-update.hpp b/daemon/rib/rib-update.hpp
similarity index 93%
rename from rib/rib-update.hpp
rename to daemon/rib/rib-update.hpp
index cd2b6d7..ad5a390 100644
--- a/rib/rib-update.hpp
+++ b/daemon/rib/rib-update.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_RIB_UPDATE_HPP
-#define NFD_RIB_RIB_UPDATE_HPP
+#ifndef NFD_DAEMON_RIB_RIB_UPDATE_HPP
+#define NFD_DAEMON_RIB_RIB_UPDATE_HPP
 
 #include "core/common.hpp"
 #include "route.hpp"
@@ -125,4 +125,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_RIB_UPDATE_HPP
+#endif // NFD_DAEMON_RIB_RIB_UPDATE_HPP
diff --git a/rib/rib.cpp b/daemon/rib/rib.cpp
similarity index 100%
rename from rib/rib.cpp
rename to daemon/rib/rib.cpp
diff --git a/rib/rib.hpp b/daemon/rib/rib.hpp
similarity index 97%
rename from rib/rib.hpp
rename to daemon/rib/rib.hpp
index a9278de..ea848f8 100644
--- a/rib/rib.hpp
+++ b/daemon/rib/rib.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_RIB_HPP
-#define NFD_RIB_RIB_HPP
+#ifndef NFD_DAEMON_RIB_RIB_HPP
+#define NFD_DAEMON_RIB_RIB_HPP
 
 #include "rib-entry.hpp"
 #include "rib-update-batch.hpp"
@@ -304,4 +304,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_RIB_HPP
+#endif // NFD_DAEMON_RIB_RIB_HPP
diff --git a/rib/route.cpp b/daemon/rib/route.cpp
similarity index 100%
rename from rib/route.cpp
rename to daemon/rib/route.cpp
diff --git a/rib/route.hpp b/daemon/rib/route.hpp
similarity index 93%
rename from rib/route.hpp
rename to daemon/rib/route.hpp
index 05449e2..f38fbab 100644
--- a/rib/route.hpp
+++ b/daemon/rib/route.hpp
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_ROUTE_HPP
-#define NFD_RIB_ROUTE_HPP
+#ifndef NFD_DAEMON_RIB_ROUTE_HPP
+#define NFD_DAEMON_RIB_ROUTE_HPP
 
 #include "core/common.hpp"
 
@@ -71,7 +71,7 @@
     m_expirationEvent.cancel();
   }
 
-  std::underlying_type<ndn::nfd::RouteFlags>::type
+  std::underlying_type_t<ndn::nfd::RouteFlags>
   getFlags() const
   {
     return flags;
@@ -81,7 +81,7 @@
   uint64_t faceId = 0;
   ndn::nfd::RouteOrigin origin = ndn::nfd::ROUTE_ORIGIN_APP;
   uint64_t cost = 0;
-  std::underlying_type<ndn::nfd::RouteFlags>::type flags = ndn::nfd::ROUTE_FLAGS_NONE;
+  std::underlying_type_t<ndn::nfd::RouteFlags> flags = ndn::nfd::ROUTE_FLAGS_NONE;
   optional<time::steady_clock::TimePoint> expires;
 
   /** \brief The prefix announcement that caused the creation of this route.
@@ -131,4 +131,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_ROUTE_HPP
+#endif // NFD_DAEMON_RIB_ROUTE_HPP
diff --git a/rib/service.cpp b/daemon/rib/service.cpp
similarity index 100%
rename from rib/service.cpp
rename to daemon/rib/service.cpp
diff --git a/rib/service.hpp b/daemon/rib/service.hpp
similarity index 95%
rename from rib/service.hpp
rename to daemon/rib/service.hpp
index e372a0d..0d6a71a 100644
--- a/rib/service.hpp
+++ b/daemon/rib/service.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_RIB_SERVICE_HPP
-#define NFD_RIB_SERVICE_HPP
+#ifndef NFD_DAEMON_RIB_SERVICE_HPP
+#define NFD_DAEMON_RIB_SERVICE_HPP
 
 #include "rib-manager.hpp"
 
@@ -124,4 +124,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_RIB_SERVICE_HPP
+#endif // NFD_DAEMON_RIB_SERVICE_HPP
diff --git a/docs/doxygen.conf.in b/docs/doxygen.conf.in
index 902c297..7928d8c 100644
--- a/docs/doxygen.conf.in
+++ b/docs/doxygen.conf.in
@@ -780,7 +780,7 @@
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = core daemon rib tools
+INPUT                  = core daemon tools
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/tests/rib/rib-test-common.hpp b/tests/daemon/rib/create-route.hpp
similarity index 73%
rename from tests/rib/rib-test-common.hpp
rename to tests/daemon/rib/create-route.hpp
index 8cddafe..b248575 100644
--- a/tests/rib/rib-test-common.hpp
+++ b/tests/daemon/rib/create-route.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_RIB_RIB_TEST_COMMON_HPP
-#define NFD_TESTS_RIB_RIB_TEST_COMMON_HPP
+#ifndef NFD_TESTS_DAEMON_RIB_CREATE_ROUTE_HPP
+#define NFD_TESTS_DAEMON_RIB_CREATE_ROUTE_HPP
 
 #include "rib/route.hpp"
 
@@ -34,21 +34,20 @@
 
 inline Route
 createRoute(uint64_t faceId,
-            std::underlying_type<ndn::nfd::RouteOrigin>::type origin,
+            std::underlying_type_t<ndn::nfd::RouteOrigin> origin,
             uint64_t cost = 0,
-            std::underlying_type<ndn::nfd::RouteFlags>::type flags = ndn::nfd::ROUTE_FLAGS_NONE)
+            std::underlying_type_t<ndn::nfd::RouteFlags> flags = ndn::nfd::ROUTE_FLAGS_NONE)
 {
-  Route temp;
-  temp.faceId = faceId;
-  temp.origin = static_cast<ndn::nfd::RouteOrigin>(origin);
-  temp.cost = cost;
-  temp.flags = flags;
-
-  return temp;
+  Route r;
+  r.faceId = faceId;
+  r.origin = static_cast<ndn::nfd::RouteOrigin>(origin);
+  r.cost = cost;
+  r.flags = flags;
+  return r;
 }
 
 } // namespace tests
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_TESTS_RIB_RIB_TEST_COMMON_HPP
+#endif // NFD_TESTS_DAEMON_RIB_CREATE_ROUTE_HPP
diff --git a/tests/rib/fib-updates-common.hpp b/tests/daemon/rib/fib-updates-common.hpp
similarity index 88%
rename from tests/rib/fib-updates-common.hpp
rename to tests/daemon/rib/fib-updates-common.hpp
index 66b1c8e..4668af5 100644
--- a/tests/rib/fib-updates-common.hpp
+++ b/tests/daemon/rib/fib-updates-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,13 +23,13 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_RIB_FIB_UPDATES_COMMON_HPP
-#define NFD_TESTS_RIB_FIB_UPDATES_COMMON_HPP
+#ifndef NFD_TESTS_DAEMON_RIB_FIB_UPDATES_COMMON_HPP
+#define NFD_TESTS_DAEMON_RIB_FIB_UPDATES_COMMON_HPP
 
 #include "rib/fib-updater.hpp"
 
-#include "rib-test-common.hpp"
 #include "tests/identity-management-fixture.hpp"
+#include "tests/daemon/rib/create-route.hpp"
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
@@ -72,8 +72,9 @@
 
   void
   insertRoute(const Name& name, uint64_t faceId,
-              std::underlying_type<ndn::nfd::RouteOrigin>::type origin,
-              uint64_t cost, std::underlying_type<ndn::nfd::RouteFlags>::type flags)
+              std::underlying_type_t<ndn::nfd::RouteOrigin> origin,
+              uint64_t cost,
+              std::underlying_type_t<ndn::nfd::RouteFlags> flags)
   {
     Route route = createRoute(faceId, origin, cost, flags);
 
@@ -88,7 +89,7 @@
 
   void
   eraseRoute(const Name& name, uint64_t faceId,
-             std::underlying_type<ndn::nfd::RouteOrigin>::type origin)
+             std::underlying_type_t<ndn::nfd::RouteOrigin> origin)
   {
     Route route = createRoute(faceId, origin, 0, 0);
 
@@ -155,4 +156,4 @@
 } // namespace rib
 } // namespace nfd
 
-#endif // NFD_TESTS_RIB_FIB_UPDATES_COMMON_HPP
+#endif // NFD_TESTS_DAEMON_RIB_FIB_UPDATES_COMMON_HPP
diff --git a/tests/rib/fib-updates-erase-face.t.cpp b/tests/daemon/rib/fib-updates-erase-face.t.cpp
similarity index 100%
rename from tests/rib/fib-updates-erase-face.t.cpp
rename to tests/daemon/rib/fib-updates-erase-face.t.cpp
diff --git a/tests/rib/fib-updates-new-face.t.cpp b/tests/daemon/rib/fib-updates-new-face.t.cpp
similarity index 100%
rename from tests/rib/fib-updates-new-face.t.cpp
rename to tests/daemon/rib/fib-updates-new-face.t.cpp
diff --git a/tests/rib/fib-updates-new-namespace.t.cpp b/tests/daemon/rib/fib-updates-new-namespace.t.cpp
similarity index 100%
rename from tests/rib/fib-updates-new-namespace.t.cpp
rename to tests/daemon/rib/fib-updates-new-namespace.t.cpp
diff --git a/tests/rib/fib-updates-update-face.t.cpp b/tests/daemon/rib/fib-updates-update-face.t.cpp
similarity index 100%
rename from tests/rib/fib-updates-update-face.t.cpp
rename to tests/daemon/rib/fib-updates-update-face.t.cpp
diff --git a/tests/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
similarity index 100%
rename from tests/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
rename to tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
diff --git a/tests/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
similarity index 100%
rename from tests/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
rename to tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
diff --git a/tests/rib/readvertise/nfd-rib-readvertise-destination.t.cpp b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
similarity index 100%
rename from tests/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
rename to tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
diff --git a/tests/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
similarity index 100%
rename from tests/rib/readvertise/readvertise.t.cpp
rename to tests/daemon/rib/readvertise/readvertise.t.cpp
diff --git a/tests/rib/rib-entry.t.cpp b/tests/daemon/rib/rib-entry.t.cpp
similarity index 100%
rename from tests/rib/rib-entry.t.cpp
rename to tests/daemon/rib/rib-entry.t.cpp
diff --git a/tests/rib/rib-manager.t.cpp b/tests/daemon/rib/rib-manager.t.cpp
similarity index 100%
rename from tests/rib/rib-manager.t.cpp
rename to tests/daemon/rib/rib-manager.t.cpp
diff --git a/tests/rib/rib-update.t.cpp b/tests/daemon/rib/rib-update.t.cpp
similarity index 95%
rename from tests/rib/rib-update.t.cpp
rename to tests/daemon/rib/rib-update.t.cpp
index f40730f..22577f0 100644
--- a/tests/rib/rib-update.t.cpp
+++ b/tests/daemon/rib/rib-update.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,8 @@
 #include "rib/rib-update.hpp"
 #include "rib/rib-update-batch.hpp"
 
-#include "rib-test-common.hpp"
 #include "tests/test-common.hpp"
+#include "tests/daemon/rib/create-route.hpp"
 
 namespace nfd {
 namespace rib {
diff --git a/tests/rib/rib.t.cpp b/tests/daemon/rib/rib.t.cpp
similarity index 98%
rename from tests/rib/rib.t.cpp
rename to tests/daemon/rib/rib.t.cpp
index 3b9840c..26a47b3 100644
--- a/tests/rib/rib.t.cpp
+++ b/tests/daemon/rib/rib.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,8 @@
 
 #include "rib/rib.hpp"
 
-#include "rib-test-common.hpp"
 #include "tests/test-common.hpp"
+#include "tests/daemon/rib/create-route.hpp"
 
 namespace nfd {
 namespace rib {
diff --git a/tests/rib/route.t.cpp b/tests/daemon/rib/route.t.cpp
similarity index 100%
rename from tests/rib/route.t.cpp
rename to tests/daemon/rib/route.t.cpp
diff --git a/tests/rib/service.t.cpp b/tests/daemon/rib/service.t.cpp
similarity index 100%
rename from tests/rib/service.t.cpp
rename to tests/daemon/rib/service.t.cpp
diff --git a/tests/rib/sl-announce.t.cpp b/tests/daemon/rib/sl-announce.t.cpp
similarity index 100%
rename from tests/rib/sl-announce.t.cpp
rename to tests/daemon/rib/sl-announce.t.cpp
diff --git a/tests/other/wscript b/tests/other/wscript
index b09be43..da57688 100644
--- a/tests/other/wscript
+++ b/tests/other/wscript
@@ -1,6 +1,6 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 """
-Copyright (c) 2014-2018,  Regents of the University of California,
+Copyright (c) 2014-2019,  Regents of the University of California,
                           Arizona Board of Regents,
                           Colorado State University,
                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,7 +37,7 @@
         bld.program(name=module,
                     target='../../%s' % module,
                     source=bld.path.ant_glob('%s*.cpp' % module),
-                    use='daemon-objects rib-objects unit-tests-base other-tests-%s-main' % module,
+                    use='daemon-objects unit-tests-base other-tests-%s-main' % module,
                     defines=['UNIT_TEST_CONFIG_PATH="%s"' % bld.bldnode.make_node('tmp-files')],
                     install_path=None)
 
@@ -45,5 +45,5 @@
     bld.program(name='face-benchmark',
                 target='../../face-benchmark',
                 source=bld.path.ant_glob('face-benchmark*.cpp'),
-                use='daemon-objects rib-objects',
+                use='daemon-objects',
                 install_path=None)
diff --git a/tests/wscript b/tests/wscript
index 2103753..7f5b321 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -1,6 +1,6 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 """
-Copyright (c) 2014-2018,  Regents of the University of California,
+Copyright (c) 2014-2019,  Regents of the University of California,
                           Arizona Board of Regents,
                           Colorado State University,
                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,17 +39,18 @@
             headers='../core/common.hpp boost-test.hpp',
             defines=[config_path])
 
-        for module, name in {"core": "Core Tests",
-                             "daemon": "Daemon Tests",
-                             "rib": "RIB Tests",
-                             "tools": "Tools Tests"}.items():
+        for module, name in {'core': 'Core Tests',
+                             'daemon': 'Daemon Tests',
+                             'rib': 'RIB Tests',
+                             'tools': 'Tools Tests'}.items():
             # main() for the module
             bld.objects(target='unit-tests-%s-main' % module,
                         source='main.cpp',
                         use='BOOST',
                         defines=['BOOST_TEST_MODULE=%s' % name])
 
-            node = bld.path.find_dir(module)
+            subdir = 'daemon/rib' if module == 'rib' else module
+            node = bld.path.find_dir(subdir)
             src = node.ant_glob('**/*.cpp', excl=['face/*ethernet*.cpp',
                                                   'face/pcap*.cpp',
                                                   'face/unix*.cpp',
@@ -62,21 +63,14 @@
             if bld.env.HAVE_WEBSOCKET:
                 src += node.ant_glob('face/websocket*.cpp')
 
-            # unit-tests-%module
-            if module == "daemon":
-              bld.program(name='unit-tests-%s' % module,
-                          target='../unit-tests-%s' % module,
-                          source=src,
-                          use='%s-objects rib-objects unit-tests-base unit-tests-%s-main' % (module, module),
-                          defines=[config_path],
-                          install_path=None)
-            else:
-              bld.program(name='unit-tests-%s' % module,
-                          target='../unit-tests-%s' % module,
-                          source=src,
-                          use='%s-objects unit-tests-base unit-tests-%s-main' % (module, module),
-                          defines=[config_path],
-                          install_path=None)
+            objmod = 'daemon' if module == 'rib' else module
+            # unit-tests binary for the module
+            bld.program(name='unit-tests-%s' % module,
+                        target='../unit-tests-%s' % module,
+                        source=src,
+                        use='%s-objects unit-tests-base unit-tests-%s-main' % (objmod, module),
+                        defines=[config_path],
+                        install_path=None)
 
     # Other tests (e.g., stress tests and benchmarks that can be enabled even if unit tests are disabled)
     if bld.env.WITH_TESTS or bld.env.WITH_OTHER_TESTS:
diff --git a/wscript b/wscript
index 6b7c556..587a458 100644
--- a/wscript
+++ b/wscript
@@ -196,14 +196,10 @@
     if bld.env.WITH_OTHER_TESTS:
         nfd_objects.source += bld.path.ant_glob('tests/other/fw/*.cpp')
 
-    bld.objects(target='rib-objects',
-                source=bld.path.ant_glob('rib/**/*.cpp'),
-                use='core-objects')
-
     bld.program(name='nfd',
                 target='bin/nfd',
                 source='daemon/main.cpp',
-                use='daemon-objects rib-objects SYSTEMD')
+                use='daemon-objects SYSTEMD')
 
     bld.recurse('tools')
     bld.recurse('tests')