core: slim down `common.hpp`
Change-Id: I875c35147edd2261fbaa24e809c170d5cd9b94d3
diff --git a/core/common.hpp b/core/common.hpp
index cc999d8..06b8ede 100644
--- a/core/common.hpp
+++ b/core/common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,12 +46,8 @@
#include <cstddef>
#include <cstdint>
-#include <functional>
-#include <limits>
-#include <map>
#include <memory>
#include <optional>
-#include <set>
#include <stdexcept>
#include <string>
#include <string_view>
@@ -63,10 +59,8 @@
#include <ndn-cxx/name.hpp>
#include <ndn-cxx/encoding/block.hpp>
#include <ndn-cxx/lp/nack.hpp>
-#include <ndn-cxx/net/face-uri.hpp>
#include <ndn-cxx/util/backports.hpp>
#include <ndn-cxx/util/exception.hpp>
-#include <ndn-cxx/util/scheduler.hpp>
#include <ndn-cxx/util/signal.hpp>
#include <ndn-cxx/util/span.hpp>
#include <ndn-cxx/util/time.hpp>
@@ -84,11 +78,6 @@
using std::make_shared;
using std::make_unique;
-using std::static_pointer_cast;
-using std::dynamic_pointer_cast;
-using std::const_pointer_cast;
-
-using std::to_string;
using namespace std::string_literals;
using namespace std::string_view_literals;
@@ -97,11 +86,9 @@
using ndn::span;
using ndn::Block;
using ndn::Data;
-using ndn::FaceUri;
using ndn::Interest;
using ndn::Name;
using ndn::PartialName;
-using ndn::Scheduler;
// Not using a namespace alias (namespace tlv = ndn::tlv), because
// it doesn't allow NFD to add other members to the namespace
@@ -111,7 +98,6 @@
namespace lp = ndn::lp;
namespace name = ndn::name;
-namespace scheduler = ndn::scheduler;
namespace signal = ndn::signal;
namespace time = ndn::time;
diff --git a/daemon/common/config-file.cpp b/daemon/common/config-file.cpp
index a71bade..ef1eed0 100644
--- a/daemon/common/config-file.cpp
+++ b/daemon/common/config-file.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -106,7 +106,7 @@
}
catch (const boost::property_tree::info_parser_error& error) {
NDN_THROW(Error("Failed to parse configuration file " + filename +
- ": " + error.message() + " on line " + to_string(error.line())));
+ ": " + error.message() + " on line " + std::to_string(error.line())));
}
process(isDryRun, filename);
diff --git a/daemon/common/config-file.hpp b/daemon/common/config-file.hpp
index 06cd70b..7be8306 100644
--- a/daemon/common/config-file.hpp
+++ b/daemon/common/config-file.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,9 @@
#include <boost/property_tree/ptree.hpp>
+#include <functional>
+#include <map>
+
namespace nfd {
/**
@@ -140,9 +143,9 @@
static_assert(std::is_integral_v<T>);
if (value < min || value > max) {
- NDN_THROW(Error("Invalid value '" + to_string(value) + "' for option '" + key +
+ NDN_THROW(Error("Invalid value '" + std::to_string(value) + "' for option '" + key +
"' in section '" + sectionName + "': out of acceptable range [" +
- to_string(min) + ", " + to_string(max) + "]"));
+ std::to_string(min) + ", " + std::to_string(max) + "]"));
}
}
diff --git a/daemon/common/global.cpp b/daemon/common/global.cpp
index a9848cd..7dde3b8 100644
--- a/daemon/common/global.cpp
+++ b/daemon/common/global.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,8 +27,8 @@
namespace nfd {
-static thread_local unique_ptr<boost::asio::io_context> g_ioCtx;
-static thread_local unique_ptr<Scheduler> g_scheduler;
+static thread_local std::unique_ptr<boost::asio::io_context> g_ioCtx;
+static thread_local std::unique_ptr<ndn::Scheduler> g_scheduler;
static boost::asio::io_context* g_mainIoCtx = nullptr;
static boost::asio::io_context* g_ribIoCtx = nullptr;
@@ -36,16 +36,16 @@
getGlobalIoService()
{
if (g_ioCtx == nullptr) {
- g_ioCtx = make_unique<boost::asio::io_context>();
+ g_ioCtx = std::make_unique<boost::asio::io_context>();
}
return *g_ioCtx;
}
-Scheduler&
+ndn::Scheduler&
getScheduler()
{
if (g_scheduler == nullptr) {
- g_scheduler = make_unique<Scheduler>(getGlobalIoService());
+ g_scheduler = std::make_unique<ndn::Scheduler>(getGlobalIoService());
}
return *g_scheduler;
}
diff --git a/daemon/common/global.hpp b/daemon/common/global.hpp
index 3ee072d..3342df5 100644
--- a/daemon/common/global.hpp
+++ b/daemon/common/global.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023 Regents of the University of California,
+ * Copyright (c) 2014-2024 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,9 +25,10 @@
#ifndef NFD_DAEMON_COMMON_GLOBAL_HPP
#define NFD_DAEMON_COMMON_GLOBAL_HPP
-#include "core/common.hpp"
+#include "core/config.hpp"
#include <boost/asio/io_context.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
namespace nfd {
@@ -40,7 +41,7 @@
/**
* \brief Returns the global Scheduler instance for the calling thread.
*/
-Scheduler&
+ndn::Scheduler&
getScheduler();
boost::asio::io_context&
diff --git a/daemon/common/privilege-helper.cpp b/daemon/common/privilege-helper.cpp
index eb8e608..8071f23 100644
--- a/daemon/common/privilege-helper.cpp
+++ b/daemon/common/privilege-helper.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -123,11 +123,11 @@
NFD_LOG_TRACE("dropping to effective gid=" << s_normalGid);
if (::setegid(s_normalGid) != 0)
- throw Error("Failed to drop to effective gid=" + to_string(s_normalGid));
+ throw Error("Failed to drop to effective gid=" + std::to_string(s_normalGid));
NFD_LOG_TRACE("dropping to effective uid=" << s_normalUid);
if (::seteuid(s_normalUid) != 0)
- throw Error("Failed to drop to effective uid=" + to_string(s_normalUid));
+ throw Error("Failed to drop to effective uid=" + std::to_string(s_normalUid));
NFD_LOG_INFO("dropped to effective uid=" << ::geteuid() << " gid=" << ::getegid());
#else
@@ -144,11 +144,11 @@
NFD_LOG_TRACE("elevating to effective uid=" << s_privilegedUid);
if (::seteuid(s_privilegedUid) != 0)
- throw Error("Failed to elevate to effective uid=" + to_string(s_privilegedUid));
+ throw Error("Failed to elevate to effective uid=" + std::to_string(s_privilegedUid));
NFD_LOG_TRACE("elevating to effective gid=" << s_privilegedGid);
if (::setegid(s_privilegedGid) != 0)
- throw Error("Failed to elevate to effective gid=" + to_string(s_privilegedGid));
+ throw Error("Failed to elevate to effective gid=" + std::to_string(s_privilegedGid));
NFD_LOG_INFO("elevated to effective uid=" << ::geteuid() << " gid=" << ::getegid());
#else
diff --git a/daemon/face/channel.hpp b/daemon/face/channel.hpp
index 19fcd35..3ecb986 100644
--- a/daemon/face/channel.hpp
+++ b/daemon/face/channel.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "channel-log.hpp"
#include "face-common.hpp"
+#include <functional>
+
namespace nfd::face {
/** \brief Represents a channel that listens on a local endpoint.
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index dfd5bf3..1ac0625 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.cpp
@@ -217,7 +217,7 @@
if (!isListening())
return;
- std::string filter = "(ether proto " + to_string(ethernet::ETHERTYPE_NDN) +
+ std::string filter = "(ether proto " + std::to_string(ethernet::ETHERTYPE_NDN) +
") && (ether dst " + m_localEndpoint->getEthernetAddress().toString() + ")";
for (const auto& addr : m_channelFaces | boost::adaptors::map_keys) {
filter += " && (not ether src " + addr.toString() + ")";
diff --git a/daemon/face/ethernet-channel.hpp b/daemon/face/ethernet-channel.hpp
index c675a52..86a3bc8 100644
--- a/daemon/face/ethernet-channel.hpp
+++ b/daemon/face/ethernet-channel.hpp
@@ -33,6 +33,8 @@
#include <boost/asio/posix/stream_descriptor.hpp>
#include <ndn-cxx/net/network-interface.hpp>
+#include <map>
+
namespace nfd::face {
/**
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index 1908cac..175a7d5 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -199,7 +199,7 @@
if (req.params.mtu && *req.params.mtu < MIN_MTU) {
// The specified MTU must be greater than the minimum possible
NFD_LOG_TRACE("createFace: override MTU cannot be less than " << MIN_MTU);
- onFailure(406, "Override MTU cannot be less than " + to_string(MIN_MTU));
+ onFailure(406, "Override MTU cannot be less than " + std::to_string(MIN_MTU));
return;
}
diff --git a/daemon/face/ethernet-protocol.cpp b/daemon/face/ethernet-protocol.cpp
index 137ff27..3d96d17 100644
--- a/daemon/face/ethernet-protocol.cpp
+++ b/daemon/face/ethernet-protocol.cpp
@@ -33,7 +33,7 @@
checkFrameHeader(span<const uint8_t> packet, const Address& localAddr, const Address& destAddr)
{
if (packet.size() < HDR_LEN + MIN_DATA_LEN)
- return {nullptr, "Received frame too short: " + to_string(packet.size()) + " bytes"};
+ return {nullptr, "Received frame too short: " + std::to_string(packet.size()) + " bytes"};
const ether_header* eh = reinterpret_cast<const ether_header*>(packet.data());
@@ -41,7 +41,7 @@
// make sure we do not process those frames (see #3348)
uint16_t ethertype = boost::endian::big_to_native(eh->ether_type);
if (ethertype != ETHERTYPE_NDN)
- return {nullptr, "Received frame with wrong ethertype: " + to_string(ethertype)};
+ return {nullptr, "Received frame with wrong ethertype: " + std::to_string(ethertype)};
#ifndef NDEBUG
Address shost(eh->ether_shost);
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index 43f7e91..9ddbdb7 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -133,8 +133,8 @@
if (sent < 0)
handleError("Send operation failed: " + m_pcap.getLastError());
else if (static_cast<size_t>(sent) < buffer.size())
- handleError("Failed to send the full frame: size=" + to_string(buffer.size()) +
- " sent=" + to_string(sent));
+ handleError("Failed to send the full frame: size=" + std::to_string(buffer.size()) +
+ " sent=" + std::to_string(sent));
else
// print block size because we don't want to count the padding in buffer
NFD_LOG_FACE_TRACE("Successfully sent: " << block.size() << " bytes");
diff --git a/daemon/face/face-common.hpp b/daemon/face/face-common.hpp
index 18ca03c..bdaa3df 100644
--- a/daemon/face/face-common.hpp
+++ b/daemon/face/face-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,7 @@
#include "common/logger.hpp"
#include <ndn-cxx/encoding/nfd-constants.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
#include <boost/logic/tribool.hpp>
#include <variant>
@@ -76,10 +77,11 @@
*/
using EndpointId = std::variant<std::monostate, ethernet::Address, udp::Endpoint>;
-/** \brief Parameters used to set Transport properties or LinkService options on a newly created face.
+/**
+ * \brief Parameters used to set Transport properties or LinkService options on a newly created face.
*
- * Parameters are passed as a struct rather than individually, so that a future change in the list
- * of parameters does not require an update to the method signature in all subclasses.
+ * Parameters are passed as a struct rather than individually, so that a future change in the list
+ * of parameters does not require an update to the method signature in all subclasses.
*/
struct FaceParams
{
@@ -92,13 +94,14 @@
boost::logic::tribool wantCongestionMarking = boost::logic::indeterminate;
};
-/** \brief For internal use by FaceLogging macros.
+/**
+ * \brief For internal use by FaceLogging macros.
*
- * FaceLogHelper wraps a reference to Face, LinkService, or Transport object.
+ * FaceLogHelper wraps a reference to Face, LinkService, or Transport object.
*
- * `std::ostream& operator<<(std::ostream& os, const FaceLogHelper<T>& flh)`
- * should be specialized to print "[id=888,local=scheme://local/uri,remote=scheme://remote/uri] "
- * which will appear as part of the log message.
+ * `std::ostream& operator<<(std::ostream& os, const FaceLogHelper<T>& flh)`
+ * should be specialized to print "[id=888,local=scheme://local/uri,remote=scheme://remote/uri] "
+ * which will appear as part of the log message.
*/
template<typename T>
class FaceLogHelper
@@ -118,10 +121,12 @@
using face::EndpointId;
using face::FaceId;
+using ::ndn::FaceUri;
} // namespace nfd
-/** \defgroup FaceLogging Face logging macros
+/**
+ * \defgroup FaceLogging Face logging macros.
*
* These macros augment the log message with some face-specific information,
* such as the face ID, that are useful to distinguish which face produced the
diff --git a/daemon/face/face-system.hpp b/daemon/face/face-system.hpp
index 36148df..6441ee7 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-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,6 +32,9 @@
#include <ndn-cxx/net/network-interface.hpp>
#include <ndn-cxx/net/network-monitor.hpp>
+#include <map>
+#include <set>
+
namespace nfd {
class FaceTable;
diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp
index 547ca67..dba7e85 100644
--- a/daemon/face/generic-link-service.hpp
+++ b/daemon/face/generic-link-service.hpp
@@ -31,6 +31,8 @@
#include "lp-reassembler.hpp"
#include "lp-reliability.hpp"
+#include <limits>
+
namespace nfd::face {
/** \brief Counters provided by GenericLinkService.
diff --git a/daemon/face/lp-reassembler.hpp b/daemon/face/lp-reassembler.hpp
index 1908ccc..dbb9b9f 100644
--- a/daemon/face/lp-reassembler.hpp
+++ b/daemon/face/lp-reassembler.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,9 @@
#include <ndn-cxx/lp/packet.hpp>
#include <ndn-cxx/lp/sequence.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
+
+#include <map>
namespace nfd::face {
@@ -106,7 +109,7 @@
std::vector<lp::Packet> fragments;
size_t fragCount; ///< total fragments
size_t nReceivedFragments; ///< number of received fragments
- scheduler::ScopedEventId dropTimer;
+ ndn::scheduler::ScopedEventId dropTimer;
};
/**
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index 107212e..4f26e5d 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.cpp
@@ -30,6 +30,8 @@
#include <ndn-cxx/lp/fields.hpp>
+#include <set>
+
namespace nfd::face {
NFD_LOG_INIT(LpReliability);
diff --git a/daemon/face/lp-reliability.hpp b/daemon/face/lp-reliability.hpp
index 3a4d703..0324304 100644
--- a/daemon/face/lp-reliability.hpp
+++ b/daemon/face/lp-reliability.hpp
@@ -31,7 +31,9 @@
#include <ndn-cxx/lp/packet.hpp>
#include <ndn-cxx/lp/sequence.hpp>
#include <ndn-cxx/util/rtt-estimator.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
+#include <map>
#include <queue>
namespace nfd::face {
@@ -181,7 +183,7 @@
public:
lp::Packet pkt;
- scheduler::ScopedEventId rtoTimer;
+ ndn::scheduler::ScopedEventId rtoTimer;
time::steady_clock::time_point sendTime = time::steady_clock::now();
size_t retxCount = 0;
size_t nGreaterSeqAcks = 0; ///< Number of Acks received for sequences greater than this fragment
@@ -219,7 +221,7 @@
std::map<lp::Sequence, time::steady_clock::time_point> m_recentRecvSeqs;
std::queue<lp::Sequence> m_recentRecvSeqsQueue;
lp::Sequence m_lastTxSeqNo;
- scheduler::ScopedEventId m_idleAckTimer;
+ ndn::scheduler::ScopedEventId m_idleAckTimer;
ndn::util::RttEstimator m_rttEst;
};
diff --git a/daemon/face/netdev-bound.hpp b/daemon/face/netdev-bound.hpp
index 68cbdc6..600e695 100644
--- a/daemon/face/netdev-bound.hpp
+++ b/daemon/face/netdev-bound.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,7 +33,8 @@
class FaceSystem;
-/** \brief Manages netdev-bound faces.
+/**
+ * \brief Manages netdev-bound faces.
*/
class NetdevBound : noncopyable
{
@@ -42,7 +43,7 @@
{
public:
RuleParseError(int index, std::string msg)
- : Error("Error parsing face_system.netdev_bound.rule[" + to_string(index) + "]: " + msg)
+ : Error("Error parsing face_system.netdev_bound.rule[" + std::to_string(index) + "]: " + msg)
, index(index)
, msg(std::move(msg))
{
diff --git a/daemon/face/network-predicate.hpp b/daemon/face/network-predicate.hpp
index 815afcc..0147d78 100644
--- a/daemon/face/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-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,6 +33,8 @@
#include <ndn-cxx/net/network-interface.hpp>
+#include <set>
+
namespace nfd::face {
class NetworkPredicateBase : private boost::equality_comparable<NetworkPredicateBase>
diff --git a/daemon/face/protocol-factory.hpp b/daemon/face/protocol-factory.hpp
index c490e07..56095bb 100644
--- a/daemon/face/protocol-factory.hpp
+++ b/daemon/face/protocol-factory.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,6 +33,10 @@
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
+#include <functional>
+#include <map>
+#include <set>
+
namespace nfd::face {
/**
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index fbfd17d..b12b754 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -188,7 +188,7 @@
const tcp::Endpoint& remoteEndpoint,
const shared_ptr<ip::tcp::socket>& socket,
const FaceParams& params,
- const scheduler::EventId& connectTimeoutEvent,
+ const ndn::scheduler::EventId& connectTimeoutEvent,
const FaceCreatedCallback& onFaceCreated,
const FaceCreationFailedCallback& onConnectFailed)
{
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index cc000ea..6bdc4b9 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,12 @@
#include "channel.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <boost/asio/ip/tcp.hpp>
+#include <map>
+
namespace nfd::tcp {
using Endpoint = boost::asio::ip::tcp::endpoint;
} // namespace nfd::tcp
@@ -109,7 +113,7 @@
const tcp::Endpoint& remoteEndpoint,
const shared_ptr<boost::asio::ip::tcp::socket>& socket,
const FaceParams& params,
- const scheduler::EventId& connectTimeoutEvent,
+ const ndn::scheduler::EventId& connectTimeoutEvent,
const FaceCreatedCallback& onFaceCreated,
const FaceCreationFailedCallback& onConnectFailed);
diff --git a/daemon/face/tcp-transport.hpp b/daemon/face/tcp-transport.hpp
index 2b088bb..c31c9cb 100644
--- a/daemon/face/tcp-transport.hpp
+++ b/daemon/face/tcp-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "stream-transport.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <boost/asio/ip/tcp.hpp>
namespace nfd::face {
@@ -94,7 +96,7 @@
boost::asio::ip::tcp::endpoint m_remoteEndpoint;
// The following members are valid only when the persistency is set to permanent
- scheduler::ScopedEventId m_reconnectEvent;
+ ndn::scheduler::ScopedEventId m_reconnectEvent;
time::milliseconds m_nextReconnectWait;
};
diff --git a/daemon/face/udp-channel.hpp b/daemon/face/udp-channel.hpp
index 8c96b09..c7d10fd 100644
--- a/daemon/face/udp-channel.hpp
+++ b/daemon/face/udp-channel.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,7 @@
#include "udp-protocol.hpp"
#include <array>
+#include <map>
namespace nfd::face {
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index be3f87e..5281303 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -281,7 +281,7 @@
if (req.params.mtu && *req.params.mtu < MIN_MTU) {
// The specified MTU must be greater than the minimum possible
NFD_LOG_TRACE("createFace: override MTU cannot be less than " << MIN_MTU);
- onFailure(406, "Override MTU cannot be less than " + to_string(MIN_MTU));
+ onFailure(406, "Override MTU cannot be less than " + std::to_string(MIN_MTU));
return;
}
diff --git a/daemon/face/udp-protocol.cpp b/daemon/face/udp-protocol.cpp
index bfddd43..e0a590d 100644
--- a/daemon/face/udp-protocol.cpp
+++ b/daemon/face/udp-protocol.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,6 +25,8 @@
#include "udp-protocol.hpp"
+#include <limits>
+
namespace nfd::udp {
ssize_t
diff --git a/daemon/face/unicast-ethernet-transport.hpp b/daemon/face/unicast-ethernet-transport.hpp
index 22e943e..fb5a745 100644
--- a/daemon/face/unicast-ethernet-transport.hpp
+++ b/daemon/face/unicast-ethernet-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "ethernet-transport.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
namespace nfd::face {
/**
@@ -57,7 +59,7 @@
private:
const time::nanoseconds m_idleTimeout;
- scheduler::ScopedEventId m_closeIfIdleEvent;
+ ndn::scheduler::ScopedEventId m_closeIfIdleEvent;
};
} // namespace nfd::face
diff --git a/daemon/face/unicast-udp-transport.hpp b/daemon/face/unicast-udp-transport.hpp
index 4aa7233..fd6d645 100644
--- a/daemon/face/unicast-udp-transport.hpp
+++ b/daemon/face/unicast-udp-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "datagram-transport.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <boost/asio/ip/udp.hpp>
namespace nfd::face {
@@ -57,7 +59,7 @@
private:
const time::nanoseconds m_idleTimeout;
- scheduler::ScopedEventId m_closeIfIdleEvent;
+ ndn::scheduler::ScopedEventId m_closeIfIdleEvent;
};
} // namespace nfd::face
diff --git a/daemon/face/websocket-channel.hpp b/daemon/face/websocket-channel.hpp
index a793a7c..aeae9cc 100644
--- a/daemon/face/websocket-channel.hpp
+++ b/daemon/face/websocket-channel.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "channel.hpp"
#include "websocketpp.hpp"
+#include <map>
+
namespace nfd::websocket {
using Endpoint = boost::asio::ip::tcp::endpoint;
} // namespace nfd::websocket
diff --git a/daemon/face/websocket-transport.hpp b/daemon/face/websocket-transport.hpp
index 0dcb530..3f08d79 100644
--- a/daemon/face/websocket-transport.hpp
+++ b/daemon/face/websocket-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "transport.hpp"
#include "websocketpp.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
namespace nfd::face {
/** \brief Counters provided by WebSocketTransport.
@@ -96,7 +98,7 @@
websocketpp::connection_hdl m_handle;
websocket::Server& m_server;
time::milliseconds m_pingInterval;
- scheduler::ScopedEventId m_pingEventId;
+ ndn::scheduler::ScopedEventId m_pingEventId;
};
inline const WebSocketTransport::Counters&
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 688867f..0070a3e 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -43,7 +43,8 @@
NDN_THROW(std::invalid_argument("AccessStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument("AccessStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("AccessStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
}
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index 194c9ca..324fea8 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -80,7 +80,7 @@
}
public:
- scheduler::ScopedEventId rtoTimer;
+ ndn::scheduler::ScopedEventId rtoTimer;
};
/** \brief StrategyInfo in measurements table.
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index df1f4ff..957e3a0 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,7 @@
namespace nfd::fw::asf {
time::nanoseconds
-FaceInfo::scheduleTimeout(const Name& interestName, scheduler::EventCallback cb)
+FaceInfo::scheduleTimeout(const Name& interestName, ndn::scheduler::EventCallback cb)
{
BOOST_ASSERT(!m_timeoutEvent);
m_lastInterestName = interestName;
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index bfed7ca..4883315 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -53,7 +53,7 @@
}
time::nanoseconds
- scheduleTimeout(const Name& interestName, scheduler::EventCallback cb);
+ scheduleTimeout(const Name& interestName, ndn::scheduler::EventCallback cb);
void
cancelTimeout(const Name& prefix);
@@ -113,11 +113,11 @@
size_t m_nTimeouts = 0;
// Timeout associated with measurement
- scheduler::ScopedEventId m_measurementExpiration;
+ ndn::scheduler::ScopedEventId m_measurementExpiration;
friend class NamespaceInfo;
// RTO associated with Interest
- scheduler::ScopedEventId m_timeoutEvent;
+ ndn::scheduler::ScopedEventId m_timeoutEvent;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 25e0ac3..fb07db2 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -172,7 +172,7 @@
}
else {
NDN_THROW(std::invalid_argument("Probing interval must be >= " +
- to_string(MIN_PROBING_INTERVAL.count()) + " milliseconds"));
+ std::to_string(MIN_PROBING_INTERVAL.count()) + " milliseconds"));
}
}
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index 8ff31a2..7695095 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -39,8 +39,8 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument(
- "AsfStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("AsfStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
StrategyParameters params = parseParameters(parsed.parameters);
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index a275b3a..45935b1 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,8 +38,8 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument(
- "BestRouteStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("BestRouteStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
StrategyParameters params = parseParameters(parsed.parameters);
diff --git a/daemon/fw/face-table.hpp b/daemon/fw/face-table.hpp
index b19530d..dd61ca8 100644
--- a/daemon/fw/face-table.hpp
+++ b/daemon/fw/face-table.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
#include <boost/range/adaptor/indirected.hpp>
#include <boost/range/adaptor/map.hpp>
+#include <map>
+
namespace nfd {
/**
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 678f52a..08eda9a 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,8 +38,8 @@
{
ParsedInstanceName parsed = parseInstanceName(name);
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument(
- "MulticastStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("MulticastStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
StrategyParameters params = parseParameters(parsed.parameters);
diff --git a/daemon/fw/random-strategy.cpp b/daemon/fw/random-strategy.cpp
index a7ba224..1cda978 100644
--- a/daemon/fw/random-strategy.cpp
+++ b/daemon/fw/random-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -42,8 +42,8 @@
NDN_THROW(std::invalid_argument("RandomStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument(
- "RandomStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("RandomStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
}
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index acf1f22..7cb14c4 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -52,8 +52,8 @@
NDN_THROW(std::invalid_argument("SelfLearningStrategy does not accept parameters"));
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument(
- "SelfLearningStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("SelfLearningStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
}
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 5e99d6a..460fbdc 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,10 @@
#include <boost/lexical_cast/try_lexical_convert.hpp>
+#include <functional>
+#include <map>
+#include <set>
+
namespace nfd::fw {
class StrategyParameters;
diff --git a/daemon/fw/unsolicited-data-policy.hpp b/daemon/fw/unsolicited-data-policy.hpp
index ec9984b..fe113b5 100644
--- a/daemon/fw/unsolicited-data-policy.hpp
+++ b/daemon/fw/unsolicited-data-policy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,10 @@
#include "face/face.hpp"
+#include <functional>
+#include <map>
+#include <set>
+
namespace nfd::fw {
/**
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 725b7b6..cc3c58a 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -291,9 +291,9 @@
}
const std::string boostBuildInfo =
- "with Boost version " + to_string(BOOST_VERSION / 100000) +
- "." + to_string(BOOST_VERSION / 100 % 1000) +
- "." + to_string(BOOST_VERSION % 100);
+ "with Boost version " + std::to_string(BOOST_VERSION / 100000) +
+ "." + std::to_string(BOOST_VERSION / 100 % 1000) +
+ "." + std::to_string(BOOST_VERSION % 100);
const std::string pcapBuildInfo =
#ifdef NFD_HAVE_LIBPCAP
"with " + std::string(pcap_lib_version());
@@ -302,9 +302,9 @@
#endif
const std::string wsBuildInfo =
#ifdef NFD_HAVE_WEBSOCKET
- "with WebSocket++ version " + to_string(websocketpp::major_version) +
- "." + to_string(websocketpp::minor_version) +
- "." + to_string(websocketpp::patch_version);
+ "with WebSocket++ version " + std::to_string(websocketpp::major_version) +
+ "." + std::to_string(websocketpp::minor_version) +
+ "." + std::to_string(websocketpp::patch_version);
#else
"without WebSocket++";
#endif
diff --git a/daemon/mgmt/command-authenticator.cpp b/daemon/mgmt/command-authenticator.cpp
index 17651e9..9d327a0 100644
--- a/daemon/mgmt/command-authenticator.cpp
+++ b/daemon/mgmt/command-authenticator.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -86,7 +86,7 @@
// SignerTag must be placed on the 'original Interest' in ValidationState to be available for
// InterestValidationSuccessCallback. The 'interest' parameter refers to a different instance
// which is copied into 'original Interest'.
- auto state1 = dynamic_pointer_cast<security::InterestValidationState>(state);
+ auto state1 = std::dynamic_pointer_cast<security::InterestValidationState>(state);
state1->getOriginalInterest().setTag(make_shared<SignerTag>(klName));
continueValidation(make_shared<security::CertificateRequest>(klName), state);
@@ -146,7 +146,7 @@
}
catch (const boost::property_tree::ptree_error&) {
NDN_THROW(ConfigFile::Error("'certfile' is missing under authorize[" +
- to_string(authSectionIndex) + "]"));
+ std::to_string(authSectionIndex) + "]"));
}
bool isAny = false;
@@ -162,7 +162,7 @@
cert = ndn::io::load<security::Certificate>(certfilePath.string());
if (cert == nullptr) {
NDN_THROW(ConfigFile::Error("cannot load certfile " + certfilePath.string() +
- " for authorize[" + to_string(authSectionIndex) + "]"));
+ " for authorize[" + std::to_string(authSectionIndex) + "]"));
}
}
@@ -172,7 +172,7 @@
}
catch (const boost::property_tree::ptree_error&) {
NDN_THROW(ConfigFile::Error("'privileges' is missing under authorize[" +
- to_string(authSectionIndex) + "]"));
+ std::to_string(authSectionIndex) + "]"));
}
if (privSection->empty()) {
@@ -183,7 +183,7 @@
auto found = m_validators.find(module);
if (found == m_validators.end()) {
NDN_THROW(ConfigFile::Error("unknown module '" + module +
- "' under authorize[" + to_string(authSectionIndex) + "]"));
+ "' under authorize[" + std::to_string(authSectionIndex) + "]"));
}
if (isDryRun) {
diff --git a/daemon/mgmt/cs-manager.cpp b/daemon/mgmt/cs-manager.cpp
index a88b40c..e203b45 100644
--- a/daemon/mgmt/cs-manager.cpp
+++ b/daemon/mgmt/cs-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include <ndn-cxx/mgmt/nfd/cs-info.hpp>
+#include <limits>
+
namespace nfd {
CsManager::CsManager(Cs& cs, const ForwarderCounters& fwCounters,
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index b7109fa..24bfd7f 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -36,6 +36,8 @@
#include <ndn-cxx/mgmt/nfd/face-query-filter.hpp>
#include <ndn-cxx/mgmt/nfd/face-status.hpp>
+#include <limits>
+
namespace nfd {
NFD_LOG_INIT(FaceManager);
diff --git a/daemon/mgmt/face-manager.hpp b/daemon/mgmt/face-manager.hpp
index db2e5aa..8e72b9a 100644
--- a/daemon/mgmt/face-manager.hpp
+++ b/daemon/mgmt/face-manager.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,8 @@
#include "face/face.hpp"
#include "face/face-system.hpp"
+#include <map>
+
namespace nfd {
/**
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 24b044b..9bbd545 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -65,7 +65,7 @@
NFD_LOG_DEBUG("fib/add-nexthop(" << prefix << ',' << faceId << ',' << cost <<
"): FAIL prefix-too-long");
return done(ControlResponse(414, "FIB entry prefix cannot exceed " +
- to_string(Fib::getMaxDepth()) + " components"));
+ std::to_string(Fib::getMaxDepth()) + " components"));
}
Face* face = m_faceTable.get(faceId);
diff --git a/daemon/mgmt/manager-base.hpp b/daemon/mgmt/manager-base.hpp
index d9b351a..a664c9e 100644
--- a/daemon/mgmt/manager-base.hpp
+++ b/daemon/mgmt/manager-base.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,6 +33,8 @@
#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
#include <ndn-cxx/mgmt/nfd/control-response.hpp>
+#include <functional>
+
namespace nfd {
using ndn::mgmt::Dispatcher;
diff --git a/daemon/mgmt/rib-manager.cpp b/daemon/mgmt/rib-manager.cpp
index 7149680..b3d515c 100644
--- a/daemon/mgmt/rib-manager.cpp
+++ b/daemon/mgmt/rib-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -119,7 +119,7 @@
NFD_LOG_DEBUG("Local fields enabled");
},
[] (const ControlResponse& res) {
- NDN_THROW(Error("Couldn't enable local fields (" + to_string(res.getCode()) +
+ NDN_THROW(Error("Couldn't enable local fields (" + std::to_string(res.getCode()) +
" " + res.getText() + ")"));
});
}
@@ -209,7 +209,7 @@
},
[=] (const ControlResponse& res) {
NDN_THROW(Error("Cannot add FIB entry " + topPrefix.toUri() + " (" +
- to_string(res.getCode()) + " " + res.getText() + ")"));
+ std::to_string(res.getCode()) + " " + res.getText() + ")"));
});
// add top prefix to the dispatcher without prefix registration
@@ -221,7 +221,7 @@
const ndn::mgmt::CommandContinuation& done)
{
if (parameters.getName().size() > Fib::getMaxDepth()) {
- done(ControlResponse(414, "Route prefix cannot exceed " + to_string(Fib::getMaxDepth()) +
+ done(ControlResponse(414, "Route prefix cannot exceed " + std::to_string(Fib::getMaxDepth()) +
" components"));
return;
}
diff --git a/daemon/mgmt/rib-manager.hpp b/daemon/mgmt/rib-manager.hpp
index 8589b0b..114a7c4 100644
--- a/daemon/mgmt/rib-manager.hpp
+++ b/daemon/mgmt/rib-manager.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -252,7 +252,7 @@
ndn::ValidatorConfig m_paValidator;
bool m_isLocalhopEnabled;
- scheduler::ScopedEventId m_activeFaceFetchEvent;
+ ndn::scheduler::ScopedEventId m_activeFaceFetchEvent;
};
std::ostream&
diff --git a/daemon/mgmt/tables-config-section.cpp b/daemon/mgmt/tables-config-section.cpp
index f693a73..e98282c 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-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,6 +26,8 @@
#include "tables-config-section.hpp"
#include "fw/strategy.hpp"
+#include <map>
+
namespace nfd {
constexpr size_t DEFAULT_CS_MAX_PACKETS = 65536;
diff --git a/daemon/nfd-pch.hpp b/daemon/nfd-pch.hpp
index 1692179..d6fd179 100644
--- a/daemon/nfd-pch.hpp
+++ b/daemon/nfd-pch.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,12 +28,17 @@
#include "core/common.hpp"
+#include <functional>
+#include <map>
+#include <set>
+
#include <boost/lexical_cast.hpp>
#include <boost/property_tree/ptree.hpp>
#include <ndn-cxx/lp/packet.hpp>
#include <ndn-cxx/mgmt/dispatcher.hpp>
#include <ndn-cxx/mgmt/nfd/controller.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
#include <ndn-cxx/security/validator.hpp>
#include <ndn-cxx/util/logger.hpp>
diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp
index 787afb8..aeaeed1 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-2019, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,6 +32,7 @@
#include <ndn-cxx/mgmt/dispatcher.hpp>
#include <ndn-cxx/net/network-monitor.hpp>
#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
namespace nfd {
@@ -126,7 +127,7 @@
unique_ptr<StrategyChoiceManager> m_strategyChoiceManager;
shared_ptr<ndn::net::NetworkMonitor> m_netmon;
- scheduler::ScopedEventId m_reloadConfigEvent;
+ ndn::scheduler::ScopedEventId m_reloadConfigEvent;
};
} // namespace nfd
diff --git a/daemon/rib/fib-updater.cpp b/daemon/rib/fib-updater.cpp
index 75ffa4c..a2657a1 100644
--- a/daemon/rib/fib-updater.cpp
+++ b/daemon/rib/fib-updater.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -300,7 +300,7 @@
}
}
else {
- NDN_THROW(Error("Non-recoverable error: " + response.getText() + " code: " + to_string(code)));
+ NDN_THROW(Error("Non-recoverable error " + std::to_string(code) + ": " + response.getText()));
}
}
diff --git a/daemon/rib/readvertise/readvertised-route.hpp b/daemon/rib/readvertise/readvertised-route.hpp
index bc2d8c1..c4e0ac7 100644
--- a/daemon/rib/readvertise/readvertised-route.hpp
+++ b/daemon/rib/readvertise/readvertised-route.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
#include <ndn-cxx/security/signing-info.hpp>
#include <ndn-cxx/util/scheduler.hpp>
+#include <set>
+
namespace nfd::rib {
/**
@@ -56,7 +58,7 @@
mutable ndn::security::SigningInfo signer; ///< signer for commands
mutable size_t nRibRoutes = 0; ///< number of RIB routes that cause the readvertisement
mutable time::milliseconds retryDelay = 0_ms; ///< retry interval (not used for refresh)
- mutable scheduler::ScopedEventId retryEvt; ///< retry or refresh event
+ mutable ndn::scheduler::ScopedEventId retryEvt; ///< retry or refresh event
};
using ReadvertisedRouteContainer = std::set<ReadvertisedRoute>;
diff --git a/daemon/rib/rib.hpp b/daemon/rib/rib.hpp
index 795222c..9251a0d 100644
--- a/daemon/rib/rib.hpp
+++ b/daemon/rib/rib.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,9 @@
#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
+#include <functional>
+#include <map>
+
namespace nfd::rib {
using ndn::nfd::ControlParameters;
diff --git a/daemon/rib/route.hpp b/daemon/rib/route.hpp
index f460487..2c275df 100644
--- a/daemon/rib/route.hpp
+++ b/daemon/rib/route.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -53,14 +53,14 @@
*/
Route(const ndn::PrefixAnnouncement& ann, uint64_t faceId);
- const scheduler::EventId&
+ const ndn::scheduler::EventId&
getExpirationEvent() const
{
return m_expirationEvent;
}
void
- setExpirationEvent(const scheduler::EventId& eid)
+ setExpirationEvent(const ndn::scheduler::EventId& eid)
{
m_expirationEvent = eid;
}
@@ -113,7 +113,7 @@
time::steady_clock::time_point annExpires;
private:
- scheduler::EventId m_expirationEvent;
+ ndn::scheduler::EventId m_expirationEvent;
};
std::ostream&
diff --git a/daemon/table/cleanup.cpp b/daemon/table/cleanup.cpp
index b025de8..fe1487d 100644
--- a/daemon/table/cleanup.cpp
+++ b/daemon/table/cleanup.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,6 +25,8 @@
#include "cleanup.hpp"
+#include <map>
+
namespace nfd {
void
diff --git a/daemon/table/cs-entry.hpp b/daemon/table/cs-entry.hpp
index 89f71f1..0b58395 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-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "core/common.hpp"
+#include <set>
+
namespace nfd::cs {
/** \brief A ContentStore entry.
diff --git a/daemon/table/cs-policy-priority-fifo.hpp b/daemon/table/cs-policy-priority-fifo.hpp
index 44ebe9e..a476ec9 100644
--- a/daemon/table/cs-policy-priority-fifo.hpp
+++ b/daemon/table/cs-policy-priority-fifo.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "cs-policy.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <list>
namespace nfd::cs {
@@ -46,7 +48,7 @@
{
QueueType queueType;
Queue::iterator queueIt;
- scheduler::EventId moveStaleEventId;
+ ndn::scheduler::EventId moveStaleEventId;
};
/** \brief Priority First-In-First-Out (FIFO) replacement policy.
diff --git a/daemon/table/cs-policy.hpp b/daemon/table/cs-policy.hpp
index 3291bda..0952f44 100644
--- a/daemon/table/cs-policy.hpp
+++ b/daemon/table/cs-policy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,10 @@
#include "cs-entry.hpp"
+#include <functional>
+#include <map>
+#include <set>
+
namespace nfd::cs {
class Cs;
diff --git a/daemon/table/dead-nonce-list.hpp b/daemon/table/dead-nonce-list.hpp
index d2ef585..a78065c 100644
--- a/daemon/table/dead-nonce-list.hpp
+++ b/daemon/table/dead-nonce-list.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "core/common.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
@@ -194,14 +196,14 @@
std::multiset<size_t> m_actualMarkCounts;
const time::nanoseconds m_markInterval;
- scheduler::ScopedEventId m_markEvent;
+ ndn::scheduler::ScopedEventId m_markEvent;
// ---- capacity adjustments
static constexpr double CAPACITY_UP = 1.2;
static constexpr double CAPACITY_DOWN = 0.9;
const time::nanoseconds m_adjustCapacityInterval;
- scheduler::ScopedEventId m_adjustCapacityEvent;
+ ndn::scheduler::ScopedEventId m_adjustCapacityEvent;
/// Maximum number of entries to evict at each operation if the index is over capacity
static constexpr size_t EVICT_LIMIT = 64;
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index 84624a2..09528d4 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "strategy-info-host.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
namespace nfd::name_tree {
class Entry;
} // namespace nfd::name_tree
@@ -58,7 +60,7 @@
private:
Name m_name;
time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
- scheduler::EventId m_cleanup;
+ ndn::scheduler::EventId m_cleanup;
name_tree::Entry* m_nameTreeEntry = nullptr;
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 1bd0eb7..4100fcf 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "measurements-entry.hpp"
#include "name-tree.hpp"
+#include <functional>
+
namespace nfd {
namespace fib {
diff --git a/daemon/table/name-tree-hashtable.hpp b/daemon/table/name-tree-hashtable.hpp
index 1328c2e..6c1b165 100644
--- a/daemon/table/name-tree-hashtable.hpp
+++ b/daemon/table/name-tree-hashtable.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "name-tree-entry.hpp"
+#include <limits>
+
namespace nfd::name_tree {
class Entry;
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 1b97c92..e4e97ef 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
#include <boost/operators.hpp>
#include <boost/range/iterator_range_core.hpp>
+#include <functional>
+
namespace nfd::name_tree {
class NameTree;
diff --git a/daemon/table/network-region-table.hpp b/daemon/table/network-region-table.hpp
index b4ee652..c7445ad 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-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "core/common.hpp"
+#include <set>
+
namespace nfd {
/** \brief Stores a collection of producer region names.
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index f612512..82ed272 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,8 @@
#include "pit-in-record.hpp"
#include "pit-out-record.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <list>
namespace nfd::name_tree {
@@ -223,7 +225,7 @@
*
* This timer is used in forwarding pipelines to delete the entry
*/
- scheduler::EventId expiryTimer;
+ ndn::scheduler::EventId expiryTimer;
/** \brief Indicates whether this PIT entry is satisfied.
*/
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index c7b7a1a..f3e95d3 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -127,7 +127,7 @@
return os << "Error instantiating strategy: " << res.m_exceptionMessage;
case StrategyChoice::InsertResult::DEPTH_EXCEEDED:
return os << "Prefix has too many components (limit is "
- << to_string(NameTree::getMaxDepth()) << ")";
+ << std::to_string(NameTree::getMaxDepth()) << ")";
}
return os;
}
diff --git a/tests/daemon/common/global.t.cpp b/tests/daemon/common/global.t.cpp
index 61556f7..bd3a5f2 100644
--- a/tests/daemon/common/global.t.cpp
+++ b/tests/daemon/common/global.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -52,8 +52,8 @@
BOOST_AUTO_TEST_CASE(ThreadLocalScheduler)
{
- scheduler::Scheduler* s1 = &getScheduler();
- scheduler::Scheduler* s2 = nullptr;
+ ndn::scheduler::Scheduler* s1 = &getScheduler();
+ ndn::scheduler::Scheduler* s2 = nullptr;
std::thread t([&s2] { s2 = &getScheduler(); });
t.join();
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index d09c7df..785c8ed 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -588,7 +588,7 @@
SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
// Now add a real interface: both channel and multicast face should be created successfully.
- netmon->addInterface(const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
+ netmon->addInterface(std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
BOOST_CHECK_EQUAL(factory.getChannels().size(), 2);
auto etherMcastFaces = this->listEtherMcastFaces();
BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), 1);
@@ -613,7 +613,7 @@
BOOST_CHECK_EQUAL(this->listEtherMcastFaces().size(), 0);
// Add an interface that satisfies only the unicast criteria.
- auto netif = const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
+ auto netif = std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
netif->setFlags(netif->getFlags() & ~IFF_MULTICAST);
netmon->addInterface(netif);
checkChannelListEqual(factory, {FaceUri::fromDev(netifs.front()->getName()).toString()});
@@ -659,7 +659,7 @@
parseConfig("", false);
g_io.poll();
- netmon->addInterface(const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
+ netmon->addInterface(std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front()));
BOOST_CHECK_EQUAL(factory.getChannels().size(), 0);
BOOST_CHECK_EQUAL(this->listEtherMcastFaces().size(), 0);
}
diff --git a/tests/daemon/face/ethernet-transport-fixture.hpp b/tests/daemon/face/ethernet-transport-fixture.hpp
index ab73795..dc157e8 100644
--- a/tests/daemon/face/ethernet-transport-fixture.hpp
+++ b/tests/daemon/face/ethernet-transport-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -40,7 +40,7 @@
EthernetTransportFixture()
{
if (!netifs.empty()) {
- defaultNetif = const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
+ defaultNetif = std::const_pointer_cast<ndn::net::NetworkInterface>(netifs.front());
}
}
@@ -52,7 +52,7 @@
{
for (const auto& netif : netifs) {
if (netif->getState() == ndn::net::InterfaceState::RUNNING) {
- return const_pointer_cast<ndn::net::NetworkInterface>(netif);
+ return std::const_pointer_cast<ndn::net::NetworkInterface>(netif);
}
}
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 55d601c..3d04940 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -1188,7 +1188,7 @@
BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
- netmon->addInterface(const_pointer_cast<NetworkInterface>(netifsV4.front()));
+ netmon->addInterface(std::const_pointer_cast<NetworkInterface>(netifsV4.front()));
BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 1);
BOOST_CHECK_LE(this->listUdp6McastFaces().size(), 1);
}
@@ -1211,7 +1211,7 @@
BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
- netmon->addInterface(const_pointer_cast<NetworkInterface>(netifsV6.front()));
+ netmon->addInterface(std::const_pointer_cast<NetworkInterface>(netifsV6.front()));
BOOST_CHECK_LE(this->listUdp4McastFaces().size(), 1);
BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 1);
}
@@ -1278,7 +1278,7 @@
parseConfig("", false);
g_io.poll();
- netmon->addInterface(const_pointer_cast<NetworkInterface>(netifs.front()));
+ netmon->addInterface(std::const_pointer_cast<NetworkInterface>(netifs.front()));
BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
}
diff --git a/tests/daemon/face/unix-stream-transport-fixture.hpp b/tests/daemon/face/unix-stream-transport-fixture.hpp
index 43b1ad0..253e05c 100644
--- a/tests/daemon/face/unix-stream-transport-fixture.hpp
+++ b/tests/daemon/face/unix-stream-transport-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -42,7 +42,7 @@
using face::UnixStreamTransport;
/**
- * \brief Automatically unlinks the socket file of a Unix stream acceptor
+ * \brief Automatically unlinks the socket file of a Unix stream acceptor.
*/
class AcceptorWithCleanup : public unix_stream::acceptor
{
@@ -51,28 +51,27 @@
AcceptorWithCleanup(boost::asio::io_context& io, const std::string& path = "")
: unix_stream::acceptor(io)
{
- this->open();
+ open();
if (path.empty()) {
- this->bind("nfd-unix-stream-test." + to_string(time::system_clock::now().time_since_epoch().count()) + ".sock");
+ bind("nfd-unix-stream-test." + std::to_string(time::system_clock::now().time_since_epoch().count()) + ".sock");
}
else {
- this->bind(path);
+ bind(path);
}
- this->listen(1);
+ listen(1);
}
~AcceptorWithCleanup()
{
boost::system::error_code ec;
-
- std::string path = this->local_endpoint(ec).path();
+ std::string path = local_endpoint(ec).path();
if (ec) {
return;
}
- this->close(ec);
+ close(ec);
boost::filesystem::remove(path, ec);
}
};
diff --git a/tests/daemon/fw/best-route-strategy.t.cpp b/tests/daemon/fw/best-route-strategy.t.cpp
index ce408ec..004b4f2 100644
--- a/tests/daemon/fw/best-route-strategy.t.cpp
+++ b/tests/daemon/fw/best-route-strategy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -92,7 +92,7 @@
// downstream retransmits frequently, but the strategy should not send Interests
// more often than DEFAULT_MIN_RETX_INTERVAL
- scheduler::EventId retxFrom4Evt;
+ ndn::scheduler::EventId retxFrom4Evt;
size_t nSentLast = strategy.sendInterestHistory.size();
auto timeSentLast = time::steady_clock::now();
std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
diff --git a/tests/daemon/fw/dummy-strategy.hpp b/tests/daemon/fw/dummy-strategy.hpp
index a4cc414..4ce6f40 100644
--- a/tests/daemon/fw/dummy-strategy.hpp
+++ b/tests/daemon/fw/dummy-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
#include "fw/strategy.hpp"
+#include <limits>
+
namespace nfd::tests {
/**
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index a69c3a5..aa18cdf 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -173,7 +173,7 @@
// downstream retransmits frequently, but the strategy should not send Interests
// more often than DEFAULT_MIN_RETX_INTERVAL
- scheduler::EventId retxFrom4Evt;
+ ndn::scheduler::EventId retxFrom4Evt;
size_t nSentLast = strategy.sendInterestHistory.size();
auto timeSentLast = time::steady_clock::now();
std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
diff --git a/tests/daemon/fw/random-strategy.t.cpp b/tests/daemon/fw/random-strategy.t.cpp
index ae34b03..d2173b5 100644
--- a/tests/daemon/fw/random-strategy.t.cpp
+++ b/tests/daemon/fw/random-strategy.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,12 +24,13 @@
*/
#include "fw/random-strategy.hpp"
-#include "common/global.hpp"
#include "tests/test-common.hpp"
#include "tests/daemon/face/dummy-face.hpp"
#include "strategy-tester.hpp"
+#include <unordered_map>
+
namespace nfd::tests {
using RandomStrategyTester = StrategyTester<fw::RandomStrategy>;
diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp
index e82705c..5264306 100644
--- a/tests/daemon/fw/topology-tester.hpp
+++ b/tests/daemon/fw/topology-tester.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -38,6 +38,8 @@
#include <ndn-cxx/face.hpp>
+#include <unordered_map>
+
namespace nfd::tests {
/** \brief Identifies a node (forwarder) in the topology.
diff --git a/tests/daemon/global-io-fixture.hpp b/tests/daemon/global-io-fixture.hpp
index 5422e72..a18a587 100644
--- a/tests/daemon/global-io-fixture.hpp
+++ b/tests/daemon/global-io-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,10 @@
#include "tests/clock-fixture.hpp"
+namespace boost::asio {
+class io_context;
+} // namespace boost::asio
+
namespace nfd::tests {
/**
diff --git a/tests/daemon/limited-io.hpp b/tests/daemon/limited-io.hpp
index 123b370..63d5682 100644
--- a/tests/daemon/limited-io.hpp
+++ b/tests/daemon/limited-io.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,7 +28,10 @@
#include "tests/daemon/global-io-fixture.hpp"
+#include <ndn-cxx/util/scheduler.hpp>
+
#include <exception>
+#include <limits>
namespace nfd::tests {
@@ -102,7 +105,7 @@
GlobalIoTimeFixture* m_fixture;
StopReason m_reason;
int m_nOpsRemaining = 0;
- scheduler::EventId m_timeout;
+ ndn::scheduler::EventId m_timeout;
std::exception_ptr m_lastException;
bool m_isRunning = false;
};
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.cpp b/tests/daemon/mgmt/face-manager-command-fixture.cpp
index 694870e..0771e8c 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.cpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -44,11 +44,11 @@
"{\n"
" tcp\n"
" {\n"
- " port " + to_string(port) + "\n"
+ " port " + std::to_string(port) + "\n"
" }\n"
" udp\n"
" {\n"
- " port " + to_string(port) + "\n"
+ " port " + std::to_string(port) + "\n"
" mcast no\n"
" }\n"
" ether\n"
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index d73dc24..458599f 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -320,7 +320,7 @@
const size_t nEntries = 42;
std::map<std::string, shared_ptr<TestChannel>> addedChannels;
for (size_t i = 0; i < nEntries; i++) {
- auto channel = factory->addChannel("test" + to_string(i) + "://");
+ auto channel = factory->addChannel("test" + std::to_string(i) + "://");
addedChannels[channel->getUri().toString()] = channel;
}
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index ded13e2..65dcf05 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -446,7 +446,7 @@
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
BOOST_CHECK_EQUAL(checkResponse(0, command.getName(),
ControlResponse(414, "Route prefix cannot exceed " +
- to_string(Fib::getMaxDepth()) + " components")),
+ std::to_string(Fib::getMaxDepth()) + " components")),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(m_fibUpdater.updates.size(), 0);
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 4a6e3df..3553cfd 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -131,7 +131,7 @@
ControlResponse expectedResp;
expectedResp.setCode(414)
.setText("Prefix has too many components (limit is " +
- to_string(NameTree::getMaxDepth()) + ")");
+ std::to_string(NameTree::getMaxDepth()) + ")");
BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResp),
CheckResponseResult::OK);
diff --git a/tests/daemon/table/dead-nonce-list.t.cpp b/tests/daemon/table/dead-nonce-list.t.cpp
index 6c6add2..8bf6842 100644
--- a/tests/daemon/table/dead-nonce-list.t.cpp
+++ b/tests/daemon/table/dead-nonce-list.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -141,7 +141,7 @@
Name name = "/N";
uint32_t lastNonce = 0;
size_t addNonceBatch = 0;
- scheduler::ScopedEventId addNonceEvent;
+ ndn::scheduler::ScopedEventId addNonceEvent;
};
BOOST_FIXTURE_TEST_CASE(Lifetime, PeriodicalInsertionFixture)
diff --git a/tests/other/cs-benchmark.cpp b/tests/other/cs-benchmark.cpp
index 4446d31..f642d14 100644
--- a/tests/other/cs-benchmark.cpp
+++ b/tests/other/cs-benchmark.cpp
@@ -26,6 +26,7 @@
#include "benchmark-helpers.hpp"
#include "table/cs.hpp"
+#include <functional>
#include <iostream>
#ifdef NFD_HAVE_VALGRIND
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 4c1ac6a..17ce4ef 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -162,7 +162,7 @@
[[noreturn]] static void
onFaceCreationFailed(uint32_t status, const std::string& reason)
{
- NDN_THROW(std::runtime_error("Failed to create face: [" + to_string(status) + "] " + reason));
+ NDN_THROW(std::runtime_error("Failed to create face: [" + std::to_string(status) + "] " + reason));
}
private:
diff --git a/tests/other/fw/congestion-mark-strategy.cpp b/tests/other/fw/congestion-mark-strategy.cpp
index 078799b..da8e352 100644
--- a/tests/other/fw/congestion-mark-strategy.cpp
+++ b/tests/other/fw/congestion-mark-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,6 +25,8 @@
#include "congestion-mark-strategy.hpp"
+#include <boost/lexical_cast.hpp>
+
namespace nfd::fw {
NFD_REGISTER_STRATEGY(CongestionMarkStrategy);
@@ -62,8 +64,8 @@
}
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
- NDN_THROW(std::invalid_argument(
- "CongestionMarkStrategy does not support version " + to_string(*parsed.version)));
+ NDN_THROW(std::invalid_argument("CongestionMarkStrategy does not support version " +
+ std::to_string(*parsed.version)));
}
this->setInstanceName(makeInstanceName(name, getStrategyName()));
}
diff --git a/tests/other/pit-fib-benchmark.cpp b/tests/other/pit-fib-benchmark.cpp
index f750f90..0b6dd86 100644
--- a/tests/other/pit-fib-benchmark.cpp
+++ b/tests/other/pit-fib-benchmark.cpp
@@ -59,13 +59,13 @@
BOOST_ASSERT(interestNameLength <= dataNameLength);
for (size_t i = 0; i < nPackets; i++) {
- Name prefix(to_string(i / nFibEntries));
+ Name prefix(std::to_string(i / nFibEntries));
extendName(prefix, fibPrefixLength);
m_fib.insert(prefix);
Name interestName = prefix;
if (nPackets > nFibEntries) {
- interestName.append(to_string(i));
+ interestName.append(std::to_string(i));
}
extendName(interestName, interestNameLength);
interests.push_back(make_shared<Interest>(interestName));
diff --git a/tests/tools/nfdc/command-definition.t.cpp b/tests/tools/nfdc/command-definition.t.cpp
index bf1f1a0..0b4e0d0 100644
--- a/tests/tools/nfdc/command-definition.t.cpp
+++ b/tests/tools/nfdc/command-definition.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,7 @@
#include "tests/test-common.hpp"
+#include <ndn-cxx/net/face-uri.hpp>
#include <boost/lexical_cast.hpp>
namespace nfd::tools::nfdc::tests {
@@ -35,6 +36,8 @@
BOOST_AUTO_TEST_SUITE(Nfdc)
BOOST_AUTO_TEST_SUITE(TestCommandDefinition)
+using ndn::FaceUri;
+
BOOST_AUTO_TEST_SUITE(Arguments)
BOOST_AUTO_TEST_CASE(NoArg)
diff --git a/tests/tools/nfdc/status-report.t.cpp b/tests/tools/nfdc/status-report.t.cpp
index 2e9626e..95ef146 100644
--- a/tests/tools/nfdc/status-report.t.cpp
+++ b/tests/tools/nfdc/status-report.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -77,7 +77,7 @@
onSuccess();
}
else {
- onFailure(m_res, m_moduleName + " fails with code " + to_string(m_res));
+ onFailure(m_res, m_moduleName + " fails with code " + std::to_string(m_res));
}
});
}
@@ -99,7 +99,7 @@
private:
std::string m_moduleName;
- Scheduler m_scheduler;
+ ndn::Scheduler m_scheduler;
uint32_t m_res;
time::nanoseconds m_delay;
};
diff --git a/tools/ndn-autoconfig/dns-srv.cpp b/tools/ndn-autoconfig/dns-srv.cpp
index bc0b3a6..ee1970e 100644
--- a/tools/ndn-autoconfig/dns-srv.cpp
+++ b/tools/ndn-autoconfig/dns-srv.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -110,7 +110,7 @@
NDN_THROW(DnsSrvError("SRV record cannot be parsed (error decoding host name)"));
}
- return "udp://"s + hostName + ":" + to_string(port);
+ return "udp://"s + hostName + ":" + std::to_string(port);
}
std::string
diff --git a/tools/ndn-autoconfig/multicast-discovery.cpp b/tools/ndn-autoconfig/multicast-discovery.cpp
index 61312cd..dca08fc 100644
--- a/tools/ndn-autoconfig/multicast-discovery.cpp
+++ b/tools/ndn-autoconfig/multicast-discovery.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -55,7 +55,7 @@
filter,
[this] (const auto& dataset) { registerHubDiscoveryPrefix(dataset); },
[this] (uint32_t code, const std::string& reason) {
- fail("Error " + to_string(code) + " when querying multi-access faces: " + reason);
+ fail("Error " + std::to_string(code) + " when querying multi-access faces: " + reason);
});
}
@@ -119,7 +119,7 @@
parameters,
[this] (const auto&) { requestHubData(); },
[this] (const auto& resp) {
- fail("Error " + to_string(resp.getCode()) + " when setting multicast strategy: " + resp.getText());
+ fail("Error " + std::to_string(resp.getCode()) + " when setting multicast strategy: " + resp.getText());
});
}
diff --git a/tools/ndn-autoconfig/ndn-fch-discovery.cpp b/tools/ndn-autoconfig/ndn-fch-discovery.cpp
index 0e5c6b0..51234fc 100644
--- a/tools/ndn-autoconfig/ndn-fch-discovery.cpp
+++ b/tools/ndn-autoconfig/ndn-fch-discovery.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -181,7 +181,7 @@
}
if (statusCode != 200) {
boost::trim(statusMessage);
- NDN_THROW(HttpException("HTTP request failed: " + to_string(statusCode) + " " + statusMessage));
+ NDN_THROW(HttpException("HTTP request failed: " + std::to_string(statusCode) + " " + statusMessage));
}
std::string header;
while (std::getline(requestStream, header) && header != "\r")
diff --git a/tools/nfdc/command-arguments.hpp b/tools/nfdc/command-arguments.hpp
index 91d17e0..b0f82f0 100644
--- a/tools/nfdc/command-arguments.hpp
+++ b/tools/nfdc/command-arguments.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,11 +26,14 @@
#ifndef NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
#define NFD_TOOLS_NFDC_COMMAND_ARGUMENTS_HPP
-#include "core/common.hpp"
-
#include <ndn-cxx/encoding/nfd-constants.hpp>
#include <any>
+#include <map>
+#include <optional>
+#include <string>
+#include <string_view>
+
#include <boost/logic/tribool.hpp>
namespace nfd::tools::nfdc {
diff --git a/tools/nfdc/command-definition.cpp b/tools/nfdc/command-definition.cpp
index 443aff0..5e59382 100644
--- a/tools/nfdc/command-definition.cpp
+++ b/tools/nfdc/command-definition.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,9 +26,12 @@
#include "command-definition.hpp"
#include "status-report.hpp"
-#include <boost/lexical_cast.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
+#include <ndn-cxx/util/backports.hpp>
#include <ndn-cxx/util/logger.hpp>
+#include <boost/lexical_cast.hpp>
+
namespace nfd::tools::nfdc {
NDN_LOG_INIT(nfdc.CommandDefinition);
@@ -282,14 +285,14 @@
return Name(token);
case ArgValueType::FACE_URI:
- return FaceUri(token);
+ return ndn::FaceUri(token);
case ArgValueType::FACE_ID_OR_URI:
try {
return boost::lexical_cast<uint64_t>(token);
}
catch (const boost::bad_lexical_cast&) {
- return FaceUri(token);
+ return ndn::FaceUri(token);
}
case ArgValueType::FACE_PERSISTENCY:
diff --git a/tools/nfdc/command-definition.hpp b/tools/nfdc/command-definition.hpp
index 07ecd15..914c9b5 100644
--- a/tools/nfdc/command-definition.hpp
+++ b/tools/nfdc/command-definition.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,11 @@
#include "command-arguments.hpp"
+#include <iosfwd>
+#include <set>
+#include <stdexcept>
+#include <vector>
+
namespace nfd::tools::nfdc {
/** \brief Indicates argument value type.
diff --git a/tools/nfdc/command-parser.hpp b/tools/nfdc/command-parser.hpp
index e7046e0..fb3f9ef 100644
--- a/tools/nfdc/command-parser.hpp
+++ b/tools/nfdc/command-parser.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,6 +26,7 @@
#ifndef NFD_TOOLS_NFDC_COMMAND_PARSER_HPP
#define NFD_TOOLS_NFDC_COMMAND_PARSER_HPP
+#include "core/common.hpp"
#include "command-definition.hpp"
#include "execute-command.hpp"
@@ -58,7 +59,7 @@
/** \brief Parses a command.
*/
-class CommandParser : noncopyable
+class CommandParser : boost::noncopyable
{
public:
class NoSuchCommandError : public std::invalid_argument
diff --git a/tools/nfdc/execute-command.cpp b/tools/nfdc/execute-command.cpp
index 8c9e5b5..67c6959 100644
--- a/tools/nfdc/execute-command.cpp
+++ b/tools/nfdc/execute-command.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,6 +24,7 @@
*/
#include "execute-command.hpp"
+#include "core/common.hpp"
namespace nfd::tools::nfdc {
diff --git a/tools/nfdc/execute-command.hpp b/tools/nfdc/execute-command.hpp
index 4b1bf5d..4bf6970 100644
--- a/tools/nfdc/execute-command.hpp
+++ b/tools/nfdc/execute-command.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -36,6 +36,9 @@
#include <ndn-cxx/mgmt/nfd/control-response.hpp>
#include <ndn-cxx/security/key-chain.hpp>
+#include <functional>
+#include <iosfwd>
+
namespace nfd::tools::nfdc {
using ndn::nfd::ControlParameters;
@@ -49,7 +52,7 @@
public:
/** \return timeout for each step
*/
- time::nanoseconds
+ ndn::time::nanoseconds
getTimeout() const;
ndn::nfd::CommandOptions
diff --git a/tools/nfdc/face-helpers.cpp b/tools/nfdc/face-helpers.cpp
index 780422f..0bfc980 100644
--- a/tools/nfdc/face-helpers.cpp
+++ b/tools/nfdc/face-helpers.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -133,7 +133,7 @@
};
auto failureCb = [this] (uint32_t code, const auto& reason) {
m_res = Code::ERROR;
- m_errorReason = "Error " + to_string(code) + " when querying face: " + reason;
+ m_errorReason = "Error " + std::to_string(code) + " when querying face: " + reason;
};
if (m_filter.empty()) {
diff --git a/tools/nfdc/face-helpers.hpp b/tools/nfdc/face-helpers.hpp
index 1f54e0a..c4e25f5 100644
--- a/tools/nfdc/face-helpers.hpp
+++ b/tools/nfdc/face-helpers.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,13 +26,18 @@
#ifndef NFD_TOOLS_NFDC_FACE_HELPERS_HPP
#define NFD_TOOLS_NFDC_FACE_HELPERS_HPP
+#include "core/common.hpp"
#include "execute-command.hpp"
#include <ndn-cxx/mgmt/nfd/face-query-filter.hpp>
#include <ndn-cxx/mgmt/nfd/face-status.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
+
+#include <set>
namespace nfd::tools::nfdc {
+using ndn::FaceUri;
using ndn::nfd::FaceQueryFilter;
using ndn::nfd::FaceStatus;
diff --git a/tools/nfdc/format-helpers.hpp b/tools/nfdc/format-helpers.hpp
index 0f04c16..ac4ffc8 100644
--- a/tools/nfdc/format-helpers.hpp
+++ b/tools/nfdc/format-helpers.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -255,7 +255,7 @@
std::string
formatDuration(time::nanoseconds d, bool isLong = false)
{
- return to_string(time::duration_cast<OutputPrecision>(d).count()) +
+ return std::to_string(time::duration_cast<OutputPrecision>(d).count()) +
(isLong ? " " : "") + detail::getTimeUnit<OutputPrecision>(isLong);
}
diff --git a/tools/nfdc/module.hpp b/tools/nfdc/module.hpp
index 42725c1..21d9384 100644
--- a/tools/nfdc/module.hpp
+++ b/tools/nfdc/module.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,7 @@
#include <ndn-cxx/mgmt/nfd/command-options.hpp>
#include <ndn-cxx/mgmt/nfd/controller.hpp>
+#include <functional>
#include <ostream>
namespace nfd::tools::nfdc {
diff --git a/tools/nfdc/nfdc-pch.hpp b/tools/nfdc/nfdc-pch.hpp
index b2e789d..9ab60e8 100644
--- a/tools/nfdc/nfdc-pch.hpp
+++ b/tools/nfdc/nfdc-pch.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,7 +28,12 @@
#include "core/common.hpp"
+#include <functional>
+#include <map>
+#include <set>
+
#include <ndn-cxx/mgmt/nfd/controller.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
#include <ndn-cxx/security/validator-null.hpp>
#include <ndn-cxx/util/logger.hpp>