Slim down `common.hpp`
Change-Id: Ic9843a1b9ffc5b5b1fa6062c8250ba28c6aaa898
diff --git a/tools/ping/server/main.cpp b/tools/ping/server/main.cpp
index 41ec490..64538b5 100644
--- a/tools/ping/server/main.cpp
+++ b/tools/ping/server/main.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2015-2023, Arizona Board of Regents.
+ * Copyright (c) 2015-2024, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -31,6 +31,8 @@
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
+#include <iostream>
+
namespace ndn::ping::server {
namespace po = boost::program_options;
diff --git a/tools/ping/server/ping-server.cpp b/tools/ping/server/ping-server.cpp
index 69093d3..ca11c2a 100644
--- a/tools/ping/server/ping-server.cpp
+++ b/tools/ping/server/ping-server.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2015-2022, Arizona Board of Regents.
+ * Copyright (c) 2015-2024, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -23,6 +23,7 @@
#include "ping-server.hpp"
#include <ndn-cxx/security/signing-helpers.hpp>
+#include <ndn-cxx/util/exception.hpp>
namespace ndn::ping::server {
@@ -31,7 +32,7 @@
, m_face(face)
, m_keyChain(keyChain)
{
- auto b = make_shared<Buffer>();
+ auto b = std::make_shared<Buffer>();
b->assign(m_options.payloadSize, 'a');
m_payload = Block(tlv::Content, std::move(b));
}
@@ -63,7 +64,7 @@
{
afterReceive(interest.getName());
- auto data = make_shared<Data>(interest.getName());
+ auto data = std::make_shared<Data>(interest.getName());
data->setFreshnessPeriod(m_options.freshnessPeriod);
data->setContent(m_payload);
m_keyChain.sign(*data, signingWithSha256());
diff --git a/tools/ping/server/ping-server.hpp b/tools/ping/server/ping-server.hpp
index 0289da2..936846b 100644
--- a/tools/ping/server/ping-server.hpp
+++ b/tools/ping/server/ping-server.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2015-2023, Arizona Board of Regents.
+ * Copyright (c) 2015-2024, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -25,6 +25,8 @@
#include "core/common.hpp"
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
#include <ndn-cxx/util/signal.hpp>
namespace ndn::ping::server {
diff --git a/tools/ping/server/tracer.cpp b/tools/ping/server/tracer.cpp
index 0a9df40..e09c481 100644
--- a/tools/ping/server/tracer.cpp
+++ b/tools/ping/server/tracer.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2015-2022, Arizona Board of Regents.
+ * Copyright (c) 2015-2024, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -21,6 +21,8 @@
#include "tracer.hpp"
+#include <iostream>
+
namespace ndn::ping::server {
Tracer::Tracer(PingServer& pingServer, const Options& options)