diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index c75b60a5..cf1156e3 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -52,7 +52,7 @@ export BOOST_TEST_COLOR_OUTPUT=1
# Then use sudo to run those tests that need superuser powers
sudo_preserve_env ASAN_OPTIONS BOOST_TEST_COLOR_OUTPUT -- \
- ./build/unit-tests-core -t TestPrivilegeHelper $(ut_log_args core-privilege)
+ ./build/unit-tests-daemon -t TestPrivilegeHelper $(ut_log_args daemon-privilege-helper)
sudo_preserve_env ASAN_OPTIONS BOOST_TEST_COLOR_OUTPUT -- \
./build/unit-tests-daemon -t Face/*Ethernet* $(ut_log_args daemon-ethernet)
sudo_preserve_env ASAN_OPTIONS BOOST_TEST_COLOR_OUTPUT -- \
diff --git a/core/fib-max-depth.hpp b/core/fib-max-depth.hpp
deleted file mode 100644
index af15a97f..00000000
--- a/core/fib-max-depth.hpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2018, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file. If not, see .
- */
-
-#ifndef NFD_CORE_FIB_MAX_DEPTH_HPP
-#define NFD_CORE_FIB_MAX_DEPTH_HPP
-
-namespace nfd {
-
-/** \brief Maximum number of components in a FIB entry prefix.
- */
-static const int FIB_MAX_DEPTH = 32;
-
-} // namespace nfd
-
-#endif // NFD_CORE_FIB_MAX_DEPTH_HPP
diff --git a/core/city-hash.cpp b/daemon/common/city-hash.cpp
similarity index 100%
rename from core/city-hash.cpp
rename to daemon/common/city-hash.cpp
diff --git a/core/city-hash.hpp b/daemon/common/city-hash.hpp
similarity index 100%
rename from core/city-hash.hpp
rename to daemon/common/city-hash.hpp
diff --git a/core/config-file.cpp b/daemon/common/config-file.cpp
similarity index 99%
rename from core/config-file.cpp
rename to daemon/common/config-file.cpp
index accfe729..8d703496 100644
--- a/core/config-file.cpp
+++ b/daemon/common/config-file.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "config-file.hpp"
+#include "common/config-file.hpp"
#include
diff --git a/core/config-file.hpp b/daemon/common/config-file.hpp
similarity index 97%
rename from core/config-file.hpp
rename to daemon/common/config-file.hpp
index 819b9b48..20e778b5 100644
--- a/core/config-file.hpp
+++ b/daemon/common/config-file.hpp
@@ -23,10 +23,10 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_CORE_CONFIG_FILE_HPP
-#define NFD_CORE_CONFIG_FILE_HPP
+#ifndef NFD_DAEMON_COMMON_CONFIG_FILE_HPP
+#define NFD_DAEMON_COMMON_CONFIG_FILE_HPP
-#include "common.hpp"
+#include "core/common.hpp"
#include
@@ -177,4 +177,4 @@ private:
} // namespace nfd
-#endif // NFD_CORE_CONFIG_FILE_HPP
+#endif // NFD_DAEMON_COMMON_CONFIG_FILE_HPP
diff --git a/core/counter.hpp b/daemon/common/counter.hpp
similarity index 82%
rename from core/counter.hpp
rename to daemon/common/counter.hpp
index 3a678ec8..4619b355 100644
--- a/core/counter.hpp
+++ b/daemon/common/counter.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,10 +23,10 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_CORE_COUNTER_HPP
-#define NFD_CORE_COUNTER_HPP
+#ifndef NFD_DAEMON_COMMON_COUNTER_HPP
+#define NFD_DAEMON_COMMON_COUNTER_HPP
-#include "common.hpp"
+#include "core/common.hpp"
namespace nfd {
@@ -35,25 +35,14 @@ namespace nfd {
* SimpleCounter is noncopyable, because increment should be called on the counter,
* not a copy of it; it's implicitly convertible to an integral type to be observed
*/
-class SimpleCounter
+class SimpleCounter : noncopyable
{
public:
typedef uint64_t rep;
- constexpr
- SimpleCounter()
- : m_value(0)
- {
- }
-
- SimpleCounter(const SimpleCounter&) = delete;
-
- SimpleCounter&
- operator=(const SimpleCounter&) = delete;
-
/** \brief observe the counter
*/
- operator rep() const
+ operator rep() const noexcept
{
return m_value;
}
@@ -61,13 +50,13 @@ public:
/** \brief replace the counter value
*/
void
- set(rep value)
+ set(rep value) noexcept
{
m_value = value;
}
protected:
- rep m_value;
+ rep m_value = 0;
};
/** \brief represents a counter of number of packets
@@ -80,7 +69,7 @@ public:
/** \brief increment the counter by one
*/
PacketCounter&
- operator++()
+ operator++() noexcept
{
++m_value;
return *this;
@@ -98,7 +87,7 @@ public:
/** \brief increase the counter
*/
ByteCounter&
- operator+=(rep n)
+ operator+=(rep n) noexcept
{
m_value += n;
return *this;
@@ -111,24 +100,19 @@ public:
* if table not specified in constructor, it can be added later by invoking observe()
*/
template
-class SizeCounter
+class SizeCounter : noncopyable
{
public:
typedef size_t Rep;
explicit constexpr
- SizeCounter(const T* table = nullptr)
+ SizeCounter(const T* table = nullptr) noexcept
: m_table(table)
{
}
- SizeCounter(const SizeCounter&) = delete;
-
- SizeCounter&
- operator=(const SizeCounter&) = delete;
-
void
- observe(const T* table)
+ observe(const T* table) noexcept
{
m_table = table;
}
@@ -147,4 +131,4 @@ private:
} // namespace nfd
-#endif // NFD_CORE_COUNTER_HPP
+#endif // NFD_DAEMON_COMMON_COUNTER_HPP
diff --git a/daemon/global.cpp b/daemon/common/global.cpp
similarity index 98%
rename from daemon/global.cpp
rename to daemon/common/global.cpp
index bd1dac21..a0fd88f7 100644
--- a/daemon/global.cpp
+++ b/daemon/common/global.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
diff --git a/daemon/global.hpp b/daemon/common/global.hpp
similarity index 95%
rename from daemon/global.hpp
rename to daemon/common/global.hpp
index 05bc5776..1e1fce83 100644
--- a/daemon/global.hpp
+++ b/daemon/common/global.hpp
@@ -22,8 +22,8 @@
* NFD, e.g., in COPYING.md file. If not, see .
**/
-#ifndef NFD_DAEMON_GLOBAL_HPP
-#define NFD_DAEMON_GLOBAL_HPP
+#ifndef NFD_DAEMON_COMMON_GLOBAL_HPP
+#define NFD_DAEMON_COMMON_GLOBAL_HPP
#include "core/common.hpp"
@@ -72,4 +72,4 @@ resetGlobalIoService();
} // namespace nfd
-#endif // NFD_DAEMON_GLOBAL_HPP
+#endif // NFD_DAEMON_COMMON_GLOBAL_HPP
diff --git a/core/logger.hpp b/daemon/common/logger.hpp
similarity index 91%
rename from core/logger.hpp
rename to daemon/common/logger.hpp
index b98ff616..9a2637df 100644
--- a/core/logger.hpp
+++ b/daemon/common/logger.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 .
*/
-#ifndef NFD_CORE_LOGGER_HPP
-#define NFD_CORE_LOGGER_HPP
+#ifndef NFD_DAEMON_COMMON_LOGGER_HPP
+#define NFD_DAEMON_COMMON_LOGGER_HPP
#include
@@ -41,4 +41,4 @@
#define NFD_LOG_ERROR NDN_LOG_ERROR
#define NFD_LOG_FATAL NDN_LOG_FATAL
-#endif // NFD_CORE_LOGGER_HPP
+#endif // NFD_DAEMON_COMMON_LOGGER_HPP
diff --git a/core/privilege-helper.cpp b/daemon/common/privilege-helper.cpp
similarity index 98%
rename from core/privilege-helper.cpp
rename to daemon/common/privilege-helper.cpp
index 86523478..7cdfcd06 100644
--- a/core/privilege-helper.cpp
+++ b/daemon/common/privilege-helper.cpp
@@ -23,8 +23,8 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "privilege-helper.hpp"
-#include "core/logger.hpp"
+#include "common/privilege-helper.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/core/privilege-helper.hpp b/daemon/common/privilege-helper.hpp
similarity index 93%
rename from core/privilege-helper.hpp
rename to daemon/common/privilege-helper.hpp
index 0379b2f0..52daf843 100644
--- a/core/privilege-helper.hpp
+++ b/daemon/common/privilege-helper.hpp
@@ -23,10 +23,10 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_CORE_PRIVILEGE_HELPER_HPP
-#define NFD_CORE_PRIVILEGE_HELPER_HPP
+#ifndef NFD_DAEMON_COMMON_PRIVILEGE_HELPER_HPP
+#define NFD_DAEMON_COMMON_PRIVILEGE_HELPER_HPP
-#include "common.hpp"
+#include "core/common.hpp"
#include
@@ -96,4 +96,4 @@ PUBLIC_WITH_TESTS_ELSE_PRIVATE:
} // namespace nfd
-#endif // NFD_CORE_PRIVILEGE_HELPER_HPP
+#endif // NFD_DAEMON_COMMON_PRIVILEGE_HELPER_HPP
diff --git a/daemon/face/channel-log.hpp b/daemon/face/channel-log.hpp
index 59edf521..375c23af 100644
--- a/daemon/face/channel-log.hpp
+++ b/daemon/face/channel-log.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,
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_FACE_CHANNEL_LOG_HPP
#define NFD_DAEMON_FACE_CHANNEL_LOG_HPP
-#include "core/logger.hpp"
+#include "common/logger.hpp"
/** \defgroup ChannelLogging Channel logging macros
*
diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index 135035f2..fcde63b4 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -28,7 +28,7 @@
#include "transport.hpp"
#include "socket-utils.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index 4b5a0726..9c27adaa 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.cpp
@@ -27,7 +27,7 @@
#include "ethernet-protocol.hpp"
#include "generic-link-service.hpp"
#include "unicast-ethernet-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
#include
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index 0e69745d..a2f3e9b3 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -25,7 +25,7 @@
#include "ethernet-transport.hpp"
#include "ethernet-protocol.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/daemon/face/face-log.hpp b/daemon/face/face-log.hpp
index 55022d18..b193d82d 100644
--- a/daemon/face/face-log.hpp
+++ b/daemon/face/face-log.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,
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_FACE_FACE_LOG_HPP
#define NFD_DAEMON_FACE_FACE_LOG_HPP
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index 260eea7c..67738aa0 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.cpp
@@ -26,7 +26,7 @@
#include "face-system.hpp"
#include "protocol-factory.hpp"
#include "netdev-bound.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "fw/face-table.hpp"
namespace nfd {
diff --git a/daemon/face/face-system.hpp b/daemon/face/face-system.hpp
index 833da1b2..2bcdfad8 100644
--- a/daemon/face/face-system.hpp
+++ b/daemon/face/face-system.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,
@@ -27,8 +27,9 @@
#define NFD_DAEMON_FACE_FACE_SYSTEM_HPP
#include "channel.hpp"
-#include "core/config-file.hpp"
-#include "core/network-predicate.hpp"
+#include "network-predicate.hpp"
+#include "common/config-file.hpp"
+
#include
#include
#include
diff --git a/daemon/face/internal-face.cpp b/daemon/face/internal-face.cpp
index f82bd580..764dfd7c 100644
--- a/daemon/face/internal-face.cpp
+++ b/daemon/face/internal-face.cpp
@@ -26,7 +26,7 @@
#include "internal-face.hpp"
#include "generic-link-service.hpp"
#include "internal-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/internal-transport.cpp b/daemon/face/internal-transport.cpp
index 5b3fcac3..18bfe0a6 100644
--- a/daemon/face/internal-transport.cpp
+++ b/daemon/face/internal-transport.cpp
@@ -24,7 +24,7 @@
*/
#include "internal-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/link-service.hpp b/daemon/face/link-service.hpp
index b8e87499..0caa857c 100644
--- a/daemon/face/link-service.hpp
+++ b/daemon/face/link-service.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,
@@ -26,9 +26,9 @@
#ifndef NFD_DAEMON_FACE_LINK_SERVICE_HPP
#define NFD_DAEMON_FACE_LINK_SERVICE_HPP
-#include "core/counter.hpp"
#include "face-log.hpp"
#include "transport.hpp"
+#include "common/counter.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/lp-reassembler.cpp b/daemon/face/lp-reassembler.cpp
index 918d2963..d19f7993 100644
--- a/daemon/face/lp-reassembler.cpp
+++ b/daemon/face/lp-reassembler.cpp
@@ -25,7 +25,7 @@
#include "lp-reassembler.hpp"
#include "link-service.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index f65d3c3b..7f7ee140 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.cpp
@@ -26,7 +26,7 @@
#include "lp-reliability.hpp"
#include "generic-link-service.hpp"
#include "transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/multicast-ethernet-transport.cpp b/daemon/face/multicast-ethernet-transport.cpp
index 80f13ea3..1295764c 100644
--- a/daemon/face/multicast-ethernet-transport.cpp
+++ b/daemon/face/multicast-ethernet-transport.cpp
@@ -24,7 +24,7 @@
*/
#include "multicast-ethernet-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include // for errno
#include // for memcpy(), strerror(), strncpy()
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index 2c61527e..689b7e04 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -27,7 +27,7 @@
#include "socket-utils.hpp"
#include "udp-protocol.hpp"
-#include "core/privilege-helper.hpp"
+#include "common/privilege-helper.hpp"
#include
diff --git a/daemon/face/netdev-bound.cpp b/daemon/face/netdev-bound.cpp
index 5ed975d2..124ea3a7 100644
--- a/daemon/face/netdev-bound.cpp
+++ b/daemon/face/netdev-bound.cpp
@@ -25,7 +25,7 @@
#include "netdev-bound.hpp"
#include "face-system.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace face {
diff --git a/core/network-predicate.cpp b/daemon/face/network-predicate.cpp
similarity index 98%
rename from core/network-predicate.cpp
rename to daemon/face/network-predicate.cpp
index 43a0d401..31a2cf8f 100644
--- a/core/network-predicate.cpp
+++ b/daemon/face/network-predicate.cpp
@@ -24,13 +24,13 @@
*/
#include "network-predicate.hpp"
-
-#include "config-file.hpp"
-#include "network.hpp"
+#include "common/config-file.hpp"
+#include "core/network.hpp"
#include
namespace nfd {
+namespace face {
NetworkPredicateBase::NetworkPredicateBase()
{
@@ -223,4 +223,5 @@ IpAddressPredicate::operator()(const boost::asio::ip::address& address) const
std::none_of(m_blacklist.begin(), m_blacklist.end(), bind(&doesAddressMatchRule, std::cref(address), _1));
}
+} // namespace face
} // namespace nfd
diff --git a/core/network-predicate.hpp b/daemon/face/network-predicate.hpp
similarity index 93%
rename from core/network-predicate.hpp
rename to daemon/face/network-predicate.hpp
index dc86c70f..27ac8b1e 100644
--- a/core/network-predicate.hpp
+++ b/daemon/face/network-predicate.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,15 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_CORE_NETWORK_PREDICATE_HPP
-#define NFD_CORE_NETWORK_PREDICATE_HPP
+#ifndef NFD_DAEMON_FACE_NETWORK_PREDICATE_HPP
+#define NFD_DAEMON_FACE_NETWORK_PREDICATE_HPP
+
+#include "core/common.hpp"
-#include "common.hpp"
#include
namespace nfd {
+namespace face {
class NetworkPredicateBase
{
@@ -128,6 +130,7 @@ private:
isRuleValid(const std::string& key, const std::string& value) final;
};
+} // namespace face
} // namespace nfd
-#endif // NFD_CORE_NETWORK_PREDICATE_HPP
+#endif // NFD_DAEMON_FACE_NETWORK_PREDICATE_HPP
diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp
index eb7de923..e0a7d6da 100644
--- a/daemon/face/stream-transport.hpp
+++ b/daemon/face/stream-transport.hpp
@@ -28,7 +28,7 @@
#include "transport.hpp"
#include "socket-utils.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 7ffb0f31..dc0576f6 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -26,7 +26,7 @@
#include "tcp-channel.hpp"
#include "generic-link-service.hpp"
#include "tcp-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/tcp-transport.cpp b/daemon/face/tcp-transport.cpp
index 90c18255..58c4add4 100644
--- a/daemon/face/tcp-transport.cpp
+++ b/daemon/face/tcp-transport.cpp
@@ -24,7 +24,7 @@
*/
#include "tcp-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#if defined(__linux__)
#include
diff --git a/daemon/face/transport.hpp b/daemon/face/transport.hpp
index 8bbfe868..aaea75a9 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -26,8 +26,8 @@
#ifndef NFD_DAEMON_FACE_TRANSPORT_HPP
#define NFD_DAEMON_FACE_TRANSPORT_HPP
-#include "core/counter.hpp"
#include "face-log.hpp"
+#include "common/counter.hpp"
#include
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index b9da25e1..7f4a4d91 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -26,7 +26,7 @@
#include "udp-channel.hpp"
#include "generic-link-service.hpp"
#include "unicast-udp-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 2c8cf207..54b00b17 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -26,7 +26,7 @@
#include "udp-factory.hpp"
#include "generic-link-service.hpp"
#include "multicast-udp-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
#include
diff --git a/daemon/face/unicast-ethernet-transport.cpp b/daemon/face/unicast-ethernet-transport.cpp
index 3ed78006..97e5c4e3 100644
--- a/daemon/face/unicast-ethernet-transport.cpp
+++ b/daemon/face/unicast-ethernet-transport.cpp
@@ -24,7 +24,7 @@
*/
#include "unicast-ethernet-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include // for snprintf()
diff --git a/daemon/face/unicast-udp-transport.cpp b/daemon/face/unicast-udp-transport.cpp
index c2c0d2b8..a81e1d01 100644
--- a/daemon/face/unicast-udp-transport.cpp
+++ b/daemon/face/unicast-udp-transport.cpp
@@ -25,7 +25,7 @@
#include "unicast-udp-transport.hpp"
#include "udp-protocol.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#ifdef __linux__
#include // for errno
diff --git a/daemon/face/unix-stream-channel.cpp b/daemon/face/unix-stream-channel.cpp
index 52a4c999..4ef1a183 100644
--- a/daemon/face/unix-stream-channel.cpp
+++ b/daemon/face/unix-stream-channel.cpp
@@ -26,7 +26,7 @@
#include "unix-stream-channel.hpp"
#include "generic-link-service.hpp"
#include "unix-stream-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
#include // for chmod()
diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index 74b4d39b..f3f69ba4 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -26,7 +26,7 @@
#include "websocket-channel.hpp"
#include "generic-link-service.hpp"
#include "websocket-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index 63be570e..d20e54cd 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -24,7 +24,7 @@
*/
#include "websocket-transport.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 3b282462..59d99f3f 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -25,8 +25,8 @@
#include "access-strategy.hpp"
#include "algorithm.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace fw {
diff --git a/daemon/fw/algorithm.hpp b/daemon/fw/algorithm.hpp
index 95d8bc53..07a0e013 100644
--- a/daemon/fw/algorithm.hpp
+++ b/daemon/fw/algorithm.hpp
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_FW_PIT_ALGORITHM_HPP
#define NFD_DAEMON_FW_PIT_ALGORITHM_HPP
-#include "core/scope-prefix.hpp"
+#include "fw/scope-prefix.hpp"
#include "table/fib.hpp"
#include "table/pit-entry.hpp"
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index dde6866f..404fc85e 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -24,7 +24,7 @@
*/
#include "asf-measurements.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace fw {
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 84055f1f..46f17516 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -25,7 +25,7 @@
#include "asf-probing-module.hpp"
#include "algorithm.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index e013fab1..ce689bc1 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -25,8 +25,8 @@
#include "asf-strategy.hpp"
#include "algorithm.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace fw {
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 5c7d6a23..f2acfed6 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -25,7 +25,7 @@
#include "best-route-strategy2.hpp"
#include "algorithm.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace fw {
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index a25e1076..49d33b60 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.cpp
@@ -24,8 +24,8 @@
*/
#include "face-table.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
#include "face/channel.hpp"
#include
diff --git a/daemon/fw/forwarder-counters.hpp b/daemon/fw/forwarder-counters.hpp
index ca9eb4d3..f526b863 100644
--- a/daemon/fw/forwarder-counters.hpp
+++ b/daemon/fw/forwarder-counters.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,
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_FW_FORWARDER_COUNTERS_HPP
#define NFD_DAEMON_FW_FORWARDER_COUNTERS_HPP
-#include "core/counter.hpp"
+#include "common/counter.hpp"
namespace nfd {
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 328ff31b..7a85daff 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -28,8 +28,8 @@
#include "algorithm.hpp"
#include "best-route-strategy2.hpp"
#include "strategy.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
#include "table/cleanup.hpp"
#include
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index f22514a6..d15063e4 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -25,7 +25,7 @@
#include "multicast-strategy.hpp"
#include "algorithm.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace fw {
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 50632007..c427cd1d 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -25,7 +25,7 @@
#include "ncc-strategy.hpp"
#include "algorithm.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/daemon/fw/process-nack-traits.cpp b/daemon/fw/process-nack-traits.cpp
index 4b2d0913..6f3ad083 100644
--- a/daemon/fw/process-nack-traits.cpp
+++ b/daemon/fw/process-nack-traits.cpp
@@ -24,7 +24,7 @@
*/
#include "process-nack-traits.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace fw {
diff --git a/core/scope-prefix.cpp b/daemon/fw/scope-prefix.cpp
similarity index 95%
rename from core/scope-prefix.cpp
rename to daemon/fw/scope-prefix.cpp
index 487d6759..984d19c8 100644
--- a/core/scope-prefix.cpp
+++ b/daemon/fw/scope-prefix.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,
diff --git a/core/scope-prefix.hpp b/daemon/fw/scope-prefix.hpp
similarity index 92%
rename from core/scope-prefix.hpp
rename to daemon/fw/scope-prefix.hpp
index 05e3b68a..265959d5 100644
--- a/core/scope-prefix.hpp
+++ b/daemon/fw/scope-prefix.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,10 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_CORE_SCOPE_PREFIX_HPP
-#define NFD_CORE_SCOPE_PREFIX_HPP
+#ifndef NFD_DAEMON_FW_SCOPE_PREFIX_HPP
+#define NFD_DAEMON_FW_SCOPE_PREFIX_HPP
-#include "common.hpp"
+#include "core/common.hpp"
/** \brief contain name prefixes that affect namespace-based scope control
* \sa https://redmine.named-data.net/projects/nfd/wiki/ScopeControl
@@ -61,4 +61,4 @@ extern const Name LOCALHOP;
} // namespace scope_prefix
} // namespace nfd
-#endif // NFD_CORE_SCOPE_PREFIX_HPP
+#endif // NFD_DAEMON_FW_SCOPE_PREFIX_HPP
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index d199b864..fd6d16ec 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -26,8 +26,8 @@
#include "self-learning-strategy.hpp"
#include "algorithm.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
#include "rib/service.hpp"
#include
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 54574d7d..151dac84 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -25,7 +25,7 @@
#include "strategy.hpp"
#include "forwarder.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 06756203..8a236ab6 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -26,10 +26,10 @@
#include "nfd.hpp"
#include "rib/service.hpp"
-#include "core/logger.hpp"
-#include "core/privilege-helper.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
+#include "common/privilege-helper.hpp"
#include "core/version.hpp"
-#include "daemon/global.hpp"
#include // for strsignal()
diff --git a/daemon/mgmt/command-authenticator.cpp b/daemon/mgmt/command-authenticator.cpp
index 913c74ff..c146962f 100644
--- a/daemon/mgmt/command-authenticator.cpp
+++ b/daemon/mgmt/command-authenticator.cpp
@@ -24,7 +24,7 @@
*/
#include "command-authenticator.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/mgmt/command-authenticator.hpp b/daemon/mgmt/command-authenticator.hpp
index 5589187d..9f136a84 100644
--- a/daemon/mgmt/command-authenticator.hpp
+++ b/daemon/mgmt/command-authenticator.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,
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
#define NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
#include
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index b7b22f2c..9b36410d 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -25,7 +25,7 @@
#include "face-manager.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include "face/generic-link-service.hpp"
#include "face/protocol-factory.hpp"
#include "fw/face-table.hpp"
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 8fef3a38..1f0d173f 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -25,7 +25,7 @@
#include "fib-manager.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include "fw/face-table.hpp"
#include "table/fib.hpp"
@@ -66,7 +66,7 @@ FibManager::addNextHop(const Name& topPrefix, const Interest& interest,
NFD_LOG_DEBUG("fib/add-nexthop(" << prefix << ',' << faceId << ',' << cost <<
"): FAIL prefix-too-long");
return done(ControlResponse(414, "FIB entry prefix cannot exceed " +
- ndn::to_string(Fib::getMaxDepth()) + " components"));
+ to_string(Fib::getMaxDepth()) + " components"));
}
Face* face = m_faceTable.get(faceId);
diff --git a/daemon/mgmt/general-config-section.cpp b/daemon/mgmt/general-config-section.cpp
index 732074b5..de9c6112 100644
--- a/daemon/mgmt/general-config-section.cpp
+++ b/daemon/mgmt/general-config-section.cpp
@@ -24,7 +24,7 @@
*/
#include "general-config-section.hpp"
-#include "core/privilege-helper.hpp"
+#include "common/privilege-helper.hpp"
namespace nfd {
namespace general {
diff --git a/daemon/mgmt/general-config-section.hpp b/daemon/mgmt/general-config-section.hpp
index a70bc485..cd9089dd 100644
--- a/daemon/mgmt/general-config-section.hpp
+++ b/daemon/mgmt/general-config-section.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,10 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_MGMT_GENERAL_CONFIG_SECTION_HPP
-#define NFD_MGMT_GENERAL_CONFIG_SECTION_HPP
+#ifndef NFD_DAEMON_MGMT_GENERAL_CONFIG_SECTION_HPP
+#define NFD_DAEMON_MGMT_GENERAL_CONFIG_SECTION_HPP
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
namespace nfd {
namespace general {
@@ -37,4 +37,4 @@ setConfigFile(ConfigFile& config);
} // namespace general
} // namespace nfd
-#endif // NFD_MGMT_GENERAL_CONFIG_SECTION_HPP
+#endif // NFD_DAEMON_MGMT_GENERAL_CONFIG_SECTION_HPP
diff --git a/core/log-config-section.cpp b/daemon/mgmt/log-config-section.cpp
similarity index 100%
rename from core/log-config-section.cpp
rename to daemon/mgmt/log-config-section.cpp
diff --git a/core/log-config-section.hpp b/daemon/mgmt/log-config-section.hpp
similarity index 84%
rename from core/log-config-section.hpp
rename to daemon/mgmt/log-config-section.hpp
index fbe35f94..e7e40221 100644
--- a/core/log-config-section.hpp
+++ b/daemon/mgmt/log-config-section.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,10 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#ifndef NFD_CORE_LOG_CONFIG_SECTION_HPP
-#define NFD_CORE_LOG_CONFIG_SECTION_HPP
+#ifndef NFD_DAEMON_MGMT_LOG_CONFIG_SECTION_HPP
+#define NFD_DAEMON_MGMT_LOG_CONFIG_SECTION_HPP
-#include "config-file.hpp"
+#include "common/config-file.hpp"
namespace nfd {
namespace log {
@@ -37,4 +37,4 @@ setConfigFile(ConfigFile& config);
} // namespace log
} // namespace nfd
-#endif // NFD_CORE_LOG_CONFIG_SECTION_HPP
+#endif // NFD_DAEMON_MGMT_LOG_CONFIG_SECTION_HPP
diff --git a/daemon/mgmt/rib-manager.cpp b/daemon/mgmt/rib-manager.cpp
index a7907754..383c47f4 100644
--- a/daemon/mgmt/rib-manager.cpp
+++ b/daemon/mgmt/rib-manager.cpp
@@ -25,10 +25,10 @@
#include "rib-manager.hpp"
-#include "core/fib-max-depth.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
#include "rib/rib.hpp"
+#include "table/fib.hpp"
#include
#include
@@ -217,8 +217,8 @@ RibManager::registerEntry(const Name& topPrefix, const Interest& interest,
ControlParameters parameters,
const ndn::mgmt::CommandContinuation& done)
{
- if (parameters.getName().size() > FIB_MAX_DEPTH) {
- done(ControlResponse(414, "Route prefix cannot exceed " + ndn::to_string(FIB_MAX_DEPTH) +
+ if (parameters.getName().size() > Fib::getMaxDepth()) {
+ done(ControlResponse(414, "Route prefix cannot exceed " + to_string(Fib::getMaxDepth()) +
" components"));
return;
}
diff --git a/daemon/mgmt/rib-manager.hpp b/daemon/mgmt/rib-manager.hpp
index 6888024f..a5e663f5 100644
--- a/daemon/mgmt/rib-manager.hpp
+++ b/daemon/mgmt/rib-manager.hpp
@@ -27,7 +27,6 @@
#define NFD_DAEMON_MGMT_RIB_MANAGER_HPP
#include "manager-base.hpp"
-#include "core/config-file.hpp"
#include "rib/route.hpp"
#include
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index bebe1a09..169ce2ee 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -25,7 +25,7 @@
#include "strategy-choice-manager.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include "table/strategy-choice.hpp"
#include
diff --git a/daemon/mgmt/tables-config-section.hpp b/daemon/mgmt/tables-config-section.hpp
index 932df2c1..c2cfec53 100644
--- a/daemon/mgmt/tables-config-section.hpp
+++ b/daemon/mgmt/tables-config-section.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 .
*/
-#ifndef NFD_MGMT_TABLES_CONFIG_SECTION_HPP
-#define NFD_MGMT_TABLES_CONFIG_SECTION_HPP
+#ifndef NFD_DAEMON_MGMT_TABLES_CONFIG_SECTION_HPP
+#define NFD_DAEMON_MGMT_TABLES_CONFIG_SECTION_HPP
+#include "common/config-file.hpp"
#include "fw/forwarder.hpp"
-#include "core/config-file.hpp"
namespace nfd {
@@ -101,4 +101,4 @@ private:
} // namespace nfd
-#endif // NFD_MGMT_TABLES_CONFIG_SECTION_HPP
+#endif // NFD_DAEMON_MGMT_TABLES_CONFIG_SECTION_HPP
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index 078d9877..a6155639 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -24,10 +24,9 @@
*/
#include "nfd.hpp"
-#include "global.hpp"
-#include "core/config-file.hpp"
-#include "core/log-config-section.hpp"
-#include "core/privilege-helper.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
+#include "common/privilege-helper.hpp"
#include "face/face-system.hpp"
#include "face/internal-face.hpp"
#include "face/null-face.hpp"
@@ -37,6 +36,7 @@
#include "mgmt/fib-manager.hpp"
#include "mgmt/forwarder-status-manager.hpp"
#include "mgmt/general-config-section.hpp"
+#include "mgmt/log-config-section.hpp"
#include "mgmt/strategy-choice-manager.hpp"
#include "mgmt/tables-config-section.hpp"
diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp
index ba8efd41..f0a09f4b 100644
--- a/daemon/nfd.hpp
+++ b/daemon/nfd.hpp
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_NFD_HPP
#define NFD_DAEMON_NFD_HPP
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
#include
#include
diff --git a/daemon/rib/fib-updater.cpp b/daemon/rib/fib-updater.cpp
index 574b5f9d..2ee14fd8 100644
--- a/daemon/rib/fib-updater.cpp
+++ b/daemon/rib/fib-updater.cpp
@@ -24,7 +24,7 @@
*/
#include "fib-updater.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
index 7810619f..9ee79854 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
@@ -24,7 +24,7 @@
*/
#include "host-to-gateway-readvertise-policy.hpp"
-#include "core/scope-prefix.hpp"
+#include "fw/scope-prefix.hpp"
#include "mgmt/rib-manager.hpp"
#include
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
index 69e914a9..325fc80d 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
@@ -27,7 +27,7 @@
#define NFD_DAEMON_RIB_READVERTISE_HOST_TO_GATEWAY_READVERTISE_POLICY_HPP
#include "readvertise-policy.hpp"
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
#include
diff --git a/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp b/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
index f0a04825..a76aaed9 100644
--- a/daemon/rib/readvertise/nfd-rib-readvertise-destination.cpp
+++ b/daemon/rib/readvertise/nfd-rib-readvertise-destination.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,
@@ -24,7 +24,7 @@
*/
#include "nfd-rib-readvertise-destination.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/rib/readvertise/readvertise-destination.cpp b/daemon/rib/readvertise/readvertise-destination.cpp
index a687a8a2..972c1dc7 100644
--- a/daemon/rib/readvertise/readvertise-destination.cpp
+++ b/daemon/rib/readvertise/readvertise-destination.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,
@@ -24,7 +24,7 @@
*/
#include "readvertise-destination.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace rib {
diff --git a/daemon/rib/readvertise/readvertise.cpp b/daemon/rib/readvertise/readvertise.cpp
index 7b59e222..2f167956 100644
--- a/daemon/rib/readvertise/readvertise.cpp
+++ b/daemon/rib/readvertise/readvertise.cpp
@@ -24,8 +24,8 @@
*/
#include "readvertise.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
#include
diff --git a/daemon/rib/rib-entry.cpp b/daemon/rib/rib-entry.cpp
index 008ac4fb..7385d169 100644
--- a/daemon/rib/rib-entry.cpp
+++ b/daemon/rib/rib-entry.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,
@@ -24,7 +24,7 @@
*/
#include "rib-entry.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
diff --git a/daemon/rib/rib.cpp b/daemon/rib/rib.cpp
index bbd72f10..1491c871 100644
--- a/daemon/rib/rib.cpp
+++ b/daemon/rib/rib.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,7 +25,7 @@
#include "rib.hpp"
#include "fib-updater.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace rib {
diff --git a/daemon/rib/service.cpp b/daemon/rib/service.cpp
index 043b9805..564e3d6a 100644
--- a/daemon/rib/service.cpp
+++ b/daemon/rib/service.cpp
@@ -31,8 +31,8 @@
#include "readvertise/nfd-rib-readvertise-destination.hpp"
#include "readvertise/readvertise.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/rib/service.hpp b/daemon/rib/service.hpp
index d1c2226d..ca5f57bc 100644
--- a/daemon/rib/service.hpp
+++ b/daemon/rib/service.hpp
@@ -26,7 +26,7 @@
#ifndef NFD_DAEMON_RIB_SERVICE_HPP
#define NFD_DAEMON_RIB_SERVICE_HPP
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
#include "mgmt/rib-manager.hpp"
#include "rib/fib-updater.hpp"
#include "rib/rib.hpp"
diff --git a/daemon/table/cs-policy-priority-fifo.cpp b/daemon/table/cs-policy-priority-fifo.cpp
index f350c723..db130132 100644
--- a/daemon/table/cs-policy-priority-fifo.cpp
+++ b/daemon/table/cs-policy-priority-fifo.cpp
@@ -25,7 +25,7 @@
#include "cs-policy-priority-fifo.hpp"
#include "cs.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace cs {
diff --git a/daemon/table/cs-policy.cpp b/daemon/table/cs-policy.cpp
index a982590b..4930af8c 100644
--- a/daemon/table/cs-policy.cpp
+++ b/daemon/table/cs-policy.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,7 +25,7 @@
#include "cs-policy.hpp"
#include "cs.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/table/cs.cpp b/daemon/table/cs.cpp
index a9583740..3a06c7d2 100644
--- a/daemon/table/cs.cpp
+++ b/daemon/table/cs.cpp
@@ -24,8 +24,8 @@
*/
#include "cs.hpp"
+#include "common/logger.hpp"
#include "core/algorithm.hpp"
-#include "core/logger.hpp"
#include
#include
diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index 7d6a9080..3521b511 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.cpp
@@ -24,9 +24,9 @@
*/
#include "dead-nonce-list.hpp"
-#include "core/city-hash.hpp"
-#include "core/logger.hpp"
-#include "daemon/global.hpp"
+#include "common/city-hash.hpp"
+#include "common/global.hpp"
+#include "common/logger.hpp"
namespace nfd {
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index fc73a7da..462a29bd 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -29,8 +29,6 @@
#include "fib-entry.hpp"
#include "name-tree.hpp"
-#include "core/fib-max-depth.hpp"
-
#include
namespace nfd {
@@ -89,7 +87,7 @@ public: // mutation
static constexpr size_t
getMaxDepth()
{
- return FIB_MAX_DEPTH;
+ return NameTree::getMaxDepth();
}
/** \brief Find or insert a FIB entry
diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index adfd782f..af3cc1ed 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -27,7 +27,7 @@
#include "name-tree.hpp"
#include "pit-entry.hpp"
#include "fib-entry.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace measurements {
diff --git a/daemon/table/name-tree-hashtable.cpp b/daemon/table/name-tree-hashtable.cpp
index 2e252234..7d20a34a 100644
--- a/daemon/table/name-tree-hashtable.cpp
+++ b/daemon/table/name-tree-hashtable.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,
@@ -24,8 +24,8 @@
*/
#include "name-tree-hashtable.hpp"
-#include "core/city-hash.hpp"
-#include "core/logger.hpp"
+#include "common/city-hash.hpp"
+#include "common/logger.hpp"
namespace nfd {
namespace name_tree {
diff --git a/daemon/table/name-tree-iterator.cpp b/daemon/table/name-tree-iterator.cpp
index f295d9cb..33b53826 100644
--- a/daemon/table/name-tree-iterator.cpp
+++ b/daemon/table/name-tree-iterator.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,7 +25,7 @@
#include "name-tree-iterator.hpp"
#include "name-tree.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/table/name-tree.cpp b/daemon/table/name-tree.cpp
index 3eca24f9..aac885ce 100644
--- a/daemon/table/name-tree.cpp
+++ b/daemon/table/name-tree.cpp
@@ -24,7 +24,7 @@
*/
#include "name-tree.hpp"
-#include "core/logger.hpp"
+#include "common/logger.hpp"
#include
#include
diff --git a/daemon/table/name-tree.hpp b/daemon/table/name-tree.hpp
index 1cb5f317..b3c7da46 100644
--- a/daemon/table/name-tree.hpp
+++ b/daemon/table/name-tree.hpp
@@ -28,8 +28,6 @@
#include "name-tree-iterator.hpp"
-#include "core/fib-max-depth.hpp"
-
namespace nfd {
namespace name_tree {
@@ -52,7 +50,7 @@ public: // information
static constexpr size_t
getMaxDepth()
{
- return FIB_MAX_DEPTH;
+ return 32;
}
/** \return number of name tree entries
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index b6cb0f7b..e03306cf 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -24,10 +24,10 @@
*/
#include "strategy-choice.hpp"
-
#include "measurements-entry.hpp"
#include "pit-entry.hpp"
-#include "core/logger.hpp"
+
+#include "common/logger.hpp"
#include "fw/strategy.hpp"
#include
diff --git a/tests/core/config-file.t.cpp b/tests/daemon/common/config-file.t.cpp
similarity index 94%
rename from tests/core/config-file.t.cpp
rename to tests/daemon/common/config-file.t.cpp
index 05b2722f..8eae4fba 100644
--- a/tests/core/config-file.t.cpp
+++ b/tests/daemon/common/config-file.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "core/config-file.hpp"
+#include "common/config-file.hpp"
#include "tests/test-common.hpp"
@@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(ParseFromStream)
ConfigFile file;
DummyAllSubscriber sub(file);
- std::ifstream input("tests/core/config_example.info");
+ std::ifstream input("tests/daemon/common/config_example.info");
BOOST_REQUIRE(input.is_open());
file.parse(input, false, "config_example.info");
@@ -169,10 +169,10 @@ BOOST_AUTO_TEST_CASE(ParseFromStreamDryRun)
ConfigFile file;
DummyAllSubscriber sub(file, true);
- std::ifstream input("tests/core/config_example.info");
+ std::ifstream input("tests/daemon/common/config_example.info");
BOOST_REQUIRE(input.is_open());
- file.parse(input, true, "tests/core/config_example.info");
+ file.parse(input, true, "tests/daemon/common/config_example.info");
BOOST_CHECK(sub.allCallbacksFired());
}
@@ -240,7 +240,7 @@ BOOST_AUTO_TEST_CASE(ParseFromFilename)
ConfigFile file;
DummyAllSubscriber sub(file);
- file.parse("tests/core/config_example.info", false);
+ file.parse("tests/daemon/common/config_example.info", false);
BOOST_CHECK(sub.allCallbacksFired());
}
@@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE(ParseFromFilenameMalformed)
ConfigFile file;
DummyAllSubscriber sub(file);
- BOOST_CHECK_THROW(file.parse("tests/core/config_malformed.info", false), ConfigFile::Error);
+ BOOST_CHECK_THROW(file.parse("tests/daemon/common/config_malformed.info", false), ConfigFile::Error);
BOOST_CHECK(sub.noCallbacksFired());
}
@@ -267,7 +267,7 @@ BOOST_AUTO_TEST_CASE(ParseFromFilenameDryRun)
ConfigFile file;
DummyAllSubscriber sub(file, true);
- file.parse("tests/core/config_example.info", true);
+ file.parse("tests/daemon/common/config_example.info", true);
BOOST_CHECK(sub.allCallbacksFired());
}
diff --git a/tests/core/config_example.info b/tests/daemon/common/config_example.info
similarity index 100%
rename from tests/core/config_example.info
rename to tests/daemon/common/config_example.info
diff --git a/tests/core/config_malformed.info b/tests/daemon/common/config_malformed.info
similarity index 100%
rename from tests/core/config_malformed.info
rename to tests/daemon/common/config_malformed.info
diff --git a/tests/core/counter.t.cpp b/tests/daemon/common/counter.t.cpp
similarity index 98%
rename from tests/core/counter.t.cpp
rename to tests/daemon/common/counter.t.cpp
index 387b13f6..60de483d 100644
--- a/tests/core/counter.t.cpp
+++ b/tests/daemon/common/counter.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "core/counter.hpp"
+#include "common/counter.hpp"
#include "tests/test-common.hpp"
diff --git a/tests/daemon/global.t.cpp b/tests/daemon/common/global.t.cpp
similarity index 99%
rename from tests/daemon/global.t.cpp
rename to tests/daemon/common/global.t.cpp
index bb24218b..dced3825 100644
--- a/tests/daemon/global.t.cpp
+++ b/tests/daemon/common/global.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/core/privilege-helper.t.cpp b/tests/daemon/common/privilege-helper.t.cpp
similarity index 98%
rename from tests/core/privilege-helper.t.cpp
rename to tests/daemon/common/privilege-helper.t.cpp
index 58f89472..dcea7cb4 100644
--- a/tests/core/privilege-helper.t.cpp
+++ b/tests/daemon/common/privilege-helper.t.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "core/privilege-helper.hpp"
+#include "common/privilege-helper.hpp"
#include "tests/test-common.hpp"
diff --git a/tests/daemon/face/multicast-ethernet-transport.t.cpp b/tests/daemon/face/multicast-ethernet-transport.t.cpp
index db248acb..4961a694 100644
--- a/tests/daemon/face/multicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/multicast-ethernet-transport.t.cpp
@@ -27,7 +27,7 @@
#include "ethernet-fixture.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/tests/core/network-predicate.t.cpp b/tests/daemon/face/network-predicate.t.cpp
similarity index 98%
rename from tests/core/network-predicate.t.cpp
rename to tests/daemon/face/network-predicate.t.cpp
index 378b6aa2..73e29c6b 100644
--- a/tests/core/network-predicate.t.cpp
+++ b/tests/daemon/face/network-predicate.t.cpp
@@ -23,8 +23,8 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "core/network-predicate.hpp"
-#include "core/config-file.hpp"
+#include "face/network-predicate.hpp"
+#include "common/config-file.hpp"
#include "tests/test-common.hpp"
@@ -35,8 +35,10 @@
#include
namespace nfd {
+namespace face {
namespace tests {
+BOOST_AUTO_TEST_SUITE(Face)
BOOST_AUTO_TEST_SUITE(TestNetworkPredicate)
template
@@ -508,6 +510,8 @@ BOOST_AUTO_TEST_CASE(UnrecognizedKey)
BOOST_AUTO_TEST_SUITE_END() // IpAddress
BOOST_AUTO_TEST_SUITE_END() // TestNetworkPredicate
+BOOST_AUTO_TEST_SUITE_END() // Face
} // namespace tests
+} // namespace face
} // namespace nfd
diff --git a/tests/daemon/face/tcp-channel-fixture.hpp b/tests/daemon/face/tcp-channel-fixture.hpp
index fa907358..b872f942 100644
--- a/tests/daemon/face/tcp-channel-fixture.hpp
+++ b/tests/daemon/face/tcp-channel-fixture.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,
@@ -27,7 +27,7 @@
#define NFD_TESTS_DAEMON_FACE_TCP_CHANNEL_FIXTURE_HPP
#include "face/tcp-channel.hpp"
-#include "core/network-predicate.hpp"
+#include "face/network-predicate.hpp"
#include "channel-fixture.hpp"
diff --git a/tests/daemon/face/test-netif.cpp b/tests/daemon/face/test-netif.cpp
index a19623fa..d97ce47c 100644
--- a/tests/daemon/face/test-netif.cpp
+++ b/tests/daemon/face/test-netif.cpp
@@ -24,7 +24,7 @@
*/
#include "test-netif.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace face {
diff --git a/tests/daemon/fw/asf-measurements.t.cpp b/tests/daemon/fw/asf-measurements.t.cpp
index d08f7614..a6d8c02a 100644
--- a/tests/daemon/fw/asf-measurements.t.cpp
+++ b/tests/daemon/fw/asf-measurements.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/asf-measurements.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 5776f6cd..e63951c8 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/best-route-strategy2.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/face/dummy-face.hpp"
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 59b5ef3c..598935c7 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/forwarder.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index e1c40271..a44ba782 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -24,7 +24,7 @@
*/
#include "fw/multicast-strategy.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/face/dummy-face.hpp"
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index 50d3de5b..5c63f61e 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -25,7 +25,7 @@
#include "topology-tester.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "face/generic-link-service.hpp"
#include
diff --git a/tests/daemon/global-io-fixture.cpp b/tests/daemon/global-io-fixture.cpp
index 4888e802..9d9b1847 100644
--- a/tests/daemon/global-io-fixture.cpp
+++ b/tests/daemon/global-io-fixture.cpp
@@ -24,7 +24,7 @@
*/
#include "tests/daemon/global-io-fixture.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
namespace nfd {
namespace tests {
diff --git a/tests/daemon/limited-io.cpp b/tests/daemon/limited-io.cpp
index c54a2903..aeb1ea7c 100644
--- a/tests/daemon/limited-io.cpp
+++ b/tests/daemon/limited-io.cpp
@@ -25,7 +25,7 @@
#include "tests/daemon/limited-io.hpp"
#include "tests/test-common.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.cpp b/tests/daemon/mgmt/face-manager-command-fixture.cpp
index 16e99c67..ed90d0a7 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.cpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.cpp
@@ -24,7 +24,7 @@
*/
#include "face-manager-command-fixture.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 5d61168b..0918aaff 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -172,7 +172,7 @@ BOOST_AUTO_TEST_CASE(UnknownFaceId)
BOOST_AUTO_TEST_CASE(NameTooLong)
{
Name prefix;
- while (prefix.size() <= FIB_MAX_DEPTH) {
+ while (prefix.size() <= Fib::getMaxDepth()) {
prefix.append("A");
}
diff --git a/tests/daemon/mgmt/general-config-section.t.cpp b/tests/daemon/mgmt/general-config-section.t.cpp
index 1f7188a9..5dbfc41b 100644
--- a/tests/daemon/mgmt/general-config-section.t.cpp
+++ b/tests/daemon/mgmt/general-config-section.t.cpp
@@ -24,8 +24,8 @@
*/
#include "mgmt/general-config-section.hpp"
-#include "core/config-file.hpp"
-#include "core/privilege-helper.hpp"
+#include "common/config-file.hpp"
+#include "common/privilege-helper.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index 04d9dca2..dd34b5e9 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -24,7 +24,6 @@
*/
#include "mgmt/rib-manager.hpp"
-#include "core/fib-max-depth.hpp"
#include "rib/fib-updater.hpp"
#include "manager-common-fixture.hpp"
@@ -405,7 +404,7 @@ BOOST_AUTO_TEST_CASE(Expiration)
BOOST_AUTO_TEST_CASE(NameTooLong)
{
Name prefix;
- while (prefix.size() <= FIB_MAX_DEPTH) {
+ while (prefix.size() <= Fib::getMaxDepth()) {
prefix.append("A");
}
auto params = makeRegisterParameters(prefix, 2899);
@@ -413,9 +412,9 @@ BOOST_AUTO_TEST_CASE(NameTooLong)
receiveInterest(command);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, command.getName(), ControlResponse(414,
- "Route prefix cannot exceed " + ndn::to_string(FIB_MAX_DEPTH) +
- " components")),
+ BOOST_CHECK_EQUAL(checkResponse(0, command.getName(),
+ ControlResponse(414, "Route prefix cannot exceed " +
+ to_string(Fib::getMaxDepth()) + " components")),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(m_commands.size(), 0);
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 6b7e3909..ae963527 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(SetUnknownStrategy)
BOOST_AUTO_TEST_CASE(SetNameTooLong)
{
Name prefix;
- while (prefix.size() <= FIB_MAX_DEPTH) {
+ while (prefix.size() <= NameTree::getMaxDepth()) {
prefix.append("A");
}
ControlParameters reqParams;
diff --git a/tests/daemon/rib-io-fixture.cpp b/tests/daemon/rib-io-fixture.cpp
index 768c5cc2..a0c8048b 100644
--- a/tests/daemon/rib-io-fixture.cpp
+++ b/tests/daemon/rib-io-fixture.cpp
@@ -25,7 +25,7 @@
#include "tests/daemon/rib-io-fixture.hpp"
#include "tests/test-common.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include
diff --git a/tests/daemon/rib/service.t.cpp b/tests/daemon/rib/service.t.cpp
index e732e073..80b0c38a 100644
--- a/tests/daemon/rib/service.t.cpp
+++ b/tests/daemon/rib/service.t.cpp
@@ -24,7 +24,7 @@
*/
#include "rib/service.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/rib-io-fixture.hpp"
diff --git a/tests/daemon/table/dead-nonce-list.t.cpp b/tests/daemon/table/dead-nonce-list.t.cpp
index 1cd32eb9..b98cd00a 100644
--- a/tests/daemon/table/dead-nonce-list.t.cpp
+++ b/tests/daemon/table/dead-nonce-list.t.cpp
@@ -24,7 +24,7 @@
*/
#include "table/dead-nonce-list.hpp"
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/global-io-fixture.hpp"
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index cdda120d..1b86cd5b 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -23,7 +23,7 @@
* NFD, e.g., in COPYING.md file. If not, see .
*/
-#include "daemon/global.hpp"
+#include "common/global.hpp"
#include "face/face.hpp"
#include "face/tcp-channel.hpp"
#include "face/udp-channel.hpp"