docs: fix capitalization in doxygen comments
Change-Id: Ibf5ee5119d12d60d382b0acef8dfd08277c18fcb
diff --git a/daemon/face/channel.cpp b/daemon/face/channel.cpp
index fa25405..b1b087c 100644
--- a/daemon/face/channel.cpp
+++ b/daemon/face/channel.cpp
@@ -31,13 +31,13 @@
Channel::~Channel() = default;
void
-Channel::setUri(const FaceUri& uri)
+Channel::setUri(const FaceUri& uri) noexcept
{
m_uri = uri;
}
void
-Channel::setDefaultMtu(size_t mtu)
+Channel::setDefaultMtu(size_t mtu) noexcept
{
m_defaultMtu = mtu;
}
diff --git a/daemon/face/channel.hpp b/daemon/face/channel.hpp
index 8d624fb..19fcd35 100644
--- a/daemon/face/channel.hpp
+++ b/daemon/face/channel.hpp
@@ -44,35 +44,38 @@
~Channel();
const FaceUri&
- getUri() const
+ getUri() const noexcept
{
return m_uri;
}
- /** \brief Returns the default MTU for all faces created by this channel
+ /**
+ * \brief Returns the default MTU for all faces created by this channel.
*/
size_t
- getDefaultMtu() const
+ getDefaultMtu() const noexcept
{
return m_defaultMtu;
}
- /** \brief Returns whether the channel is listening
+ /**
+ * \brief Returns whether the channel is listening.
*/
virtual bool
isListening() const = 0;
- /** \brief Returns the number of faces in the channel
+ /**
+ * \brief Returns the number of faces in the channel.
*/
virtual size_t
size() const = 0;
protected:
void
- setUri(const FaceUri& uri);
+ setUri(const FaceUri& uri) noexcept;
void
- setDefaultMtu(size_t mtu);
+ setDefaultMtu(size_t mtu) noexcept;
private:
FaceUri m_uri;
diff --git a/daemon/face/ethernet-channel.hpp b/daemon/face/ethernet-channel.hpp
index bc9b141..8c11824 100644
--- a/daemon/face/ethernet-channel.hpp
+++ b/daemon/face/ethernet-channel.hpp
@@ -47,11 +47,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
diff --git a/daemon/face/ethernet-factory.hpp b/daemon/face/ethernet-factory.hpp
index 1d63397..607c965 100644
--- a/daemon/face/ethernet-factory.hpp
+++ b/daemon/face/ethernet-factory.hpp
@@ -31,7 +31,7 @@
namespace nfd::face {
-/** \brief Protocol factory for Ethernet
+/** \brief Protocol factory for Ethernet.
*/
class EthernetFactory final : public ProtocolFactory
{
@@ -43,7 +43,7 @@
EthernetFactory(const CtorParams& params);
/**
- * \brief Create Ethernet-based channel on the specified network interface
+ * \brief Create Ethernet-based channel on the specified network interface.
*
* If this method is called twice with the same endpoint, only one channel
* will be created. The second call will just return the existing channel.
@@ -57,7 +57,7 @@
time::nanoseconds idleTimeout);
/**
- * \brief Create a face to communicate on the given Ethernet multicast group
+ * \brief Create a face to communicate on the given Ethernet multicast group.
*
* If this method is called twice with the same arguments, only one face
* will be created. The second call will just return the existing face.
@@ -72,8 +72,6 @@
const ethernet::Address& group);
private:
- /** \brief process face_system.ether config section
- */
void
doProcessConfig(OptionalConfigSection configSection,
FaceSystem::ConfigContext& context) final;
@@ -121,7 +119,7 @@
};
MulticastConfig m_mcastConfig;
- /// (ifname, group) => face
+ // [ifname, group] => face
std::map<std::pair<std::string, ethernet::Address>, shared_ptr<Face>> m_mcastFaces;
signal::ScopedConnection m_netifAddConn;
diff --git a/daemon/face/face-counters.hpp b/daemon/face/face-counters.hpp
index 7d7cdc3..a3f8576 100644
--- a/daemon/face/face-counters.hpp
+++ b/daemon/face/face-counters.hpp
@@ -31,7 +31,7 @@
namespace nfd::face {
-/** \brief gives access to counters provided by Face
+/** \brief Gives access to counters provided by Face.
*
* This type is a facade that exposes common counters of a Face.
*
@@ -80,11 +80,11 @@
const ByteCounter& nInBytes;
const ByteCounter& nOutBytes;
- /** \brief count of incoming Interests dropped due to HopLimit == 0
+ /** \brief Count of incoming Interests dropped due to HopLimit == 0.
*/
PacketCounter nInHopLimitZero;
- /** \brief count of outgoing Interests dropped due to HopLimit == 0 on non-local faces
+ /** \brief Count of outgoing Interests dropped due to HopLimit == 0 on non-local faces.
*/
PacketCounter nOutHopLimitZero;
diff --git a/daemon/face/face-system.hpp b/daemon/face/face-system.hpp
index 3b2e3dc..d7d534b 100644
--- a/daemon/face/face-system.hpp
+++ b/daemon/face/face-system.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-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,
@@ -43,10 +43,11 @@
class ProtocolFactory;
struct ProtocolFactoryCtorParams;
-/** \brief entry point of the face system
+/**
+ * \brief Entry point of NFD's face system.
*
- * NFD's face system is organized as a FaceSystem-ProtocolFactory-Channel-Face hierarchy.
- * FaceSystem class is the entry point of NFD's face system and owns ProtocolFactory objects.
+ * NFD's face system is organized as a FaceSystem-ProtocolFactory-Channel-Face hierarchy.
+ * The FaceSystem class is the entry point of the face system and owns all ProtocolFactory objects.
*/
class FaceSystem : noncopyable
{
@@ -55,17 +56,18 @@
~FaceSystem();
- /** \return ProtocolFactory objects owned by the FaceSystem
+ /**
+ * \brief Returns all ProtocolFactory objects owned by the face system.
*/
- std::set<const ProtocolFactory*>
+ [[nodiscard]] std::set<const ProtocolFactory*>
listProtocolFactories() const;
- /** \return ProtocolFactory for the specified registered factory id or nullptr if not found
+ /** \return ProtocolFactory for the specified registered factory id or nullptr if not found.
*/
ProtocolFactory*
getFactoryById(const std::string& id);
- /** \return ProtocolFactory for the specified FaceUri scheme or nullptr if not found
+ /** \return ProtocolFactory for the specified FaceUri scheme or nullptr if not found.
*/
ProtocolFactory*
getFactoryByScheme(const std::string& scheme);
@@ -79,19 +81,19 @@
return m_faceTable;
}
- /** \brief register handler for face_system section of NFD configuration file
+ /** \brief Register handler for the `face_system` section of NFD's configuration file.
*/
void
setConfigFile(ConfigFile& configFile);
- /** \brief configuration options from "general" section
+ /** \brief Configuration options from `general` section.
*/
struct GeneralConfig
{
bool wantCongestionMarking = true;
};
- /** \brief context for processing a config section in ProtocolFactory
+ /** \brief Context for processing a config section in ProtocolFactory.
*/
class ConfigContext : noncopyable
{
@@ -110,13 +112,13 @@
const std::string& filename);
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- /** \brief config section name => protocol factory
+ /** \brief Config section name => protocol factory.
*/
std::map<std::string, unique_ptr<ProtocolFactory>> m_factories;
unique_ptr<NetdevBound> m_netdevBound;
private:
- /** \brief scheme => protocol factory
+ /** \brief Scheme => protocol factory.
*
* The same protocol factory may be available under multiple schemes.
*/
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index 976a959..b18b9ca 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -41,7 +41,7 @@
*/
using FaceState = TransportState;
-/** \brief generalization of a network interface
+/** \brief Generalization of a network interface.
*
* A face generalizes a network interface.
* It provides best-effort network-layer packet delivery services
@@ -58,12 +58,18 @@
Face(unique_ptr<LinkService> service, unique_ptr<Transport> transport);
LinkService*
- getLinkService() const;
+ getLinkService() const noexcept
+ {
+ return m_service.get();
+ }
Transport*
- getTransport() const;
+ getTransport() const noexcept
+ {
+ return m_transport.get();
+ }
- /** \brief Request that the face be closed
+ /** \brief Request that the face be closed.
*
* This operation is effective only if face is in the UP or DOWN state; otherwise, it has no effect.
* The face will change state to CLOSING, and then perform a cleanup procedure.
@@ -76,115 +82,133 @@
close();
public: // upper interface connected to forwarding
- /** \brief send Interest
+ /** \brief Send Interest.
*/
void
sendInterest(const Interest& interest);
- /** \brief send Data
+ /** \brief Send Data.
*/
void
sendData(const Data& data);
- /** \brief send Nack
+ /** \brief Send Nack.
*/
void
sendNack(const lp::Nack& nack);
- /** \brief signals on Interest received
+ /** \brief Signals on Interest received.
*/
signal::Signal<LinkService, Interest, EndpointId>& afterReceiveInterest;
- /** \brief signals on Data received
+ /** \brief Signals on Data received.
*/
signal::Signal<LinkService, Data, EndpointId>& afterReceiveData;
- /** \brief signals on Nack received
+ /** \brief Signals on Nack received.
*/
signal::Signal<LinkService, lp::Nack, EndpointId>& afterReceiveNack;
- /** \brief signals on Interest dropped by reliability system for exceeding allowed number of retx
+ /** \brief Signals on Interest dropped by reliability system for exceeding allowed number of retx.
*/
signal::Signal<LinkService, Interest>& onDroppedInterest;
public: // properties
- /** \return face ID
+ /**
+ * \brief Returns the face ID.
*/
FaceId
- getId() const;
+ getId() const noexcept
+ {
+ return m_id;
+ }
- /** \brief sets face ID
- * \note Normally, this should only be invoked by FaceTable.
+ /**
+ * \brief Sets the face ID.
+ * \note Normally, this should only be invoked by FaceTable.
*/
void
- setId(FaceId id);
+ setId(FaceId id) noexcept
+ {
+ m_id = id;
+ }
- /** \return a FaceUri representing local endpoint
+ /**
+ * \brief Returns a FaceUri representing the local endpoint.
*/
FaceUri
getLocalUri() const;
- /** \return a FaceUri representing remote endpoint
+ /**
+ * \brief Returns a FaceUri representing the remote endpoint.
*/
FaceUri
getRemoteUri() const;
- /** \return whether face is local or non-local for scope control purpose
+ /**
+ * \brief Returns whether the face is local or non-local for scope control purposes.
*/
ndn::nfd::FaceScope
getScope() const;
- /** \return face persistency setting
+ /**
+ * \brief Returns the current persistency setting of the face.
*/
ndn::nfd::FacePersistency
getPersistency() const;
- /** \brief changes face persistency setting
+ /**
+ * \brief Changes the face persistency setting.
*/
void
setPersistency(ndn::nfd::FacePersistency persistency);
- /** \return whether face is point-to-point or multi-access
+ /**
+ * \brief Returns the link type of the face (point-to-point, multi-access, ...).
*/
ndn::nfd::LinkType
getLinkType() const;
- /** \brief Returns face effective MTU
+ /**
+ * \brief Returns the effective MTU of the face.
*
- * This function is a wrapper. The effective MTU of a face is determined by the link service.
+ * This function is a wrapper. The effective MTU of a face is determined by the link service.
*/
ssize_t
getMtu() const;
- /** \return face state
+ /**
+ * \brief Returns the face state.
*/
FaceState
getState() const;
- /** \brief signals after face state changed
+ /**
+ * \brief Signals after face state changed.
*/
signal::Signal<Transport, FaceState/*old*/, FaceState/*new*/>& afterStateChange;
- /** \return expiration time of the face
- * \retval time::steady_clock::TimePoint::max() the face has an indefinite lifetime
+ /**
+ * \brief Returns the expiration time of the face.
+ * \retval time::steady_clock::time_point::max() The face has an indefinite lifetime.
*/
- time::steady_clock::TimePoint
+ time::steady_clock::time_point
getExpirationTime() const;
const FaceCounters&
- getCounters() const
+ getCounters() const noexcept
{
return m_counters;
}
FaceCounters&
- getCounters()
+ getCounters() noexcept
{
return m_counters;
}
/**
- * \brief Get channel on which face was created (unicast) or the associated channel (multicast)
+ * \brief Get channel on which face was created (unicast) or the associated channel (multicast).
*/
weak_ptr<Channel>
getChannel() const
@@ -193,7 +217,7 @@
}
/**
- * \brief Set channel on which face was created (unicast) or the associated channel (multicast)
+ * \brief Set channel on which face was created (unicast) or the associated channel (multicast).
*/
void
setChannel(weak_ptr<Channel> channel)
@@ -209,18 +233,6 @@
weak_ptr<Channel> m_channel;
};
-inline LinkService*
-Face::getLinkService() const
-{
- return m_service.get();
-}
-
-inline Transport*
-Face::getTransport() const
-{
- return m_transport.get();
-}
-
inline void
Face::close()
{
@@ -245,18 +257,6 @@
m_service->sendNack(nack);
}
-inline FaceId
-Face::getId() const
-{
- return m_id;
-}
-
-inline void
-Face::setId(FaceId id)
-{
- m_id = id;
-}
-
inline FaceUri
Face::getLocalUri() const
{
@@ -305,7 +305,7 @@
return m_transport->getState();
}
-inline time::steady_clock::TimePoint
+inline time::steady_clock::time_point
Face::getExpirationTime() const
{
return m_transport->getExpirationTime();
diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp
index be216a7..7b5a427 100644
--- a/daemon/face/generic-link-service.hpp
+++ b/daemon/face/generic-link-service.hpp
@@ -33,70 +33,71 @@
namespace nfd::face {
-/** \brief counters provided by GenericLinkService
- * \note The type name 'GenericLinkServiceCounters' is implementation detail.
- * Use 'GenericLinkService::Counters' in public API.
+/** \brief Counters provided by GenericLinkService.
+ * \note The type name GenericLinkServiceCounters is an implementation detail.
+ * Use GenericLinkService::Counters in public API.
*/
class GenericLinkServiceCounters : public virtual LinkService::Counters
{
public:
- /** \brief count of failed fragmentations
+ /** \brief Count of failed fragmentations.
*/
PacketCounter nFragmentationErrors;
- /** \brief count of outgoing LpPackets dropped due to exceeding MTU limit
+ /** \brief Count of outgoing LpPackets dropped due to exceeding MTU limit.
*
* If this counter is non-zero, the operator should enable fragmentation.
*/
PacketCounter nOutOverMtu;
- /** \brief count of invalid LpPackets dropped before reassembly
+ /** \brief Count of invalid LpPackets dropped before reassembly.
*/
PacketCounter nInLpInvalid;
- /** \brief count of network-layer packets currently being reassembled
+ /** \brief Count of network-layer packets currently being reassembled.
*/
SizeCounter<LpReassembler> nReassembling;
- /** \brief count of dropped partial network-layer packets due to reassembly timeout
+ /** \brief Count of dropped partial network-layer packets due to reassembly timeout.
*/
PacketCounter nReassemblyTimeouts;
- /** \brief count of invalid reassembled network-layer packets dropped
+ /** \brief Count of invalid reassembled network-layer packets dropped.
*/
PacketCounter nInNetInvalid;
- /** \brief count of network-layer packets that did not require retransmission of a fragment
+ /** \brief Count of network-layer packets that did not require retransmission of a fragment.
*/
PacketCounter nAcknowledged;
- /** \brief count of network-layer packets that had at least one fragment retransmitted, but were
- * eventually received in full
+ /** \brief Count of network-layer packets that had at least one fragment retransmitted, but were
+ * eventually received in full.
*/
PacketCounter nRetransmitted;
- /** \brief count of network-layer packets dropped because a fragment reached the maximum number
- * of retransmissions
+ /** \brief Count of network-layer packets dropped because a fragment reached the maximum number
+ * of retransmissions.
*/
PacketCounter nRetxExhausted;
- /** \brief count of LpPackets dropped due to duplicate Sequence numbers
+ /** \brief Count of LpPackets dropped due to duplicate Sequence numbers.
*/
PacketCounter nDuplicateSequence;
- /** \brief count of outgoing LpPackets that were marked with congestion marks
+ /** \brief Count of outgoing LpPackets that were marked with congestion marks.
*/
PacketCounter nCongestionMarked;
};
-/** \brief GenericLinkService is a LinkService that implements the NDNLPv2 protocol
- * \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
+/**
+ * \brief GenericLinkService is a LinkService that implements the NDNLPv2 protocol.
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
*/
class GenericLinkService NFD_FINAL_UNLESS_WITH_TESTS : public LinkService
, protected virtual GenericLinkServiceCounters
{
public:
- /** \brief Options that control the behavior of GenericLinkService
+ /** \brief %Options that control the behavior of GenericLinkService.
*/
class Options
{
@@ -106,35 +107,35 @@
}
public:
- /** \brief enables encoding of IncomingFaceId, and decoding of NextHopFaceId and CachePolicy
+ /** \brief Enables encoding of IncomingFaceId, and decoding of NextHopFaceId and CachePolicy.
*/
bool allowLocalFields = false;
- /** \brief enables fragmentation
+ /** \brief Enables fragmentation.
*/
bool allowFragmentation = false;
- /** \brief options for fragmentation
+ /** \brief Options for fragmentation.
*/
LpFragmenter::Options fragmenterOptions;
- /** \brief enables reassembly
+ /** \brief Enables reassembly.
*/
bool allowReassembly = false;
- /** \brief options for reassembly
+ /** \brief Options for reassembly.
*/
LpReassembler::Options reassemblerOptions;
- /** \brief options for reliability
+ /** \brief Options for reliability.
*/
LpReliability::Options reliabilityOptions;
- /** \brief enables send queue congestion detection and marking
+ /** \brief Enables send queue congestion detection and marking.
*/
bool allowCongestionMarking = false;
- /** \brief starting value for congestion marking interval
+ /** \brief Starting value for congestion marking interval.
*
* Packets are marked if the queue size stays above THRESHOLD for at least one INTERVAL.
*
@@ -142,7 +143,7 @@
*/
time::nanoseconds baseCongestionMarkingInterval = 100_ms;
- /** \brief default congestion threshold in bytes
+ /** \brief Default congestion threshold in bytes.
*
* Packets are marked if the queue size stays above THRESHOLD for at least one INTERVAL.
*
@@ -150,45 +151,51 @@
*/
size_t defaultCongestionThreshold = 65536;
- /** \brief enables self-learning forwarding support
+ /** \brief Enables self-learning forwarding support.
*/
bool allowSelfLearning = true;
- /** \brief overrides MTU provided by Transport
+ /** \brief Overrides the MTU provided by Transport.
*
* This MTU value will be used instead of the MTU provided by the transport if it is less than
* the transport MTU. However, it will not be utilized when the transport MTU is unlimited.
*
- * Acceptable values for the override MTU are values >= MIN_MTU, which can be validated before
+ * Acceptable values for this option are values >= #MIN_MTU, which can be validated before
* being set with canOverrideMtuTo().
*/
ssize_t overrideMtu = std::numeric_limits<ssize_t>::max();
};
- /** \brief counters provided by GenericLinkService
+ /** \brief %Counters provided by GenericLinkService.
*/
using Counters = GenericLinkServiceCounters;
explicit
GenericLinkService(const Options& options = {});
- /** \brief get Options used by GenericLinkService
+ /** \brief Get the options used by GenericLinkService.
*/
const Options&
- getOptions() const;
+ getOptions() const
+ {
+ return m_options;
+ }
- /** \brief sets Options used by GenericLinkService
+ /** \brief Sets the options used by GenericLinkService.
*/
void
setOptions(const Options& options);
const Counters&
- getCounters() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
+ getCounters() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL
+ {
+ return *this;
+ }
ssize_t
getEffectiveMtu() const NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
- /** \brief Whether MTU can be overridden to the specified value
+ /** \brief Whether MTU can be overridden to the specified value.
*
* If the transport MTU is unlimited, then this will always return false.
*/
@@ -196,12 +203,12 @@
canOverrideMtuTo(ssize_t mtu) const;
NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE: // send path
- /** \brief request an IDLE packet to transmit pending service fields
+ /** \brief Request an IDLE packet to transmit pending service fields.
*/
void
requestIdlePacket();
- /** \brief send an LpPacket
+ /** \brief Send an LpPacket.
*/
void
sendLpPacket(lp::Packet&& pkt);
@@ -215,28 +222,28 @@
void
doSendNack(const ndn::lp::Nack& nack) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
- /** \brief assign consecutive sequence numbers to LpPackets
+ /** \brief Assign consecutive sequence numbers to LpPackets.
*/
void
assignSequences(std::vector<lp::Packet>& pkts);
private: // send path
- /** \brief encode link protocol fields from tags onto an outgoing LpPacket
+ /** \brief Encode link protocol fields from tags onto an outgoing LpPacket.
* \param netPkt network-layer packet to extract tags from
* \param lpPacket LpPacket to add link protocol fields to
*/
void
encodeLpFields(const ndn::PacketBase& netPkt, lp::Packet& lpPacket);
- /** \brief send a complete network layer packet
+ /** \brief Send a complete network layer packet.
* \param pkt LpPacket containing a complete network layer packet
* \param isInterest whether the network layer packet is an Interest
*/
void
sendNetPacket(lp::Packet&& pkt, bool isInterest);
- /** \brief if the send queue is found to be congested, add a congestion mark to the packet
- * according to CoDel
+ /** \brief If the send queue is found to be congested, add a congestion mark to the packet
+ * according to CoDel.
* \sa https://tools.ietf.org/html/rfc8289
*/
void
@@ -246,7 +253,7 @@
void
doReceivePacket(const Block& packet, const EndpointId& endpoint) NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL;
- /** \brief decode incoming network-layer packet
+ /** \brief Decode incoming network-layer packet.
* \param netPkt reassembled network-layer packet
* \param firstPkt LpPacket of first fragment
* \param endpointId endpoint of peer who sent the packet
@@ -257,7 +264,7 @@
void
decodeNetPacket(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
- /** \brief decode incoming Interest
+ /** \brief Decode incoming Interest.
* \param netPkt reassembled network-layer packet; TLV-TYPE must be Interest
* \param firstPkt LpPacket of first fragment; must not have Nack field
* \param endpointId endpoint of peer who sent the Interest
@@ -270,7 +277,7 @@
void
decodeInterest(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
- /** \brief decode incoming Interest
+ /** \brief Decode incoming Interest.
* \param netPkt reassembled network-layer packet; TLV-TYPE must be Data
* \param firstPkt LpPacket of first fragment
* \param endpointId endpoint of peer who sent the Data
@@ -283,7 +290,7 @@
void
decodeData(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
- /** \brief decode incoming Interest
+ /** \brief Decode incoming Interest.
* \param netPkt reassembled network-layer packet; TLV-TYPE must be Interest
* \param firstPkt LpPacket of first fragment; must have Nack field
* \param endpointId endpoint of peer who sent the Nack
@@ -305,25 +312,13 @@
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
/// Time to mark next packet due to send queue congestion
- time::steady_clock::TimePoint m_nextMarkTime;
+ time::steady_clock::time_point m_nextMarkTime;
/// number of marked packets in the current incident of congestion
size_t m_nMarkedSinceInMarkingState;
friend LpReliability;
};
-inline const GenericLinkService::Options&
-GenericLinkService::getOptions() const
-{
- return m_options;
-}
-
-inline const GenericLinkService::Counters&
-GenericLinkService::getCounters() const
-{
- return *this;
-}
-
} // namespace nfd::face
#endif // NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP
diff --git a/daemon/face/internal-face.hpp b/daemon/face/internal-face.hpp
index 6b27cfa..e0b8765 100644
--- a/daemon/face/internal-face.hpp
+++ b/daemon/face/internal-face.hpp
@@ -32,11 +32,11 @@
namespace nfd::face {
-/** \brief make a pair of forwarder-side face and client-side face
- * that are connected with each other
+/** \brief Make a pair of forwarder-side face and client-side face
+ * that are connected to each other.
*
* Network-layer packets sent by one face will be received by the other face
- * after io.poll().
+ * after `io.poll()`.
*
* \param clientKeyChain A KeyChain used by client-side face to sign
* prefix registration commands.
diff --git a/daemon/face/link-service.cpp b/daemon/face/link-service.cpp
index d7233d0..7d1445e 100644
--- a/daemon/face/link-service.cpp
+++ b/daemon/face/link-service.cpp
@@ -30,18 +30,10 @@
NFD_LOG_INIT(LinkService);
-LinkService::LinkService()
- : m_face(nullptr)
- , m_transport(nullptr)
-{
-}
-
-LinkService::~LinkService()
-{
-}
+LinkService::~LinkService() = default;
void
-LinkService::setFaceAndTransport(Face& face, Transport& transport)
+LinkService::setFaceAndTransport(Face& face, Transport& transport) noexcept
{
BOOST_ASSERT(m_face == nullptr);
BOOST_ASSERT(m_transport == nullptr);
diff --git a/daemon/face/link-service.hpp b/daemon/face/link-service.hpp
index 92645f4..da752e6 100644
--- a/daemon/face/link-service.hpp
+++ b/daemon/face/link-service.hpp
@@ -32,44 +32,45 @@
namespace nfd::face {
-/** \brief counters provided by LinkService
- * \note The type name 'LinkServiceCounters' is implementation detail.
- * Use 'LinkService::Counters' in public API.
+/** \brief Counters provided by LinkService.
+ * \note The type name LinkServiceCounters is an implementation detail.
+ * Use LinkService::Counters in public API.
*/
class LinkServiceCounters
{
public:
- /** \brief count of incoming Interests
+ /** \brief Count of incoming Interests.
*/
PacketCounter nInInterests;
- /** \brief count of outgoing Interests
+ /** \brief Count of outgoing Interests.
*/
PacketCounter nOutInterests;
- /** \brief count of Interests dropped by reliability system for exceeding allowed number of retx
+ /** \brief Count of Interests dropped by reliability system for exceeding allowed number of retx.
*/
PacketCounter nInterestsExceededRetx;
- /** \brief count of incoming Data packets
+ /** \brief Count of incoming Data packets.
*/
PacketCounter nInData;
- /** \brief count of outgoing Data packets
+ /** \brief Count of outgoing Data packets.
*/
PacketCounter nOutData;
- /** \brief count of incoming Nacks
+ /** \brief Count of incoming Nacks.
*/
PacketCounter nInNacks;
- /** \brief count of outgoing Nacks
+ /** \brief Count of outgoing Nacks.
*/
PacketCounter nOutNacks;
};
-/** \brief the upper part of a Face
- * \sa Face
+/**
+ * \brief The upper half of a Face.
+ * \sa Face, Transport
*/
class LinkService : protected virtual LinkServiceCounters, noncopyable
{
@@ -80,97 +81,111 @@
using Counters = LinkServiceCounters;
public:
- LinkService();
-
virtual
~LinkService();
- /** \brief set Face and Transport for LinkService
- * \pre setFaceAndTransport has not been called
+ /**
+ * \brief Set Face and Transport for this LinkService.
+ * \pre setFaceAndTransport() has not been called.
*/
void
- setFaceAndTransport(Face& face, Transport& transport);
+ setFaceAndTransport(Face& face, Transport& transport) noexcept;
- /** \return Face to which this LinkService is attached
+ /**
+ * \brief Returns the Face to which this LinkService is attached.
*/
const Face*
- getFace() const;
+ getFace() const noexcept
+ {
+ return m_face;
+ }
- /** \return Transport to which this LinkService is attached
+ /**
+ * \brief Returns the Transport to which this LinkService is attached.
*/
const Transport*
- getTransport() const;
+ getTransport() const noexcept
+ {
+ return m_transport;
+ }
- /** \return Transport to which this LinkService is attached
+ /**
+ * \brief Returns the Transport to which this LinkService is attached.
*/
Transport*
- getTransport();
+ getTransport() noexcept
+ {
+ return m_transport;
+ }
virtual const Counters&
- getCounters() const;
+ getCounters() const
+ {
+ return *this;
+ }
virtual ssize_t
getEffectiveMtu() const;
public: // upper interface to be used by forwarding
- /** \brief Send Interest
- * \pre setTransport has been called
+ /** \brief Send Interest.
+ * \pre setFaceAndTransport() has been called.
*/
void
sendInterest(const Interest& interest);
- /** \brief Send Data
- * \pre setTransport has been called
+ /** \brief Send Data.
+ * \pre setFaceAndTransport() has been called.
*/
void
sendData(const Data& data);
- /** \brief Send Nack
- * \pre setTransport has been called
+ /** \brief Send Nack.
+ * \pre setFaceAndTransport() has been called.
*/
void
sendNack(const ndn::lp::Nack& nack);
- /** \brief signals on Interest received
+ /** \brief Signals on Interest received.
*/
signal::Signal<LinkService, Interest, EndpointId> afterReceiveInterest;
- /** \brief signals on Data received
+ /** \brief Signals on Data received.
*/
signal::Signal<LinkService, Data, EndpointId> afterReceiveData;
- /** \brief signals on Nack received
+ /** \brief Signals on Nack received.
*/
signal::Signal<LinkService, lp::Nack, EndpointId> afterReceiveNack;
- /** \brief signals on Interest dropped by reliability system for exceeding allowed number of retx
+ /** \brief Signals on Interest dropped by reliability system for exceeding allowed number of retx.
*/
signal::Signal<LinkService, Interest> onDroppedInterest;
public: // lower interface to be invoked by Transport
- /** \brief performs LinkService specific operations to receive a lower-layer packet
+ /** \brief Performs LinkService specific operations to receive a lower-layer packet.
*/
void
receivePacket(const Block& packet, const EndpointId& endpoint);
protected: // upper interface to be invoked in subclass (receive path termination)
- /** \brief delivers received Interest to forwarding
+ /** \brief Delivers received Interest to forwarding.
*/
void
receiveInterest(const Interest& interest, const EndpointId& endpoint);
- /** \brief delivers received Data to forwarding
+ /** \brief Delivers received Data to forwarding.
*/
void
receiveData(const Data& data, const EndpointId& endpoint);
- /** \brief delivers received Nack to forwarding
+ /** \brief Delivers received Nack to forwarding.
*/
void
receiveNack(const lp::Nack& nack, const EndpointId& endpoint);
protected: // lower interface to be invoked in subclass (send path termination)
- /** \brief send a lower-layer packet via Transport
+ /** \brief Send a lower-layer packet via Transport.
*/
void
sendPacket(const Block& packet);
@@ -180,17 +195,17 @@
notifyDroppedInterest(const Interest& packet);
private: // upper interface to be overridden in subclass (send path entrypoint)
- /** \brief performs LinkService specific operations to send an Interest
+ /** \brief Performs LinkService specific operations to send an Interest.
*/
virtual void
doSendInterest(const Interest& interest) = 0;
- /** \brief performs LinkService specific operations to send a Data
+ /** \brief Performs LinkService specific operations to send a Data.
*/
virtual void
doSendData(const Data& data) = 0;
- /** \brief performs LinkService specific operations to send a Nack
+ /** \brief Performs LinkService specific operations to send a Nack.
*/
virtual void
doSendNack(const lp::Nack& nack) = 0;
@@ -200,34 +215,10 @@
doReceivePacket(const Block& packet, const EndpointId& endpoint) = 0;
private:
- Face* m_face;
- Transport* m_transport;
+ Face* m_face = nullptr;
+ Transport* m_transport = nullptr;
};
-inline const Face*
-LinkService::getFace() const
-{
- return m_face;
-}
-
-inline const Transport*
-LinkService::getTransport() const
-{
- return m_transport;
-}
-
-inline Transport*
-LinkService::getTransport()
-{
- return m_transport;
-}
-
-inline const LinkService::Counters&
-LinkService::getCounters() const
-{
- return *this;
-}
-
inline ssize_t
LinkService::getEffectiveMtu() const
{
diff --git a/daemon/face/lp-fragmenter.hpp b/daemon/face/lp-fragmenter.hpp
index 8d24124..40e429b 100644
--- a/daemon/face/lp-fragmenter.hpp
+++ b/daemon/face/lp-fragmenter.hpp
@@ -32,17 +32,17 @@
namespace nfd::face {
-/** \brief fragments network-layer packets into NDNLPv2 link-layer packets
+/** \brief Fragments network-layer packets into NDNLPv2 link-layer packets.
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
*/
class LpFragmenter
{
public:
- /** \brief Options that control the behavior of LpFragmenter
+ /** \brief %Options that control the behavior of LpFragmenter.
*/
struct Options
{
- /** \brief maximum number of fragments in a packet
+ /** \brief Maximum number of fragments in a packet.
*/
size_t nMaxFragments = 400;
};
@@ -50,7 +50,7 @@
explicit
LpFragmenter(const Options& options, const LinkService* linkService = nullptr);
- /** \brief set options for fragmenter
+ /** \brief Set options for fragmenter.
*/
void
setOptions(const Options& options);
@@ -62,7 +62,7 @@
const LinkService*
getLinkService() const;
- /** \brief fragments a network-layer packet into link-layer packets
+ /** \brief Fragments a network-layer packet into link-layer packets.
* \param packet an LpPacket that contains a network-layer packet;
* must have Fragment field, must not have FragIndex and FragCount fields
* \param mtu maximum allowable LpPacket size after fragmentation and sequence number assignment
diff --git a/daemon/face/lp-reassembler.hpp b/daemon/face/lp-reassembler.hpp
index 30fec04..32b7e15 100644
--- a/daemon/face/lp-reassembler.hpp
+++ b/daemon/face/lp-reassembler.hpp
@@ -33,23 +33,23 @@
namespace nfd::face {
/**
- * \brief Reassembles fragmented network-layer packets
+ * \brief Reassembles fragmented network-layer packets.
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
*/
class LpReassembler : noncopyable
{
public:
- /** \brief Options that control the behavior of LpReassembler
+ /** \brief %Options that control the behavior of LpReassembler.
*/
struct Options
{
- /** \brief maximum number of fragments in a packet
+ /** \brief Maximum number of fragments in a packet.
*
* LpPackets with FragCount over this limit are dropped.
*/
size_t nMaxFragments = 400;
- /** \brief timeout before a partially reassembled packet is dropped
+ /** \brief Timeout before a partially reassembled packet is dropped.
*/
time::nanoseconds reassemblyTimeout = 500_ms;
};
@@ -57,7 +57,7 @@
explicit
LpReassembler(const Options& options, const LinkService* linkService = nullptr);
- /** \brief set options for reassembler
+ /** \brief Set options for reassembler.
*/
void
setOptions(const Options& options);
@@ -69,7 +69,7 @@
const LinkService*
getLinkService() const;
- /** \brief adds received fragment to the buffer
+ /** \brief Adds received fragment to the buffer.
* \param remoteEndpoint endpoint that sent the packet
* \param packet received fragment; must have Fragment field
* \return a tuple containing:
@@ -81,7 +81,7 @@
std::tuple<bool, Block, lp::Packet>
receiveFragment(const EndpointId& remoteEndpoint, const lp::Packet& packet);
- /** \brief count of partial packets
+ /** \brief Count of partial packets.
*/
size_t
size() const;
@@ -98,7 +98,7 @@
private:
/**
- * \brief Holds all fragments of packet until reassembled
+ * \brief Holds all fragments of a packet until reassembled.
*/
struct PartialPacket
{
@@ -109,11 +109,11 @@
};
/**
- * \brief Index key for PartialPackets
+ * \brief Index key for PartialPackets.
*/
using Key = std::tuple<
- EndpointId, // remoteEndpoint
- lp::Sequence // message identifier (sequence of the first fragment)
+ EndpointId, // remote endpoint
+ lp::Sequence // message identifier (sequence number of the first fragment)
>;
Block
diff --git a/daemon/face/lp-reliability.hpp b/daemon/face/lp-reliability.hpp
index 17b2e44..415a06d 100644
--- a/daemon/face/lp-reliability.hpp
+++ b/daemon/face/lp-reliability.hpp
@@ -39,7 +39,7 @@
class GenericLinkService;
/**
- * \brief Provides for reliable sending and receiving of link-layer packets
+ * \brief Provides for reliable sending and receiving of link-layer packets.
* \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
*/
class LpReliability : noncopyable
@@ -52,31 +52,31 @@
struct Options
{
- /** \brief enables link-layer reliability
+ /** \brief Enables link-layer reliability.
*/
bool isEnabled = false;
- /** \brief maximum number of retransmissions for an LpPacket
+ /** \brief Maximum number of retransmissions for an LpPacket.
*/
size_t maxRetx = 3;
- /** \brief period between sending pending Acks in an IDLE packet
+ /** \brief Period between sending pending Acks in an IDLE packet.
*/
time::nanoseconds idleAckTimerPeriod = 5_ms;
- /** \brief a fragment is considered lost if this number of fragments with greater sequence
- * numbers are acknowledged
+ /** \brief A fragment is considered lost if this number of fragments with greater sequence
+ * numbers are acknowledged.
*/
size_t seqNumLossThreshold = 3;
};
LpReliability(const Options& options, GenericLinkService* linkService);
- /** \brief signals on Interest dropped by reliability system for exceeding allowed number of retx
+ /** \brief Signals on Interest dropped by reliability system for exceeding allowed number of retx.
*/
signal::Signal<LpReliability, Interest> onDroppedInterest;
- /** \brief set options for reliability
+ /** \brief Set options for reliability.
*/
void
setOptions(const Options& options);
@@ -88,7 +88,7 @@
const GenericLinkService*
getLinkService() const;
- /** \brief observe outgoing fragment(s) of a network packet and store for potential retransmission
+ /** \brief Observe outgoing fragment(s) of a network packet and store for potential retransmission.
* \param frags fragments of network packet
* \param pkt encapsulated network packet
* \param isInterest whether the network packet is an Interest
@@ -96,16 +96,16 @@
void
handleOutgoing(std::vector<lp::Packet>& frags, lp::Packet&& pkt, bool isInterest);
- /** \brief extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue
+ /** \brief Extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue.
* \param pkt incoming LpPacket
* \return whether incoming LpPacket is new and not a duplicate
*/
bool
processIncomingPacket(const lp::Packet& pkt);
- /** \brief called by GenericLinkService to attach Acks onto an outgoing LpPacket
+ /** \brief Called by GenericLinkService to attach Acks onto an outgoing LpPacket.
* \param pkt outgoing LpPacket to attach Acks to
- * \param mtu MTU of the Transport
+ * \param mtu MTU of the transport
*/
void
piggyback(lp::Packet& pkt, ssize_t mtu);
@@ -115,7 +115,7 @@
class NetPkt;
using UnackedFrags = std::map<lp::Sequence, UnackedFrag>;
- /** \brief assign TxSequence number to a fragment
+ /** \brief Assign TxSequence number to a fragment.
* \param frag fragment to assign TxSequence to
* \return assigned TxSequence number
* \throw std::length_error assigned TxSequence is equal to the start of the existing window
@@ -123,7 +123,7 @@
lp::Sequence
assignTxSequence(lp::Packet& frag);
- /** \brief start the idle Ack timer
+ /** \brief Start the idle Ack timer.
*
* This timer requests an IDLE packet to acknowledge pending fragments not already piggybacked.
* It is called regularly on a period configured in Options::idleAckTimerPeriod. This allows Acks
@@ -132,22 +132,22 @@
void
startIdleAckTimer();
- /** \brief find and mark as lost fragments where a configurable number of Acks
- * (\p m_options.seqNumLossThreshold) have been received for greater TxSequence numbers
+ /** \brief Find and mark as lost fragments where a configurable number of Acks
+ * (Options::seqNumLossThreshold) have been received for greater TxSequence numbers.
* \param ackIt iterator pointing to acknowledged fragment
* \return vector containing TxSequences of fragments marked lost by this mechanism
*/
std::vector<lp::Sequence>
findLostLpPackets(UnackedFrags::iterator ackIt);
- /** \brief resend (or give up on) a lost fragment
+ /** \brief Resend (or give up on) a lost fragment.
* \return vector of the TxSequences of fragments removed due to a network packet being removed
*/
std::vector<lp::Sequence>
onLpPacketLost(lp::Sequence txSeq, bool isTimeout);
- /** \brief remove the fragment with the given sequence number from the map of unacknowledged
- * fragments, as well as its associated network packet (if any)
+ /** \brief Remove the fragment with the given sequence number from the map of unacknowledged
+ * fragments, as well as its associated network packet (if any).
* \param fragIt iterator to acknowledged fragment
*
* If the given TxSequence marks the beginning of the send window, the window will be incremented.
@@ -156,7 +156,7 @@
void
onLpPacketAcknowledged(UnackedFrags::iterator fragIt);
- /** \brief delete a fragment from UnackedFrags and advance acknowledge window if necessary
+ /** \brief Delete a fragment from UnackedFrags and advance acknowledge window if necessary.
* \param fragIt iterator to an UnackedFrag, must be dereferencable
* \post fragIt is not in m_unackedFrags
* \post if was equal to m_firstUnackedFrag,
@@ -168,7 +168,7 @@
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
/**
- * \brief Contains a sent fragment that has not been acknowledged and associated data
+ * \brief Contains a sent fragment that has not been acknowledged and associated data.
*/
class UnackedFrag
{
@@ -179,14 +179,14 @@
public:
lp::Packet pkt;
scheduler::ScopedEventId rtoTimer;
- time::steady_clock::TimePoint sendTime;
+ time::steady_clock::time_point sendTime;
size_t retxCount;
size_t nGreaterSeqAcks; //!< number of Acks received for sequences greater than this fragment
shared_ptr<NetPkt> netPkt;
};
/**
- * \brief Contains a network-layer packet with unacknowledged fragments
+ * \brief Contains a network-layer packet with unacknowledged fragments.
*/
class NetPkt
{
@@ -203,14 +203,13 @@
Options m_options;
GenericLinkService* m_linkService;
UnackedFrags m_unackedFrags;
- /** An iterator that points to the first unacknowledged fragment in the current window. The window
- * can wrap around so that the beginning of the window is at a TxSequence greater than other
- * fragments in the window. When the window is moved past the last item in the iterator, the
- * first fragment in the map will become the start of the window.
- */
+ // An iterator that points to the first unacknowledged fragment in the current window. The window
+ // can wrap around so that the beginning of the window is at a TxSequence greater than other
+ // fragments in the window. When the window is moved past the last item in the iterator, the
+ // first fragment in the map will become the start of the window.
UnackedFrags::iterator m_firstUnackedFrag;
std::queue<lp::Sequence> m_ackQueue;
- std::map<lp::Sequence, time::steady_clock::TimePoint> m_recentRecvSeqs;
+ std::map<lp::Sequence, time::steady_clock::time_point> m_recentRecvSeqs;
std::queue<lp::Sequence> m_recentRecvSeqsQueue;
lp::Sequence m_lastTxSeqNo;
scheduler::ScopedEventId m_idleAckTimer;
diff --git a/daemon/face/netdev-bound.hpp b/daemon/face/netdev-bound.hpp
index 7328342..9c9aec3 100644
--- a/daemon/face/netdev-bound.hpp
+++ b/daemon/face/netdev-bound.hpp
@@ -32,7 +32,7 @@
class FaceSystem;
-/** \brief manages netdev-bound faces
+/** \brief Manages netdev-bound faces.
*/
class NetdevBound : noncopyable
{
@@ -54,7 +54,7 @@
NetdevBound(const ProtocolFactoryCtorParams& params, const FaceSystem& faceSystem);
- /** \brief process face_system.netdev_bound config section
+ /** \brief Process `face_system.netdev_bound` config section.
*/
void
processConfig(OptionalConfigSection configSection,
diff --git a/daemon/face/pcap-helper.cpp b/daemon/face/pcap-helper.cpp
index 054eda2..637faaf 100644
--- a/daemon/face/pcap-helper.cpp
+++ b/daemon/face/pcap-helper.cpp
@@ -38,7 +38,6 @@
namespace nfd::face {
PcapHelper::PcapHelper(const std::string& interfaceName)
- : m_pcap(nullptr)
{
char errbuf[PCAP_ERRBUF_SIZE] = {};
m_pcap = pcap_create(interfaceName.data(), errbuf);
@@ -56,7 +55,7 @@
pcap_set_buffer_size(m_pcap, 4 * 1024 * 1024);
}
-PcapHelper::~PcapHelper()
+PcapHelper::~PcapHelper() noexcept
{
close();
}
diff --git a/daemon/face/pcap-helper.hpp b/daemon/face/pcap-helper.hpp
index 41bf066..50ab505 100644
--- a/daemon/face/pcap-helper.hpp
+++ b/daemon/face/pcap-helper.hpp
@@ -47,11 +47,7 @@
class Error : public std::runtime_error
{
public:
- explicit
- Error(const std::string& what)
- : std::runtime_error(what)
- {
- }
+ using std::runtime_error::runtime_error;
};
/**
@@ -62,7 +58,7 @@
explicit
PcapHelper(const std::string& interfaceName);
- ~PcapHelper();
+ ~PcapHelper() noexcept;
/**
* @brief Start capturing packets.
@@ -135,7 +131,7 @@
}
private:
- pcap_t* m_pcap;
+ pcap_t* m_pcap = nullptr;
};
} // namespace nfd::face
diff --git a/daemon/face/protocol-factory.hpp b/daemon/face/protocol-factory.hpp
index 4d02d15..c490e07 100644
--- a/daemon/face/protocol-factory.hpp
+++ b/daemon/face/protocol-factory.hpp
@@ -35,12 +35,14 @@
namespace nfd::face {
-/** \brief Parameters to ProtocolFactory constructor
+/**
+ * \brief Parameters to ProtocolFactory constructor.
*
- * Every ProtocolFactory subclass is expected to have a constructor that accepts CtorParams,
- * which in turn passes it to ProtocolFactory base class constructor. Parameters are passed as a
- * struct rather than individually, so that a future change in list of parameters does not
- * require updates to subclass constructors.
+ * Every ProtocolFactory subclass is expected to have a constructor that accepts
+ * ProtocolFactory::CtorParams, which in turn passes it to ProtocolFactory base class
+ * constructor. Parameters are passed as a struct rather than individually, so that
+ * any future changes in the list of parameters will not require updates to all subclass
+ * constructors.
*/
struct ProtocolFactoryCtorParams
{
@@ -48,21 +50,24 @@
shared_ptr<ndn::net::NetworkMonitor> netmon;
};
-/** \brief Provides support for an underlying protocol
- * \sa FaceSystem
+/**
+ * \brief Provides support for an underlying protocol.
*
- * A protocol factory provides support for an underlying protocol and owns Channel objects.
- * It can process a subsection of face_system config section and create channels and multicast
- * faces accordingly.
+ * A protocol factory provides support for an underlying protocol and owns Channel objects.
+ * It can process a subsection of the `face_system` configuration section and create channels
+ * and multicast faces accordingly.
+ *
+ * \sa FaceSystem
*/
class ProtocolFactory : noncopyable
{
public: // registry
using CtorParams = ProtocolFactoryCtorParams;
- /** \brief Register a protocol factory type
- * \tparam PF subclass of ProtocolFactory
- * \param id factory identifier
+ /**
+ * \brief Register a protocol factory type.
+ * \tparam PF subclass of ProtocolFactory
+ * \param id factory identifier
*/
template<typename PF>
static void
@@ -75,19 +80,22 @@
BOOST_VERIFY(r.second);
}
- /** \brief Create a protocol factory instance
- * \retval nullptr if a factory with the given \p id is not registered
+ /**
+ * \brief Create a protocol factory instance.
+ * \retval nullptr if a factory with the given \p id is not registered
*/
static unique_ptr<ProtocolFactory>
create(const std::string& id, const CtorParams& params);
- /** \brief Get all registered protocol factory ids
+ /**
+ * \brief Get all registered protocol factory IDs.
*/
- static std::set<std::string>
+ [[nodiscard]] static std::set<std::string>
listRegistered();
public:
- /** \brief Base class for all exceptions thrown by ProtocolFactory subclasses
+ /**
+ * \brief Base class for all exceptions thrown by ProtocolFactory subclasses.
*/
class Error : public std::runtime_error
{
@@ -102,18 +110,20 @@
~ProtocolFactory() = 0;
#ifdef DOXYGEN
- /** \brief Get id for this protocol factory
+ /**
+ * \brief Get the ID of this protocol factory.
*
- * face_system.factory-id config section is processed by the protocol factory.
+ * `face_system.<factory-id>` config section is processed by the protocol factory.
*/
static const std::string&
getId() noexcept;
#endif
- /** \brief Get FaceUri schemes accepted by this protocol factory
+ /**
+ * \brief Get FaceUri schemes accepted by this protocol factory.
*/
const std::set<std::string>&
- getProvidedSchemes() const
+ getProvidedSchemes() const noexcept
{
return providedSchemes;
}
diff --git a/daemon/face/socket-utils.hpp b/daemon/face/socket-utils.hpp
index 9efb389..2b358e9 100644
--- a/daemon/face/socket-utils.hpp
+++ b/daemon/face/socket-utils.hpp
@@ -30,7 +30,7 @@
namespace nfd::face {
-/** \brief obtain send queue length from a specified system socket
+/** \brief Obtain send queue length from a specified system socket.
* \param fd file descriptor of the socket
* \retval QUEUE_UNSUPPORTED this operation is unsupported on the current platform
* \retval QUEUE_ERROR there was an error retrieving the send queue length
diff --git a/daemon/face/tcp-factory.hpp b/daemon/face/tcp-factory.hpp
index 87ffae8..23969f8 100644
--- a/daemon/face/tcp-factory.hpp
+++ b/daemon/face/tcp-factory.hpp
@@ -31,7 +31,7 @@
namespace nfd::face {
-/** \brief Protocol factory for TCP over IPv4 and IPv6
+/** \brief Protocol factory for TCP over IPv4 and IPv6.
*/
class TcpFactory final : public ProtocolFactory
{
@@ -42,7 +42,7 @@
using ProtocolFactory::ProtocolFactory;
/**
- * \brief Create TCP-based channel using tcp::Endpoint
+ * \brief Create TCP-based channel using tcp::Endpoint.
*
* tcp::Endpoint is really an alias for boost::asio::ip::tcp::endpoint.
*
@@ -56,8 +56,6 @@
createChannel(const tcp::Endpoint& localEndpoint);
private:
- /** \brief process face_system.tcp config section
- */
void
doProcessConfig(OptionalConfigSection configSection,
FaceSystem::ConfigContext& context) final;
diff --git a/daemon/face/transport.cpp b/daemon/face/transport.cpp
index 44babbb..dc3682e 100644
--- a/daemon/face/transport.cpp
+++ b/daemon/face/transport.cpp
@@ -49,23 +49,12 @@
}
}
-Transport::Transport()
- : m_face(nullptr)
- , m_service(nullptr)
- , m_scope(ndn::nfd::FACE_SCOPE_NONE)
- , m_persistency(ndn::nfd::FACE_PERSISTENCY_NONE)
- , m_linkType(ndn::nfd::LINK_TYPE_NONE)
- , m_mtu(MTU_INVALID)
- , m_sendQueueCapacity(QUEUE_UNSUPPORTED)
- , m_state(TransportState::UP)
- , m_expirationTime(time::steady_clock::TimePoint::max())
-{
-}
+Transport::Transport() = default;
Transport::~Transport() = default;
void
-Transport::setFaceAndLinkService(Face& face, LinkService& service)
+Transport::setFaceAndLinkService(Face& face, LinkService& service) noexcept
{
BOOST_ASSERT(m_face == nullptr);
BOOST_ASSERT(m_service == nullptr);
@@ -122,7 +111,7 @@
}
void
-Transport::setMtu(ssize_t mtu)
+Transport::setMtu(ssize_t mtu) noexcept
{
BOOST_ASSERT(mtu == MTU_UNLIMITED || mtu >= 0);
diff --git a/daemon/face/transport.hpp b/daemon/face/transport.hpp
index 0350bf4..cebc927 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -53,7 +53,7 @@
class TransportCounters
{
public:
- /** \brief count of incoming packets
+ /** \brief Count of incoming packets.
*
* A 'packet' typically means a top-level TLV block.
* For a datagram-based transport, an incoming packet that cannot be parsed as TLV
@@ -61,14 +61,14 @@
*/
PacketCounter nInPackets;
- /** \brief count of outgoing packets
+ /** \brief Count of outgoing packets.
*
* A 'packet' typically means a top-level TLV block.
* This counter is incremented only if transport is UP.
*/
PacketCounter nOutPackets;
- /** \brief total incoming bytes
+ /** \brief Total incoming bytes.
*
* This counter includes headers imposed by NFD (such as NDNLP),
* but excludes overhead of underlying protocol (such as IP header).
@@ -77,7 +77,7 @@
*/
ByteCounter nInBytes;
- /** \brief total outgoing bytes
+ /** \brief Total outgoing bytes.
*
* This counter includes headers imposed by NFD (such as NDNLP),
* but excludes overhead of underlying protocol (such as IP header).
@@ -87,28 +87,28 @@
};
/**
- * \brief Indicates that the transport has no limit on payload size
+ * \brief Indicates that the transport has no limit on payload size.
*/
inline constexpr ssize_t MTU_UNLIMITED = -1;
/**
- * \brief (for internal use) Indicates that the MTU field is unset
+ * \brief (for internal use) Indicates that the MTU field is unset.
*/
inline constexpr ssize_t MTU_INVALID = -2;
/**
- * \brief Indicates that the transport does not support reading the queue capacity/length
+ * \brief Indicates that the transport does not support reading the queue capacity/length.
*/
inline constexpr ssize_t QUEUE_UNSUPPORTED = -1;
/**
- * \brief Indicates that the transport was unable to retrieve the queue capacity/length
+ * \brief Indicates that the transport was unable to retrieve the queue capacity/length.
*/
inline constexpr ssize_t QUEUE_ERROR = -2;
/**
* \brief The lower half of a Face.
- * \sa Face
+ * \sa Face, LinkService
*/
class Transport : protected virtual TransportCounters, noncopyable
{
@@ -132,32 +132,48 @@
~Transport();
public:
- /** \brief set Face and LinkService for Transport
- * \pre setFaceAndLinkService has not been called
+ /**
+ * \brief Set Face and LinkService for this transport.
+ * \pre setFaceAndLinkService() has not been called.
*/
void
- setFaceAndLinkService(Face& face, LinkService& service);
+ setFaceAndLinkService(Face& face, LinkService& service) noexcept;
- /** \return Face to which this Transport is attached
+ /**
+ * \brief Returns the Face to which this transport is attached.
*/
const Face*
- getFace() const;
+ getFace() const noexcept
+ {
+ return m_face;
+ }
- /** \return LinkService to which this Transport is attached
+ /**
+ * \brief Returns the LinkService to which this transport is attached.
*/
const LinkService*
- getLinkService() const;
+ getLinkService() const noexcept
+ {
+ return m_service;
+ }
- /** \return LinkService to which this Transport is attached
+ /**
+ * \brief Returns the LinkService to which this transport is attached.
*/
LinkService*
- getLinkService();
+ getLinkService() noexcept
+ {
+ return m_service;
+ }
virtual const Counters&
- getCounters() const;
+ getCounters() const
+ {
+ return *this;
+ }
public: // upper interface
- /** \brief Request the transport to be closed
+ /** \brief Request the transport to be closed.
*
* This operation is effective only if transport is in UP or DOWN state,
* otherwise it has no effect.
@@ -168,7 +184,7 @@
void
close();
- /** \brief Send a link-layer packet
+ /** \brief Send a link-layer packet.
* \param packet the packet to be sent, must be a valid and well-formed TLV block
* \note This operation has no effect if getState() is neither UP nor DOWN
* \warning Behavior is undefined if packet size exceeds the MTU limit
@@ -177,85 +193,125 @@
send(const Block& packet);
public: // static properties
- /** \return a FaceUri representing local endpoint
+ /**
+ * \brief Returns a FaceUri representing the local endpoint.
*/
FaceUri
- getLocalUri() const;
+ getLocalUri() const noexcept
+ {
+ return m_localUri;
+ }
- /** \return a FaceUri representing remote endpoint
+ /**
+ * \brief Returns a FaceUri representing the remote endpoint.
*/
FaceUri
- getRemoteUri() const;
+ getRemoteUri() const noexcept
+ {
+ return m_remoteUri;
+ }
- /** \return whether face is local or non-local for scope control purpose
+ /**
+ * \brief Returns whether the transport is local or non-local for scope control purposes.
*/
ndn::nfd::FaceScope
- getScope() const;
+ getScope() const noexcept
+ {
+ return m_scope;
+ }
- /** \return face persistency setting
+ /**
+ * \brief Returns the current persistency setting of the transport.
*/
ndn::nfd::FacePersistency
- getPersistency() const;
+ getPersistency() const noexcept
+ {
+ return m_persistency;
+ }
- /** \brief check whether the face persistency can be changed to \p newPersistency
+ /**
+ * \brief Check whether the persistency can be changed to \p newPersistency.
*
- * This function serves as the external API, and invokes the protected function
- * canChangePersistencyToImpl to perform further checks if \p newPersistency differs
- * from the current persistency.
+ * This function serves as the external API, and invokes the protected function
+ * canChangePersistencyToImpl() to perform further checks if \p newPersistency differs
+ * from the current persistency.
*
- * \return true if the change can be performed, false otherwise
+ * \return true if the change can be performed, false otherwise
*/
bool
canChangePersistencyTo(ndn::nfd::FacePersistency newPersistency) const;
- /** \brief changes face persistency setting
+ /**
+ * \brief Changes the persistency setting of the transport.
*/
void
setPersistency(ndn::nfd::FacePersistency newPersistency);
- /** \return the link type of the transport
+ /**
+ * \brief Returns the link type of the transport.
*/
ndn::nfd::LinkType
- getLinkType() const;
+ getLinkType() const noexcept
+ {
+ return m_linkType;
+ }
- /** \return maximum payload size
- * \retval MTU_UNLIMITED transport has no limit on payload size
+ /**
+ * \brief Returns the maximum payload size.
+ * \retval MTU_UNLIMITED The transport has no limit on payload size.
*
- * This size is the maximum packet size that can be sent or received through this transport.
+ * This size is the maximum packet size that can be sent or received through this transport.
*
- * For a datagram-based transport, this is typically the Maximum Transmission Unit (MTU),
- * after the overhead of headers introduced by the transport has been accounted for.
- * For a stream-based transport, this is typically unlimited (MTU_UNLIMITED).
+ * For a datagram-based transport, this is typically the Maximum Transmission Unit (MTU),
+ * after the overhead of headers introduced by the transport has been accounted for.
+ * For a stream-based transport, this is typically unlimited (MTU_UNLIMITED).
*/
ssize_t
- getMtu() const;
+ getMtu() const noexcept
+ {
+ return m_mtu;
+ }
- /** \return capacity of the send queue (in bytes)
- * \retval QUEUE_UNSUPPORTED transport does not support queue capacity retrieval
- * \retval QUEUE_ERROR transport was unable to retrieve the queue capacity
+ /**
+ * \brief Returns the capacity of the send queue (in bytes).
+ * \retval QUEUE_UNSUPPORTED The transport does not support queue capacity retrieval.
+ * \retval QUEUE_ERROR The transport was unable to retrieve the queue capacity.
*/
ssize_t
- getSendQueueCapacity() const;
+ getSendQueueCapacity() const noexcept
+ {
+ return m_sendQueueCapacity;
+ }
public: // dynamic properties
- /** \return transport state
+ /**
+ * \brief Returns the current transport state.
*/
TransportState
- getState() const;
+ getState() const noexcept
+ {
+ return m_state;
+ }
- /** \brief signals when transport state changes
+ /**
+ * \brief Signals when the transport state changes.
*/
signal::Signal<Transport, TransportState/*old*/, TransportState/*new*/> afterStateChange;
- /** \return expiration time of the transport
- * \retval time::steady_clock::TimePoint::max() the transport has indefinite lifetime
+ /**
+ * \brief Returns the expiration time of the transport.
+ * \retval time::steady_clock::time_point::max() The transport has an indefinite lifetime.
*/
- time::steady_clock::TimePoint
- getExpirationTime() const;
+ time::steady_clock::time_point
+ getExpirationTime() const noexcept
+ {
+ return m_expirationTime;
+ }
- /** \return current send queue length of the transport (in octets)
- * \retval QUEUE_UNSUPPORTED transport does not support queue length retrieval
- * \retval QUEUE_ERROR transport was unable to retrieve the queue length
+ /**
+ * \brief Returns the current send queue length of the transport (in octets).
+ * \retval QUEUE_UNSUPPORTED The transport does not support queue length retrieval.
+ * \retval QUEUE_ERROR The transport was unable to retrieve the queue length.
*/
virtual ssize_t
getSendQueueLength()
@@ -275,24 +331,39 @@
protected: // properties to be set by subclass
void
- setLocalUri(const FaceUri& uri);
+ setLocalUri(const FaceUri& uri) noexcept
+ {
+ m_localUri = uri;
+ }
void
- setRemoteUri(const FaceUri& uri);
+ setRemoteUri(const FaceUri& uri) noexcept
+ {
+ m_remoteUri = uri;
+ }
void
- setScope(ndn::nfd::FaceScope scope);
+ setScope(ndn::nfd::FaceScope scope) noexcept
+ {
+ m_scope = scope;
+ }
void
- setLinkType(ndn::nfd::LinkType linkType);
+ setLinkType(ndn::nfd::LinkType linkType) noexcept
+ {
+ m_linkType = linkType;
+ }
void
- setMtu(ssize_t mtu);
+ setMtu(ssize_t mtu) noexcept;
void
- setSendQueueCapacity(ssize_t sendQueueCapacity);
+ setSendQueueCapacity(ssize_t sendQueueCapacity) noexcept
+ {
+ m_sendQueueCapacity = sendQueueCapacity;
+ }
- /** \brief set transport state
+ /** \brief Set transport state.
*
* Only the following transitions are valid:
* UP->DOWN, DOWN->UP, UP/DOWN->CLOSING/FAILED, CLOSING/FAILED->CLOSED
@@ -303,10 +374,13 @@
setState(TransportState newState);
void
- setExpirationTime(const time::steady_clock::TimePoint& expirationTime);
+ setExpirationTime(const time::steady_clock::time_point& expirationTime) noexcept
+ {
+ m_expirationTime = expirationTime;
+ }
protected: // to be overridden by subclass
- /** \brief invoked by canChangePersistencyTo to perform the check
+ /** \brief Invoked by canChangePersistencyTo to perform the check.
*
* Base class implementation returns false.
*
@@ -315,7 +389,7 @@
virtual bool
canChangePersistencyToImpl(ndn::nfd::FacePersistency newPersistency) const;
- /** \brief invoked after the persistency has been changed
+ /** \brief Invoked after the persistency has been changed.
*
* The base class implementation does nothing.
* When overridden in a subclass, the function should update internal states
@@ -324,9 +398,9 @@
virtual void
afterChangePersistency(ndn::nfd::FacePersistency oldPersistency);
- /** \brief performs Transport specific operations to close the transport
+ /** \brief Performs Transport specific operations to close the transport.
*
- * This is invoked once by \p close() after changing state to CLOSING.
+ * This is invoked once by close() after changing state to CLOSING.
* It will not be invoked by Transport class if the transport is already CLOSING or CLOSED.
*
* When the cleanup procedure is complete, this method should change state to CLOSED.
@@ -336,7 +410,7 @@
doClose() = 0;
private: // to be overridden by subclass
- /** \brief performs Transport specific operations to send a packet
+ /** \brief Performs Transport specific operations to send a packet.
* \param packet the packet to be sent, can be assumed to be valid and well-formed
* \pre transport state is either UP or DOWN
*/
@@ -344,133 +418,19 @@
doSend(const Block& packet) = 0;
private:
- Face* m_face;
- LinkService* m_service;
+ Face* m_face = nullptr;
+ LinkService* m_service = nullptr;
FaceUri m_localUri;
FaceUri m_remoteUri;
- ndn::nfd::FaceScope m_scope;
- ndn::nfd::FacePersistency m_persistency;
- ndn::nfd::LinkType m_linkType;
- ssize_t m_mtu;
- ssize_t m_sendQueueCapacity;
- TransportState m_state;
- time::steady_clock::TimePoint m_expirationTime;
+ ndn::nfd::FaceScope m_scope = ndn::nfd::FACE_SCOPE_NONE;
+ ndn::nfd::FacePersistency m_persistency = ndn::nfd::FACE_PERSISTENCY_NONE;
+ ndn::nfd::LinkType m_linkType = ndn::nfd::LINK_TYPE_NONE;
+ ssize_t m_mtu = MTU_INVALID;
+ ssize_t m_sendQueueCapacity = QUEUE_UNSUPPORTED;
+ TransportState m_state = TransportState::UP;
+ time::steady_clock::time_point m_expirationTime = time::steady_clock::time_point::max();
};
-inline const Face*
-Transport::getFace() const
-{
- return m_face;
-}
-
-inline const LinkService*
-Transport::getLinkService() const
-{
- return m_service;
-}
-
-inline LinkService*
-Transport::getLinkService()
-{
- return m_service;
-}
-
-inline const Transport::Counters&
-Transport::getCounters() const
-{
- return *this;
-}
-
-inline FaceUri
-Transport::getLocalUri() const
-{
- return m_localUri;
-}
-
-inline void
-Transport::setLocalUri(const FaceUri& uri)
-{
- m_localUri = uri;
-}
-
-inline FaceUri
-Transport::getRemoteUri() const
-{
- return m_remoteUri;
-}
-
-inline void
-Transport::setRemoteUri(const FaceUri& uri)
-{
- m_remoteUri = uri;
-}
-
-inline ndn::nfd::FaceScope
-Transport::getScope() const
-{
- return m_scope;
-}
-
-inline void
-Transport::setScope(ndn::nfd::FaceScope scope)
-{
- m_scope = scope;
-}
-
-inline ndn::nfd::FacePersistency
-Transport::getPersistency() const
-{
- return m_persistency;
-}
-
-inline ndn::nfd::LinkType
-Transport::getLinkType() const
-{
- return m_linkType;
-}
-
-inline void
-Transport::setLinkType(ndn::nfd::LinkType linkType)
-{
- m_linkType = linkType;
-}
-
-inline ssize_t
-Transport::getMtu() const
-{
- return m_mtu;
-}
-
-inline ssize_t
-Transport::getSendQueueCapacity() const
-{
- return m_sendQueueCapacity;
-}
-
-inline void
-Transport::setSendQueueCapacity(ssize_t sendQueueCapacity)
-{
- m_sendQueueCapacity = sendQueueCapacity;
-}
-
-inline TransportState
-Transport::getState() const
-{
- return m_state;
-}
-
-inline time::steady_clock::TimePoint
-Transport::getExpirationTime() const
-{
- return m_expirationTime;
-}
-
-inline void
-Transport::setExpirationTime(const time::steady_clock::TimePoint& expirationTime)
-{
- m_expirationTime = expirationTime;
-}
-
std::ostream&
operator<<(std::ostream& os, const FaceLogHelper<Transport>& flh);
diff --git a/daemon/face/udp-factory.hpp b/daemon/face/udp-factory.hpp
index f0cd686..9144a7a 100644
--- a/daemon/face/udp-factory.hpp
+++ b/daemon/face/udp-factory.hpp
@@ -31,7 +31,7 @@
namespace nfd::face {
-/** \brief Protocol factory for UDP over IPv4 and IPv6
+/** \brief Protocol factory for UDP over IPv4 and IPv6.
*/
class UdpFactory final : public ProtocolFactory
{
@@ -49,7 +49,7 @@
UdpFactory(const CtorParams& params);
/**
- * \brief Create UDP-based channel using udp::Endpoint
+ * \brief Create UDP-based channel using udp::Endpoint.
*
* udp::Endpoint is really an alias for boost::asio::ip::udp::endpoint.
*
@@ -68,7 +68,7 @@
time::nanoseconds idleTimeout);
/**
- * \brief Create a multicast UDP face
+ * \brief Create a multicast UDP face.
*
* udp::Endpoint is really an alias for boost::asio::ip::udp::endpoint.
*
@@ -95,8 +95,6 @@
const udp::Endpoint& multicastEndpoint);
private:
- /** \brief process face_system.udp config section
- */
void
doProcessConfig(OptionalConfigSection configSection,
FaceSystem::ConfigContext& context) final;
@@ -109,13 +107,13 @@
std::vector<shared_ptr<const Channel>>
doGetChannels() const final;
- /** \brief Create UDP multicast faces on \p netif if needed by \p m_mcastConfig
+ /** \brief Create UDP multicast faces on \p netif if needed by \p m_mcastConfig.
* \return list of faces (just created or already existing) on \p netif
*/
std::vector<shared_ptr<Face>>
applyMcastConfigToNetif(const shared_ptr<const ndn::net::NetworkInterface>& netif);
- /** \brief Create and destroy UDP multicast faces according to \p m_mcastConfig
+ /** \brief Create and destroy UDP multicast faces according to \p m_mcastConfig.
*/
void
applyMcastConfig(const FaceSystem::ConfigContext& context);
diff --git a/daemon/face/udp-protocol.hpp b/daemon/face/udp-protocol.hpp
index 1b6e363..5f00b00 100644
--- a/daemon/face/udp-protocol.hpp
+++ b/daemon/face/udp-protocol.hpp
@@ -34,12 +34,14 @@
using Endpoint = boost::asio::ip::udp::endpoint;
-/** \brief computes maximum payload size in a UDP packet
+/**
+ * \brief Computes the maximum payload size in a UDP packet.
*/
ssize_t
computeMtu(const Endpoint& localEndpoint);
-/** \return default IPv4 multicast group: 224.0.23.170:56363
+/**
+ * \brief Returns the default IPv4 multicast group: `224.0.23.170:56363`
*/
inline Endpoint
getDefaultMulticastGroup()
@@ -47,7 +49,8 @@
return {boost::asio::ip::address_v4(0xE00017AA), 56363};
}
-/** \return default IPv6 multicast group: [FF02::1234]:56363
+/**
+ * \brief Returns the default IPv6 multicast group: `[FF02::1234]:56363`
*/
inline Endpoint
getDefaultMulticastGroupV6()
diff --git a/daemon/face/unicast-ethernet-transport.cpp b/daemon/face/unicast-ethernet-transport.cpp
index 3da0681..25864f7 100644
--- a/daemon/face/unicast-ethernet-transport.cpp
+++ b/daemon/face/unicast-ethernet-transport.cpp
@@ -79,7 +79,7 @@
}
else {
m_closeIfIdleEvent.cancel();
- setExpirationTime(time::steady_clock::TimePoint::max());
+ setExpirationTime(time::steady_clock::time_point::max());
}
}
diff --git a/daemon/face/unicast-udp-transport.cpp b/daemon/face/unicast-udp-transport.cpp
index e0a0526..c8a208e 100644
--- a/daemon/face/unicast-udp-transport.cpp
+++ b/daemon/face/unicast-udp-transport.cpp
@@ -94,7 +94,7 @@
}
else {
m_closeIfIdleEvent.cancel();
- setExpirationTime(time::steady_clock::TimePoint::max());
+ setExpirationTime(time::steady_clock::time_point::max());
}
}
diff --git a/daemon/face/unix-stream-factory.hpp b/daemon/face/unix-stream-factory.hpp
index 96ea3b1..8b044d4 100644
--- a/daemon/face/unix-stream-factory.hpp
+++ b/daemon/face/unix-stream-factory.hpp
@@ -31,7 +31,7 @@
namespace nfd::face {
-/** \brief Protocol factory for stream-oriented Unix sockets
+/** \brief Protocol factory for stream-oriented Unix sockets.
*/
class UnixStreamFactory final : public ProtocolFactory
{
@@ -42,7 +42,7 @@
using ProtocolFactory::ProtocolFactory;
/**
- * \brief Create stream-oriented Unix channel using specified socket path
+ * \brief Create stream-oriented Unix channel using specified socket path.
*
* If this method is called twice with the same path, only one channel
* will be created. The second call will just retrieve the existing
@@ -55,8 +55,6 @@
createChannel(const std::string& unixSocketPath);
private:
- /** \brief process face_system.unix config section
- */
void
doProcessConfig(OptionalConfigSection configSection,
FaceSystem::ConfigContext& context) final;
diff --git a/daemon/face/websocket-factory.hpp b/daemon/face/websocket-factory.hpp
index 1da0f98..7804a62 100644
--- a/daemon/face/websocket-factory.hpp
+++ b/daemon/face/websocket-factory.hpp
@@ -31,7 +31,7 @@
namespace nfd::face {
-/** \brief Protocol factory for WebSocket
+/** \brief Protocol factory for WebSocket.
*/
class WebSocketFactory final : public ProtocolFactory
{
@@ -42,7 +42,7 @@
using ProtocolFactory::ProtocolFactory;
/**
- * \brief Create WebSocket-based channel using websocket::Endpoint
+ * \brief Create WebSocket-based channel using websocket::Endpoint.
*
* websocket::Endpoint is really an alias for boost::asio::ip::tcp::endpoint.
*
@@ -57,8 +57,6 @@
createChannel(const websocket::Endpoint& localEndpoint);
private:
- /** \brief process face_system.websocket config section
- */
void
doProcessConfig(OptionalConfigSection configSection,
FaceSystem::ConfigContext& context) final;
diff --git a/daemon/face/websocket-transport.hpp b/daemon/face/websocket-transport.hpp
index 4148872..0dcb530 100644
--- a/daemon/face/websocket-transport.hpp
+++ b/daemon/face/websocket-transport.hpp
@@ -31,31 +31,31 @@
namespace nfd::face {
-/** \brief counters provided by WebSocketTransport
- * \note The type name 'WebSocketTransportCounters' is implementation detail.
- * Use 'WebSocketTransport::Counters' in public API.
+/** \brief Counters provided by WebSocketTransport.
+ * \note The type name WebSocketTransportCounters is an implementation detail.
+ * Use WebSocketTransport::Counters in public API.
*/
class WebSocketTransportCounters : public virtual Transport::Counters
{
public:
- /** \brief count of outgoing Pings
+ /** \brief Count of outgoing pings.
*/
PacketCounter nOutPings;
- /** \brief count of incoming Pongs
+ /** \brief Count of incoming pongs.
*/
PacketCounter nInPongs;
};
-/** \brief A Transport that communicates on a WebSocket connection
+/** \brief A Transport that communicates on a WebSocket connection.
*/
class WebSocketTransport final : public Transport
, protected virtual WebSocketTransportCounters
{
public:
- /** \brief counters provided by WebSocketTransport
+ /** \brief %Counters provided by WebSocketTransport.
*/
- typedef WebSocketTransportCounters Counters;
+ using Counters = WebSocketTransportCounters;
WebSocketTransport(websocketpp::connection_hdl hdl,
websocket::Server& server,
@@ -64,8 +64,7 @@
const Counters&
getCounters() const final;
- /** \brief Translates a message into a Block
- * and delivers it to the link service
+ /** \brief Translates a message into a Block and delivers it to the link service.
*/
void
receiveMessage(const std::string& msg);