Refactor and modernize namespace declarations

Move all unit tests to namespace nfd::tests

Delete unused header core/algorithm.hpp

Change-Id: I5591f0c5f3bb5db67f8b45fae95471f8a555ca68
This commit is contained in:
Davide Pesavento committed 2022-06-11 20:10:26 -04:00
1 parent a3a7a4e330
commit e422f9e1e9
411 files changed
+1397 -2762

No files matched your search

-58
View File
@@ -1,58 +0,0 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2015, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
* Washington University in St. Louis,
* Beijing Institute of Technology,
* The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
*
* NFD is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NFD_CORE_ALGORITHM_HPP
#define NFD_CORE_ALGORITHM_HPP
#include "common.hpp"
#include <boost/concept/requires.hpp>
namespace nfd {
/** \brief finds the last element satisfying a predicate
* \tparam It BidirectionalIterator
* \tparam Pred UnaryPredicate
*
* \return Iterator to the last element satisfying the condition,
* or \p last if no such element is found.
*
* Complexity: at most \p last-first invocations of \p p
*/
template<typename It, typename Pred>
BOOST_CONCEPT_REQUIRES(
((boost::BidirectionalIterator<It>))
((boost::UnaryPredicate<Pred, typename std::iterator_traits<It>::value_type>)),
(It)
)
find_last_if(It first, It last, Pred p)
{
std::reverse_iterator<It> firstR(first), lastR(last);
auto found = std::find_if(lastR, firstR, p);
return found == firstR ? last : std::prev(found.base());
}
} // namespace nfd
#endif // NFD_CORE_ALGORITHM_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,7 @@
#include "channel.hpp"
#include "face.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
Channel::~Channel() = default;
@@ -53,5 +52,4 @@ connectFaceClosedSignal(Face& face, std::function<void()> f)
});
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "channel-log.hpp"
#include "face-common.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Represents a channel that listens on a local endpoint.
* \sa FaceSystem
@@ -99,7 +98,6 @@ using FaceCreationFailedCallback = std::function<void(uint32_t status, const std
void
connectFaceClosedSignal(Face& face, std::function<void()> f);
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_CHANNEL_HPP
+2 -4
View File
@@ -32,8 +32,7 @@
#include <array>
namespace nfd {
namespace face {
namespace nfd::face {
struct Unicast {};
struct Multicast {};
@@ -262,7 +261,6 @@ DatagramTransport<T, U>::makeEndpointId(const typename protocol::endpoint&)
return 0;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_DATAGRAM_TRANSPORT_HPP
+2 -4
View File
@@ -33,8 +33,7 @@
#include <boost/range/adaptor/map.hpp>
#include <pcap/pcap.h>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(EthernetChannel);
@@ -234,5 +233,4 @@ EthernetChannel::updateFilter()
m_pcap.setPacketFilter(filter.data());
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -32,8 +32,7 @@
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/**
* \brief Class implementing Ethernet-based channel to create faces
@@ -137,7 +136,6 @@ private:
#endif
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_ETHERNET_CHANNEL_HPP
+2 -4
View File
@@ -30,8 +30,7 @@
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm/copy.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(EthernetFactory);
NFD_REGISTER_PROTOCOL_FACTORY(EthernetFactory);
@@ -377,5 +376,4 @@ EthernetFactory::applyConfig(const FaceSystem::ConfigContext&)
}
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "protocol-factory.hpp"
#include "ethernet-channel.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Protocol factory for Ethernet
*/
@@ -128,7 +127,6 @@ private:
signal::ScopedConnection m_netifAddConn;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
+2 -4
View File
@@ -27,8 +27,7 @@
#include <boost/endian/conversion.hpp>
namespace nfd {
namespace ethernet {
namespace nfd::ethernet {
std::tuple<const ether_header*, std::string>
checkFrameHeader(span<const uint8_t> packet, const Address& localAddr, const Address& destAddr)
@@ -57,5 +56,4 @@ checkFrameHeader(span<const uint8_t> packet, const Address& localAddr, const Add
return {eh, ""};
}
} // namespace ethernet
} // namespace nfd
} // namespace nfd::ethernet
+2 -4
View File
@@ -31,15 +31,13 @@
#include <ndn-cxx/net/ethernet.hpp>
#include <net/ethernet.h>
namespace nfd {
namespace ethernet {
namespace nfd::ethernet {
using namespace ndn::ethernet;
std::tuple<const ether_header*, std::string>
checkFrameHeader(span<const uint8_t> packet, const Address& localAddr, const Address& destAddr);
} // namespace ethernet
} // namespace nfd
} // namespace nfd::ethernet
#endif // NFD_DAEMON_FACE_ETHERNET_PROTOCOL_HPP
+2 -4
View File
@@ -33,8 +33,7 @@
#include <boost/endian/conversion.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(EthernetTransport);
@@ -230,5 +229,4 @@ EthernetTransport::handleError(const std::string& errorMessage)
doClose();
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -32,8 +32,7 @@
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/**
* @brief Base class for Ethernet-based Transports
@@ -113,7 +112,6 @@ private:
#endif
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,7 @@
#include "face-counters.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
FaceCounters::FaceCounters(const LinkService::Counters& linkServiceCounters,
const Transport::Counters& transportCounters)
@@ -46,5 +45,4 @@ FaceCounters::FaceCounters(const LinkService::Counters& linkServiceCounters,
{
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -29,8 +29,7 @@
#include "link-service.hpp"
#include "transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief gives access to counters provided by Face
*
@@ -94,7 +93,6 @@ private:
const Transport::Counters& m_transportCounters;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_FACE_COUNTERS_HPP
+2 -4
View File
@@ -29,8 +29,7 @@
#include "common/global.hpp"
#include "fw/face-table.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(FaceSystem);
@@ -163,5 +162,4 @@ FaceSystem::processConfig(const ConfigSection& configSection, bool isDryRun, con
}
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -25,8 +25,7 @@
#include "face.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
Face::Face(unique_ptr<LinkService> service, unique_ptr<Transport> transport)
: afterReceiveInterest(service->afterReceiveInterest)
@@ -51,5 +50,4 @@ operator<<(std::ostream& os, const FaceLogHelper<Face>& flh)
return os;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -30,8 +30,7 @@
#include <cmath>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(GenericLinkService);
@@ -507,5 +506,4 @@ GenericLinkService::decodeNack(const Block& netPkt, const lp::Packet& firstPkt,
this->receiveNack(nack, endpointId);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -31,8 +31,7 @@
#include "lp-reassembler.hpp"
#include "lp-reliability.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief counters provided by GenericLinkService
* \note The type name 'GenericLinkServiceCounters' is implementation detail.
@@ -325,7 +324,6 @@ GenericLinkService::getCounters() const
return *this;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP
+2 -4
View File
@@ -28,8 +28,7 @@
#include "internal-transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
std::tuple<shared_ptr<Face>, shared_ptr<ndn::Face>>
makeInternalFace(ndn::KeyChain& clientKeyChain)
@@ -49,5 +48,4 @@ makeInternalFace(ndn::KeyChain& clientKeyChain)
return {face, clientFace};
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+5 -6
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2015, Regents of the University of California,
/*
* Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,10 +27,10 @@
#define NFD_DAEMON_FACE_INTERNAL_FACE_HPP
#include "face.hpp"
#include <ndn-cxx/face.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief make a pair of forwarder-side face and client-side face
* that are connected with each other
@@ -45,7 +45,6 @@ namespace face {
std::tuple<shared_ptr<Face>, shared_ptr<ndn::Face>>
makeInternalFace(ndn::KeyChain& clientKeyChain);
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_INTERNAL_FACE_HPP
+2 -4
View File
@@ -26,8 +26,7 @@
#include "internal-transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_INIT(InternalForwarderTransport, InternalForwarderTransport);
NFD_LOG_MEMBER_INIT(InternalClientTransport, InternalClientTransport);
@@ -123,5 +122,4 @@ InternalClientTransport::send(const Block& wire)
m_forwarder->receivePacket(wire);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -30,8 +30,7 @@
#include <ndn-cxx/transport/transport.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Abstracts a transport that can be paired with another.
*/
@@ -125,7 +124,6 @@ private:
signal::ScopedConnection m_fwTransportStateConn;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_INTERNAL_TRANSPORT_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,7 @@
#include "link-service.hpp"
#include "face.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(LinkService);
@@ -135,5 +134,4 @@ operator<<(std::ostream& os, const FaceLogHelper<LinkService>& flh)
return os;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -30,8 +30,7 @@
#include "transport.hpp"
#include "common/counter.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief counters provided by LinkService
* \note The type name 'LinkServiceCounters' is implementation detail.
@@ -258,7 +257,6 @@ operator<<(std::ostream& os, const FaceLogHelper<T>& flh)
return os << FaceLogHelper<LinkService>(flh.obj);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_LINK_SERVICE_HPP
+2 -4
View File
@@ -28,8 +28,7 @@
#include <ndn-cxx/encoding/tlv.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(LpFragmenter);
@@ -153,5 +152,4 @@ operator<<(std::ostream& os, const FaceLogHelper<LpFragmenter>& flh)
return os;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,7 @@
#include <ndn-cxx/lp/packet.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief fragments network-layer packets into NDNLPv2 link-layer packets
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
@@ -80,7 +79,6 @@ private:
std::ostream&
operator<<(std::ostream& os, const FaceLogHelper<LpFragmenter>& flh);
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_LP_FRAGMENTER_HPP
+2 -4
View File
@@ -29,8 +29,7 @@
#include <numeric>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(LpReassembler);
@@ -161,5 +160,4 @@ operator<<(std::ostream& os, const FaceLogHelper<LpReassembler>& flh)
return os;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -30,8 +30,7 @@
#include <ndn-cxx/lp/packet.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/**
* \brief Reassembles fragmented network-layer packets
@@ -149,7 +148,6 @@ LpReassembler::size() const
return m_partialPackets.size();
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_LP_REASSEMBLER_HPP
+2 -4
View File
@@ -28,8 +28,7 @@
#include "transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(LpReliability);
@@ -426,5 +425,4 @@ operator<<(std::ostream& os, const FaceLogHelper<LpReliability>& flh)
return os;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -34,8 +34,7 @@
#include <queue>
namespace nfd {
namespace face {
namespace nfd::face {
class GenericLinkService;
@@ -221,7 +220,6 @@ NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
std::ostream&
operator<<(std::ostream& os, const FaceLogHelper<LpReliability>& flh);
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_LP_RELIABILITY_HPP
+2 -4
View File
@@ -43,8 +43,7 @@
#endif
#endif
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(MulticastEthernetTransport);
@@ -146,5 +145,4 @@ MulticastEthernetTransport::joinMulticastGroup()
NDN_THROW(Error("Failed to join multicast group"));
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "ethernet-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/**
* @brief A multicast Transport that uses raw Ethernet II frames
@@ -57,7 +56,6 @@ private:
#endif
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_MULTICAST_ETHERNET_TRANSPORT_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -37,8 +37,7 @@
#include <sys/socket.h> // for setsockopt()
#endif // __linux__
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_INIT_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Multicast>), MulticastUdpTransport);
@@ -207,5 +206,4 @@ DatagramTransport<boost::asio::ip::udp, Multicast>::makeEndpointId(const protoco
}
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,7 @@
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_DECL_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Multicast>));
@@ -94,7 +93,6 @@ private:
protocol::socket m_sendSocket;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_MULTICAST_UDP_TRANSPORT_HPP
+2 -4
View File
@@ -27,8 +27,7 @@
#include "face-system.hpp"
#include "common/logger.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(NetdevBound);
@@ -141,5 +140,4 @@ NetdevBound::parseRule(int index, const ConfigSection& confRule) const
return rule;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "protocol-factory.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
class FaceSystem;
@@ -82,7 +81,6 @@ NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
std::map<Key, shared_ptr<Face>> m_faces;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_NETDEV_BOUND_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include <fnmatch.h>
namespace nfd {
namespace face {
namespace nfd::face {
NetworkPredicateBase::NetworkPredicateBase()
{
@@ -227,5 +226,4 @@ IpAddressPredicate::operator()(const boost::asio::ip::address& address) const
[&address] (const auto& rule) { return doesAddressMatchRule(address, rule); });
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,7 @@
#include <ndn-cxx/net/network-interface.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
class NetworkPredicateBase
{
@@ -130,7 +129,6 @@ private:
isRuleValid(const std::string& key, const std::string& value) final;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_NETWORK_PREDICATE_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,8 +27,7 @@
#include "null-link-service.hpp"
#include "null-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
shared_ptr<Face>
makeNullFace(const FaceUri& uri)
@@ -39,5 +38,4 @@ makeNullFace(const FaceUri& uri)
make_unique<NullTransport>(uri, uri, ndn::nfd::FACE_SCOPE_LOCAL));
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+6 -7
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2015, Regents of the University of California,
/*
* Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,15 +28,14 @@
#include "face.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \return a Face that has no underlying transport and drops every packet
/**
* \brief Returns a Face that has no underlying transport and drops every packet.
*/
shared_ptr<Face>
makeNullFace(const FaceUri& uri = FaceUri("null://"));
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_NULL_FACE_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "link-service.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief A LinkService that drops every packet.
*/
@@ -57,7 +56,6 @@ private:
}
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_NULL_LINK_SERVICE_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,7 @@
#include "null-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(NullTransport);
@@ -43,5 +42,4 @@ NullTransport::NullTransport(const FaceUri& localUri, const FaceUri& remoteUri,
NFD_LOG_FACE_DEBUG("Creating transport");
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief A Transport that drops every packet.
*/
@@ -56,7 +55,6 @@ private:
}
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_NULL_TRANSPORT_HPP
+2 -4
View File
@@ -35,8 +35,7 @@
#define PCAP_NETMASK_UNKNOWN 0xffffffff
#endif
namespace nfd {
namespace face {
namespace nfd::face {
PcapHelper::PcapHelper(const std::string& interfaceName)
: m_pcap(nullptr)
@@ -143,5 +142,4 @@ PcapHelper::readNextPacket() const noexcept
return {{packet, header->caplen}, ""};
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -36,8 +36,7 @@
struct pcap;
typedef pcap pcap_t;
namespace nfd {
namespace face {
namespace nfd::face {
/**
* @brief Helper class for dealing with libpcap handles.
@@ -139,7 +138,6 @@ private:
pcap_t* m_pcap;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_PCAP_HELPER_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
ProtocolFactory::Registry&
ProtocolFactory::getRegistry()
@@ -129,5 +128,4 @@ ProtocolFactory::doGetChannels() const
return {};
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -33,8 +33,7 @@
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Parameters to ProtocolFactory constructor
*
@@ -248,8 +247,7 @@ protected:
shared_ptr<ndn::net::NetworkMonitor> netmon;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
/** \brief Registers a protocol factory
*
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,8 +33,7 @@
#include <sys/socket.h>
#endif
namespace nfd {
namespace face {
namespace nfd::face {
ssize_t
getTxQueueLength(int fd)
@@ -53,5 +52,4 @@ getTxQueueLength(int fd)
return queueLength;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "core/common.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief obtain send queue length from a specified system socket
* \param fd file descriptor of the socket
@@ -42,7 +41,6 @@ namespace face {
ssize_t
getTxQueueLength(int fd);
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_SOCKET_UTILS_HPP
+2 -4
View File
@@ -32,8 +32,7 @@
#include <queue>
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Implements Transport for stream-based protocols.
*
@@ -333,7 +332,6 @@ StreamTransport<T>::getSendQueueBytes() const
return m_sendQueueBytes;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_STREAM_TRANSPORT_HPP
+2 -4
View File
@@ -29,8 +29,7 @@
#include "tcp-transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(TcpChannel);
@@ -228,5 +227,4 @@ TcpChannel::handleConnectTimeout(const tcp::Endpoint& remoteEndpoint,
onConnectFailed(504, "Connection timed out");
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+4 -7
View File
@@ -28,13 +28,11 @@
#include "channel.hpp"
namespace nfd {
namespace tcp {
namespace nfd::tcp {
using Endpoint = boost::asio::ip::tcp::endpoint;
} // namespace tcp
} // namespace nfd::tcp
namespace face {
namespace nfd::face {
using DetermineFaceScopeFromAddress = std::function<ndn::nfd::FaceScope(const boost::asio::ip::address& local,
const boost::asio::ip::address& remote)>;
@@ -133,7 +131,6 @@ private:
DetermineFaceScopeFromAddress m_determineFaceScope;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_TCP_CHANNEL_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,7 @@
#include "tcp-factory.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
namespace ip = boost::asio::ip;
@@ -223,5 +222,4 @@ TcpFactory::determineFaceScopeFromAddresses(const boost::asio::ip::address& loca
return ndn::nfd::FACE_SCOPE_NON_LOCAL;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "protocol-factory.hpp"
#include "tcp-channel.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Protocol factory for TCP over IPv4 and IPv6
*/
@@ -83,7 +82,6 @@ NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
IpAddressPredicate m_local;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_TCP_FACTORY_HPP
+2 -4
View File
@@ -31,8 +31,7 @@
#include <sys/ioctl.h>
#endif
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_INIT_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>, TcpTransport);
@@ -192,5 +191,4 @@ TcpTransport::doClose()
StreamTransport::doClose();
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -28,8 +28,7 @@
#include "stream-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_DECL_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>);
@@ -99,7 +98,6 @@ private:
time::milliseconds m_nextReconnectWait;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_TCP_TRANSPORT_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,7 @@
#include "transport.hpp"
#include "face.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(Transport);
@@ -235,5 +234,4 @@ operator<<(std::ostream& os, const FaceLogHelper<Transport>& flh)
return os;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+2 -4
View File
@@ -29,8 +29,7 @@
#include "face-common.hpp"
#include "common/counter.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Indicates the state of a transport.
*/
@@ -481,7 +480,6 @@ operator<<(std::ostream& os, const FaceLogHelper<T>& flh)
return os << FaceLogHelper<Transport>(flh.obj);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_TRANSPORT_HPP
+2 -4
View File
@@ -29,8 +29,7 @@
#include "unicast-udp-transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(UdpChannel);
@@ -197,5 +196,4 @@ UdpChannel::createFace(const udp::Endpoint& remoteEndpoint,
return {true, face};
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,8 +31,7 @@
#include <array>
namespace nfd {
namespace face {
namespace nfd::face {
/**
* \brief Class implementing UDP-based channel to create faces
@@ -117,7 +116,6 @@ private:
bool m_wantCongestionMarking;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UDP_CHANNEL_HPP
+2 -4
View File
@@ -31,8 +31,7 @@
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
namespace ip = boost::asio::ip;
namespace net = ndn::net;
@@ -477,5 +476,4 @@ UdpFactory::applyMcastConfig(const FaceSystem::ConfigContext&)
}
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "protocol-factory.hpp"
#include "udp-channel.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Protocol factory for UDP over IPv4 and IPv6
*/
@@ -145,7 +144,6 @@ private:
std::map<int, NetifConns> m_netifConns; // ifindex => signal connections
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP
+4 -6
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,7 @@
#include "udp-protocol.hpp"
namespace nfd {
namespace udp {
namespace nfd::udp {
ssize_t
computeMtu(const Endpoint& localEndpoint)
@@ -43,5 +42,4 @@ computeMtu(const Endpoint& localEndpoint)
return mtu;
}
} // namespace udp
} // namespace nfd
} // namespace nfd::udp
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "core/common.hpp"
namespace nfd {
namespace udp {
namespace nfd::udp {
typedef boost::asio::ip::udp::endpoint Endpoint;
@@ -54,7 +53,6 @@ getDefaultMulticastGroupV6()
return {boost::asio::ip::address_v6::from_string("FF02::1234"), 56363};
}
} // namespace udp
} // namespace nfd
} // namespace nfd::udp
#endif // NFD_DAEMON_FACE_UDP_PROTOCOL_HPP
+2 -4
View File
@@ -28,8 +28,7 @@
#include <cstdio> // for snprintf()
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(UnicastEthernetTransport);
@@ -100,5 +99,4 @@ UnicastEthernetTransport::scheduleClosureWhenIdle()
setExpirationTime(time::steady_clock::now() + m_idleTimeout);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "ethernet-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/**
* @brief A unicast Transport that uses raw Ethernet II frames
@@ -61,7 +60,6 @@ private:
scheduler::ScopedEventId m_closeIfIdleEvent;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UNICAST_ETHERNET_TRANSPORT_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -34,8 +34,7 @@
#include <sys/socket.h> // for setsockopt()
#endif
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_INIT_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Unicast>), UnicastUdpTransport);
@@ -115,5 +114,4 @@ UnicastUdpTransport::scheduleClosureWhenIdle()
setExpirationTime(time::steady_clock::now() + m_idleTimeout);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "datagram-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_DECL_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Unicast>));
@@ -59,7 +58,6 @@ private:
scheduler::ScopedEventId m_closeIfIdleEvent;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UNICAST_UDP_TRANSPORT_HPP
+2 -4
View File
@@ -32,8 +32,7 @@
#include <boost/filesystem.hpp>
#include <sys/stat.h> // for chmod()
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(UnixStreamChannel);
@@ -148,5 +147,4 @@ UnixStreamChannel::handleAccept(const boost::system::error_code& error,
accept(onFaceCreated, onAcceptFailed);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+4 -7
View File
@@ -28,13 +28,11 @@
#include "channel.hpp"
namespace nfd {
namespace unix_stream {
namespace nfd::unix_stream {
using Endpoint = boost::asio::local::stream_protocol::endpoint;
} // namespace unix_stream
} // namespace nfd::unix_stream
namespace face {
namespace nfd::face {
/**
* \brief Class implementing a local channel to create faces
@@ -114,7 +112,6 @@ private:
bool m_wantCongestionMarking;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UNIX_STREAM_CHANNEL_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,8 +27,7 @@
#include <boost/filesystem.hpp>
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(UnixStreamFactory);
NFD_REGISTER_PROTOCOL_FACTORY(UnixStreamFactory);
@@ -109,5 +108,4 @@ UnixStreamFactory::doGetChannels() const
return getChannelsFromMap(m_channels);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "protocol-factory.hpp"
#include "unix-stream-channel.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Protocol factory for stream-oriented Unix sockets
*/
@@ -70,7 +69,6 @@ private:
std::map<unix_stream::Endpoint, shared_ptr<UnixStreamChannel>> m_channels;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UNIX_STREAM_FACTORY_HPP
+2 -4
View File
@@ -25,8 +25,7 @@
#include "unix-stream-transport.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_INIT_SPECIALIZED(StreamTransport<boost::asio::local::stream_protocol>, UnixStreamTransport);
@@ -48,5 +47,4 @@ UnixStreamTransport::UnixStreamTransport(protocol::socket&& socket)
NFD_LOG_FACE_DEBUG("Creating transport");
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,8 +32,7 @@
#error "Cannot include this file when UNIX sockets are not available"
#endif
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_MEMBER_DECL_SPECIALIZED(StreamTransport<boost::asio::local::stream_protocol>);
@@ -47,7 +46,6 @@ public:
UnixStreamTransport(protocol::socket&& socket);
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_UNIX_STREAM_TRANSPORT_HPP
+2 -4
View File
@@ -29,8 +29,7 @@
#include "websocket-transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(WebSocketChannel);
@@ -162,5 +161,4 @@ WebSocketChannel::listen(const FaceCreatedCallback& onFaceCreated)
NFD_LOG_CHAN_DEBUG("Started listening");
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+4 -7
View File
@@ -29,13 +29,11 @@
#include "channel.hpp"
#include "websocketpp.hpp"
namespace nfd {
namespace websocket {
namespace nfd::websocket {
using Endpoint = boost::asio::ip::tcp::endpoint;
} // namespace websocket
} // namespace nfd::websocket
namespace face {
namespace nfd::face {
/**
* \brief Class implementing WebSocket-based channel to create faces
@@ -111,7 +109,6 @@ private:
time::milliseconds m_pingInterval;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_WEBSOCKET_CHANNEL_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,8 +25,7 @@
#include "websocket-factory.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
namespace ip = boost::asio::ip;
@@ -132,5 +131,4 @@ WebSocketFactory::doGetChannels() const
return getChannelsFromMap(m_channels);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "protocol-factory.hpp"
#include "websocket-channel.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief Protocol factory for WebSocket
*/
@@ -71,7 +70,6 @@ private:
std::map<websocket::Endpoint, shared_ptr<WebSocketChannel>> m_channels;
};
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_WEBSOCKET_FACTORY_HPP
+2 -4
View File
@@ -26,8 +26,7 @@
#include "websocket-transport.hpp"
#include "common/global.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
NFD_LOG_INIT(WebSocketTransport);
@@ -174,5 +173,4 @@ WebSocketTransport::doClose()
this->setState(TransportState::CLOSED);
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "transport.hpp"
#include "websocketpp.hpp"
namespace nfd {
namespace face {
namespace nfd::face {
/** \brief counters provided by WebSocketTransport
* \note The type name 'WebSocketTransportCounters' is implementation detail.
@@ -107,7 +106,6 @@ WebSocketTransport::getCounters() const
return *this;
}
} // namespace face
} // namespace nfd
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_WEBSOCKET_TRANSPORT_HPP
+5 -7
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -41,13 +41,11 @@
#include "websocketpp/config/asio_no_tls.hpp"
#include "websocketpp/server.hpp"
namespace nfd {
namespace websocket {
namespace nfd::websocket {
typedef websocketpp::client<websocketpp::config::asio_client> Client;
typedef websocketpp::server<websocketpp::config::asio> Server;
using Client = websocketpp::client<websocketpp::config::asio_client>;
using Server = websocketpp::server<websocketpp::config::asio>;
} // namespace websocket
} // namespace nfd
} // namespace nfd::websocket
#endif // NFD_DAEMON_FACE_WEBSOCKETPP_HPP
+2 -4
View File
@@ -28,8 +28,7 @@
#include "common/global.hpp"
#include "common/logger.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
NFD_LOG_INIT(AccessStrategy);
NFD_REGISTER_STRATEGY(AccessStrategy);
@@ -278,5 +277,4 @@ AccessStrategy::addPrefixMeasurements(const Data& data)
return me->insertStrategyInfo<MtInfo>(m_rttEstimatorOpts).first;
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
+2 -4
View File
@@ -33,8 +33,7 @@
#include <unordered_map>
namespace nfd {
namespace fw {
namespace nfd::fw {
/** \brief Access Router strategy
*
@@ -173,7 +172,6 @@ private:
signal::ScopedConnection m_removeFaceConn;
};
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_ACCESS_STRATEGY_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,7 @@
#include "algorithm.hpp"
#include "scope-prefix.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
bool
wouldViolateScope(const Face& inFace, const Interest& interest, const Face& outFace)
@@ -151,5 +150,4 @@ isNextHopEligible(const Face& inFace, const Interest& interest,
return true;
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,8 +33,7 @@
* This file contains common algorithms used by forwarding strategies.
*/
namespace nfd {
namespace fw {
namespace nfd::fw {
/** \brief determine whether forwarding the Interest in \p pitEntry to \p outFace would violate scope
* \sa https://redmine.named-data.net/projects/nfd/wiki/ScopeControl
@@ -93,7 +92,6 @@ isNextHopEligible(const Face& inFace, const Interest& interest,
bool wantUnused = false,
time::steady_clock::TimePoint now = time::steady_clock::TimePoint::min());
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_ALGORITHM_HPP
+2 -6
View File
@@ -26,9 +26,7 @@
#include "asf-measurements.hpp"
#include "common/global.hpp"
namespace nfd {
namespace fw {
namespace asf {
namespace nfd::fw::asf {
time::nanoseconds
FaceInfo::scheduleTimeout(const Name& interestName, scheduler::EventCallback cb)
@@ -142,6 +140,4 @@ AsfMeasurements::extendLifetime(measurements::Entry& me)
m_measurements.extendLifetime(me, MEASUREMENTS_LIFETIME);
}
} // namespace asf
} // namespace fw
} // namespace nfd
} // namespace nfd::fw::asf
+2 -6
View File
@@ -33,9 +33,7 @@
#include <unordered_map>
namespace nfd {
namespace fw {
namespace asf {
namespace nfd::fw::asf {
/** \brief Strategy information for each face in a namespace
*/
@@ -217,8 +215,6 @@ private:
shared_ptr<const ndn::util::RttEstimator::Options> m_rttEstimatorOpts;
};
} // namespace asf
} // namespace fw
} // namespace nfd
} // namespace nfd::fw::asf
#endif // NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP
+2 -6
View File
@@ -29,9 +29,7 @@
#include <ndn-cxx/util/random.hpp>
namespace nfd {
namespace fw {
namespace asf {
namespace nfd::fw::asf {
static_assert(ProbingModule::DEFAULT_PROBING_INTERVAL < AsfMeasurements::MEASUREMENTS_LIFETIME);
@@ -178,6 +176,4 @@ ProbingModule::setProbingInterval(time::milliseconds probingInterval)
}
}
} // namespace asf
} // namespace fw
} // namespace nfd
} // namespace nfd::fw::asf
+2 -6
View File
@@ -28,9 +28,7 @@
#include "asf-measurements.hpp"
namespace nfd {
namespace fw {
namespace asf {
namespace nfd::fw::asf {
/** \brief ASF Probing Module
*/
@@ -97,8 +95,6 @@ private:
AsfMeasurements& m_measurements;
};
} // namespace asf
} // namespace fw
} // namespace nfd
} // namespace nfd::fw::asf
#endif // NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
+2 -6
View File
@@ -28,9 +28,7 @@
#include "common/global.hpp"
#include "common/logger.hpp"
namespace nfd {
namespace fw {
namespace asf {
namespace nfd::fw::asf {
NFD_LOG_INIT(AsfStrategy);
NFD_REGISTER_STRATEGY(AsfStrategy);
@@ -326,6 +324,4 @@ AsfStrategy::sendNoRouteNack(Face& face, const shared_ptr<pit::Entry>& pitEntry)
this->rejectPendingInterest(pitEntry);
}
} // namespace asf
} // namespace fw
} // namespace nfd
} // namespace nfd::fw::asf
+2 -4
View File
@@ -31,8 +31,7 @@
#include "asf-probing-module.hpp"
#include "retx-suppression-exponential.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
namespace asf {
/** \brief Adaptive SRTT-based Forwarding Strategy
@@ -97,7 +96,6 @@ NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
using asf::AsfStrategy;
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_ASF_STRATEGY_HPP
+2 -4
View File
@@ -27,8 +27,7 @@
#include "algorithm.hpp"
#include "common/logger.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
NFD_LOG_INIT(BestRouteStrategy);
NFD_REGISTER_STRATEGY(BestRouteStrategy);
@@ -126,5 +125,4 @@ BestRouteStrategy::afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& in
this->processNack(nack, ingress.face, pitEntry);
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
+2 -4
View File
@@ -30,8 +30,7 @@
#include "process-nack-traits.hpp"
#include "retx-suppression-exponential.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
/** \brief Best Route strategy
*
@@ -75,7 +74,6 @@ NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
friend ProcessNackTraits<BestRouteStrategy>;
};
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_BEST_ROUTE_STRATEGY_HPP
+2 -4
View File
@@ -27,8 +27,7 @@
#include "algorithm.hpp"
#include "common/logger.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
NFD_REGISTER_STRATEGY(MulticastStrategy);
@@ -111,5 +110,4 @@ MulticastStrategy::afterNewNextHop(const fib::NextHop& nextHop,
// if nothing found, the interest will not be forwarded
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
+2 -4
View File
@@ -29,8 +29,7 @@
#include "strategy.hpp"
#include "retx-suppression-exponential.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
/** \brief A forwarding strategy that forwards Interests to all FIB nexthops
*/
@@ -55,7 +54,6 @@ NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
std::unique_ptr<RetxSuppressionExponential> m_retxSuppression;
};
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_MULTICAST_STRATEGY_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,7 @@
#include "process-nack-traits.hpp"
#include "common/logger.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
NFD_LOG_INIT(ProcessNackTraits);
@@ -82,5 +81,4 @@ ProcessNackTraitsBase::processNack(const lp::Nack& nack, const Face& inFace,
this->sendNacksForProcessNackTraits(pitEntry, outNack);
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include "strategy.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
/** \brief Provides a common procedure for processing Nacks
*
@@ -95,7 +94,6 @@ private:
S* m_strategy;
};
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_PROCESS_NACK_TRAITS_HPP
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
#include <ndn-cxx/util/random.hpp>
namespace nfd {
namespace fw {
namespace nfd::fw {
NFD_REGISTER_STRATEGY(RandomStrategy);
NFD_LOG_INIT(RandomStrategy);
@@ -87,5 +86,4 @@ RandomStrategy::afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& ingre
this->processNack(nack, ingress.face, pitEntry);
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
+3 -5
View File
@@ -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-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,7 @@
#include "strategy.hpp"
#include "process-nack-traits.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
/** \brief A forwarding strategy that randomly chooses a nexthop
*
@@ -59,7 +58,6 @@ private:
friend ProcessNackTraits<RandomStrategy>;
};
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
#endif // NFD_DAEMON_FW_RANDOM_STRATEGY_HPP
+2 -4
View File
@@ -26,8 +26,7 @@
#include "retx-suppression-exponential.hpp"
#include "algorithm.hpp"
namespace nfd {
namespace fw {
namespace nfd::fw {
namespace {
@@ -143,5 +142,4 @@ RetxSuppressionExponential::construct(const StrategyParameters& params)
return make_unique<RetxSuppressionExponential>(Duration(init), Duration(max), mult);
}
} // namespace fw
} // namespace nfd
} // namespace nfd::fw
Loaded 100 of 411 files, more files were not shown because too many files have changed in this diff. Show more