core: slim down `common.hpp`
Change-Id: I875c35147edd2261fbaa24e809c170d5cd9b94d3
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;
}