build: prepend "NFD_" to various macro names to avoid conflicts
Change-Id: Icc370968e3d38fef80ece35a2aed56450f54b653
This commit is contained in:
1 parent
6aecc500e5
commit
264af77369
44 files changed
+194
-193
No files matched your search
@@ -53,10 +53,10 @@ def checkWebsocket(self, **kw):
|
||||
|
||||
self.end_msg('.'.join(self.env.WEBSOCKET_VERSION))
|
||||
|
||||
self.env.append_unique('DEFINES', ['_WEBSOCKETPP_CPP11_STL_'])
|
||||
self.env.INCLUDES_WEBSOCKET = websocketDir.parent.abspath()
|
||||
self.env.HAVE_WEBSOCKET = True
|
||||
self.define('HAVE_WEBSOCKET', 1)
|
||||
self.define('_WEBSOCKETPP_CPP11_STL_', 1)
|
||||
|
||||
except Errors.WafError as error:
|
||||
if isMandatory:
|
||||
|
||||
+14
-14
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -28,20 +28,20 @@
|
||||
|
||||
#include "core/config.hpp"
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
#define VIRTUAL_WITH_TESTS virtual
|
||||
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED public
|
||||
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE public
|
||||
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
|
||||
#define OVERRIDE_WITH_TESTS_ELSE_FINAL override
|
||||
#define FINAL_UNLESS_WITH_TESTS
|
||||
#ifdef NFD_WITH_TESTS
|
||||
#define NFD_VIRTUAL_WITH_TESTS virtual
|
||||
#define NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED public
|
||||
#define NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE public
|
||||
#define NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
|
||||
#define NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL override
|
||||
#define NFD_FINAL_UNLESS_WITH_TESTS
|
||||
#else
|
||||
#define VIRTUAL_WITH_TESTS
|
||||
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
|
||||
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE private
|
||||
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
|
||||
#define OVERRIDE_WITH_TESTS_ELSE_FINAL final
|
||||
#define FINAL_UNLESS_WITH_TESTS final
|
||||
#define NFD_VIRTUAL_WITH_TESTS
|
||||
#define NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
|
||||
#define NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE private
|
||||
#define NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE private
|
||||
#define NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL final
|
||||
#define NFD_FINAL_UNLESS_WITH_TESTS final
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -50,7 +50,7 @@ getScheduler()
|
||||
return *g_scheduler;
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
#ifdef NFD_WITH_TESTS
|
||||
void
|
||||
resetGlobalIoService()
|
||||
{
|
||||
|
||||
@@ -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-2021 Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -61,7 +61,7 @@ runOnMainIoService(const std::function<void()>& f);
|
||||
void
|
||||
runOnRibIoService(const std::function<void()>& f);
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
#ifdef NFD_WITH_TESTS
|
||||
/** \brief Destroy the global io_service instance.
|
||||
*
|
||||
* It will be recreated at the next invocation of getGlobalIoService().
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -33,18 +33,18 @@ namespace nfd {
|
||||
|
||||
NFD_LOG_INIT(PrivilegeHelper);
|
||||
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
uid_t PrivilegeHelper::s_normalUid = ::geteuid();
|
||||
gid_t PrivilegeHelper::s_normalGid = ::getegid();
|
||||
|
||||
uid_t PrivilegeHelper::s_privilegedUid = ::geteuid();
|
||||
gid_t PrivilegeHelper::s_privilegedGid = ::getegid();
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
|
||||
void
|
||||
PrivilegeHelper::initialize(const std::string& userName, const std::string& groupName)
|
||||
{
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
static const size_t MAX_GROUP_BUFFER_SIZE = 16384; // 16 KiB
|
||||
static const size_t MAX_PASSWD_BUFFER_SIZE = 16384;
|
||||
|
||||
@@ -111,13 +111,13 @@ PrivilegeHelper::initialize(const std::string& userName, const std::string& grou
|
||||
if (!userName.empty() || !groupName.empty()) {
|
||||
throw Error("Dropping and raising privileges is not supported on this platform");
|
||||
}
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
}
|
||||
|
||||
void
|
||||
PrivilegeHelper::drop()
|
||||
{
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
if (::geteuid() == s_normalUid && ::getegid() == s_normalGid)
|
||||
return;
|
||||
|
||||
@@ -132,13 +132,13 @@ PrivilegeHelper::drop()
|
||||
NFD_LOG_INFO("dropped to effective uid=" << ::geteuid() << " gid=" << ::getegid());
|
||||
#else
|
||||
NFD_LOG_WARN("Dropping privileges is not supported on this platform");
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
}
|
||||
|
||||
void
|
||||
PrivilegeHelper::raise()
|
||||
{
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
if (::geteuid() == s_privilegedUid && ::getegid() == s_privilegedGid)
|
||||
return;
|
||||
|
||||
@@ -153,7 +153,7 @@ PrivilegeHelper::raise()
|
||||
NFD_LOG_INFO("elevated to effective uid=" << ::geteuid() << " gid=" << ::getegid());
|
||||
#else
|
||||
NFD_LOG_WARN("Elevating privileges is not supported on this platform");
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
}
|
||||
|
||||
} // namespace nfd
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
raise();
|
||||
try {
|
||||
f();
|
||||
std::forward<F>(f)();
|
||||
}
|
||||
catch (...) {
|
||||
drop();
|
||||
@@ -80,18 +80,18 @@ public:
|
||||
drop();
|
||||
}
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
static void
|
||||
raise();
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
static uid_t s_normalUid;
|
||||
static gid_t s_normalGid;
|
||||
|
||||
static uid_t s_privilegedUid;
|
||||
static gid_t s_privilegedGid;
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
};
|
||||
|
||||
} // namespace nfd
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
bool isDryRun;
|
||||
};
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
ProtocolFactoryCtorParams
|
||||
makePFCtorParams();
|
||||
|
||||
@@ -109,7 +109,7 @@ private:
|
||||
processConfig(const ConfigSection& configSection, bool isDryRun,
|
||||
const std::string& filename);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief config section name => protocol factory
|
||||
*/
|
||||
std::map<std::string, unique_ptr<ProtocolFactory>> m_factories;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -51,7 +51,7 @@ typedef TransportState FaceState;
|
||||
* LinkService is the upper part, which translates between network-layer packets
|
||||
* and TLV blocks, and may provide additional services such as fragmentation and reassembly.
|
||||
*/
|
||||
class Face FINAL_UNLESS_WITH_TESTS : public std::enable_shared_from_this<Face>, noncopyable
|
||||
class Face NFD_FINAL_UNLESS_WITH_TESTS : public std::enable_shared_from_this<Face>, noncopyable
|
||||
{
|
||||
public:
|
||||
Face(unique_ptr<LinkService> service, unique_ptr<Transport> transport);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -93,8 +93,8 @@ public:
|
||||
/** \brief GenericLinkService is a LinkService that implements the NDNLPv2 protocol
|
||||
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
|
||||
*/
|
||||
class GenericLinkService FINAL_UNLESS_WITH_TESTS : public LinkService
|
||||
, protected virtual GenericLinkServiceCounters
|
||||
class GenericLinkService NFD_FINAL_UNLESS_WITH_TESTS : public LinkService
|
||||
, protected virtual GenericLinkServiceCounters
|
||||
{
|
||||
public:
|
||||
/** \brief Options that control the behavior of GenericLinkService
|
||||
@@ -184,10 +184,10 @@ public:
|
||||
setOptions(const Options& options);
|
||||
|
||||
const Counters&
|
||||
getCounters() const OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
getCounters() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
|
||||
ssize_t
|
||||
getEffectiveMtu() const OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
getEffectiveMtu() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
|
||||
/** \brief Whether MTU can be overridden to the specified value
|
||||
*
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
bool
|
||||
canOverrideMtuTo(ssize_t mtu) const;
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE: // send path
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE: // send path
|
||||
/** \brief request an IDLE packet to transmit pending service fields
|
||||
*/
|
||||
void
|
||||
@@ -208,13 +208,13 @@ PROTECTED_WITH_TESTS_ELSE_PRIVATE: // send path
|
||||
sendLpPacket(lp::Packet&& pkt);
|
||||
|
||||
void
|
||||
doSendInterest(const Interest& interest) OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
doSendInterest(const Interest& interest) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
|
||||
void
|
||||
doSendData(const Data& data) OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
doSendData(const Data& data) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
|
||||
void
|
||||
doSendNack(const ndn::lp::Nack& nack) OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
doSendNack(const ndn::lp::Nack& nack) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
|
||||
/** \brief assign consecutive sequence numbers to LpPackets
|
||||
*/
|
||||
@@ -245,7 +245,7 @@ private: // send path
|
||||
|
||||
private: // receive path
|
||||
void
|
||||
doReceivePacket(const Block& packet, const EndpointId& endpoint) OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
doReceivePacket(const Block& packet, const EndpointId& endpoint) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
|
||||
|
||||
/** \brief decode incoming network-layer packet
|
||||
* \param netPkt reassembled network-layer packet
|
||||
@@ -297,14 +297,14 @@ private: // receive path
|
||||
void
|
||||
decodeNack(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
Options m_options;
|
||||
LpFragmenter m_fragmenter;
|
||||
LpReassembler m_reassembler;
|
||||
LpReliability m_reliability;
|
||||
lp::Sequence m_lastSeqNo;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/// Time to mark next packet due to send queue congestion
|
||||
time::steady_clock::TimePoint m_nextMarkTime;
|
||||
/// number of marked packets in the current incident of congestion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -105,12 +105,12 @@ public:
|
||||
void
|
||||
piggyback(lp::Packet& pkt, ssize_t mtu);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
class UnackedFrag;
|
||||
class NetPkt;
|
||||
using UnackedFrags = std::map<lp::Sequence, UnackedFrag>;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief assign TxSequence number to a fragment
|
||||
* \param frag fragment to assign TxSequence to
|
||||
* \return assigned TxSequence number
|
||||
@@ -162,7 +162,7 @@ PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
void
|
||||
deleteUnackedFrag(UnackedFrags::iterator fragIt);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief contains a sent fragment that has not been acknowledged and associated data
|
||||
*/
|
||||
class UnackedFrag
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
tlv::sizeOfVarNumber(sizeof(lp::Sequence)) +
|
||||
sizeof(lp::Sequence);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
Options m_options;
|
||||
GenericLinkService* m_linkService;
|
||||
UnackedFrags m_unackedFrags;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -150,7 +150,7 @@ MulticastUdpTransport::openRxSocket(protocol::socket& sock,
|
||||
else {
|
||||
BOOST_ASSERT(localAddress.is_v6());
|
||||
sock.set_option(boost::asio::ip::v6_only(true));
|
||||
#ifdef WITH_TESTS
|
||||
#ifdef NFD_WITH_TESTS
|
||||
// To simplify unit tests, we bind to the "any" IPv6 address if the supplied multicast
|
||||
// address lacks a scope id. Calling bind() without a scope id would otherwise fail.
|
||||
if (multicastGroup.address().to_v6().scope_id() == 0)
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
processConfig(OptionalConfigSection configSection,
|
||||
FaceSystem::ConfigContext& context);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
struct Rule
|
||||
{
|
||||
std::vector<FaceUri> remotes;
|
||||
@@ -71,7 +71,7 @@ PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
Rule
|
||||
parseRule(int index, const ConfigSection& confRule) const;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
const FaceSystem& m_faceSystem;
|
||||
FaceCreatedCallback m_addFace;
|
||||
shared_ptr<ndn::net::NetworkMonitor> m_netmon;
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
void
|
||||
parseList(std::set<std::string>& set, std::initializer_list<std::pair<std::string, std::string>> list);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PROTECTED:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
|
||||
std::set<std::string> m_whitelist;
|
||||
std::set<std::string> m_blacklist;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -33,7 +33,7 @@ namespace face {
|
||||
|
||||
/** \brief A Transport that drops every packet.
|
||||
*/
|
||||
class NullTransport FINAL_UNLESS_WITH_TESTS : public Transport
|
||||
class NullTransport NFD_FINAL_UNLESS_WITH_TESTS : public Transport
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
@@ -44,14 +44,14 @@ public:
|
||||
|
||||
protected:
|
||||
void
|
||||
doClose() OVERRIDE_WITH_TESTS_ELSE_FINAL
|
||||
doClose() NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL
|
||||
{
|
||||
setState(TransportState::CLOSED);
|
||||
}
|
||||
|
||||
private:
|
||||
void
|
||||
doSend(const Block&) OVERRIDE_WITH_TESTS_ELSE_FINAL
|
||||
doSend(const Block&) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
/*
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "core/common.hpp"
|
||||
|
||||
#ifndef HAVE_LIBPCAP
|
||||
#ifndef NFD_HAVE_LIBPCAP
|
||||
#error "Cannot include this file when libpcap is not available"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
bool m_wantCongestionMarking = false;
|
||||
std::map<tcp::Endpoint, shared_ptr<TcpChannel>> m_channels;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
IpAddressPredicate m_local;
|
||||
};
|
||||
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -40,7 +40,7 @@ NFD_LOG_MEMBER_DECL_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>);
|
||||
* state is set to DOWN, and the connection is retried periodically with exponential backoff
|
||||
* until it is reestablished
|
||||
*/
|
||||
class TcpTransport FINAL_UNLESS_WITH_TESTS : public StreamTransport<boost::asio::ip::tcp>
|
||||
class TcpTransport NFD_FINAL_UNLESS_WITH_TESTS : public StreamTransport<boost::asio::ip::tcp>
|
||||
{
|
||||
public:
|
||||
TcpTransport(protocol::socket&& socket, ndn::nfd::FacePersistency persistency, ndn::nfd::FaceScope faceScope);
|
||||
@@ -61,17 +61,17 @@ protected:
|
||||
void
|
||||
handleError(const boost::system::error_code& error) final;
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
reconnect();
|
||||
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
handleReconnect(const boost::system::error_code& error);
|
||||
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
handleReconnectTimeout();
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief how long to wait before the first reconnection attempt after the TCP connection has been severed
|
||||
*/
|
||||
static time::milliseconds s_initialReconnectWait;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "stream-transport.hpp"
|
||||
|
||||
#ifndef HAVE_UNIX_SOCKETS
|
||||
#ifndef NFD_HAVE_UNIX_SOCKETS
|
||||
#error "Cannot include this file when UNIX sockets are not available"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
/*
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
void
|
||||
listen(const FaceCreatedCallback& onFaceCreated);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \pre listen hasn't been invoked
|
||||
*/
|
||||
void
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -26,9 +26,11 @@
|
||||
#ifndef NFD_DAEMON_FACE_WEBSOCKETPP_HPP
|
||||
#define NFD_DAEMON_FACE_WEBSOCKETPP_HPP
|
||||
|
||||
#ifndef HAVE_WEBSOCKET
|
||||
#include "core/config.hpp"
|
||||
|
||||
#ifndef NFD_HAVE_WEBSOCKET
|
||||
#error "Cannot include this file when WebSocket support is disabled"
|
||||
#endif // HAVE_WEBSOCKET
|
||||
#endif
|
||||
|
||||
// suppress websocketpp warnings
|
||||
#pragma GCC system_header
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
afterReceiveNack(const FaceEndpoint& ingress, const lp::Nack& nack,
|
||||
const shared_ptr<pit::Entry>& pitEntry) override;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
static const time::milliseconds RETX_SUPPRESSION_INITIAL;
|
||||
static const time::milliseconds RETX_SUPPRESSION_MAX;
|
||||
RetxSuppressionExponential m_retxSuppression;
|
||||
|
||||
+20
-20
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
explicit
|
||||
Forwarder(FaceTable& faceTable);
|
||||
|
||||
VIRTUAL_WITH_TESTS
|
||||
NFD_VIRTUAL_WITH_TESTS
|
||||
~Forwarder();
|
||||
|
||||
const ForwarderCounters&
|
||||
@@ -165,76 +165,76 @@ public: // forwarding entrypoints and tables
|
||||
return m_networkRegionTable;
|
||||
}
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
|
||||
/** \brief incoming Interest pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onIncomingInterest(const FaceEndpoint& ingress, const Interest& interest);
|
||||
|
||||
/** \brief Interest loop pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onInterestLoop(const FaceEndpoint& ingress, const Interest& interest);
|
||||
|
||||
/** \brief Content Store miss pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onContentStoreMiss(const FaceEndpoint& ingress,
|
||||
const shared_ptr<pit::Entry>& pitEntry, const Interest& interest);
|
||||
|
||||
/** \brief Content Store hit pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onContentStoreHit(const FaceEndpoint& ingress, const shared_ptr<pit::Entry>& pitEntry,
|
||||
const Interest& interest, const Data& data);
|
||||
|
||||
/** \brief outgoing Interest pipeline
|
||||
* \return A pointer to the out-record created or nullptr if the Interest was dropped
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS pit::OutRecord*
|
||||
NFD_VIRTUAL_WITH_TESTS pit::OutRecord*
|
||||
onOutgoingInterest(const shared_ptr<pit::Entry>& pitEntry,
|
||||
Face& egress, const Interest& interest);
|
||||
|
||||
/** \brief Interest finalize pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onInterestFinalize(const shared_ptr<pit::Entry>& pitEntry);
|
||||
|
||||
/** \brief incoming Data pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onIncomingData(const FaceEndpoint& ingress, const Data& data);
|
||||
|
||||
/** \brief Data unsolicited pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onDataUnsolicited(const FaceEndpoint& ingress, const Data& data);
|
||||
|
||||
/** \brief outgoing Data pipeline
|
||||
* \return Whether the Data was transmitted (true) or dropped (false)
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS bool
|
||||
NFD_VIRTUAL_WITH_TESTS bool
|
||||
onOutgoingData(const Data& data, Face& egress);
|
||||
|
||||
/** \brief incoming Nack pipeline
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onIncomingNack(const FaceEndpoint& ingress, const lp::Nack& nack);
|
||||
|
||||
/** \brief outgoing Nack pipeline
|
||||
* \return Whether the Nack was transmitted (true) or dropped (false)
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS bool
|
||||
NFD_VIRTUAL_WITH_TESTS bool
|
||||
onOutgoingNack(const shared_ptr<pit::Entry>& pitEntry,
|
||||
Face& egress, const lp::NackHeader& nack);
|
||||
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onDroppedInterest(const Face& egress, const Interest& interest);
|
||||
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
onNewNextHop(const Name& prefix, const fib::NextHop& nextHop);
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief set a new expiry timer (now + \p duration) on a PIT entry
|
||||
*/
|
||||
void
|
||||
@@ -244,18 +244,18 @@ PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
* \param upstream if null, insert Nonces from all out-records;
|
||||
* if not null, insert Nonce only on the out-records of this face
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
insertDeadNonceList(pit::Entry& pitEntry, Face* upstream);
|
||||
|
||||
/** \brief call trigger (method) on the effective strategy of pitEntry
|
||||
*/
|
||||
#ifdef WITH_TESTS
|
||||
#ifdef NFD_WITH_TESTS
|
||||
virtual void
|
||||
dispatchToStrategy(pit::Entry& pitEntry, std::function<void(fw::Strategy&)> trigger)
|
||||
#else
|
||||
template<class Function>
|
||||
void
|
||||
dispatchToStrategy(pit::Entry& pitEntry, Function trigger)
|
||||
dispatchToStrategy(pit::Entry& pitEntry, Function&& trigger)
|
||||
#endif
|
||||
{
|
||||
trigger(m_strategyChoice.findEffectiveStrategy(pitEntry));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
friend ProcessNackTraits<MulticastStrategy>;
|
||||
RetxSuppressionExponential m_retxSuppression;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
static const time::milliseconds RETX_SUPPRESSION_INITIAL;
|
||||
static const time::milliseconds RETX_SUPPRESSION_MAX;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
|
||||
const FaceEndpoint& ingress, const Data& data) override;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PROTECTED:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
|
||||
/// StrategyInfo on measurements::Entry
|
||||
class MeasurementsEntryInfo : public StrategyInfo
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2016, Regents of the University of California,
|
||||
/*
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -31,7 +31,7 @@
|
||||
namespace nfd {
|
||||
namespace fw {
|
||||
|
||||
/** \brief contains arbitrary information forwarding strategy places on table entries
|
||||
/** \brief Contains arbitrary information placed by the forwarding strategy on table entries
|
||||
*/
|
||||
class StrategyInfo
|
||||
{
|
||||
@@ -41,10 +41,7 @@ public:
|
||||
* \sa https://redmine.named-data.net/projects/nfd/wiki/StrategyInfoType
|
||||
*/
|
||||
static constexpr int
|
||||
getTypeId()
|
||||
{
|
||||
return <type-identifier>;
|
||||
}
|
||||
getTypeId();
|
||||
#endif
|
||||
|
||||
virtual
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -257,7 +257,7 @@ protected: // actions
|
||||
* \param interest the Interest packet
|
||||
* \return A pointer to the out-record created or nullptr if the Interest was dropped
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS pit::OutRecord*
|
||||
NFD_VIRTUAL_WITH_TESTS pit::OutRecord*
|
||||
sendInterest(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
|
||||
const Interest& interest);
|
||||
|
||||
@@ -267,7 +267,7 @@ protected: // actions
|
||||
* \param egress face through which to send out the Data
|
||||
* \return Whether the Data was sent (true) or dropped (false)
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS bool
|
||||
NFD_VIRTUAL_WITH_TESTS bool
|
||||
sendData(const shared_ptr<pit::Entry>& pitEntry, const Data& data, Face& egress);
|
||||
|
||||
/** \brief Send a Data packet to all matched and qualified faces.
|
||||
@@ -278,7 +278,7 @@ protected: // actions
|
||||
* \param inFace face on which the Data arrived
|
||||
* \param data the Data packet
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
sendDataToAll(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace, const Data& data);
|
||||
|
||||
/** \brief Schedule the PIT entry for immediate deletion.
|
||||
@@ -287,7 +287,7 @@ protected: // actions
|
||||
* The strategy should invoke this function when it concludes that the Interest cannot
|
||||
* be forwarded and it does not want to wait for responses from existing upstream nodes.
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
rejectPendingInterest(const shared_ptr<pit::Entry>& pitEntry)
|
||||
{
|
||||
this->setExpiryTimer(pitEntry, 0_ms);
|
||||
@@ -302,7 +302,7 @@ protected: // actions
|
||||
* \param header the Nack header
|
||||
* \return Whether the Nack was sent (true) or dropped (false)
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS bool
|
||||
NFD_VIRTUAL_WITH_TESTS bool
|
||||
sendNack(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
|
||||
const lp::NackHeader& header)
|
||||
{
|
||||
@@ -388,7 +388,7 @@ protected: // instance name
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PROTECTED: // setter
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED: // setter
|
||||
/** \brief Set whether the afterNewNextHop trigger should be invoked for this strategy
|
||||
*/
|
||||
void
|
||||
|
||||
+9
-9
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -50,13 +50,13 @@
|
||||
#include <ndn-cxx/util/ostream-joiner.hpp>
|
||||
#include <ndn-cxx/version.hpp>
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#ifdef NFD_HAVE_LIBPCAP
|
||||
#include <pcap/pcap.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#ifdef NFD_HAVE_SYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
#ifdef HAVE_WEBSOCKET
|
||||
#ifdef NFD_HAVE_WEBSOCKET
|
||||
#include <websocketpp/version.hpp>
|
||||
#endif
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
static void
|
||||
systemdNotify(const char* state)
|
||||
{
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#ifdef NFD_HAVE_SYSTEMD
|
||||
sd_notify(0, state);
|
||||
#endif
|
||||
}
|
||||
@@ -247,14 +247,14 @@ main(int argc, char** argv)
|
||||
{
|
||||
using namespace nfd;
|
||||
|
||||
std::string configFile = DEFAULT_CONFIG_FILE;
|
||||
std::string configFile = NFD_DEFAULT_CONFIG_FILE;
|
||||
|
||||
po::options_description description("Options");
|
||||
description.add_options()
|
||||
("help,h", "print this message and exit")
|
||||
("version,V", "show version information and exit")
|
||||
("config,c", po::value<std::string>(&configFile),
|
||||
"path to configuration file (default: " DEFAULT_CONFIG_FILE ")")
|
||||
"path to configuration file (default: " NFD_DEFAULT_CONFIG_FILE ")")
|
||||
("modules,m", "list available logging modules")
|
||||
;
|
||||
|
||||
@@ -292,13 +292,13 @@ main(int argc, char** argv)
|
||||
"." + to_string(BOOST_VERSION / 100 % 1000) +
|
||||
"." + to_string(BOOST_VERSION % 100);
|
||||
const std::string pcapBuildInfo =
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#ifdef NFD_HAVE_LIBPCAP
|
||||
"with " + std::string(pcap_lib_version());
|
||||
#else
|
||||
"without libpcap";
|
||||
#endif
|
||||
const std::string wsBuildInfo =
|
||||
#ifdef HAVE_WEBSOCKET
|
||||
#ifdef NFD_HAVE_WEBSOCKET
|
||||
"with WebSocket++ version " + to_string(websocketpp::major_version) +
|
||||
"." + to_string(websocketpp::minor_version) +
|
||||
"." + to_string(websocketpp::patch_version);
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
signal::ScopedConnection m_faceAddConn;
|
||||
signal::ScopedConnection m_faceRemoveConn;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
std::map<FaceId, signal::ScopedConnection> m_faceStateChangeConn;
|
||||
};
|
||||
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -71,7 +71,7 @@ protected:
|
||||
ManagerBase(const std::string& module, Dispatcher& dispatcher,
|
||||
CommandAuthenticator& authenticator);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
|
||||
// difference from mgmt::ControlCommand: accepts nfd::ControlParameters
|
||||
using ControlCommandHandler = std::function<void(const ControlCommand& command,
|
||||
const Name& prefix, const Interest& interest,
|
||||
@@ -90,7 +90,7 @@ PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
|
||||
ndn::mgmt::PostNotification
|
||||
registerNotificationStream(const std::string& verb);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PROTECTED: // helpers
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED: // helpers
|
||||
/**
|
||||
* @brief Extracts the requester from a ControlCommand request.
|
||||
*
|
||||
@@ -102,7 +102,7 @@ PUBLIC_WITH_TESTS_ELSE_PROTECTED: // helpers
|
||||
void
|
||||
extractRequester(const Interest& interest, ndn::mgmt::AcceptContinuation accept);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
/**
|
||||
* @brief Returns an authorization function for a specific management module and verb.
|
||||
*/
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -229,7 +229,7 @@ private: // Face monitor
|
||||
void
|
||||
onFetchActiveFacesFailure(uint32_t code, const std::string& reason);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
void
|
||||
scheduleActiveFaceFetch(const time::seconds& timeToWait);
|
||||
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
FibUpdater(Rib& rib, ndn::nfd::Controller& controller);
|
||||
|
||||
VIRTUAL_WITH_TESTS
|
||||
NFD_VIRTUAL_WITH_TESTS
|
||||
~FibUpdater() = default;
|
||||
|
||||
/** \brief computes FibUpdates using the provided RibUpdateBatch and then sends the
|
||||
@@ -102,13 +102,13 @@ private:
|
||||
sendUpdatesForNonBatchFaceId(const FibUpdateSuccessCallback& onSuccess,
|
||||
const FibUpdateFailureCallback& onFailure);
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief sends a FibAddNextHopCommand to NFD using the parameters supplied by
|
||||
* the passed update
|
||||
*
|
||||
* \param nTimeouts the number of times this FibUpdate has failed due to timeout
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
sendAddNextHopUpdate(const FibUpdate& update,
|
||||
const FibUpdateSuccessCallback& onSuccess,
|
||||
const FibUpdateFailureCallback& onFailure,
|
||||
@@ -119,7 +119,7 @@ PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
*
|
||||
* \param nTimeouts the number of times this FibUpdate has failed due to timeout
|
||||
*/
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
sendRemoveNextHopUpdate(const FibUpdate& update,
|
||||
const FibUpdateSuccessCallback& onSuccess,
|
||||
const FibUpdateFailureCallback& onFailure,
|
||||
@@ -136,7 +136,7 @@ private:
|
||||
void
|
||||
computeUpdatesForUnregistration(const RibUpdate& update);
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
/** \brief callback used by NfdController when a FibAddNextHopCommand or FibRemoveNextHopCommand
|
||||
* is successful.
|
||||
*
|
||||
@@ -257,7 +257,7 @@ private:
|
||||
ndn::nfd::Controller& m_controller;
|
||||
uint64_t m_batchFaceId;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
FibUpdateList m_updatesForBatchFaceId;
|
||||
FibUpdateList m_updatesForNonBatchFaceId;
|
||||
|
||||
|
||||
+2
-2
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -160,7 +160,7 @@ private:
|
||||
onFibUpdateFailure(const Rib::UpdateFailureCallback& onFailure,
|
||||
uint32_t code, const std::string& error);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
void
|
||||
erase(const Name& prefix, const Route& route);
|
||||
|
||||
|
||||
+2
-2
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -185,7 +185,7 @@ private:
|
||||
void
|
||||
setPolicyImpl(unique_ptr<Policy> policy);
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
|
||||
void
|
||||
dump();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
Queue& m_queue;
|
||||
Hashtable& m_ht;
|
||||
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE: // actual lifetime estimation and capacity control
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // actual lifetime estimation and capacity control
|
||||
|
||||
// ---- current capacity and hard limits
|
||||
|
||||
|
||||
@@ -2057,12 +2057,12 @@ PREDEFINED = DOXYGEN \
|
||||
NFD_LOG_MEMBER_DECL_SPECIALIZED(x)= \
|
||||
NFD_LOG_MEMBER_INIT(x,y)= \
|
||||
NFD_LOG_MEMBER_INIT_SPECIALIZED(x,y)= \
|
||||
VIRTUAL_WITH_TESTS= \
|
||||
PUBLIC_WITH_TESTS_ELSE_PROTECTED=protected \
|
||||
PUBLIC_WITH_TESTS_ELSE_PRIVATE=private \
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE=private \
|
||||
OVERRIDE_WITH_TESTS_ELSE_FINAL=final \
|
||||
FINAL_UNLESS_WITH_TESTS=final
|
||||
NFD_VIRTUAL_WITH_TESTS= \
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED=protected \
|
||||
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE=private \
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE=private \
|
||||
NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL=final \
|
||||
NFD_FINAL_UNLESS_WITH_TESTS=final
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -34,7 +34,7 @@ BOOST_AUTO_TEST_SUITE(TestPrivilegeHelper)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(DropRaise)
|
||||
{
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
SKIP_IF_NOT_SUPERUSER();
|
||||
|
||||
// The following assumes that daemon:daemon is present on the test system
|
||||
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(DropRaise)
|
||||
|
||||
#else
|
||||
BOOST_TEST_MESSAGE("Dropping/raising privileges not supported on this platform, skipping");
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END() // TestPrivilegeHelper
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -46,14 +46,14 @@ public:
|
||||
setConfigFile(configFile);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
~GeneralConfigSectionFixture()
|
||||
{
|
||||
// revert changes to s_normalUid/s_normalGid, if any
|
||||
PrivilegeHelper::s_normalUid = ::geteuid();
|
||||
PrivilegeHelper::s_normalGid = ::getegid();
|
||||
}
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
|
||||
protected:
|
||||
ConfigFile configFile;
|
||||
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(EmptyConfig)
|
||||
BOOST_CHECK_EQUAL(PrivilegeHelper::s_normalGid, PrivilegeHelper::s_privilegedGid);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UserConfig)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(UserAndGroupConfig)
|
||||
BOOST_CHECK_NE(PrivilegeHelper::s_normalGid, PrivilegeHelper::s_privilegedGid);
|
||||
}
|
||||
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
|
||||
BOOST_AUTO_TEST_CASE(InvalidUserConfig)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
#include <valgrind/callgrind.h>
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ protected:
|
||||
static time::microseconds
|
||||
timedRun(const std::function<void()>& f)
|
||||
{
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
CALLGRIND_START_INSTRUMENTATION;
|
||||
#endif
|
||||
|
||||
@@ -58,7 +58,7 @@ protected:
|
||||
f();
|
||||
auto t2 = time::steady_clock::now();
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
CALLGRIND_STOP_INSTRUMENTATION;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
#include <valgrind/callgrind.h>
|
||||
#endif
|
||||
|
||||
@@ -189,7 +189,7 @@ main(int argc, char** argv)
|
||||
|
||||
try {
|
||||
nfd::tests::FaceBenchmark bench{argv[1]};
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
CALLGRIND_START_INSTRUMENTATION;
|
||||
#endif
|
||||
nfd::getGlobalIoService().run();
|
||||
|
||||
@@ -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-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
#include <valgrind/callgrind.h>
|
||||
#endif
|
||||
|
||||
@@ -118,7 +118,7 @@ BOOST_FIXTURE_TEST_CASE(SimpleExchanges, PitFibBenchmarkFixture)
|
||||
generatePacketsAndPopulateFib(nRoundTrip, nFibEntries, fibPrefixLength,
|
||||
interestNameLength, dataNameLength);
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
CALLGRIND_START_INSTRUMENTATION;
|
||||
#endif
|
||||
|
||||
@@ -142,7 +142,7 @@ BOOST_FIXTURE_TEST_CASE(SimpleExchanges, PitFibBenchmarkFixture)
|
||||
|
||||
auto t2 = time::steady_clock::now();
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
#ifdef NFD_HAVE_VALGRIND
|
||||
CALLGRIND_STOP_INSTRUMENTATION;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include <ndn-cxx/prefix-announcement.hpp>
|
||||
|
||||
#ifdef HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#ifdef NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#include <unistd.h>
|
||||
#define SKIP_IF_NOT_SUPERUSER() \
|
||||
do { \
|
||||
@@ -42,7 +42,7 @@
|
||||
} while (false)
|
||||
#else
|
||||
#define SKIP_IF_NOT_SUPERUSER()
|
||||
#endif // HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
#endif // NFD_HAVE_PRIVILEGE_DROP_AND_ELEVATE
|
||||
|
||||
namespace nfd {
|
||||
namespace tests {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -27,6 +27,7 @@
|
||||
#define NFD_TOOLS_NDN_AUTOCONFIG_PROCEDURE_HPP
|
||||
|
||||
#include "stage.hpp"
|
||||
|
||||
#include <ndn-cxx/face.hpp>
|
||||
#include <ndn-cxx/mgmt/nfd/controller.hpp>
|
||||
#include <ndn-cxx/security/key-chain.hpp>
|
||||
@@ -63,7 +64,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
makeStages(const Options& options);
|
||||
|
||||
void
|
||||
@@ -79,7 +80,7 @@ public:
|
||||
*/
|
||||
util::Signal<Procedure, bool> onComplete;
|
||||
|
||||
PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
|
||||
std::vector<unique_ptr<Stage>> m_stages;
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2020, Regents of the University of California,
|
||||
* Copyright (c) 2014-2021, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -27,6 +27,7 @@
|
||||
#define NFD_TOOLS_NFDC_STATUS_REPORT_HPP
|
||||
|
||||
#include "module.hpp"
|
||||
|
||||
#include <ndn-cxx/face.hpp>
|
||||
#include <ndn-cxx/security/key-chain.hpp>
|
||||
#include <ndn-cxx/security/validator.hpp>
|
||||
@@ -55,7 +56,7 @@ operator<<(std::ostream& os, ReportFormat fmt);
|
||||
class StatusReport : noncopyable
|
||||
{
|
||||
public:
|
||||
#ifdef WITH_TESTS
|
||||
#ifdef NFD_WITH_TESTS
|
||||
virtual
|
||||
~StatusReport() = default;
|
||||
#endif
|
||||
@@ -83,7 +84,7 @@ public:
|
||||
formatText(std::ostream& os) const;
|
||||
|
||||
private:
|
||||
VIRTUAL_WITH_TESTS void
|
||||
NFD_VIRTUAL_WITH_TESTS void
|
||||
processEvents(Face& face);
|
||||
|
||||
public:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
"""
|
||||
Copyright (c) 2014-2020, Regents of the University of California,
|
||||
Copyright (c) 2014-2021, Regents of the University of California,
|
||||
Arizona Board of Regents,
|
||||
Colorado State University,
|
||||
University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -144,7 +144,7 @@ def configure(conf):
|
||||
# or conf.define_cond(). Everything that was added directly to conf.env.DEFINES
|
||||
# will not appear in the config header, but will instead be passed directly to the
|
||||
# compiler on the command line.
|
||||
conf.write_config_header('core/config.hpp')
|
||||
conf.write_config_header('core/config.hpp', define_prefix='NFD_')
|
||||
|
||||
def build(bld):
|
||||
versionhpp(bld)
|
||||
|
||||
Reference in new issue
Block a user