From 9f5b01dfd8168cd6a065aad0cfd2f005c7fbb09d Mon Sep 17 00:00:00 2001 From: Junxiao Shi Date: Fri, 5 Aug 2016 03:54:28 +0000 Subject: [PATCH] core: move common.hpp to core/ Headers in core/ are now included as `#include "core/*.hpp"`. This allows NFD to rely less on include paths when used as a submodule in another codebase, such as ndnSIM and NFD-Android. refs #3127 Change-Id: Ia38f3c97427e17ff7b5401281f1fe875b5d5313e --- common.hpp => core/common.hpp | 8 ++++---- version.hpp.in => core/version.hpp.in | 20 +++++++++---------- daemon/face/ethernet-transport.hpp | 2 +- daemon/face/generic-link-service.hpp | 2 +- daemon/face/udp-protocol.hpp | 4 ++-- daemon/fw/asf-probing-module.cpp | 2 +- daemon/fw/forwarder.hpp | 2 +- daemon/fw/rtt-estimator.hpp | 18 ++++++++--------- daemon/fw/strategy-info.hpp | 16 +++++++-------- daemon/fw/strategy-registry.hpp | 2 +- daemon/main.cpp | 2 +- daemon/mgmt/command-validator.hpp | 18 ++++++++--------- daemon/mgmt/forwarder-status-manager.cpp | 4 ++-- daemon/mgmt/forwarder-status-manager.hpp | 4 ++-- daemon/mgmt/general-config-section.cpp | 16 +++++++-------- daemon/mgmt/nfd-manager-base.hpp | 2 +- daemon/mgmt/tables-config-section.cpp | 3 +-- daemon/nfd.hpp | 3 +-- daemon/table/cs-entry.hpp | 4 ++-- daemon/table/cs-internal.hpp | 4 ++-- daemon/table/cs-policy-lru.hpp | 4 ++-- daemon/table/cs-policy-priority-fifo.hpp | 1 - daemon/table/dead-nonce-list.hpp | 16 +++++++-------- daemon/table/fib-nexthop.hpp | 2 +- daemon/table/measurements-entry.hpp | 1 - daemon/table/name-tree-entry.hpp | 2 +- daemon/table/name-tree.hpp | 2 +- daemon/table/network-region-table.hpp | 4 ++-- daemon/table/strategy-choice-entry.hpp | 2 +- rib/fib-update.hpp | 4 ++-- rib/fib-updater.hpp | 4 ++-- rib/rib-update-batch.hpp | 4 ++-- rib/rib-update.hpp | 4 ++-- rib/rib.hpp | 12 ++++------- rib/route.hpp | 3 +-- rib/service.hpp | 2 +- tests/core/ndebug.t.cpp | 4 ++-- tests/core/version.t.cpp | 4 ++-- .../face/dummy-receive-link-service.hpp | 2 +- tests/daemon/face/dummy-transport.hpp | 2 +- .../mgmt/forwarder-status-manager.t.cpp | 2 +- tests/wscript | 15 +++++++------- tools/ndn-autoconfig-server.cpp | 2 +- tools/ndn-autoconfig/base.hpp | 6 ++---- tools/ndn-autoconfig/main.cpp | 4 ++-- tools/nfd-autoreg.cpp | 4 ++-- tools/nfd-status/format-helpers.hpp | 2 +- tools/nfd-status/main.cpp | 2 +- tools/nfd-status/module.hpp | 2 +- tools/nfdc.cpp | 4 ++-- wscript | 10 +++++----- 51 files changed, 129 insertions(+), 139 deletions(-) rename common.hpp => core/common.hpp (96%) rename version.hpp.in => core/version.hpp.in (79%) diff --git a/common.hpp b/core/common.hpp similarity index 96% rename from common.hpp rename to core/common.hpp index a36852b1..2f21da0a 100644 --- a/common.hpp +++ b/core/common.hpp @@ -23,10 +23,10 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#ifndef NFD_COMMON_HPP -#define NFD_COMMON_HPP +#ifndef NFD_CORE_COMMON_HPP +#define NFD_CORE_COMMON_HPP -#include "config.hpp" +#include "core/config.hpp" #ifdef WITH_TESTS #define VIRTUAL_WITH_TESTS virtual @@ -116,4 +116,4 @@ namespace signal = ndn::util::signal; } // namespace nfd -#endif // NFD_COMMON_HPP +#endif // NFD_CORE_COMMON_HPP diff --git a/version.hpp.in b/core/version.hpp.in similarity index 79% rename from version.hpp.in rename to core/version.hpp.in index 13027d48..189c9e67 100644 --- a/version.hpp.in +++ b/core/version.hpp.in @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, 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 + * Copyright (c) 2014-2016, 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. @@ -23,8 +23,8 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#ifndef NFD_VERSION_HPP -#define NFD_VERSION_HPP +#ifndef NFD_CORE_VERSION_HPP +#define NFD_CORE_VERSION_HPP namespace nfd { @@ -71,4 +71,4 @@ namespace nfd { } // namespace nfd -#endif // NFD_VERSION_HPP +#endif // NFD_CORE_VERSION_HPP diff --git a/daemon/face/ethernet-transport.hpp b/daemon/face/ethernet-transport.hpp index 348cabfb..2b1229ab 100644 --- a/daemon/face/ethernet-transport.hpp +++ b/daemon/face/ethernet-transport.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP #define NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP -#include "common.hpp" +#include "core/common.hpp" #include "transport.hpp" #include "core/network-interface.hpp" diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp index dde69907..c9adcd7f 100644 --- a/daemon/face/generic-link-service.hpp +++ b/daemon/face/generic-link-service.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP #define NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP -#include "common.hpp" +#include "core/common.hpp" #include "core/logger.hpp" #include "link-service.hpp" diff --git a/daemon/face/udp-protocol.hpp b/daemon/face/udp-protocol.hpp index 76a7bed0..5f7c25a4 100644 --- a/daemon/face/udp-protocol.hpp +++ b/daemon/face/udp-protocol.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_UDP_PROTOCOL_HPP #define NFD_DAEMON_FACE_UDP_PROTOCOL_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { namespace udp { diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp index 097a3727..d60a2154 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 "random.hpp" +#include "core/random.hpp" #include diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp index 3c804191..b561d6f2 100644 --- a/daemon/fw/forwarder.hpp +++ b/daemon/fw/forwarder.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_FW_FORWARDER_HPP #define NFD_DAEMON_FW_FORWARDER_HPP -#include "common.hpp" +#include "core/common.hpp" #include "core/scheduler.hpp" #include "forwarder-counters.hpp" #include "face-table.hpp" diff --git a/daemon/fw/rtt-estimator.hpp b/daemon/fw/rtt-estimator.hpp index a830c5ab..b6920830 100644 --- a/daemon/fw/rtt-estimator.hpp +++ b/daemon/fw/rtt-estimator.hpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 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 + * Copyright (c) 2014-2016, 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. @@ -21,12 +21,12 @@ * * 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_DAEMON_FW_RTT_ESTIMATOR_HPP #define NFD_DAEMON_FW_RTT_ESTIMATOR_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { diff --git a/daemon/fw/strategy-info.hpp b/daemon/fw/strategy-info.hpp index fecd8e19..133d53c3 100644 --- a/daemon/fw/strategy-info.hpp +++ b/daemon/fw/strategy-info.hpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, 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 + * Copyright (c) 2014-2016, 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. @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_FW_STRATEGY_INFO_HPP #define NFD_DAEMON_FW_STRATEGY_INFO_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { namespace fw { diff --git a/daemon/fw/strategy-registry.hpp b/daemon/fw/strategy-registry.hpp index 6675004a..83e9f73c 100644 --- a/daemon/fw/strategy-registry.hpp +++ b/daemon/fw/strategy-registry.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_FW_STRATEGY_REGISTRY_HPP #define NFD_DAEMON_FW_STRATEGY_REGISTRY_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { diff --git a/daemon/main.cpp b/daemon/main.cpp index 3a827c3e..6be75515 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -26,7 +26,7 @@ #include "nfd.hpp" #include "rib/service.hpp" -#include "version.hpp" +#include "core/version.hpp" #include "core/global-io.hpp" #include "core/logger.hpp" #include "core/privilege-helper.hpp" diff --git a/daemon/mgmt/command-validator.hpp b/daemon/mgmt/command-validator.hpp index b2cb184e..dc7d675d 100644 --- a/daemon/mgmt/command-validator.hpp +++ b/daemon/mgmt/command-validator.hpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 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 + * Copyright (c) 2014-2016, 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. @@ -20,13 +21,12 @@ * * 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_DAEMON_MGMT_COMMAND_VALIDATOR_HPP #define NFD_DAEMON_MGMT_COMMAND_VALIDATOR_HPP -#include "common.hpp" -#include "config-file.hpp" +#include "core/config-file.hpp" #include namespace nfd { diff --git a/daemon/mgmt/forwarder-status-manager.cpp b/daemon/mgmt/forwarder-status-manager.cpp index 486e6216..27cf4e2a 100644 --- a/daemon/mgmt/forwarder-status-manager.cpp +++ b/daemon/mgmt/forwarder-status-manager.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -25,7 +25,7 @@ #include "forwarder-status-manager.hpp" #include "fw/forwarder.hpp" -#include "version.hpp" +#include "core/version.hpp" namespace nfd { diff --git a/daemon/mgmt/forwarder-status-manager.hpp b/daemon/mgmt/forwarder-status-manager.hpp index 44c112b3..03c10e2b 100644 --- a/daemon/mgmt/forwarder-status-manager.hpp +++ b/daemon/mgmt/forwarder-status-manager.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_FORWARDER_STATUS_MANAGER_HPP #define NFD_DAEMON_MGMT_FORWARDER_STATUS_MANAGER_HPP -#include "manager-base.hpp" +#include "core/manager-base.hpp" #include namespace nfd { diff --git a/daemon/mgmt/general-config-section.cpp b/daemon/mgmt/general-config-section.cpp index ed6f99e8..2b573b3e 100644 --- a/daemon/mgmt/general-config-section.cpp +++ b/daemon/mgmt/general-config-section.cpp @@ -1,11 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014 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 + * Copyright (c) 2014-2016, 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. @@ -20,11 +21,10 @@ * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see . - **/ + */ #include "general-config-section.hpp" -#include "common.hpp" #include "core/logger.hpp" #include "core/privilege-helper.hpp" #include "core/config-file.hpp" diff --git a/daemon/mgmt/nfd-manager-base.hpp b/daemon/mgmt/nfd-manager-base.hpp index 62736240..c7f30ffb 100644 --- a/daemon/mgmt/nfd-manager-base.hpp +++ b/daemon/mgmt/nfd-manager-base.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP #define NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP -#include "common.hpp" +#include "core/common.hpp" #include "command-validator.hpp" #include "core/manager-base.hpp" diff --git a/daemon/mgmt/tables-config-section.cpp b/daemon/mgmt/tables-config-section.cpp index 773e906e..8422a5b9 100644 --- a/daemon/mgmt/tables-config-section.cpp +++ b/daemon/mgmt/tables-config-section.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -25,7 +25,6 @@ #include "tables-config-section.hpp" -#include "common.hpp" #include "core/logger.hpp" #include "core/config-file.hpp" diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp index dd97cf4d..d8fd12ea 100644 --- a/daemon/nfd.hpp +++ b/daemon/nfd.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -26,7 +26,6 @@ #ifndef NFD_DAEMON_NFD_HPP #define NFD_DAEMON_NFD_HPP -#include "common.hpp" #include "core/config-file.hpp" #include "core/scheduler.hpp" diff --git a/daemon/table/cs-entry.hpp b/daemon/table/cs-entry.hpp index fe7846c5..68289cff 100644 --- a/daemon/table/cs-entry.hpp +++ b/daemon/table/cs-entry.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_TABLE_CS_ENTRY_HPP #define NFD_DAEMON_TABLE_CS_ENTRY_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { namespace cs { diff --git a/daemon/table/cs-internal.hpp b/daemon/table/cs-internal.hpp index 3f22bcd8..acf9f520 100644 --- a/daemon/table/cs-internal.hpp +++ b/daemon/table/cs-internal.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -30,7 +30,7 @@ #ifndef NFD_DAEMON_TABLE_CS_INTERNAL_HPP #define NFD_DAEMON_TABLE_CS_INTERNAL_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { namespace cs { diff --git a/daemon/table/cs-policy-lru.hpp b/daemon/table/cs-policy-lru.hpp index 81f65bb4..2cef234d 100644 --- a/daemon/table/cs-policy-lru.hpp +++ b/daemon/table/cs-policy-lru.hpp @@ -27,7 +27,7 @@ #define NFD_DAEMON_TABLE_CS_POLICY_LRU_HPP #include "cs-policy.hpp" -#include "common.hpp" +#include "core/common.hpp" #include #include @@ -103,4 +103,4 @@ using lru::LruPolicy; } // namespace cs } // namespace nfd -#endif // NFD_DAEMON_TABLE_CS_POLICY_LRU_HPP \ No newline at end of file +#endif // NFD_DAEMON_TABLE_CS_POLICY_LRU_HPP diff --git a/daemon/table/cs-policy-priority-fifo.hpp b/daemon/table/cs-policy-priority-fifo.hpp index c453990d..436afd9a 100644 --- a/daemon/table/cs-policy-priority-fifo.hpp +++ b/daemon/table/cs-policy-priority-fifo.hpp @@ -27,7 +27,6 @@ #define NFD_DAEMON_TABLE_CS_POLICY_FIFO_HPP #include "cs-policy.hpp" -#include "common.hpp" #include "core/scheduler.hpp" namespace nfd { diff --git a/daemon/table/dead-nonce-list.hpp b/daemon/table/dead-nonce-list.hpp index 1c7f7ccc..050da35e 100644 --- a/daemon/table/dead-nonce-list.hpp +++ b/daemon/table/dead-nonce-list.hpp @@ -1,12 +1,12 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014, 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 + * Copyright (c) 2014-2016, 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. @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP #define NFD_DAEMON_TABLE_DEAD_NONCE_LIST_HPP -#include "common.hpp" +#include "core/common.hpp" #include #include #include diff --git a/daemon/table/fib-nexthop.hpp b/daemon/table/fib-nexthop.hpp index c8c006e9..83b774f2 100644 --- a/daemon/table/fib-nexthop.hpp +++ b/daemon/table/fib-nexthop.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_TABLE_FIB_NEXTHOP_HPP #define NFD_DAEMON_TABLE_FIB_NEXTHOP_HPP -#include "common.hpp" +#include "core/common.hpp" #include "face/face.hpp" namespace nfd { diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp index 933baef8..c0ec0f20 100644 --- a/daemon/table/measurements-entry.hpp +++ b/daemon/table/measurements-entry.hpp @@ -26,7 +26,6 @@ #ifndef NFD_DAEMON_TABLE_MEASUREMENTS_ENTRY_HPP #define NFD_DAEMON_TABLE_MEASUREMENTS_ENTRY_HPP -#include "common.hpp" #include "strategy-info-host.hpp" #include "core/scheduler.hpp" diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp index 23acdd01..4d7ad0c5 100644 --- a/daemon/table/name-tree-entry.hpp +++ b/daemon/table/name-tree-entry.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP #define NFD_DAEMON_TABLE_NAME_TREE_ENTRY_HPP -#include "common.hpp" +#include "core/common.hpp" #include "table/fib-entry.hpp" #include "table/pit-entry.hpp" #include "table/measurements-entry.hpp" diff --git a/daemon/table/name-tree.hpp b/daemon/table/name-tree.hpp index 460e497b..fa200348 100644 --- a/daemon/table/name-tree.hpp +++ b/daemon/table/name-tree.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_TABLE_NAME_TREE_HPP #define NFD_DAEMON_TABLE_NAME_TREE_HPP -#include "common.hpp" +#include "core/common.hpp" #include "name-tree-entry.hpp" namespace nfd { diff --git a/daemon/table/network-region-table.hpp b/daemon/table/network-region-table.hpp index 2a423a7f..663d2f50 100644 --- a/daemon/table/network-region-table.hpp +++ b/daemon/table/network-region-table.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_TABLE_NETWORK_REGION_TABLE_HPP #define NFD_DAEMON_TABLE_NETWORK_REGION_TABLE_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { diff --git a/daemon/table/strategy-choice-entry.hpp b/daemon/table/strategy-choice-entry.hpp index e02a5ab9..3a217312 100644 --- a/daemon/table/strategy-choice-entry.hpp +++ b/daemon/table/strategy-choice-entry.hpp @@ -26,7 +26,7 @@ #ifndef NFD_DAEMON_TABLE_STRATEGY_CHOICE_ENTRY_HPP #define NFD_DAEMON_TABLE_STRATEGY_CHOICE_ENTRY_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { diff --git a/rib/fib-update.hpp b/rib/fib-update.hpp index 589871ac..fb4c3383 100644 --- a/rib/fib-update.hpp +++ b/rib/fib-update.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_RIB_FIB_UPDATE_HPP #define NFD_RIB_FIB_UPDATE_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { namespace rib { diff --git a/rib/fib-updater.hpp b/rib/fib-updater.hpp index bfa09017..2d7761ae 100644 --- a/rib/fib-updater.hpp +++ b/rib/fib-updater.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_RIB_FIB_UPDATER_HPP #define NFD_RIB_FIB_UPDATER_HPP -#include "common.hpp" +#include "core/common.hpp" #include "fib-update.hpp" #include "rib.hpp" #include "rib-update-batch.hpp" diff --git a/rib/rib-update-batch.hpp b/rib/rib-update-batch.hpp index 15e9ecda..e8d63249 100644 --- a/rib/rib-update-batch.hpp +++ b/rib/rib-update-batch.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_RIB_RIB_UPDATE_BATCH_HPP #define NFD_RIB_RIB_UPDATE_BATCH_HPP -#include "common.hpp" +#include "core/common.hpp" #include "rib-update.hpp" namespace nfd { diff --git a/rib/rib-update.hpp b/rib/rib-update.hpp index 4b9d5dd5..cd2b6d7d 100644 --- a/rib/rib-update.hpp +++ b/rib/rib-update.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, 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_RIB_RIB_UPDATE_HPP #define NFD_RIB_RIB_UPDATE_HPP -#include "common.hpp" +#include "core/common.hpp" #include "route.hpp" namespace nfd { diff --git a/rib/rib.hpp b/rib/rib.hpp index 2e13692e..db452b40 100644 --- a/rib/rib.hpp +++ b/rib/rib.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -26,8 +26,6 @@ #ifndef NFD_RIB_RIB_HPP #define NFD_RIB_RIB_HPP -#include "common.hpp" - #include "rib-entry.hpp" #include "rib-update-batch.hpp" @@ -131,6 +129,9 @@ public: void onRouteExpiration(const Name& prefix, const Route& route); + void + insert(const Name& prefix, const Route& route); + private: /** \brief adds the passed update to a RibUpdateBatch and adds the batch to * the end of the update queue. @@ -161,11 +162,6 @@ PUBLIC_WITH_TESTS_ELSE_PRIVATE: // Used by RibManager unit-tests to get sent batch to simulate successful FIB update function m_onSendBatchFromQueue; -public: - void - insert(const Name& prefix, const Route& route); - -PUBLIC_WITH_TESTS_ELSE_PRIVATE: void erase(const Name& prefix, const Route& route); diff --git a/rib/route.hpp b/rib/route.hpp index 9e0935ab..b93ed0c0 100644 --- a/rib/route.hpp +++ b/rib/route.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -26,7 +26,6 @@ #ifndef NFD_RIB_ROUTE_HPP #define NFD_RIB_ROUTE_HPP -#include "common.hpp" #include "core/scheduler.hpp" #include diff --git a/rib/service.hpp b/rib/service.hpp index 5cb60d93..ae7b23f9 100644 --- a/rib/service.hpp +++ b/rib/service.hpp @@ -26,7 +26,7 @@ #ifndef NFD_RIB_SERVICE_HPP #define NFD_RIB_SERVICE_HPP -#include "common.hpp" +#include "core/common.hpp" #include "core/config-file.hpp" #include diff --git a/tests/core/ndebug.t.cpp b/tests/core/ndebug.t.cpp index 5ef4d1db..a624b6be 100644 --- a/tests/core/ndebug.t.cpp +++ b/tests/core/ndebug.t.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -23,7 +23,7 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#include "common.hpp" +#include "core/common.hpp" #include "tests/test-common.hpp" diff --git a/tests/core/version.t.cpp b/tests/core/version.t.cpp index a8f985df..bf8d4673 100644 --- a/tests/core/version.t.cpp +++ b/tests/core/version.t.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -23,7 +23,7 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#include "version.hpp" +#include "core/version.hpp" #include "core/logger.hpp" #include "tests/test-common.hpp" diff --git a/tests/daemon/face/dummy-receive-link-service.hpp b/tests/daemon/face/dummy-receive-link-service.hpp index 1d406538..389c0d97 100644 --- a/tests/daemon/face/dummy-receive-link-service.hpp +++ b/tests/daemon/face/dummy-receive-link-service.hpp @@ -26,7 +26,7 @@ #ifndef NFD_TESTS_DAEMON_FACE_DUMMY_RECEIVE_LINK_SERVICE_HPP #define NFD_TESTS_DAEMON_FACE_DUMMY_RECEIVE_LINK_SERVICE_HPP -#include "common.hpp" +#include "core/common.hpp" #include "face/link-service.hpp" diff --git a/tests/daemon/face/dummy-transport.hpp b/tests/daemon/face/dummy-transport.hpp index 4dfda768..951b1a51 100644 --- a/tests/daemon/face/dummy-transport.hpp +++ b/tests/daemon/face/dummy-transport.hpp @@ -26,7 +26,7 @@ #ifndef NFD_TESTS_DAEMON_FACE_DUMMY_TRANSPORT_HPP #define NFD_TESTS_DAEMON_FACE_DUMMY_TRANSPORT_HPP -#include "common.hpp" +#include "core/common.hpp" #include "face/transport.hpp" diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp index c38482b1..c267943b 100644 --- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp +++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp @@ -24,7 +24,7 @@ */ #include "mgmt/forwarder-status-manager.hpp" -#include "version.hpp" +#include "core/version.hpp" #include "nfd-manager-common-fixture.hpp" diff --git a/tests/wscript b/tests/wscript index dc82fe66..0ab7ec64 100644 --- a/tests/wscript +++ b/tests/wscript @@ -1,12 +1,13 @@ # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- """ -Copyright (c) 2014 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 +Copyright (c) 2014-2016, 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. @@ -36,7 +37,7 @@ def build(bld): features='cxx pch', source=bld.path.ant_glob(['*.cpp'], excl='main.cpp'), use='core-objects', - headers='../common.hpp boost-test.hpp', + headers='../core/common.hpp boost-test.hpp', defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % bld.bldnode, ) diff --git a/tools/ndn-autoconfig-server.cpp b/tools/ndn-autoconfig-server.cpp index 84bcf748..50632ee8 100644 --- a/tools/ndn-autoconfig-server.cpp +++ b/tools/ndn-autoconfig-server.cpp @@ -23,7 +23,7 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#include "version.hpp" +#include "core/version.hpp" #include #include #include diff --git a/tools/ndn-autoconfig/base.hpp b/tools/ndn-autoconfig/base.hpp index bf195c6a..d69f49c6 100644 --- a/tools/ndn-autoconfig/base.hpp +++ b/tools/ndn-autoconfig/base.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -26,9 +26,7 @@ #ifndef NFD_TOOLS_NDN_AUTOCONFIG_BASE_HPP #define NFD_TOOLS_NDN_AUTOCONFIG_BASE_HPP -#include "common.hpp" - -#include +#include "core/common.hpp" #include #include diff --git a/tools/ndn-autoconfig/main.cpp b/tools/ndn-autoconfig/main.cpp index 1708bdb1..666cca16 100644 --- a/tools/ndn-autoconfig/main.cpp +++ b/tools/ndn-autoconfig/main.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -23,7 +23,7 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#include "version.hpp" +#include "core/version.hpp" #include "multicast-discovery.hpp" #include "guess-from-search-domains.hpp" diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp index 6cc32888..b21fe6d2 100644 --- a/tools/nfd-autoreg.cpp +++ b/tools/nfd-autoreg.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -37,7 +37,7 @@ #include #include -#include "version.hpp" +#include "core/version.hpp" #include "core/network.hpp" using namespace ndn::nfd; diff --git a/tools/nfd-status/format-helpers.hpp b/tools/nfd-status/format-helpers.hpp index 11d3d5ac..f98d8f1c 100644 --- a/tools/nfd-status/format-helpers.hpp +++ b/tools/nfd-status/format-helpers.hpp @@ -26,7 +26,7 @@ #ifndef NFD_TOOLS_NFD_STATUS_FORMAT_HELPERS_HPP #define NFD_TOOLS_NFD_STATUS_FORMAT_HELPERS_HPP -#include "common.hpp" +#include "core/common.hpp" namespace nfd { namespace tools { diff --git a/tools/nfd-status/main.cpp b/tools/nfd-status/main.cpp index a3033a62..b43e4cc8 100644 --- a/tools/nfd-status/main.cpp +++ b/tools/nfd-status/main.cpp @@ -23,7 +23,7 @@ * NFD, e.g., in COPYING.md file. If not, see . */ -#include "version.hpp" +#include "core/version.hpp" #include #include diff --git a/tools/nfd-status/module.hpp b/tools/nfd-status/module.hpp index 07d56477..bf1b90c2 100644 --- a/tools/nfd-status/module.hpp +++ b/tools/nfd-status/module.hpp @@ -26,7 +26,7 @@ #ifndef NFD_TOOLS_NFD_STATUS_MODULE_HPP #define NFD_TOOLS_NFD_STATUS_MODULE_HPP -#include "common.hpp" +#include "core/common.hpp" #include namespace nfd { diff --git a/tools/nfdc.cpp b/tools/nfdc.cpp index fcb808f6..31ce4f39 100644 --- a/tools/nfdc.cpp +++ b/tools/nfdc.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** - * Copyright (c) 2014-2015, Regents of the University of California, + * Copyright (c) 2014-2016, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -24,7 +24,7 @@ */ #include "nfdc.hpp" -#include "version.hpp" +#include "core/version.hpp" #include #include diff --git a/wscript b/wscript index f7b9cd96..54cbe4e1 100644 --- a/wscript +++ b/wscript @@ -156,15 +156,15 @@ main(int, char**) if not conf.options.debug: conf.define('NDEBUG', 1) - conf.write_config_header('config.hpp') + conf.write_config_header('core/config.hpp') def build(bld): version(bld) bld(features="subst", name='version', - source='version.hpp.in', - target='version.hpp', + source='core/version.hpp.in', + target='core/version.hpp', install_path=None, VERSION_STRING=VERSION_BASE, VERSION_BUILD=VERSION, @@ -184,8 +184,8 @@ def build(bld): excl=['core/logger*.cpp']), use='version NDN_CXX BOOST LIBRT', includes='. core', - export_includes='. core', - headers='common.hpp', + export_includes='.', + headers='core/common.hpp' ) if bld.env['HAVE_CUSTOM_LOGGER']: