diff --git a/daemon/common/config-file.hpp b/daemon/common/config-file.hpp
index 39cc2ed..fac8da8 100644
--- a/daemon/common/config-file.hpp
+++ b/daemon/common/config-file.hpp
@@ -32,27 +32,32 @@
 
 namespace nfd {
 
-/** \brief a config file section
+/**
+ * \brief A configuration file section.
  */
 using ConfigSection = boost::property_tree::ptree;
 
-/** \brief an optional config file section
+/**
+ * \brief An optional configuration file section.
  */
 using OptionalConfigSection = boost::optional<const ConfigSection&>;
 
-/** \brief callback to process a config file section
+/**
+ * \brief Callback to process a configuration file section.
  */
 using ConfigSectionHandler = std::function<void(const ConfigSection& section, bool isDryRun,
                                                 const std::string& filename)>;
 
-/** \brief callback to process a config file section without a \p ConfigSectionHandler
+/**
+ * \brief Callback to process a configuration file section without a #ConfigSectionHandler.
  */
 using UnknownConfigSectionHandler = std::function<void(const std::string& filename,
                                                        const std::string& sectionName,
                                                        const ConfigSection& section,
                                                        bool isDryRun)>;
 
-/** \brief configuration file parsing utility
+/**
+ * \brief Configuration file parsing utility.
  */
 class ConfigFile : noncopyable
 {
@@ -80,7 +85,7 @@
                        bool isDryRun);
 
 public: // parse helpers
-  /** \brief parse a config option that can be either "yes" or "no"
+  /** \brief Parse a config option that can be either "yes" or "no".
    *  \retval true "yes"
    *  \retval false "no"
    *  \throw Error the value is neither "yes" nor "no"
@@ -95,7 +100,7 @@
   }
 
   /**
-   * \brief parse a numeric (integral or floating point) config option
+   * \brief Parse a numeric (integral or floating point) config option.
    * \tparam T an arithmetic type
    *
    * \return the numeric value of the parsed option
@@ -125,7 +130,7 @@
   }
 
   /**
-   * \brief check that a value is within the inclusive range [min, max]
+   * \brief Check that a value is within the inclusive range [min, max].
    * \throw Error the value is out of the acceptable range
    */
   template<typename T>
@@ -142,7 +147,7 @@
   }
 
 public: // setup and parsing
-  /// \brief setup notification of configuration file sections
+  /// \brief Setup notification of configuration file sections.
   void
   addSectionHandler(const std::string& sectionName,
                     ConfigSectionHandler subscriber);
diff --git a/daemon/common/counter.hpp b/daemon/common/counter.hpp
index 4619b35..805ebdf 100644
--- a/daemon/common/counter.hpp
+++ b/daemon/common/counter.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,24 +30,27 @@
 
 namespace nfd {
 
-/** \brief represents a counter that encloses an integer value
+/**
+ * \brief Represents a counter that encloses an integer value.
  *
- *  SimpleCounter is noncopyable, because increment should be called on the counter,
- *  not a copy of it; it's implicitly convertible to an integral type to be observed
+ * SimpleCounter is noncopyable, because increment should be called on the counter,
+ * not a copy of it; it's implicitly convertible to an integral type to be observed.
  */
 class SimpleCounter : noncopyable
 {
 public:
   typedef uint64_t rep;
 
-  /** \brief observe the counter
+  /**
+   * \brief Observe the counter's value.
    */
   operator rep() const noexcept
   {
     return m_value;
   }
 
-  /** \brief replace the counter value
+  /**
+   * \brief Replace the counter's value.
    */
   void
   set(rep value) noexcept
@@ -59,14 +62,14 @@
   rep m_value = 0;
 };
 
-/** \brief represents a counter of number of packets
+/** \brief Represents a counter of number of packets.
  *
  *  \warning The counter value may wrap after exceeding the range of underlying integer type.
  */
 class PacketCounter : public SimpleCounter
 {
 public:
-  /** \brief increment the counter by one
+  /** \brief Increment the counter by one.
    */
   PacketCounter&
   operator++() noexcept
@@ -77,14 +80,14 @@
   // postfix ++ operator is not provided because it's not needed
 };
 
-/** \brief represents a counter of number of bytes
+/** \brief Represents a counter of number of bytes.
  *
  *  \warning The counter value may wrap after exceeding the range of underlying integer type.
  */
 class ByteCounter : public SimpleCounter
 {
 public:
-  /** \brief increase the counter
+  /** \brief Increase the counter.
    */
   ByteCounter&
   operator+=(rep n) noexcept
@@ -94,7 +97,7 @@
   }
 };
 
-/** \brief provides a counter that observes the size of a table
+/** \brief Provides a counter that observes the size of a table.
  *  \tparam T a type that provides a size() const member function
  *
  *  if table not specified in constructor, it can be added later by invoking observe()
@@ -117,7 +120,7 @@
     m_table = table;
   }
 
-  /** \brief observe the counter
+  /** \brief Observe the counter.
    */
   operator Rep() const
   {
diff --git a/daemon/common/privilege-helper.hpp b/daemon/common/privilege-helper.hpp
index b26dce6..cdd4d05 100644
--- a/daemon/common/privilege-helper.hpp
+++ b/daemon/common/privilege-helper.hpp
@@ -35,10 +35,12 @@
 class PrivilegeHelper
 {
 public:
-  /** \brief represents a serious seteuid/gid failure
+  /**
+   * \brief Indicates a serious seteuid/setegid failure.
    *
-   *  This should only be caught by main as part of a graceful program termination.
-   *  \note This is not an std::exception and NDN_THROW should not be used.
+   * This should only be caught by main as part of a graceful program termination.
+   *
+   * \note This is not an std::exception and NDN_THROW should not be used.
    */
   class Error
   {
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);
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index c33ad5c..194c9ca 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -35,16 +35,17 @@
 
 namespace nfd::fw {
 
-/** \brief Access Router strategy
+/**
+ * \brief A forwarding strategy for "access" routers.
  *
- *  This strategy is designed for the last hop on the NDN testbed,
- *  where each nexthop connects to a laptop, links are lossy, and FIB is mostly correct.
+ * This strategy is designed for the last hop on the NDN testbed,
+ * where each nexthop connects to a laptop, links are lossy, and FIB is mostly correct.
  *
- *  1. Multicast the first Interest to all nexthops.
- *  2. When Data comes back, remember last working nexthop of the prefix;
- *     the granularity of this knowledge is the parent of Data Name.
- *  3. Forward subsequent Interests to the last working nexthop.
- *     If it doesn't respond, multicast again.
+ * 1. Multicast the first Interest to all nexthops.
+ * 2. When Data comes back, remember the last working nexthop of the prefix;
+ *    the granularity of this knowledge is the parent of Data Name.
+ * 3. Forward subsequent Interests to the last working nexthop.
+ *    If there is no reply, multicast again (step 1).
  */
 class AccessStrategy : public Strategy
 {
@@ -67,7 +68,7 @@
 private: // StrategyInfo
   using RttEstimator = ndn::util::RttEstimator;
 
-  /** \brief StrategyInfo on PIT entry
+  /** \brief StrategyInfo on PIT entry.
    */
   class PitInfo final : public StrategyInfo
   {
@@ -82,7 +83,7 @@
     scheduler::ScopedEventId rtoTimer;
   };
 
-  /** \brief StrategyInfo in measurements table
+  /** \brief StrategyInfo in measurements table.
    */
   class MtInfo final : public StrategyInfo
   {
@@ -104,18 +105,18 @@
     RttEstimator rtt;
   };
 
-  /** \brief find per-prefix measurements for Interest
+  /** \brief Find per-prefix measurements for Interest.
    */
   std::tuple<Name, MtInfo*>
   findPrefixMeasurements(const pit::Entry& pitEntry);
 
-  /** \brief get or create pre-prefix measurements for incoming Data
+  /** \brief Get or create pre-prefix measurements for incoming Data.
    *  \note This function creates MtInfo but doesn't update it.
    */
   MtInfo*
   addPrefixMeasurements(const Data& data);
 
-  /** \brief global per-face StrategyInfo
+  /** \brief Global per-face StrategyInfo.
    *  \todo Currently stored inside AccessStrategy instance; should be moved
    *        to measurements table or somewhere else.
    */
@@ -141,7 +142,7 @@
   afterReceiveRetxInterest(const Interest& interest, const FaceEndpoint& ingress,
                            const shared_ptr<pit::Entry>& pitEntry);
 
-  /** \brief send to last working nexthop
+  /** \brief Send to last working nexthop.
    *  \return whether an Interest is sent
    */
   bool
@@ -153,7 +154,7 @@
   afterRtoTimeout(const weak_ptr<pit::Entry>& pitWeak,
                   FaceId inFaceId, FaceId firstOutFaceId);
 
-  /** \brief multicast to all nexthops
+  /** \brief Multicast to all nexthops.
    *  \param exceptFace don't forward to this face; also, \p inFace is always excluded
    *  \return number of Interests that were sent
    */
diff --git a/daemon/fw/algorithm.hpp b/daemon/fw/algorithm.hpp
index 2ff4c2c..3ae3880 100644
--- a/daemon/fw/algorithm.hpp
+++ b/daemon/fw/algorithm.hpp
@@ -35,13 +35,13 @@
 
 namespace nfd::fw {
 
-/** \brief determine whether forwarding the Interest in \p pitEntry to \p outFace would violate scope
+/** \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
  */
 bool
 wouldViolateScope(const Face& inFace, const Interest& interest, const Face& outFace);
 
-/** \brief indicates where duplicate Nonces are found
+/** \brief Indicates where duplicate Nonces are found.
  */
 enum DuplicateNonceWhere {
   DUPLICATE_NONCE_NONE      = 0,        ///< no duplicate Nonce is found
@@ -51,13 +51,13 @@
   DUPLICATE_NONCE_OUT_OTHER = (1 << 3), ///< out-record of other face
 };
 
-/** \brief determine whether \p pitEntry has duplicate Nonce \p nonce
+/** \brief Determine whether \p pitEntry has duplicate Nonce \p nonce.
  *  \return OR'ed DuplicateNonceWhere
  */
 int
 findDuplicateNonce(const pit::Entry& pitEntry, Interest::Nonce nonce, const Face& face);
 
-/** \brief determine whether \p pitEntry has any pending out-records
+/** \brief Determine whether \p pitEntry has any pending out-records.
  *  \return true if there is at least one out-record waiting for Data
  */
 bool
@@ -66,10 +66,10 @@
 /** \return last out-record time
  *  \pre pitEntry has one or more unexpired out-records
  */
-time::steady_clock::TimePoint
+time::steady_clock::time_point
 getLastOutgoing(const pit::Entry& pitEntry);
 
-/** \brief pick an eligible NextHop with earliest out-record
+/** \brief Pick an eligible NextHop with earliest out-record.
  *  \note It is assumed that every nexthop has an out-record.
  */
 fib::NextHopList::const_iterator
@@ -77,20 +77,20 @@
                                          const fib::NextHopList& nexthops,
                                          const shared_ptr<pit::Entry>& pitEntry);
 
-/** \brief determines whether a NextHop is eligible i.e. not the same inFace
+/** \brief Determines whether a NextHop is eligible, i.e., not the same \p inFace.
  *  \param inFace incoming face of current Interest
  *  \param interest incoming Interest
  *  \param nexthop next hop
  *  \param pitEntry PIT entry
  *  \param wantUnused if true, NextHop must not have unexpired out-record
- *  \param now time::steady_clock::now(), ignored if !wantUnused
+ *  \param now the current time, ignored if `wantUnused == false`
  */
 bool
 isNextHopEligible(const Face& inFace, const Interest& interest,
                   const fib::NextHop& nexthop,
                   const shared_ptr<pit::Entry>& pitEntry,
                   bool wantUnused = false,
-                  time::steady_clock::TimePoint now = time::steady_clock::TimePoint::min());
+                  time::steady_clock::time_point now = time::steady_clock::time_point::min());
 
 } // namespace nfd::fw
 
diff --git a/daemon/fw/asf-strategy.hpp b/daemon/fw/asf-strategy.hpp
index 0e6f3a2..b3d7396 100644
--- a/daemon/fw/asf-strategy.hpp
+++ b/daemon/fw/asf-strategy.hpp
@@ -34,12 +34,13 @@
 namespace nfd::fw {
 namespace asf {
 
-/** \brief Adaptive SRTT-based Forwarding Strategy
+/**
+ * \brief Adaptive SRTT-based forwarding strategy.
  *
- *  \see Vince Lehman, Ashlesh Gawande, Rodrigo Aldecoa, Dmitri Krioukov, Beichuan Zhang,
- *       Lixia Zhang, and Lan Wang, "An Experimental Investigation of Hyperbolic Routing
- *       with a Smart Forwarding Plane in NDN", NDN Technical Report NDN-0042, 2016.
- *       https://named-data.net/publications/techreports/ndn-0042-1-asf/
+ * \see Vince Lehman, Ashlesh Gawande, Rodrigo Aldecoa, Dmitri Krioukov, Beichuan Zhang,
+ *      Lixia Zhang, and Lan Wang, "An Experimental Investigation of Hyperbolic Routing
+ *      with a Smart Forwarding Plane in NDN", NDN Technical Report NDN-0042, 2016.
+ *      https://named-data.net/publications/techreports/ndn-0042-1-asf/
  */
 class AsfStrategy : public Strategy
 {
diff --git a/daemon/fw/best-route-strategy.hpp b/daemon/fw/best-route-strategy.hpp
index 484ac51..56e64a5 100644
--- a/daemon/fw/best-route-strategy.hpp
+++ b/daemon/fw/best-route-strategy.hpp
@@ -32,22 +32,23 @@
 
 namespace nfd::fw {
 
-/** \brief Best Route strategy
+/**
+ * \brief "Best route" forwarding strategy.
  *
- *  This strategy forwards a new Interest to the lowest-cost nexthop (except downstream).
- *  After that, if consumer retransmits the Interest (and is not suppressed according to
- *  exponential backoff algorithm), the strategy forwards the Interest again to
- *  the lowest-cost nexthop (except downstream) that is not previously used.
- *  If all nexthops have been used, the strategy starts over with the first nexthop.
+ * This strategy forwards a new Interest to the lowest-cost nexthop (except downstream).
+ * After that, if consumer retransmits the Interest (and is not suppressed according to
+ * exponential backoff algorithm), the strategy forwards the Interest again to
+ * the lowest-cost nexthop (except downstream) that is not previously used.
+ * If all nexthops have been used, the strategy starts over with the first nexthop.
  *
- *  This strategy returns Nack to all downstreams with reason NoRoute
- *  if there is no usable nexthop, which may be caused by:
+ * This strategy returns Nack to all downstreams with reason NoRoute
+ * if there is no usable nexthop, which may be caused by:
  *  (a) the FIB entry contains no nexthop;
  *  (b) the FIB nexthop happens to be the sole downstream;
  *  (c) the FIB nexthops violate scope.
  *
- *  This strategy returns Nack to all downstreams if all upstreams have returned Nacks.
- *  The reason of the sent Nack equals the least severe reason among received Nacks.
+ * This strategy returns Nack to all downstreams if all upstreams have returned Nacks.
+ * The reason of the sent Nack equals the least severe reason among received Nacks.
  */
 class BestRouteStrategy : public Strategy
                         , public ProcessNackTraits<BestRouteStrategy>
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index 93567bf..75b1190 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.cpp
@@ -36,20 +36,15 @@
 
 NFD_LOG_INIT(FaceTable);
 
-FaceTable::FaceTable()
-  : m_lastFaceId(face::FACEID_RESERVED_MAX)
-{
-}
-
 Face*
-FaceTable::get(FaceId id) const
+FaceTable::get(FaceId id) const noexcept
 {
   auto i = m_faces.find(id);
   return i == m_faces.end() ? nullptr : i->second.get();
 }
 
 size_t
-FaceTable::size() const
+FaceTable::size() const noexcept
 {
   return m_faces.size();
 }
diff --git a/daemon/fw/face-table.hpp b/daemon/fw/face-table.hpp
index d1c51c7..b19530d 100644
--- a/daemon/fw/face-table.hpp
+++ b/daemon/fw/face-table.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-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,
@@ -33,14 +33,13 @@
 
 namespace nfd {
 
-/** \brief container of all faces
+/**
+ * \brief Container of all faces.
  */
 class FaceTable : noncopyable
 {
 public:
-  FaceTable();
-
-  /** \brief add a face
+  /** \brief Add a face.
    *
    *  FaceTable obtains shared ownership of the face.
    *  The channel or protocol factory that creates the face may retain ownership.
@@ -48,29 +47,26 @@
   void
   add(shared_ptr<Face> face);
 
-  /** \brief add a special face with a reserved FaceId
+  /** \brief Add a special face with a reserved FaceId.
    */
   void
   addReserved(shared_ptr<Face> face, FaceId faceId);
 
-  /** \brief get face by FaceId
-   *  \return a face if found, nullptr if not found;
-   *          face->shared_from_this() can be used if shared_ptr<Face> is desired
+  /** \brief Get face by FaceId.
+   *  \return A pointer to the face if found, nullptr otherwise;
+   *          `face->shared_from_this()` can be used if a `shared_ptr` is desired.
    */
   Face*
-  get(FaceId id) const;
+  get(FaceId id) const noexcept;
 
-  /** \return count of faces
+  /** \brief Return the total number of faces.
    */
   size_t
-  size() const;
+  size() const noexcept;
 
 public: // enumeration
   using FaceMap = std::map<FaceId, shared_ptr<Face>>;
   using ForwardRange = boost::indirected_range<const boost::select_second_const_range<FaceMap>>;
-
-  /** \brief ForwardIterator for Face&
-   */
   using const_iterator = boost::range_iterator<ForwardRange>::type;
 
   const_iterator
@@ -101,7 +97,7 @@
   getForwardRange() const;
 
 private:
-  FaceId m_lastFaceId;
+  FaceId m_lastFaceId = face::FACEID_RESERVED_MAX;
   FaceMap m_faces;
 };
 
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index f4f5928..172331f 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -86,8 +86,6 @@
   m_strategyChoice.setDefaultStrategy(getDefaultStrategyName());
 }
 
-Forwarder::~Forwarder() = default;
-
 void
 Forwarder::onIncomingInterest(const Interest& interest, const FaceEndpoint& ingress)
 {
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index 373d395..a2f2af7 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -56,144 +56,146 @@
   explicit
   Forwarder(FaceTable& faceTable);
 
-  NFD_VIRTUAL_WITH_TESTS
-  ~Forwarder();
+#ifdef NFD_WITH_TESTS
+  virtual
+  ~Forwarder() = default;
+#endif
 
   const ForwarderCounters&
-  getCounters() const
+  getCounters() const noexcept
   {
     return m_counters;
   }
 
   fw::UnsolicitedDataPolicy&
-  getUnsolicitedDataPolicy() const
+  getUnsolicitedDataPolicy() const noexcept
   {
     return *m_unsolicitedDataPolicy;
   }
 
   void
-  setUnsolicitedDataPolicy(unique_ptr<fw::UnsolicitedDataPolicy> policy)
+  setUnsolicitedDataPolicy(unique_ptr<fw::UnsolicitedDataPolicy> policy) noexcept
   {
     BOOST_ASSERT(policy != nullptr);
     m_unsolicitedDataPolicy = std::move(policy);
   }
 
   NameTree&
-  getNameTree()
+  getNameTree() noexcept
   {
     return m_nameTree;
   }
 
   Fib&
-  getFib()
+  getFib() noexcept
   {
     return m_fib;
   }
 
   Pit&
-  getPit()
+  getPit() noexcept
   {
     return m_pit;
   }
 
   Cs&
-  getCs()
+  getCs() noexcept
   {
     return m_cs;
   }
 
   Measurements&
-  getMeasurements()
+  getMeasurements() noexcept
   {
     return m_measurements;
   }
 
   StrategyChoice&
-  getStrategyChoice()
+  getStrategyChoice() noexcept
   {
     return m_strategyChoice;
   }
 
   DeadNonceList&
-  getDeadNonceList()
+  getDeadNonceList() noexcept
   {
     return m_deadNonceList;
   }
 
   NetworkRegionTable&
-  getNetworkRegionTable()
+  getNetworkRegionTable() noexcept
   {
     return m_networkRegionTable;
   }
 
-  /** \brief register handler for forwarder section of NFD configuration file
+  /** \brief Register handler for forwarder section of NFD configuration file.
    */
   void
   setConfigFile(ConfigFile& configFile);
 
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
-  /** \brief incoming Interest pipeline
+  /** \brief Incoming Interest pipeline.
    *  \param interest the incoming Interest, must be well-formed and created with make_shared
    *  \param ingress face on which \p interest was received and endpoint of the sender
    */
   NFD_VIRTUAL_WITH_TESTS void
   onIncomingInterest(const Interest& interest, const FaceEndpoint& ingress);
 
-  /** \brief Interest loop pipeline
+  /** \brief Interest loop pipeline.
    */
   NFD_VIRTUAL_WITH_TESTS void
   onInterestLoop(const Interest& interest, const FaceEndpoint& ingress);
 
-  /** \brief Content Store miss pipeline
+  /** \brief Content Store miss pipeline.
   */
   NFD_VIRTUAL_WITH_TESTS void
   onContentStoreMiss(const Interest& interest, const FaceEndpoint& ingress,
                      const shared_ptr<pit::Entry>& pitEntry);
 
-  /** \brief Content Store hit pipeline
+  /** \brief Content Store hit pipeline.
   */
   NFD_VIRTUAL_WITH_TESTS void
   onContentStoreHit(const Interest& interest, const FaceEndpoint& ingress,
                     const shared_ptr<pit::Entry>& pitEntry, const Data& data);
 
-  /** \brief outgoing Interest pipeline
+  /** \brief Outgoing Interest pipeline.
    *  \return A pointer to the out-record created or nullptr if the Interest was dropped
    */
   NFD_VIRTUAL_WITH_TESTS pit::OutRecord*
   onOutgoingInterest(const Interest& interest, Face& egress,
                      const shared_ptr<pit::Entry>& pitEntry);
 
-  /** \brief Interest finalize pipeline
+  /** \brief Interest finalize pipeline.
    */
   NFD_VIRTUAL_WITH_TESTS void
   onInterestFinalize(const shared_ptr<pit::Entry>& pitEntry);
 
-  /** \brief incoming Data pipeline
+  /** \brief Incoming Data pipeline.
    *  \param data the incoming Data, must be well-formed and created with make_shared
    *  \param ingress face on which \p data was received and endpoint of the sender
    */
   NFD_VIRTUAL_WITH_TESTS void
   onIncomingData(const Data& data, const FaceEndpoint& ingress);
 
-  /** \brief Data unsolicited pipeline
+  /** \brief Data unsolicited pipeline.
    */
   NFD_VIRTUAL_WITH_TESTS void
   onDataUnsolicited(const Data& data, const FaceEndpoint& ingress);
 
-  /** \brief outgoing Data pipeline
+  /** \brief Outgoing Data pipeline.
    *  \return Whether the Data was transmitted (true) or dropped (false)
    */
   NFD_VIRTUAL_WITH_TESTS bool
   onOutgoingData(const Data& data, Face& egress);
 
-  /** \brief incoming Nack pipeline
+  /** \brief Incoming Nack pipeline.
    *  \param nack the incoming Nack, must be well-formed
    *  \param ingress face on which \p nack is received and endpoint of the sender
    */
   NFD_VIRTUAL_WITH_TESTS void
   onIncomingNack(const lp::Nack& nack, const FaceEndpoint& ingress);
 
-  /** \brief outgoing Nack pipeline
+  /** \brief Outgoing Nack pipeline.
    *  \return Whether the Nack was transmitted (true) or dropped (false)
    */
   NFD_VIRTUAL_WITH_TESTS bool
@@ -207,12 +209,12 @@
   onNewNextHop(const Name& prefix, const fib::NextHop& nextHop);
 
 private:
-  /** \brief set a new expiry timer (now + \p duration) on a PIT entry
+  /** \brief Set a new expiry timer (now + \p duration) on a PIT entry.
    */
   void
   setExpiryTimer(const shared_ptr<pit::Entry>& pitEntry, time::milliseconds duration);
 
-  /** \brief insert Nonce to Dead Nonce List if necessary
+  /** \brief Insert Nonce to Dead Nonce List if necessary.
    *  \param upstream if null, insert Nonces from all out-records;
    *                  if not null, insert Nonce only on the out-records of this face
    */
@@ -225,7 +227,7 @@
 
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /**
-   * \brief Configuration options from "forwarder" section
+   * \brief Configuration options from the `forwarder` section.
    */
   struct Config
   {
diff --git a/daemon/fw/multicast-strategy.hpp b/daemon/fw/multicast-strategy.hpp
index 6abbb38..da01018 100644
--- a/daemon/fw/multicast-strategy.hpp
+++ b/daemon/fw/multicast-strategy.hpp
@@ -31,7 +31,8 @@
 
 namespace nfd::fw {
 
-/** \brief A forwarding strategy that forwards Interests to all FIB nexthops
+/**
+ * \brief A forwarding strategy that forwards Interests to all FIB nexthops.
  */
 class MulticastStrategy : public Strategy
 {
diff --git a/daemon/fw/random-strategy.hpp b/daemon/fw/random-strategy.hpp
index 31b1e26..4150d9f 100644
--- a/daemon/fw/random-strategy.hpp
+++ b/daemon/fw/random-strategy.hpp
@@ -31,9 +31,10 @@
 
 namespace nfd::fw {
 
-/** \brief A forwarding strategy that randomly chooses a nexthop
+/**
+ * \brief A forwarding strategy that randomly chooses a nexthop.
  *
- *  Sends the incoming Interest to a random outgoing face, excluding the incoming face.
+ * Sends the incoming Interest to a random outgoing face, excluding the incoming face.
  */
 class RandomStrategy : public Strategy
                      , public ProcessNackTraits<RandomStrategy>
diff --git a/daemon/fw/retx-suppression-exponential.cpp b/daemon/fw/retx-suppression-exponential.cpp
index 6d8cdcb..39af1f5 100644
--- a/daemon/fw/retx-suppression-exponential.cpp
+++ b/daemon/fw/retx-suppression-exponential.cpp
@@ -46,9 +46,7 @@
   }
 
 public:
-  /** \brief if last transmission occurred within suppressionInterval,
-   *         retransmission will be suppressed
-   */
+  // If the last transmission occurred within this interval, retx will be suppressed
   RetxSuppressionExponential::Duration suppressionInterval;
 };
 
diff --git a/daemon/fw/retx-suppression-exponential.hpp b/daemon/fw/retx-suppression-exponential.hpp
index fd8e2c6..82dec6c 100644
--- a/daemon/fw/retx-suppression-exponential.hpp
+++ b/daemon/fw/retx-suppression-exponential.hpp
@@ -51,19 +51,19 @@
                              Duration maxInterval = DEFAULT_MAX_INTERVAL,
                              float multiplier = DEFAULT_MULTIPLIER);
 
-  /** \brief determines whether Interest is a retransmission per pit entry
-   *         and if so, whether it shall be forwarded or suppressed
+  /** \brief Determines whether Interest is a retransmission per pit entry
+   *         and if so, whether it shall be forwarded or suppressed.
    */
   RetxSuppressionResult
   decidePerPitEntry(pit::Entry& pitEntry);
 
-  /** \brief determines whether Interest is a retransmission per upstream
-   *         and if so, whether it shall be forwarded or suppressed
+  /** \brief Determines whether Interest is a retransmission per upstream
+   *         and if so, whether it shall be forwarded or suppressed.
    */
   RetxSuppressionResult
   decidePerUpstream(pit::Entry& pitEntry, Face& outFace);
 
-  /** \brief Increment the suppression interval for out record
+  /** \brief Increment the suppression interval for out record.
    */
   void
   incrementIntervalForOutRecord(pit::OutRecord& outRecord);
diff --git a/daemon/fw/retx-suppression-fixed.hpp b/daemon/fw/retx-suppression-fixed.hpp
index fdd1114..7090b99 100644
--- a/daemon/fw/retx-suppression-fixed.hpp
+++ b/daemon/fw/retx-suppression-fixed.hpp
@@ -31,8 +31,9 @@
 
 namespace nfd::fw {
 
-/** \brief a retransmission suppression decision algorithm that
- *         suppresses retransmissions within a fixed duration
+/**
+ * \brief A retransmission suppression decision algorithm that
+ *        suppresses retransmissions within a fixed duration.
  */
 class RetxSuppressionFixed
 {
@@ -40,8 +41,8 @@
   explicit
   RetxSuppressionFixed(const time::milliseconds& minRetxInterval = DEFAULT_MIN_RETX_INTERVAL);
 
-  /** \brief determines whether Interest is a retransmission,
-   *         and if so, whether it shall be forwarded or suppressed
+  /** \brief Determines whether Interest is a retransmission,
+   *         and if so, whether it shall be forwarded or suppressed.
    */
   RetxSuppressionResult
   decidePerPitEntry(pit::Entry& pitEntry) const;
diff --git a/daemon/fw/scope-prefix.hpp b/daemon/fw/scope-prefix.hpp
index 9b48b22..cbc5d1c 100644
--- a/daemon/fw/scope-prefix.hpp
+++ b/daemon/fw/scope-prefix.hpp
@@ -28,12 +28,12 @@
 
 #include "core/common.hpp"
 
-/** \brief contain name prefixes that affect namespace-based scope control
+/** \brief Contain name prefixes that affect namespace-based scope control.
  *  \sa https://redmine.named-data.net/projects/nfd/wiki/ScopeControl
  */
 namespace nfd::scope_prefix {
 
-/** \brief ndn:/localhost
+/** \brief The localhost scope `ndn:/localhost`.
  *
  *  The localhost scope limits propagation to the applications on the originating host.
  *
@@ -43,7 +43,7 @@
  */
 inline const Name LOCALHOST{"/localhost"};
 
-/** \brief ndn:/localhop
+/** \brief The localhop scope `ndn:/localhop`.
  *
  *  The localhop scope limits propagation to no further than the next node.
  *
diff --git a/daemon/fw/self-learning-strategy.hpp b/daemon/fw/self-learning-strategy.hpp
index 59cf98b..665d24e 100644
--- a/daemon/fw/self-learning-strategy.hpp
+++ b/daemon/fw/self-learning-strategy.hpp
@@ -32,12 +32,13 @@
 
 namespace nfd::fw {
 
-/** \brief Self-learning forwarding strategy
+/**
+ * \brief Self-learning forwarding strategy.
  *
- *  This strategy first broadcasts Interest to learn a single path towards data,
- *  then unicasts subsequent Interests along the learned path.
+ * This strategy first broadcasts Interest to learn a single path towards data,
+ * then unicasts subsequent Interests along the learned path.
  *
- *  \see https://redmine.named-data.net/attachments/864/Self-learning-strategy-v1.pdf
+ * \see https://redmine.named-data.net/attachments/864/Self-learning-strategy-v1.pdf
  */
 class SelfLearningStrategy : public Strategy
 {
@@ -90,7 +91,7 @@
                    const shared_ptr<pit::Entry>& pitEntry) override;
 
 private: // operations
-  /** \brief Send an Interest to all possible faces
+  /** \brief Send an Interest to all possible faces.
    *
    *  This function is invoked when the forwarder has no matching FIB entries for
    *  an incoming discovery Interest, which will be forwarded to faces that
@@ -102,7 +103,7 @@
   broadcastInterest(const Interest& interest, const Face& inFace,
                     const shared_ptr<pit::Entry>& pitEntry);
 
-  /** \brief Send an Interest to \p nexthops
+  /** \brief Send an Interest to \p nexthops.
    */
   void
   multicastInterest(const Interest& interest, const Face& inFace,
@@ -110,12 +111,12 @@
                     const fib::NextHopList& nexthops);
 
   /** \brief Find a Prefix Announcement for the Data on the RIB thread, and forward
-   *         the Data with the Prefix Announcement on the main thread
+   *         the Data with the Prefix Announcement on the main thread.
    */
   void
   asyncProcessData(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace, const Data& data);
 
-  /** \brief Check whether a PrefixAnnouncement needs to be attached to an incoming Data
+  /** \brief Check whether a PrefixAnnouncement needs to be attached to an incoming Data.
    *
    *  The conditions that a Data packet requires a PrefixAnnouncement are
    *    - the incoming Interest was discovery and
@@ -125,13 +126,13 @@
   static bool
   needPrefixAnn(const shared_ptr<pit::Entry>& pitEntry);
 
-  /** \brief Add a route using RibManager::slAnnounce on the RIB thread
+  /** \brief Add a route using RibManager::slAnnounce on the RIB thread.
    */
   void
   addRoute(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace,
            const Data& data, const ndn::PrefixAnnouncement& pa);
 
-  /** \brief renew a route using RibManager::slRenew on the RIB thread
+  /** \brief Renew a route using RibManager::slRenew on the RIB thread.
    */
   void
   renewRoute(const Name& name, FaceId inFaceId, time::milliseconds maxLifetime);
diff --git a/daemon/fw/strategy-info.hpp b/daemon/fw/strategy-info.hpp
index db6e9e6..fdf457b 100644
--- a/daemon/fw/strategy-info.hpp
+++ b/daemon/fw/strategy-info.hpp
@@ -30,7 +30,8 @@
 
 namespace nfd::fw {
 
-/** \brief Contains arbitrary information placed by the forwarding strategy on table entries
+/**
+ * \brief Contains arbitrary information placed by the forwarding strategy on table entries.
  */
 class StrategyInfo
 {
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index ce8ba23..285e1a8 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -36,16 +36,17 @@
 class StrategyParameters;
 
 /**
- * \brief Represents a forwarding strategy
+ * \brief Base class of all forwarding strategies.
  */
 class Strategy : noncopyable
 {
 public: // registry
-  /** \brief Register a strategy type
-   *  \tparam S subclass of Strategy
-   *  \param strategyName strategy program name, must contain version
-   *  \note It is permitted to register the same strategy type under multiple names,
-   *        which is useful in tests and for creating aliases.
+  /**
+   * \brief Register a strategy type.
+   * \tparam S subclass of Strategy
+   * \param strategyName strategy program name, must contain version
+   * \note It is permitted to register the same strategy type under multiple names,
+   *       which is useful in tests and for creating aliases.
    */
   template<typename S>
   static void
@@ -59,30 +60,34 @@
     BOOST_VERIFY(r.second);
   }
 
-  /** \return Whether a strategy instance can be created from \p instanceName
-   *  \param instanceName strategy instance name, may contain version and parameters
-   *  \note This function finds a strategy type using same rules as \p create ,
-   *        but does not attempt to construct an instance.
+  /**
+   * \brief Returns whether a strategy instance can be created from \p instanceName.
+   * \param instanceName strategy instance name, may contain version and parameters
+   * \note This function finds a strategy type using the same rules as create(),
+   *       but does not attempt to construct an instance.
    */
   static bool
   canCreate(const Name& instanceName);
 
-  /** \return A strategy instance created from \p instanceName
-   *  \retval nullptr if `canCreate(instanceName) == false`
-   *  \throw std::invalid_argument strategy type constructor does not accept
-   *                               specified version or parameters
+  /**
+   * \brief Returns a strategy instance created from \p instanceName.
+   * \retval nullptr if `canCreate(instanceName) == false`
+   * \throw std::invalid_argument strategy type constructor does not accept the
+   *                              specified version or parameters
    */
   static unique_ptr<Strategy>
   create(const Name& instanceName, Forwarder& forwarder);
 
-  /** \return Whether \p instanceNameA and \p instanceNameA will initiate same strategy type
+  /**
+   * \brief Returns whether two names will instantiate the same strategy type.
    */
   static bool
   areSameType(const Name& instanceNameA, const Name& instanceNameB);
 
-  /** \return Registered versioned strategy names
+  /**
+   * \brief Returns all registered versioned strategy names.
    */
-  static std::set<Name>
+  [[nodiscard]] static std::set<Name>
   listRegistered();
 
 public: // constructor, destructor, strategy info
@@ -97,22 +102,24 @@
   ~Strategy();
 
 #ifdef DOXYGEN
-  /** \return Strategy program name
+  /**
+   * \brief Returns the strategy's program name.
    *
-   *  The strategy name is defined by the strategy program.
-   *  It must end with a version component.
+   * The strategy name is defined by the strategy program.
+   * It must end with a version component.
    */
   static const Name&
   getStrategyName();
 #endif
 
-  /** \return Strategy instance name
+  /**
+   * \brief Returns the strategy's instance name.
    *
-   *  The instance name is assigned during instantiation.
-   *  It contains a version component, and may have extra parameter components.
+   * The instance name is assigned during instantiation.
+   * It contains a version component and may have extra parameter components.
    */
   const Name&
-  getInstanceName() const
+  getInstanceName() const noexcept
   {
     return m_name;
   }
@@ -356,19 +363,19 @@
   lookupFib(const pit::Entry& pitEntry) const;
 
   MeasurementsAccessor&
-  getMeasurements()
+  getMeasurements() noexcept
   {
     return m_measurements;
   }
 
   Face*
-  getFace(FaceId id) const
+  getFace(FaceId id) const noexcept
   {
     return getFaceTable().get(id);
   }
 
   const FaceTable&
-  getFaceTable() const
+  getFaceTable() const noexcept
   {
     return m_forwarder.m_faceTable;
   }
@@ -405,7 +412,7 @@
    *  \note This must be called by strategy subclass constructor.
    */
   void
-  setInstanceName(const Name& name)
+  setInstanceName(const Name& name) noexcept
   {
     m_name = name;
   }
diff --git a/daemon/mgmt/command-authenticator.hpp b/daemon/mgmt/command-authenticator.hpp
index 12c6c70..0a3d4e5 100644
--- a/daemon/mgmt/command-authenticator.hpp
+++ b/daemon/mgmt/command-authenticator.hpp
@@ -35,7 +35,8 @@
 
 namespace nfd {
 
-/** \brief Provides ControlCommand authorization according to NFD configuration file.
+/**
+ * \brief Provides ControlCommand authorization according to NFD's configuration file.
  */
 class CommandAuthenticator : public std::enable_shared_from_this<CommandAuthenticator>, noncopyable
 {
@@ -46,10 +47,10 @@
   void
   setConfigFile(ConfigFile& configFile);
 
-  /** \return an Authorization function for module/verb command
+  /** \brief Returns an Authorization function for `module/verb` command.
    *  \param module management module name
-   *  \param verb command verb; currently it's ignored
-   *  \note This must be called before parsing configuration file
+   *  \param verb command verb; currently ignored
+   *  \note This must be called before parsing the configuration file.
    */
   ndn::mgmt::Authorization
   makeAuthorization(const std::string& module, const std::string& verb);
@@ -57,14 +58,14 @@
 private:
   CommandAuthenticator();
 
-  /** \brief process "authorizations" section
+  /** \brief Process `authorizations` section.
    *  \throw ConfigFile::Error on parse error
    */
   void
   processConfig(const ConfigSection& section, bool isDryRun, const std::string& filename);
 
 private:
-  /// module => validator
+  // module => validator
   std::unordered_map<std::string, shared_ptr<ndn::security::Validator>> m_validators;
 };
 
diff --git a/daemon/mgmt/forwarder-status-manager.hpp b/daemon/mgmt/forwarder-status-manager.hpp
index 39c52f3..f93650c 100644
--- a/daemon/mgmt/forwarder-status-manager.hpp
+++ b/daemon/mgmt/forwarder-status-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -47,7 +47,8 @@
   ndn::nfd::ForwarderStatus
   collectGeneralStatus();
 
-  /** \brief provide general status dataset
+  /**
+   * \brief Provides the general status dataset.
    */
   void
   listGeneralStatus(const Name& topPrefix, const Interest& interest,
@@ -56,7 +57,7 @@
 private:
   Forwarder& m_forwarder;
   Dispatcher& m_dispatcher;
-  time::system_clock::TimePoint m_startTimestamp;
+  time::system_clock::time_point m_startTimestamp;
 };
 
 } // namespace nfd
diff --git a/daemon/mgmt/manager-base.hpp b/daemon/mgmt/manager-base.hpp
index 592d4fa..7702271 100644
--- a/daemon/mgmt/manager-base.hpp
+++ b/daemon/mgmt/manager-base.hpp
@@ -113,7 +113,7 @@
    * @param parameters the original ControlParameters
    * @return whether the original ControlParameters can be validated
    */
-  static bool
+  [[nodiscard]] static bool
   validateParameters(const ControlCommand& command,
                      const ndn::mgmt::ControlParameters& parameters);
 
diff --git a/daemon/mgmt/tables-config-section.hpp b/daemon/mgmt/tables-config-section.hpp
index f551b78..4dc5dd4 100644
--- a/daemon/mgmt/tables-config-section.hpp
+++ b/daemon/mgmt/tables-config-section.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,
@@ -31,7 +31,7 @@
 
 namespace nfd {
 
-/** \brief handles 'tables' config section
+/** \brief Handles the `tables` configuration file section.
  *
  *  This class recognizes a config section that looks like
  *  \code{.unparsed}
@@ -63,7 +63,7 @@
  *  \li strategy_choice entries are inserted, but old entries are not deleted.
  *  \li network_region is applied; it's kept unchanged if the section is omitted.
  *
- *  It's necessary to call \p ensureConfigured() after initial configuration and
+ *  It's necessary to call ensureConfigured() after initial configuration and
  *  configuration reload, so that the correct defaults are applied in case
  *  tables section is omitted.
  */
@@ -76,7 +76,8 @@
   void
   setConfigFile(ConfigFile& configFile);
 
-  /** \brief apply default configuration, if tables section was omitted in configuration file
+  /**
+   * \brief Apply default configuration, if tables section was omitted in configuration file.
    */
   void
   ensureConfigured();
diff --git a/daemon/rib/fib-updater.cpp b/daemon/rib/fib-updater.cpp
index 6f82b17..3a7caff 100644
--- a/daemon/rib/fib-updater.cpp
+++ b/daemon/rib/fib-updater.cpp
@@ -554,7 +554,7 @@
 
 void
 FibUpdater::createFibUpdatesForErasedRoute(const RibEntry& entry, const Route& route,
-                                               const bool captureWasTurnedOff)
+                                           bool captureWasTurnedOff)
 {
   addFibUpdate(FibUpdate::createRemoveUpdate(entry.getName(), route.faceId));
 
diff --git a/daemon/rib/fib-updater.hpp b/daemon/rib/fib-updater.hpp
index e231341..ee820f6 100644
--- a/daemon/rib/fib-updater.hpp
+++ b/daemon/rib/fib-updater.hpp
@@ -35,7 +35,8 @@
 
 namespace nfd::rib {
 
-/** \brief computes FibUpdates based on updates to the RIB and sends them to NFD
+/**
+ * \brief Computes FibUpdates based on updates to the RIB and sends them to NFD.
  */
 class FibUpdater : noncopyable
 {
@@ -46,18 +47,19 @@
     using std::runtime_error::runtime_error;
   };
 
-public:
   using FibUpdateList = std::list<FibUpdate>;
   using FibUpdateSuccessCallback = std::function<void(RibUpdateList inheritedRoutes)>;
   using FibUpdateFailureCallback = std::function<void(uint32_t code, const std::string& error)>;
 
   FibUpdater(Rib& rib, ndn::nfd::Controller& controller);
 
-  NFD_VIRTUAL_WITH_TESTS
+#ifdef NFD_WITH_TESTS
+  virtual
   ~FibUpdater() = default;
+#endif
 
-  /** \brief computes FibUpdates using the provided RibUpdateBatch and then sends the
-   *         updates to NFD's FIB
+  /** \brief Computes FibUpdates using the provided RibUpdateBatch and then sends the
+   *         updates to NFD's FIB.
    *
    *  \note  Caller must guarantee that the previous batch has either succeeded or failed
    *         before calling this method
@@ -68,56 +70,60 @@
                            const FibUpdateFailureCallback& onFailure);
 
 private:
-  /** \brief determines the type of action that will be performed on the RIB and calls the
-  *          corresponding computation method
-  */
+  /**
+   * \brief Determines the type of action that will be performed on the RIB and calls the
+   *        corresponding computation method.
+   */
   void
   computeUpdates(const RibUpdateBatch& batch);
 
-  /** \brief sends the passed updates to NFD
-  *
-  *   onSuccess or onFailure will be called based on the results in
-  *   onUpdateSuccess or onUpdateFailure
-  *
-  *   \see FibUpdater::onUpdateSuccess
-  *   \see FibUpdater::onUpdateFailure
-  */
+  /**
+   * \brief Sends the passed updates to NFD.
+   *
+   * onSuccess or onFailure will be called based on the results in
+   * onUpdateSuccess or onUpdateFailure.
+   *
+   * \see FibUpdater::onUpdateSuccess
+   * \see FibUpdater::onUpdateFailure
+   */
   void
   sendUpdates(const FibUpdateList& updates,
               const FibUpdateSuccessCallback& onSuccess,
               const FibUpdateFailureCallback& onFailure);
 
-  /** \brief sends the updates in m_updatesForBatchFaceId to NFD if any exist,
-  *          otherwise calls FibUpdater::sendUpdatesForNonBatchFaceId.
-  */
+  /**
+   * \brief Sends the updates in m_updatesForBatchFaceId to NFD if any exist,
+   *        otherwise calls FibUpdater::sendUpdatesForNonBatchFaceId.
+   */
   void
   sendUpdatesForBatchFaceId(const FibUpdateSuccessCallback& onSuccess,
                             const FibUpdateFailureCallback& onFailure);
 
-  /** \brief sends the updates in m_updatesForNonBatchFaceId to NFD if any exist,
-  *          otherwise calls onSuccess.
-  */
+  /**
+   * \brief Sends the updates in m_updatesForNonBatchFaceId to NFD if any exist,
+   *        otherwise calls onSuccess.
+   */
   void
   sendUpdatesForNonBatchFaceId(const FibUpdateSuccessCallback& onSuccess,
                                const FibUpdateFailureCallback& onFailure);
 
 NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
-  /** \brief sends a FibAddNextHopCommand to NFD using the parameters supplied by
-  *          the passed update
-  *
-  *   \param nTimeouts the number of times this FibUpdate has failed due to timeout
-  */
+  /**
+   * \brief Sends a FibAddNextHopCommand to NFD using the parameters supplied by
+   *        the passed update.
+   * \param nTimeouts the number of times this FibUpdate has failed due to timeout
+   */
   NFD_VIRTUAL_WITH_TESTS void
   sendAddNextHopUpdate(const FibUpdate& update,
                        const FibUpdateSuccessCallback& onSuccess,
                        const FibUpdateFailureCallback& onFailure,
                        uint32_t nTimeouts = 0);
 
-  /** \brief sends a FibRemoveNextHopCommand to NFD using the parameters supplied by
-  *          the passed update
-  *
-  *   \param nTimeouts the number of times this FibUpdate has failed due to timeout
-  */
+  /**
+   * \brief Sends a FibRemoveNextHopCommand to NFD using the parameters supplied by
+   *        the passed update.
+   * \param nTimeouts the number of times this FibUpdate has failed due to timeout
+   */
   NFD_VIRTUAL_WITH_TESTS void
   sendRemoveNextHopUpdate(const FibUpdate& update,
                           const FibUpdateSuccessCallback& onSuccess,
@@ -125,48 +131,52 @@
                           uint32_t nTimeouts = 0);
 
 private:
-  /** \brief calculates the FibUpdates generated by a RIB registration
-  */
+  /**
+   * \brief Calculates the FibUpdates generated by a RIB registration.
+   */
   void
   computeUpdatesForRegistration(const RibUpdate& update);
 
-  /** \brief calculates the FibUpdates generated by a RIB unregistration
-  */
+  /**
+   * \brief Calculates the FibUpdates generated by a RIB unregistration.
+   */
   void
   computeUpdatesForUnregistration(const RibUpdate& update);
 
 NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE:
-  /** \brief callback used by NfdController when a FibAddNextHopCommand or FibRemoveNextHopCommand
-  *          is successful.
-  *
-  *   If the update has the same Face ID as the batch being processed, the update is
-  *   removed from m_updatesForBatchFaceId. If m_updatesForBatchFaceId becomes empty,
-  *   the updates with a different Face ID than the batch are sent to NFD.
-  *
-  *   If the update has a different Face ID than the batch being processed, the update is
-  *   removed from m_updatesForBatchNonFaceId. If m_updatesForBatchNonFaceId becomes empty,
-  *   the FIB update process is considered a success.
-  */
+  /**
+   * \brief Callback used by NfdController when a FibAddNextHopCommand or FibRemoveNextHopCommand
+   *        is successful.
+   *
+   * If the update has the same Face ID as the batch being processed, the update is
+   * removed from m_updatesForBatchFaceId. If m_updatesForBatchFaceId becomes empty,
+   * the updates with a different Face ID than the batch are sent to NFD.
+   *
+   * If the update has a different Face ID than the batch being processed, the update is
+   * removed from m_updatesForBatchNonFaceId. If m_updatesForBatchNonFaceId becomes empty,
+   * the FIB update process is considered a success.
+   */
   void
   onUpdateSuccess(const FibUpdate& update,
                   const FibUpdateSuccessCallback& onSuccess,
                   const FibUpdateFailureCallback& onFailure);
 
-  /** \brief callback used by NfdController when a FibAddNextHopCommand or FibRemoveNextHopCommand
-  *          is successful.
-  *
-  *   If the update has not reached the max number of timeouts allowed, the update
-  *   is retried.
-  *
-  *   If the update failed due to a non-existent face and the update has the same Face ID
-  *   as the update batch, the FIB update process fails.
-  *
-  *   If the update failed due to a non-existent face and the update has a different
-  *   face than the update batch, the update is not retried and the error is
-  *   ignored.
-  *
-  *   Otherwise, a non-recoverable error has occurred and an exception is thrown.
-  */
+  /**
+   * \brief Callback used by NfdController when a FibAddNextHopCommand or FibRemoveNextHopCommand
+   *        is successful.
+   *
+   * If the update has not reached the max number of timeouts allowed, the update
+   * is retried.
+   *
+   * If the update failed due to a non-existent face and the update has the same Face ID
+   * as the update batch, the FIB update process fails.
+   *
+   * If the update failed due to a non-existent face and the update has a different
+   * face than the update batch, the update is not retried and the error is
+   * ignored.
+   *
+   * Otherwise, a non-recoverable error has occurred and an exception is thrown.
+   */
   void
   onUpdateError(const FibUpdate& update,
                 const FibUpdateSuccessCallback& onSuccess,
@@ -174,80 +184,93 @@
                 const ndn::nfd::ControlResponse& response, uint32_t nTimeouts);
 
 private:
-  /** \brief adds the update to an update list based on its Face ID
-  *
-  *   If the update has the same Face ID as the update batch, the update is added
-  *   to m_updatesForBatchFaceId.
-  *
-  *   Otherwise, the update is added to m_updatesForBatchNonFaceId.
-  */
+  /**
+   * \brief Adds the update to an update list based on its Face ID.
+   *
+   * If the update has the same Face ID as the update batch, the update is added
+   * to m_updatesForBatchFaceId.
+   *
+   * Otherwise, the update is added to m_updatesForBatchNonFaceId.
+   */
   void
   addFibUpdate(const FibUpdate& update);
 
-  /** \brief creates records of the passed routes added to the entry and creates FIB updates
-  */
+  /**
+   * \brief Creates records of the passed routes added to the entry and creates FIB updates.
+   */
   void
   addInheritedRoutes(const RibEntry& entry, const Rib::RouteSet& routesToAdd);
 
-  /** \brief creates records of the passed routes added to the name and creates FIB updates.
-  *          Routes in routesToAdd with the same Face ID as ignore will be not be considered.
-  */
+  /**
+   * \brief Creates records of the passed routes added to the name and creates FIB updates.
+   *        Routes in \p routesToAdd with the same Face ID as ignore will be not be considered.
+   */
   void
   addInheritedRoutes(const Name& name, const Rib::RouteSet& routesToAdd, const Route& ignore);
 
-  /** \brief creates records of the passed routes removed from the entry and creates FIB updates
-  */
+  /**
+   * \brief Creates records of the passed routes removed from the entry and creates FIB updates.
+   */
   void
   removeInheritedRoutes(const RibEntry& entry, const Rib::RouteSet& routesToRemove);
 
-  /** \brief calculates updates for a name that will create a new RIB entry
-  */
+  /**
+   * \brief Calculates updates for a name that will create a new RIB entry.
+   */
   void
   createFibUpdatesForNewRibEntry(const Name& name, const Route& route,
                                  const Rib::RibEntryList& children);
 
-  /** \brief calculates updates for a new route added to a RIB entry
-  */
+  /**
+   * \brief Calculates updates for a new route added to a RIB entry.
+   */
   void
   createFibUpdatesForNewRoute(const RibEntry& entry, const Route& route,
-                              const bool captureWasTurnedOn);
+                              bool captureWasTurnedOn);
 
-  /** \brief calculates updates for changes to an existing route for a RIB entry
-  */
+  /**
+   * \brief Calculates updates for changes to an existing route for a RIB entry.
+   */
   void
   createFibUpdatesForUpdatedRoute(const RibEntry& entry, const Route& route,
                                   const Route& existingRoute);
 
-  /** \brief calculates updates for a an existing route removed from a RIB entry
-  */
+  /**
+   * \brief Calculates updates for a an existing route removed from a RIB entry.
+   */
   void
   createFibUpdatesForErasedRoute(const RibEntry& entry, const Route& route,
-                                 const bool captureWasTurnedOff);
+                                 bool captureWasTurnedOff);
 
-  /** \brief calculates updates for an entry that will be removed from the RIB
-  */
+  /**
+   * \brief Calculates updates for an entry that will be removed from the RIB.
+   */
   void
   createFibUpdatesForErasedRibEntry(const RibEntry& entry);
 
-  /** \brief adds and removes passed routes to children's inherited routes
-  */
+  /**
+   * \brief Adds and removes passed routes to children's inherited routes.
+   */
   void
   modifyChildrensInheritedRoutes(const Rib::RibEntryList& children,
                                  const Rib::RouteSet& routesToAdd,
                                  const Rib::RouteSet& routesToRemove);
 
-  /** \brief traverses the entry's children adding and removing the passed routes
-  */
+  /**
+   * \brief Traverses the entry's children adding and removing the passed routes.
+   */
   void
   traverseSubTree(const RibEntry& entry, Rib::RouteSet routesToAdd, Rib::RouteSet routesToRemove);
 
-  /** \brief creates a record of a calculated inherited route that should be added to the entry
-  */
+  /**
+   * \brief Creates a record of a calculated inherited route that should be added to the entry.
+   */
   void
   addInheritedRoute(const Name& name, const Route& route);
 
-  /** \brief creates a record of an existing inherited route that should be removed from the entry
-  */
+  /**
+   * \brief Creates a record of an existing inherited route that should be removed from the entry.
+   */
   void
   removeInheritedRoute(const Name& name, const Route& route);
 
@@ -260,8 +283,9 @@
   FibUpdateList m_updatesForBatchFaceId;
   FibUpdateList m_updatesForNonBatchFaceId;
 
-  /** \brief list of inherited routes generated during FIB update calculation;
-   *         passed to the RIB when updates are completed successfully
+  /**
+   * \brief List of inherited routes generated during FIB update calculation;
+   *        passed to the RIB when updates are completed successfully.
    */
   RibUpdateList m_inheritedRoutes;
 };
diff --git a/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
index be76597..963c9c1 100644
--- a/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
@@ -30,12 +30,12 @@
 
 namespace nfd::rib {
 
-/** \brief a policy to readvertise routes registered by end hosts into NLSR
+/** \brief A policy to readvertise routes registered by end hosts into NLSR.
  */
 class ClientToNlsrReadvertisePolicy : public ReadvertisePolicy
 {
 public:
-  /** \brief advertise if the route's origin is client
+  /** \brief Advertise if the route's origin is client.
    *
    *  If the route origin is "client" (typically from auto prefix propagation), readvertise it
    *  using the default signing identity.
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
index 63b4fc8..44506e5 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
@@ -33,7 +33,7 @@
 
 namespace nfd::rib {
 
-/** \brief a policy to readvertise routes registered by local applications into remote gateway
+/** \brief A policy to readvertise routes registered by local applications into remote gateway.
  */
 class HostToGatewayReadvertisePolicy : public ReadvertisePolicy
 {
diff --git a/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp b/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
index ab2f710..5ed5f52 100644
--- a/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
+++ b/daemon/rib/readvertise/nfd-rib-readvertise-destination.hpp
@@ -35,7 +35,7 @@
 
 namespace nfd::rib {
 
-/** \brief a readvertise destination using NFD RIB management protocol
+/** \brief A readvertise destination using NFD RIB management protocol.
  */
 class NfdRibReadvertiseDestination : public ReadvertiseDestination
 {
@@ -46,14 +46,14 @@
                                const ndn::nfd::ControlParameters& parameters =
                                  ndn::nfd::ControlParameters().setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT));
 
-  /** \brief add a name prefix into NFD RIB
+  /** \brief Add a name prefix into NFD RIB.
    */
   void
   advertise(const ReadvertisedRoute& rr,
             std::function<void()> successCb,
             std::function<void(const std::string&)> failureCb) override;
 
-  /** \brief remove a name prefix from NFD RIB
+  /** \brief Remove a name prefix from NFD RIB.
    */
   void
   withdraw(const ReadvertisedRoute& rr,
diff --git a/daemon/rib/readvertise/readvertise-destination.hpp b/daemon/rib/readvertise/readvertise-destination.hpp
index 045483a..95726bd 100644
--- a/daemon/rib/readvertise/readvertise-destination.hpp
+++ b/daemon/rib/readvertise/readvertise-destination.hpp
@@ -30,7 +30,7 @@
 
 namespace nfd::rib {
 
-/** \brief a destination to readvertise into
+/** \brief A destination to readvertise into.
  */
 class ReadvertiseDestination : noncopyable
 {
@@ -59,7 +59,7 @@
   setAvailability(bool isAvailable);
 
 public:
-  /** \brief signals when the destination becomes available or unavailable
+  /** \brief Signals when the destination becomes available or unavailable.
    */
   signal::Signal<ReadvertiseDestination, bool> afterAvailabilityChange;
 
diff --git a/daemon/rib/readvertise/readvertise-policy.hpp b/daemon/rib/readvertise/readvertise-policy.hpp
index 3e4456e..94d178f 100644
--- a/daemon/rib/readvertise/readvertise-policy.hpp
+++ b/daemon/rib/readvertise/readvertise-policy.hpp
@@ -32,7 +32,7 @@
 
 namespace nfd::rib {
 
-/** \brief a decision made by readvertise policy
+/** \brief A decision made by readvertise policy.
  */
 struct ReadvertiseAction
 {
@@ -40,7 +40,7 @@
   ndn::security::SigningInfo signer; ///< credentials for command signing
 };
 
-/** \brief a policy to decide whether to readvertise a route, and what prefix to readvertise
+/** \brief A policy to decide whether to readvertise a route, and what prefix to readvertise.
  */
 class ReadvertisePolicy : noncopyable
 {
@@ -48,7 +48,7 @@
   virtual
   ~ReadvertisePolicy() = default;
 
-  /** \brief decide whether to readvertise a route, and what prefix to readvertise
+  /** \brief Decide whether to readvertise a route, and what prefix to readvertise.
    */
   virtual std::optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& ribRoute) const = 0;
diff --git a/daemon/rib/readvertise/readvertise.hpp b/daemon/rib/readvertise/readvertise.hpp
index 88b11aa..19274c9 100644
--- a/daemon/rib/readvertise/readvertise.hpp
+++ b/daemon/rib/readvertise/readvertise.hpp
@@ -33,7 +33,7 @@
 
 namespace nfd::rib {
 
-/** \brief readvertise a subset of routes to a destination according to a policy
+/** \brief Readvertise a subset of routes to a destination according to a policy.
  *
  *  The Readvertise class allows RIB routes to be readvertised to a destination such as a routing
  *  protocol daemon or another NFD-RIB. It monitors the RIB for route additions and removals,
@@ -72,7 +72,7 @@
 
   ReadvertisedRouteContainer m_rrs;
   /**
-   * \brief maps from RIB route to readvertised route derived from RIB route(s)
+   * \brief Map from RIB route to readvertised route derived from RIB route(s).
    */
   std::map<RibRouteRef, ReadvertisedRouteContainer::iterator> m_routeToRr;
 
diff --git a/daemon/rib/readvertise/readvertised-route.hpp b/daemon/rib/readvertise/readvertised-route.hpp
index e4be12c..a57fe70 100644
--- a/daemon/rib/readvertise/readvertised-route.hpp
+++ b/daemon/rib/readvertise/readvertised-route.hpp
@@ -33,7 +33,7 @@
 
 namespace nfd::rib {
 
-/** \brief state of a readvertised route
+/** \brief State of a readvertised route.
  */
 class ReadvertisedRoute : noncopyable
 {
diff --git a/daemon/rib/rib-entry.hpp b/daemon/rib/rib-entry.hpp
index d98d72a..6fbd198 100644
--- a/daemon/rib/rib-entry.hpp
+++ b/daemon/rib/rib-entry.hpp
@@ -66,10 +66,12 @@
   bool
   hasChildren() const;
 
-  /** \brief inserts a new route into the entry's route list
+  /** \brief Inserts a new route into the entry's route list.
+   *
    *  If another route already exists with the same faceId and origin,
    *  the new route is not inserted.
-   *  \return a pair, whose first element is the iterator to the newly
+   *
+   *  \return A pair, whose first element is the iterator to the newly
    *  inserted element if the insert succeeds and to the
    *  previously-existing element otherwise, and whose second element
    *  is true if the insert succeeds and false otherwise.
@@ -77,13 +79,15 @@
   std::pair<RibEntry::iterator, bool>
   insertRoute(const Route& route);
 
-  /** \brief erases a Route with the same faceId and origin
+  /**
+   * \brief Erases a Route with the same FaceId and origin.
    */
   void
   eraseRoute(const Route& route);
 
-  /** \brief erases a Route with the passed iterator
-   *  \return{ an iterator to the element that followed the erased iterator }
+  /**
+   * \brief Erases a Route with the passed iterator.
+   * \return An iterator to the element that followed the erased iterator
    */
   iterator
   eraseRoute(RouteList::iterator route);
@@ -112,23 +116,25 @@
   void
   removeInheritedRoute(const Route& route);
 
-  /** \brief Returns the routes this namespace has inherited.
-   *  The inherited routes returned represent inherited routes this namespace has in the FIB.
-   *  \return{ routes inherited by this namespace }
+  /**
+   * \brief Returns the routes this namespace has inherited.
+   *
+   * The inherited routes returned represent inherited routes this namespace has in the FIB.
    */
   const RouteList&
   getInheritedRoutes() const;
 
-  /** \brief Finds an inherited route with a matching face ID.
-   *  \return{ An iterator to the matching route if one is found;
-   *           otherwise, an iterator to the end of the entry's
-   *           inherited route list }
+  /**
+   * \brief Finds an inherited route with a matching face ID.
+   * \return An iterator to the matching route if one is found;
+   *         otherwise, an iterator to the end of the entry's
+   *         inherited route list
    */
   RouteList::const_iterator
   findInheritedRoute(const Route& route) const;
 
   /** \brief Determines if the entry has an inherited route with a matching face ID.
-   *  \return{ True, if a matching inherited route is found; otherwise, false. }
+   *  \return True, if a matching inherited route is found; otherwise, false.
    */
   bool
   hasInheritedRoute(const Route& route) const;
@@ -138,13 +144,13 @@
 
   /** \brief Determines if the entry has an inherited route with the passed
    *         face ID and its child inherit flag set.
-   *  \return{ True, if a matching inherited route is found; otherwise, false. }
+   *  \return True, if a matching inherited route is found; otherwise, false.
    */
   bool
   hasChildInheritOnFaceId(uint64_t faceId) const;
 
   /** \brief Returns the route with the lowest cost that has the passed face ID.
-   *  \return{ The route with the lowest cost that has the passed face ID}
+   *  \return The route with the lowest cost that has the passed face ID
    */
   const Route*
   getRouteWithLowestCostByFaceId(uint64_t faceId) const;
@@ -154,8 +160,6 @@
 
   /** \brief Returns the route with the lowest cost that has the passed face ID
    *         and its child inherit flag set.
-   *  \return{ The route with the lowest cost that has the passed face ID
-   *           and its child inherit flag set }
    */
   const Route*
   getRouteWithLowestCostAndChildInheritByFaceId(uint64_t faceId) const;
@@ -170,7 +174,7 @@
    *  confined within [\p minExpiration, \p maxExpiration] range. The caller is expected to sign
    *  this announcement.
    *
-   *  \warning (minExpiration > maxExpiration) triggers undefined behavior.
+   *  \warning `minExpiration > maxExpiration` triggers undefined behavior.
    */
   ndn::PrefixAnnouncement
   getPrefixAnnouncement(time::milliseconds minExpiration = 15_s,
diff --git a/daemon/rib/rib.hpp b/daemon/rib/rib.hpp
index 36d5e41..ddfa591 100644
--- a/daemon/rib/rib.hpp
+++ b/daemon/rib/rib.hpp
@@ -37,7 +37,7 @@
 
 class FibUpdater;
 
-/** \brief references a route
+/** \brief References a route.
  */
 struct RibRouteRef
 {
@@ -48,12 +48,15 @@
 bool
 operator<(const RibRouteRef& lhs, const RibRouteRef& rhs);
 
-/** \brief represents the Routing Information Base
-
-    The Routing Information Base contains a collection of Routes, each
-    represents a piece of static or dynamic routing information
-    registered by applications, operators, or NFD itself. Routes
-    associated with the same namespace are collected into a RIB entry.
+/**
+ * \brief Represents the Routing Information Base.
+ *
+ * The Routing Information Base (RIB) contains a collection of Route objects,
+ * each representing a piece of static or dynamic routing information registered
+ * by applications, operators, or NFD itself. Routes associated with the same
+ * namespace are collected into a RIB entry.
+ *
+ * \sa RibEntry
  */
 class Rib : noncopyable
 {
@@ -87,13 +90,13 @@
   }
 
   size_t
-  size() const
+  size() const noexcept
   {
     return m_nItems;
   }
 
-  bool
-  empty() const
+  [[nodiscard]] bool
+  empty() const noexcept
   {
     return m_rib.empty();
   }
@@ -105,7 +108,7 @@
   using UpdateSuccessCallback = std::function<void()>;
   using UpdateFailureCallback = std::function<void(uint32_t code, const std::string& error)>;
 
-  /** \brief passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates.
+  /** \brief Passes the provided RibUpdateBatch to FibUpdater to calculate and send FibUpdates.
    *
    *  If the FIB is updated successfully, onFibUpdateSuccess() will be called, and the
    *  RIB will be updated
@@ -118,7 +121,7 @@
                    const UpdateSuccessCallback& onSuccess,
                    const UpdateFailureCallback& onFailure);
 
-  /** \brief starts the FIB update process when a face has been destroyed
+  /** \brief Starts the FIB update process when a face has been destroyed.
    */
   void
   beginRemoveFace(uint64_t faceId);
@@ -167,13 +170,13 @@
   using RouteComparePredicate = bool (*)(const Route&, const Route&);
   using RouteSet = std::set<Route, RouteComparePredicate>;
 
-  /** \brief find entries under \p prefix
+  /** \brief Find entries under \p prefix.
    *  \pre a RIB entry exists at \p prefix
    */
   std::list<shared_ptr<RibEntry>>
   findDescendants(const Name& prefix) const;
 
-  /** \brief find entries under \p prefix
+  /** \brief Find entries under \p prefix.
    *  \pre a RIB entry does not exist at \p prefix
    */
   std::list<shared_ptr<RibEntry>>
@@ -185,54 +188,52 @@
   void
   updateRib(const RibUpdateBatch& batch);
 
-  /** \brief returns routes inherited from the entry's ancestors
-   *
-   *  \return{ a list of inherited routes }
+  /** \brief Returns routes inherited from the entry's ancestors.
+   *  \return a list of inherited routes
    */
   RouteSet
   getAncestorRoutes(const RibEntry& entry) const;
 
-  /** \brief returns routes inherited from the parent of the name and the parent's ancestors
-   *
+  /** \brief Returns routes inherited from the parent of the name and the parent's ancestors.
    *  \note A parent is first found for the passed name before inherited routes are collected
-   *
-   *  \return{ a list of inherited routes }
+   *  \return a list of inherited routes
    */
   RouteSet
   getAncestorRoutes(const Name& name) const;
 
-  /** \brief applies the passed inheritedRoutes and their actions to the corresponding RibEntries'
-   *  inheritedRoutes lists
+  /** \brief Applies the passed \p inheritedRoutes and their actions to the corresponding
+   *  RibEntries' inheritedRoutes lists.
    */
   void
   modifyInheritedRoutes(const RibUpdateList& inheritedRoutes);
 
 public:
-  /** \brief signals after a RIB entry is inserted
+  /** \brief Signals after a RIB entry is inserted.
    *
    *  A RIB entry is inserted when the first route associated with a
    *  certain namespace is added.
    */
   signal::Signal<Rib, Name> afterInsertEntry;
 
-  /** \brief signals after a RIB entry is erased
+  /** \brief Signals after a RIB entry is erased.
    *
    *  A RIB entry is erased when the last route associated with a
    *  certain namespace is removed.
    */
   signal::Signal<Rib, Name> afterEraseEntry;
 
-  /** \brief signals after a Route is added
+  /** \brief Signals after a Route is added.
    */
   signal::Signal<Rib, RibRouteRef> afterAddRoute;
 
-  /** \brief signals before a route is removed
+  /** \brief Signals before a route is removed.
    */
   signal::Signal<Rib, RibRouteRef> beforeRemoveRoute;
 
 private:
   RibTable m_rib;
-  std::multimap<uint64_t, shared_ptr<RibEntry>> m_faceEntries; ///< FaceId => Entry with Route on this face
+  // FaceId => Entry with Route on this face
+  std::multimap<uint64_t, shared_ptr<RibEntry>> m_faceEntries;
   size_t m_nItems = 0;
   FibUpdater* m_fibUpdater = nullptr;
 
diff --git a/daemon/rib/route.hpp b/daemon/rib/route.hpp
index eea42ee..471bdb6 100644
--- a/daemon/rib/route.hpp
+++ b/daemon/rib/route.hpp
@@ -37,16 +37,16 @@
 
 namespace nfd::rib {
 
-/** \brief represents a route for a name prefix
+/** \brief Represents a route for a name prefix.
  */
 class Route : public ndn::nfd::RouteFlagsTraits<Route>
 {
 public:
-  /** \brief default constructor
+  /** \brief Default constructor.
    */
   Route() = default;
 
-  /** \brief construct from a prefix announcement
+  /** \brief Construct from a prefix announcement.
    *  \param ann a prefix announcement that has passed verification
    *  \param faceId the face on which \p ann arrived
    */
diff --git a/daemon/rib/service.hpp b/daemon/rib/service.hpp
index 02e1914..3cedde4 100644
--- a/daemon/rib/service.hpp
+++ b/daemon/rib/service.hpp
@@ -43,7 +43,7 @@
 class Readvertise;
 
 /**
- * \brief initializes and executes NFD-RIB service thread
+ * \brief Initializes and executes the NFD-RIB service thread.
  *
  * Only one instance of this class can be created at any time.
  * After initialization, NFD-RIB instance can be started by running the global io_service.
@@ -52,7 +52,7 @@
 {
 public:
   /**
-   * \brief create NFD-RIB service
+   * \brief Create NFD-RIB service.
    * \param configFile absolute or relative path of configuration file
    * \param keyChain the KeyChain
    * \throw std::logic_error Instance of rib::Service has been already constructed
@@ -61,7 +61,7 @@
   Service(const std::string& configFile, ndn::KeyChain& keyChain);
 
   /**
-   * \brief create NFD-RIB service
+   * \brief Create NFD-RIB service.
    * \param configSection parsed configuration section
    * \param keyChain the KeyChain
    * \note This constructor overload is more appropriate for integrated environments,
@@ -72,13 +72,10 @@
    */
   Service(const ConfigSection& configSection, ndn::KeyChain& keyChain);
 
-  /**
-   * \brief Destructor
-   */
   ~Service();
 
   /**
-   * \brief Get a reference to the only instance of this class
+   * \brief Get a reference to the only instance of this class.
    * \throw std::logic_error No instance has been constructed
    * \throw std::logic_error This function is invoked on a thread other than the RIB thread
    */
@@ -86,7 +83,7 @@
   get();
 
   RibManager&
-  getRibManager()
+  getRibManager() noexcept
   {
     return m_ribManager;
   }
diff --git a/daemon/table/cleanup.hpp b/daemon/table/cleanup.hpp
index 3c84482..b1e95b1 100644
--- a/daemon/table/cleanup.hpp
+++ b/daemon/table/cleanup.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -32,10 +32,10 @@
 
 namespace nfd {
 
-/** \brief cleanup tables when a face is destroyed
+/** \brief Cleanup tables when a face is destroyed.
  *
- *  This function enumerates the NameTree, calls Fib::removeNextHop for each FIB entry,
- *  calls Pit::deleteInOutRecords for each PIT entry, and finally
+ *  This function enumerates the NameTree, calls Fib::removeNextHop() for each FIB entry,
+ *  calls Pit::deleteInOutRecords() for each PIT entry, and finally
  *  deletes any name tree entries that have become empty.
  *
  *  \note It's a design choice to let Fib and Pit classes decide what to do with each entry.
diff --git a/daemon/table/cs-entry.hpp b/daemon/table/cs-entry.hpp
index a04f9f7..89f71f1 100644
--- a/daemon/table/cs-entry.hpp
+++ b/daemon/table/cs-entry.hpp
@@ -30,12 +30,12 @@
 
 namespace nfd::cs {
 
-/** \brief a ContentStore entry
+/** \brief A ContentStore entry.
  */
 class Entry
 {
 public: // exposed through ContentStore enumeration
-  /** \brief return the stored Data
+  /** \brief Return the stored Data.
    */
   const Data&
   getData() const
@@ -43,7 +43,7 @@
     return *m_data;
   }
 
-  /** \brief return stored Data name
+  /** \brief Return stored Data name.
    */
   const Name&
   getName() const
@@ -51,7 +51,7 @@
     return m_data->getName();
   }
 
-  /** \brief return full name (including implicit digest) of the stored Data
+  /** \brief Return full name (including implicit digest) of the stored Data.
    */
   const Name&
   getFullName() const
@@ -59,7 +59,7 @@
     return m_data->getFullName();
   }
 
-  /** \brief return whether the stored Data is unsolicited
+  /** \brief Return whether the stored Data is unsolicited.
    */
   bool
   isUnsolicited() const
@@ -67,12 +67,12 @@
     return m_isUnsolicited;
   }
 
-  /** \brief check if the stored Data is fresh now
+  /** \brief Check if the stored Data is fresh now.
    */
   bool
   isFresh() const;
 
-  /** \brief determine whether Interest can be satisified by the stored Data
+  /** \brief Determine whether Interest can be satisified by the stored Data.
    */
   bool
   canSatisfy(const Interest& interest) const;
@@ -80,12 +80,12 @@
 public: // used by ContentStore implementation
   Entry(shared_ptr<const Data> data, bool isUnsolicited);
 
-  /** \brief recalculate when the entry would become non-fresh, relative to current time
+  /** \brief Recalculate when the entry would become non-fresh, relative to current time.
    */
   void
   updateFreshUntil();
 
-  /** \brief clear 'unsolicited' flag
+  /** \brief Clear 'unsolicited' flag.
    */
   void
   clearUnsolicited()
@@ -96,7 +96,7 @@
 private:
   shared_ptr<const Data> m_data;
   bool m_isUnsolicited;
-  time::steady_clock::TimePoint m_freshUntil;
+  time::steady_clock::time_point m_freshUntil;
 };
 
 bool
@@ -108,7 +108,7 @@
 bool
 operator<(const Entry& lhs, const Entry& rhs);
 
-/** \brief an ordered container of ContentStore entries
+/** \brief An ordered container of ContentStore entries.
  *
  *  This container uses std::less<> comparator to enable lookup with queryName.
  */
diff --git a/daemon/table/cs-policy-lru.hpp b/daemon/table/cs-policy-lru.hpp
index 8d7c814..9a62c6c 100644
--- a/daemon/table/cs-policy-lru.hpp
+++ b/daemon/table/cs-policy-lru.hpp
@@ -43,7 +43,7 @@
                 >
               >;
 
-/** \brief Least-Recently-Used (LRU) replacement policy
+/** \brief Least-Recently-Used (LRU) replacement policy.
  */
 class LruPolicy final : public Policy
 {
@@ -70,7 +70,7 @@
   evictEntries() final;
 
 private:
-  /** \brief moves an entry to the end of queue
+  /** \brief Moves an entry to the end of queue.
    */
   void
   insertToQueue(EntryRef i, bool isNewEntry);
diff --git a/daemon/table/cs-policy-priority-fifo.hpp b/daemon/table/cs-policy-priority-fifo.hpp
index 48d1d66..eaa4c81 100644
--- a/daemon/table/cs-policy-priority-fifo.hpp
+++ b/daemon/table/cs-policy-priority-fifo.hpp
@@ -49,7 +49,7 @@
   scheduler::EventId moveStaleEventId;
 };
 
-/** \brief Priority FIFO replacement policy
+/** \brief Priority First-In-First-Out (FIFO) replacement policy.
  *
  *  This policy maintains a set of cleanup queues to decide the eviction order of CS entries.
  *  The cleanup queues are three doubly linked lists that store EntryRefs.
@@ -88,25 +88,25 @@
   evictEntries() final;
 
 private:
-  /** \brief evicts one entry
+  /** \brief Evicts one entry.
    *  \pre CS is not empty
    */
   void
   evictOne();
 
-  /** \brief attaches the entry to an appropriate queue
+  /** \brief Attaches the entry to an appropriate queue.
    *  \pre the entry is not in any queue
    */
   void
   attachQueue(EntryRef i);
 
-  /** \brief detaches the entry from its current queue
+  /** \brief Detaches the entry from its current queue.
    *  \post the entry is not in any queue
    */
   void
   detachQueue(EntryRef i);
 
-  /** \brief moves an entry from FIFO queue to STALE queue
+  /** \brief Moves an entry from FIFO queue to STALE queue.
    */
   void
   moveToStaleQueue(EntryRef i);
diff --git a/daemon/table/cs-policy.hpp b/daemon/table/cs-policy.hpp
index de4c89c..748a45b 100644
--- a/daemon/table/cs-policy.hpp
+++ b/daemon/table/cs-policy.hpp
@@ -33,7 +33,7 @@
 class Cs;
 
 /**
- * \brief Represents a CS replacement policy
+ * \brief Represents a CS replacement policy.
  */
 class Policy : noncopyable
 {
@@ -47,13 +47,15 @@
     BOOST_VERIFY(r.second);
   }
 
-  /** \return a cs::Policy identified by \p policyName,
-   *          or nullptr if \p policyName is unknown
+  /**
+   * \brief Returns a cs::Policy identified by \p policyName,
+   *        or nullptr if \p policyName is unknown.
    */
   static unique_ptr<Policy>
   create(const std::string& policyName);
 
-  /** \return a list of available policy names
+  /**
+   * \brief Returns a list of available policy names.
    */
   static std::set<std::string>
   getPolicyNames();
@@ -63,36 +65,39 @@
   ~Policy() = default;
 
   const std::string&
-  getName() const
+  getName() const noexcept
   {
     return m_policyName;
   }
 
-  /** \brief gets cs
+  /**
+   * \brief Returns a pointer to the associated CS instance.
    */
   Cs*
-  getCs() const
+  getCs() const noexcept
   {
     return m_cs;
   }
 
-  /** \brief sets cs
+  /**
+   * \brief Sets the associated CS instance.
    */
   void
-  setCs(Cs* cs)
+  setCs(Cs* cs) noexcept
   {
     m_cs = cs;
   }
 
-  /** \brief gets hard limit (in number of entries)
+  /**
+   * \brief Gets hard limit (in number of entries).
    */
   size_t
-  getLimit() const
+  getLimit() const noexcept
   {
     return m_limit;
   }
 
-  /** \brief sets hard limit (in number of entries)
+  /** \brief Sets hard limit (in number of entries).
    *  \post getLimit() == nMaxEntries
    *  \post cs.size() <= getLimit()
    *
@@ -102,19 +107,19 @@
   setLimit(size_t nMaxEntries);
 
 public:
-  /** \brief a reference to an CS entry
-   *  \note operator< of EntryRef compares the Data name enclosed in the Entry.
+  /** \brief A reference to a CS entry.
+   *  \note `operator<` of EntryRef compares the Data name enclosed in the Entry.
    */
   using EntryRef = Table::const_iterator;
 
-  /** \brief emits when an entry is being evicted
+  /** \brief %Signal emitted when an entry is being evicted.
    *
    *  A policy implementation should emit this signal to cause CS to erase an entry from its index.
    *  CS should connect to this signal and erase the entry upon signal emission.
    */
   signal::Signal<Policy, EntryRef> beforeEvict;
 
-  /** \brief invoked by CS after a new entry is inserted
+  /** \brief Invoked by CS after a new entry is inserted.
    *  \post cs.size() <= getLimit()
    *
    *  The policy may evict entries if necessary.
@@ -123,20 +128,20 @@
   void
   afterInsert(EntryRef i);
 
-  /** \brief invoked by CS after an existing entry is refreshed by same Data
+  /** \brief Invoked by CS after an existing entry is refreshed by same Data.
    *
    *  The policy may witness this refresh to make better eviction decisions in the future.
    */
   void
   afterRefresh(EntryRef i);
 
-  /** \brief invoked by CS before an entry is erased due to management command
+  /** \brief Invoked by CS before an entry is erased due to management command.
    *  \warning CS must not invoke this method if an entry is erased due to eviction.
    */
   void
   beforeErase(EntryRef i);
 
-  /** \brief invoked by CS before an entry is used to match a lookup
+  /** \brief Invoked by CS before an entry is used to match a lookup.
    *
    *  The policy may witness this usage to make better eviction decisions in the future.
    */
@@ -144,7 +149,7 @@
   beforeUse(EntryRef i);
 
 protected:
-  /** \brief invoked after a new entry is created in CS
+  /** \brief Invoked after a new entry is created in CS.
    *
    *  When overridden in a subclass, a policy implementation should decide whether to accept \p i.
    *  If \p i is accepted, it should be inserted into a cleanup index.
@@ -155,7 +160,7 @@
   virtual void
   doAfterInsert(EntryRef i) = 0;
 
-  /** \brief invoked after an existing entry is refreshed by same Data
+  /** \brief Invoked after an existing entry is refreshed by same Data.
    *
    *  When overridden in a subclass, a policy implementation may witness this operation
    *  and adjust its cleanup index.
@@ -163,7 +168,7 @@
   virtual void
   doAfterRefresh(EntryRef i) = 0;
 
-  /** \brief invoked before an entry is erased due to management command
+  /** \brief Invoked before an entry is erased due to management command.
    *  \note This will not be invoked for an entry being evicted by policy.
    *
    *  When overridden in a subclass, a policy implementation should erase \p i
@@ -172,7 +177,7 @@
   virtual void
   doBeforeErase(EntryRef i) = 0;
 
-  /** \brief invoked before an entry is used to match a lookup
+  /** \brief Invoked before an entry is used to match a lookup.
    *
    *  When overridden in a subclass, a policy implementation may witness this operation
    *  and adjust its cleanup index.
@@ -180,7 +185,7 @@
   virtual void
   doBeforeUse(EntryRef i) = 0;
 
-  /** \brief evicts zero or more entries
+  /** \brief Evicts zero or more entries.
    *  \post CS size does not exceed hard limit
    */
   virtual void
@@ -207,7 +212,7 @@
 
 } // namespace nfd::cs
 
-/** \brief registers a CS policy
+/** \brief Registers a CS policy.
  *  \param P a subclass of nfd::cs::Policy
  */
 #define NFD_REGISTER_CS_POLICY(P)                      \
diff --git a/daemon/table/cs.cpp b/daemon/table/cs.cpp
index 18d8fe2..3ad8bc9 100644
--- a/daemon/table/cs.cpp
+++ b/daemon/table/cs.cpp
@@ -157,7 +157,7 @@
 }
 
 void
-Cs::enableAdmit(bool shouldAdmit)
+Cs::enableAdmit(bool shouldAdmit) noexcept
 {
   if (m_shouldAdmit == shouldAdmit) {
     return;
@@ -167,7 +167,7 @@
 }
 
 void
-Cs::enableServe(bool shouldServe)
+Cs::enableServe(bool shouldServe) noexcept
 {
   if (m_shouldServe == shouldServe) {
     return;
diff --git a/daemon/table/cs.hpp b/daemon/table/cs.hpp
index cf91e17..a0bcbf6 100644
--- a/daemon/table/cs.hpp
+++ b/daemon/table/cs.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,
@@ -31,7 +31,7 @@
 namespace nfd {
 namespace cs {
 
-/** \brief implements the Content Store
+/** \brief Implements the Content Store.
  *
  *  This Content Store implementation consists of a Table and a replacement policy.
  *
@@ -47,12 +47,12 @@
   explicit
   Cs(size_t nMaxPackets = 10);
 
-  /** \brief inserts a Data packet
+  /** \brief Inserts a Data packet.
    */
   void
   insert(const Data& data, bool isUnsolicited = false);
 
-  /** \brief asynchronously erases entries under \p prefix
+  /** \brief Asynchronously erases entries under \p prefix.
    *  \tparam AfterEraseCallback `void f(size_t nErased)`
    *  \param prefix name prefix of entries
    *  \param limit max number of entries to erase
@@ -67,7 +67,7 @@
     cb(nErased);
   }
 
-  /** \brief finds the best matching Data packet
+  /** \brief Finds the best matching Data packet.
    *  \tparam HitCallback `void f(const Interest&, const Data&)`
    *  \tparam MissCallback `void f(const Interest&)`
    *  \param interest the Interest for lookup
@@ -88,7 +88,7 @@
     hit(interest, match->getData());
   }
 
-  /** \brief get number of stored packets
+  /** \brief Get number of stored packets.
    */
   size_t
   size() const
@@ -97,15 +97,15 @@
   }
 
 public: // configuration
-  /** \brief get capacity (in number of packets)
+  /** \brief Get capacity (in number of packets).
    */
   size_t
-  getLimit() const
+  getLimit() const noexcept
   {
     return m_policy->getLimit();
   }
 
-  /** \brief change capacity (in number of packets)
+  /** \brief Change capacity (in number of packets).
    */
   void
   setLimit(size_t nMaxPackets)
@@ -113,49 +113,49 @@
     return m_policy->setLimit(nMaxPackets);
   }
 
-  /** \brief get replacement policy
+  /** \brief Get replacement policy.
    */
   Policy*
-  getPolicy() const
+  getPolicy() const noexcept
   {
     return m_policy.get();
   }
 
-  /** \brief change replacement policy
+  /** \brief Change replacement policy.
    *  \pre size() == 0
    */
   void
   setPolicy(unique_ptr<Policy> policy);
 
-  /** \brief get CS_ENABLE_ADMIT flag
+  /** \brief Get CS_ENABLE_ADMIT flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   bool
-  shouldAdmit() const
+  shouldAdmit() const noexcept
   {
     return m_shouldAdmit;
   }
 
-  /** \brief set CS_ENABLE_ADMIT flag
+  /** \brief Set CS_ENABLE_ADMIT flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   void
-  enableAdmit(bool shouldAdmit);
+  enableAdmit(bool shouldAdmit) noexcept;
 
-  /** \brief get CS_ENABLE_SERVE flag
+  /** \brief Get CS_ENABLE_SERVE flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   bool
-  shouldServe() const
+  shouldServe() const noexcept
   {
     return m_shouldServe;
   }
 
-  /** \brief set CS_ENABLE_SERVE flag
+  /** \brief Set CS_ENABLE_SERVE flag.
    *  \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#Update-config
    */
   void
-  enableServe(bool shouldServe);
+  enableServe(bool shouldServe) noexcept;
 
 public: // enumeration
   using const_iterator = Table::const_iterator;
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index c300208..03a2c2e 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.hpp
@@ -82,7 +82,7 @@
   hasNextHop(const Face& face) const;
 
 private:
-  /** \brief adds a NextHop record to the entry
+  /** \brief Adds a NextHop record to the entry.
    *
    *  If a NextHop record for \p face already exists in the entry, its cost is set to \p cost.
    *
@@ -92,7 +92,7 @@
   std::pair<NextHopList::iterator, bool>
   addOrUpdateNextHop(Face& face, uint64_t cost);
 
-  /** \brief removes a NextHop record
+  /** \brief Removes a NextHop record.
    *
    *  If no NextHop record for face exists, do nothing.
    */
@@ -104,7 +104,7 @@
   NextHopList::iterator
   findNextHop(const Face& face);
 
-  /** \brief sorts the nexthop list
+  /** \brief Sorts the nexthop list.
    */
   void
   sortNextHops();
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index 6073533..bfeedf8 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -43,7 +43,9 @@
 
 namespace fib {
 
-/** \brief Represents the Forwarding Information Base (FIB)
+/**
+ * \brief Represents the Forwarding Information Base (FIB).
+ * \sa fib::Entry
  */
 class Fib : noncopyable
 {
@@ -52,32 +54,32 @@
   Fib(NameTree& nameTree);
 
   size_t
-  size() const
+  size() const noexcept
   {
     return m_nItems;
   }
 
 public: // lookup
-  /** \brief Performs a longest prefix match
+  /** \brief Performs a longest prefix match.
    */
   const Entry&
   findLongestPrefixMatch(const Name& prefix) const;
 
-  /** \brief Performs a longest prefix match
+  /** \brief Performs a longest prefix match.
    *
    *  This is equivalent to `findLongestPrefixMatch(pitEntry.getName())`
    */
   const Entry&
   findLongestPrefixMatch(const pit::Entry& pitEntry) const;
 
-  /** \brief Performs a longest prefix match
+  /** \brief Performs a longest prefix match.
    *
    *  This is equivalent to `findLongestPrefixMatch(measurementsEntry.getName())`
    */
   const Entry&
   findLongestPrefixMatch(const measurements::Entry& measurementsEntry) const;
 
-  /** \brief Performs an exact match lookup
+  /** \brief Performs an exact match lookup.
    */
   Entry*
   findExactMatch(const Name& prefix);
@@ -91,7 +93,7 @@
     return NameTree::getMaxDepth();
   }
 
-  /** \brief Find or insert a FIB entry
+  /** \brief Find or insert a FIB entry.
    *  \param prefix FIB entry name; it must not have more than \c getMaxDepth() components.
    *  \return the entry, and true for new entry or false for existing entry
    */
@@ -104,7 +106,7 @@
   void
   erase(const Entry& entry);
 
-  /** \brief Add a NextHop record
+  /** \brief Add a NextHop record.
    *
    *  If a NextHop record for \p face already exists in \p entry, its cost is set to \p cost.
    */
@@ -117,7 +119,7 @@
     FIB_ENTRY_REMOVED ///< the nexthop is removed and the fib entry is removed
   };
 
-  /** \brief Remove the NextHop record for \p face from \p entry
+  /** \brief Remove the NextHop record for \p face from \p entry.
    */
   RemoveNextHopResult
   removeNextHop(Entry& entry, const Face& face);
@@ -147,7 +149,7 @@
   }
 
 public: // signal
-  /** \brief signals on Fib entry nexthop creation
+  /** \brief Signals on Fib entry nexthop creation.
    */
   signal::Signal<Fib, Name, NextHop> afterNewNextHop;
 
diff --git a/daemon/table/measurements-accessor.hpp b/daemon/table/measurements-accessor.hpp
index 244897b..9895beb 100644
--- a/daemon/table/measurements-accessor.hpp
+++ b/daemon/table/measurements-accessor.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,10 +37,11 @@
 
 namespace measurements {
 
-/** \brief allows Strategy to access portion of Measurements table under its namespace
+/**
+ * \brief Allows fw::Strategy to access the portion of Measurements table under its namespace.
  *
- *  All public methods have the same semantics as the same method on \p Measurements,
- *  but would return nullptr if the entry falls out of the strategy's authority.
+ * All public methods have the same semantics as the corresponding methods on Measurements,
+ * but will return nullptr if the entry falls out of the strategy's authority.
  */
 class MeasurementsAccessor : noncopyable
 {
@@ -50,46 +51,44 @@
 
   ~MeasurementsAccessor();
 
-  /** \brief find or insert a Measurements entry for \p name
+  /** \brief Find or insert a Measurements entry for \p name.
    */
   Entry*
   get(const Name& name);
 
-  /** \brief find or insert a Measurements entry for \p fibEntry->getPrefix()
+  /** \brief Find or insert a Measurements entry for \p fibEntry->getPrefix().
    */
   Entry*
   get(const fib::Entry& fibEntry);
 
-  /** \brief find or insert a Measurements entry for \p pitEntry->getName()
+  /** \brief Find or insert a Measurements entry for \p pitEntry->getName().
    */
   Entry*
   get(const pit::Entry& pitEntry);
 
-  /** \brief find or insert a Measurements entry for child's parent
+  /** \brief Find or insert a Measurements entry for child's parent.
    */
   Entry*
   getParent(const Entry& child);
 
-  /** \brief perform a longest prefix match for \p name
+  /** \brief Perform a longest prefix match for \p name.
    */
   Entry*
   findLongestPrefixMatch(const Name& name,
-                         const EntryPredicate& pred =
-                             AnyEntry()) const;
+                         const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief perform a longest prefix match for \p pitEntry.getName()
+  /** \brief Perform a longest prefix match for \p pitEntry.getName().
    */
   Entry*
   findLongestPrefixMatch(const pit::Entry& pitEntry,
-                         const EntryPredicate& pred =
-                             AnyEntry()) const;
+                         const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief perform an exact match
+  /** \brief Perform an exact match.
    */
   Entry*
   findExactMatch(const Name& name) const;
 
-  /** \brief extend lifetime of an entry
+  /** \brief Extend lifetime of an entry.
    *
    *  The entry will be kept until at least now()+lifetime.
    */
@@ -97,7 +96,7 @@
   extendLifetime(Entry& entry, const time::nanoseconds& lifetime);
 
 private:
-  /** \brief perform access control to Measurements entry
+  /** \brief Perform access control to Measurements entry.
    *  \return entry if strategy has access to namespace, otherwise nullptr
    */
   Entry*
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index a3983ae..84624a2 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.hpp
@@ -50,14 +50,14 @@
   }
 
   const Name&
-  getName() const
+  getName() const noexcept
   {
     return m_name;
   }
 
 private:
   Name m_name;
-  time::steady_clock::TimePoint m_expiry = time::steady_clock::TimePoint::min();
+  time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
   scheduler::EventId m_cleanup;
 
   name_tree::Entry* m_nameTreeEntry = nullptr;
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 342d753..1bd0eb7 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-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,
@@ -41,23 +41,26 @@
 
 namespace measurements {
 
-/** \brief A predicate that accepts or rejects an entry
+/**
+ * \brief A predicate that accepts or rejects an entry.
  */
 using EntryPredicate = std::function<bool(const Entry&)>;
 
-/** \brief An \c EntryPredicate that accepts any entry
+/**
+ * \brief An #EntryPredicate that accepts any entry.
  */
 class AnyEntry
 {
 public:
-  bool
-  operator()(const Entry&) const
+  constexpr bool
+  operator()(const Entry&) const noexcept
   {
     return true;
   }
 };
 
-/** \brief An \c EntryPredicate that accepts an entry if it has StrategyInfo of type T
+/**
+ * \brief An #EntryPredicate that accepts an entry if it has StrategyInfo of type T.
  */
 template<typename T>
 class EntryWithStrategyInfo
@@ -70,11 +73,12 @@
   }
 };
 
-/** \brief The Measurements table
+/**
+ * \brief The %Measurements table.
  *
- *  The Measurements table is a data structure for forwarding strategies to store per name prefix
- *  measurements. A strategy can access this table via \c Strategy::getMeasurements(), and then
- *  place any object that derive from \c StrategyInfo type onto Measurements entries.
+ * The %Measurements table is a data structure for forwarding strategies to store per name prefix
+ * measurements. A strategy can access this table via fw::Strategy::getMeasurements(), and then
+ * place any object that derive from StrategyInfo type onto %Measurements entries.
  */
 class Measurements : noncopyable
 {
@@ -82,7 +86,7 @@
   explicit
   Measurements(NameTree& nameTree);
 
-  /** \brief maximum depth of a Measurements entry
+  /** \brief Maximum depth of a %Measurements entry.
    */
   static constexpr size_t
   getMaxDepth()
@@ -90,44 +94,44 @@
     return NameTree::getMaxDepth();
   }
 
-  /** \brief Find or insert an entry by name
+  /** \brief Find or insert an entry by name.
    *
-   *  An entry name can have at most \c getMaxDepth() components. If \p name exceeds this limit,
-   *  it is truncated to the first \c getMaxDepth() components.
+   *  An entry name can have at most getMaxDepth() components. If \p name exceeds this limit,
+   *  it is truncated to the first getMaxDepth() components.
    */
   Entry&
   get(const Name& name);
 
-  /** \brief Equivalent to `get(fibEntry.getPrefix())`
+  /** \brief Equivalent to `get(fibEntry.getPrefix())`.
    */
   Entry&
   get(const fib::Entry& fibEntry);
 
-  /** \brief Equivalent to `get(pitEntry.getName(), std::min(pitEntry.getName().size(), getMaxDepth()))`
+  /** \brief Equivalent to `get(pitEntry.getName(), std::min(pitEntry.getName().size(), getMaxDepth()))`.
    */
   Entry&
   get(const pit::Entry& pitEntry);
 
-  /** \brief Find or insert a parent entry
+  /** \brief Find or insert a parent entry.
    *  \retval nullptr child is the root entry
    *  \return get(child.getName().getPrefix(-1))
    */
   Entry*
   getParent(const Entry& child);
 
-  /** \brief Perform a longest prefix match for \p name
+  /** \brief Perform a longest prefix match for \p name.
    */
   Entry*
   findLongestPrefixMatch(const Name& name,
                          const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief Perform a longest prefix match for `pitEntry.getName()`
+  /** \brief Perform a longest prefix match for `pitEntry.getName()`.
    */
   Entry*
   findLongestPrefixMatch(const pit::Entry& pitEntry,
                          const EntryPredicate& pred = AnyEntry()) const;
 
-  /** \brief Perform an exact match
+  /** \brief Perform an exact match.
    */
   Entry*
   findExactMatch(const Name& name) const;
@@ -138,7 +142,7 @@
     return 4_s;
   }
 
-  /** \brief Extend lifetime of an entry
+  /** \brief Extend lifetime of an entry.
    *
    *  The entry will be kept until at least now()+lifetime.
    */
@@ -158,7 +162,7 @@
   Entry&
   get(name_tree::Entry& nte);
 
-  /** \tparam K a parameter acceptable to \c NameTree::findLongestPrefixMatch
+  /** \tparam K a parameter acceptable to NameTree::findLongestPrefixMatch()
    */
   template<typename K>
   Entry*
diff --git a/daemon/table/name-tree-entry.hpp b/daemon/table/name-tree-entry.hpp
index 644d86b..8923d9c 100644
--- a/daemon/table/name-tree-entry.hpp
+++ b/daemon/table/name-tree-entry.hpp
@@ -35,7 +35,8 @@
 
 class Node;
 
-/** \brief An entry in the name tree
+/**
+ * \brief An entry in the name tree.
  */
 class Entry : noncopyable
 {
@@ -43,7 +44,7 @@
   Entry(const Name& prefix, Node* node);
 
   const Name&
-  getName() const
+  getName() const noexcept
   {
     return m_name;
   }
@@ -52,12 +53,12 @@
    *  \retval nullptr this entry is the root entry, i.e. getName() == Name()
    */
   Entry*
-  getParent() const
+  getParent() const noexcept
   {
     return m_parent;
   }
 
-  /** \brief Set parent of this entry
+  /** \brief Set parent of this entry.
    *  \param entry entry of getName().getPrefix(-1)
    *  \pre getParent() == nullptr
    *  \post getParent() == &entry
@@ -66,14 +67,15 @@
   void
   setParent(Entry& entry);
 
-  /** \brief Unset parent of this entry
+  /** \brief Unset parent of this entry.
    *  \post getParent() == nullptr
    *  \post parent.getChildren() does not contain this
    */
   void
   unsetParent();
 
-  /** \brief Check whether this entry has any children
+  /**
+   * \brief Check whether this entry has any children.
    */
   bool
   hasChildren() const
@@ -81,10 +83,11 @@
     return !m_children.empty();
   }
 
-  /** \return children of this entry
+  /**
+   * \brief Returns the children of this entry.
    */
   const std::vector<Entry*>&
-  getChildren() const
+  getChildren() const noexcept
   {
     return m_children;
   }
@@ -176,14 +179,14 @@
   friend Node* getNode(const Entry& entry);
 };
 
-/** \brief a functor to get a table entry from a name tree entry
+/** \brief A functor to get a table entry from a name tree entry.
  *  \tparam ENTRY type of single table entry attached to name tree entry, such as fib::Entry
  */
 template<typename ENTRY>
 class GetTableEntry
 {
 public:
-  /** \brief A function pointer to the getter on Entry class that returns ENTRY
+  /** \brief A function pointer to the getter on Entry class that returns ENTRY.
    */
   using Getter = ENTRY* (Entry::*)() const;
 
diff --git a/daemon/table/name-tree-hashtable.hpp b/daemon/table/name-tree-hashtable.hpp
index de96d0a..1328c2e 100644
--- a/daemon/table/name-tree-hashtable.hpp
+++ b/daemon/table/name-tree-hashtable.hpp
@@ -32,27 +32,27 @@
 
 class Entry;
 
-/** \brief a single hash value
+/** \brief A single hash value.
  */
 using HashValue = size_t;
 
-/** \brief a sequence of hash values
+/** \brief A sequence of hash values.
  *  \sa computeHashes
  */
 using HashSequence = std::vector<HashValue>;
 
-/** \brief computes hash value of \p name.getPrefix(prefixLen)
+/** \brief Computes hash value of \p name.getPrefix(prefixLen).
  */
 HashValue
 computeHash(const Name& name, size_t prefixLen = std::numeric_limits<size_t>::max());
 
-/** \brief computes hash values for each prefix of \p name.getPrefix(prefixLen)
+/** \brief Computes hash values for each prefix of \p name.getPrefix(prefixLen).
  *  \return a hash sequence, where the i-th hash value equals computeHash(name, i)
  */
 HashSequence
 computeHashes(const Name& name, size_t prefixLen = std::numeric_limits<size_t>::max());
 
-/** \brief a hashtable node
+/** \brief A hashtable node.
  *
  *  Zero or more nodes can be added to a hashtable bucket. They are organized as
  *  a doubly linked list through prev and next pointers.
@@ -83,7 +83,7 @@
 Node*
 getNode(const Entry& entry);
 
-/** \brief invoke a function for each node in a doubly linked list
+/** \brief Invoke a function for each node in a doubly linked list.
  *  \tparam N either Node or const Node
  *  \tparam F a functor with signature void F(N*)
  *  \note It's safe to delete the node in the function.
@@ -100,50 +100,50 @@
   }
 }
 
-/** \brief provides options for Hashtable
+/**
+ * \brief Provides options for Hashtable.
  */
-class HashtableOptions
+struct HashtableOptions
 {
-public:
-  /** \brief constructor
+  /** \brief Constructor.
    *  \post initialSize == size
    *  \post minSize == size
    */
   explicit
   HashtableOptions(size_t size = 16);
 
-public:
-  /** \brief initial number of buckets
+  /** \brief Initial number of buckets.
    */
   size_t initialSize;
 
-  /** \brief minimal number of buckets
+  /** \brief Minimal number of buckets.
    */
   size_t minSize;
 
-  /** \brief if hashtable has more than nBuckets*expandLoadFactor nodes, it will be expanded
+  /** \brief If the hashtable has more than `nBuckets*expandLoadFactor` nodes, it will be expanded.
    */
   float expandLoadFactor = 0.5f;
 
-  /** \brief when hashtable is expanded, its new size is nBuckets*expandFactor
+  /** \brief When the hashtable is expanded, its new size will be `nBuckets*expandFactor`.
    */
   float expandFactor = 2.0f;
 
-  /** \brief if hashtable has less than nBuckets*shrinkLoadFactor nodes, it will be shrunk
+  /** \brief If the hashtable has less than `nBuckets*shrinkLoadFactor` nodes, it will be shrunk.
    */
   float shrinkLoadFactor = 0.1f;
 
-  /** \brief when hashtable is shrunk, its new size is max(nBuckets*shrinkFactor, minSize)
+  /** \brief When the hashtable is shrunk, its new size will be `max(nBuckets*shrinkFactor, minSize)`.
    */
   float shrinkFactor = 0.5f;
 };
 
-/** \brief a hashtable for fast exact name lookup
+/**
+ * \brief A hashtable for fast exact name lookup.
  *
- *  The Hashtable contains a number of buckets.
- *  Each node is placed into a bucket determined by a hash value computed from its name.
- *  Hash collision is resolved through a doubly linked list in each bucket.
- *  The number of buckets is adjusted according to how many nodes are stored.
+ * The Hashtable contains a number of buckets.
+ * Each node is placed into a bucket determined by a hash value computed from its name.
+ * Hash collision is resolved through a doubly linked list in each bucket.
+ * The number of buckets is adjusted according to how many nodes are stored.
  */
 class Hashtable
 {
@@ -153,7 +153,7 @@
   explicit
   Hashtable(const Options& options);
 
-  /** \brief deallocates all nodes
+  /** \brief Deallocates all nodes.
    */
   ~Hashtable();
 
@@ -191,39 +191,39 @@
     return m_buckets[bucket]; // don't use m_bucket.at() for better performance
   }
 
-  /** \brief find node for name.getPrefix(prefixLen)
+  /** \brief Find node for name.getPrefix(prefixLen).
    *  \pre name.size() > prefixLen
    */
   const Node*
   find(const Name& name, size_t prefixLen) const;
 
-  /** \brief find node for name.getPrefix(prefixLen)
+  /** \brief Find node for name.getPrefix(prefixLen).
    *  \pre name.size() > prefixLen
    *  \pre hashes == computeHashes(name)
    */
   const Node*
   find(const Name& name, size_t prefixLen, const HashSequence& hashes) const;
 
-  /** \brief find or insert node for name.getPrefix(prefixLen)
+  /** \brief Find or insert node for name.getPrefix(prefixLen).
    *  \pre name.size() > prefixLen
    *  \pre hashes == computeHashes(name)
    */
   std::pair<const Node*, bool>
   insert(const Name& name, size_t prefixLen, const HashSequence& hashes);
 
-  /** \brief delete node
+  /** \brief Delete node.
    *  \pre node exists in this hashtable
    */
   void
   erase(Node* node);
 
 private:
-  /** \brief attach node to bucket
+  /** \brief Attach node to bucket.
    */
   void
   attach(size_t bucket, Node* node);
 
-  /** \brief detach node from bucket
+  /** \brief Detach node from bucket.
    */
   void
   detach(size_t bucket, Node* node);
diff --git a/daemon/table/name-tree-iterator.cpp b/daemon/table/name-tree-iterator.cpp
index 001bb06..ecfe40d 100644
--- a/daemon/table/name-tree-iterator.cpp
+++ b/daemon/table/name-tree-iterator.cpp
@@ -37,18 +37,11 @@
 
 NFD_LOG_INIT(NameTreeIterator);
 
-Iterator::Iterator()
-  : m_entry(nullptr)
-  , m_ref(nullptr)
-  , m_state(0)
-{
-}
+Iterator::Iterator() = default;
 
 Iterator::Iterator(shared_ptr<EnumerationImpl> impl, const Entry* ref)
   : m_impl(std::move(impl))
-  , m_entry(nullptr)
   , m_ref(ref)
-  , m_state(0)
 {
   m_impl->advance(*this);
   NFD_LOG_TRACE("initialized " << *this);
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index 4a76a53..4458a3e 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -34,33 +34,36 @@
 
 class NameTree;
 
-/** \brief a predicate to accept or reject an Entry in find operations
+/**
+ * \brief A predicate to accept or reject an Entry in find operations.
  */
 using EntrySelector = std::function<bool(const Entry&)>;
 
-/** \brief an EntrySelector that accepts every Entry
+/**
+ * \brief An #EntrySelector that accepts every Entry.
  */
 struct AnyEntry
 {
-  bool
-  operator()(const Entry&) const
+  constexpr bool
+  operator()(const Entry&) const noexcept
   {
     return true;
   }
 };
 
-/** \brief a predicate to accept or reject an Entry and its children
+/** \brief A predicate to accept or reject an Entry and its children.
  *  \return `.first` indicates whether entry should be accepted;
  *          `.second` indicates whether entry's children should be visited
  */
 using EntrySubTreeSelector = std::function<std::pair<bool, bool>(const Entry&)>;
 
-/** \brief an EntrySubTreeSelector that accepts every Entry and its children
+/**
+ * \brief An #EntrySubTreeSelector that accepts every Entry and its children.
  */
 struct AnyEntrySubTree
 {
-  std::pair<bool, bool>
-  operator()(const Entry&) const
+  constexpr std::pair<bool, bool>
+  operator()(const Entry&) const noexcept
   {
     return {true, true};
   }
@@ -68,7 +71,8 @@
 
 class EnumerationImpl;
 
-/** \brief NameTree iterator
+/**
+ * \brief NameTree iterator.
  */
 class Iterator
 {
@@ -113,21 +117,21 @@
   }
 
 private:
-  /** \brief enumeration implementation; nullptr for end iterator
+  /** \brief Enumeration implementation; nullptr for end iterator.
    */
   shared_ptr<EnumerationImpl> m_impl;
 
-  /** \brief current entry; nullptr for uninitialized iterator
+  /** \brief Current entry; nullptr for uninitialized iterator.
    */
-  const Entry* m_entry;
+  const Entry* m_entry = nullptr;
 
-  /** \brief reference entry used by enumeration implementation
+  /** \brief Reference entry used by enumeration implementation.
    */
-  const Entry* m_ref;
+  const Entry* m_ref = nullptr;
 
-  /** \brief state used by enumeration implementation
+  /** \brief State used by enumeration implementation.
    */
-  int m_state;
+  int m_state = 0;
 
   friend std::ostream& operator<<(std::ostream&, const Iterator&);
   friend class FullEnumerationImpl;
@@ -138,7 +142,7 @@
 std::ostream&
 operator<<(std::ostream& os, const Iterator& i);
 
-/** \brief enumeration operation implementation
+/** \brief Enumeration operation implementation.
  */
 class EnumerationImpl
 {
@@ -157,7 +161,7 @@
   const Hashtable& ht;
 };
 
-/** \brief full enumeration implementation
+/** \brief Full enumeration implementation.
  */
 class FullEnumerationImpl final : public EnumerationImpl
 {
@@ -171,7 +175,7 @@
   EntrySelector m_pred;
 };
 
-/** \brief partial enumeration implementation
+/** \brief Partial enumeration implementation.
  *
  *  Iterator::m_ref should be initialized to subtree root.
  *  Iterator::m_state LSB indicates whether to visit children of m_entry.
@@ -188,7 +192,7 @@
   EntrySubTreeSelector m_pred;
 };
 
-/** \brief partial enumeration implementation
+/** \brief Partial enumeration implementation.
  *
  *  Iterator::m_ref should be initialized to longest prefix matched entry.
  */
@@ -205,7 +209,7 @@
   EntrySelector m_pred;
 };
 
-/** \brief a Forward Range of name tree entries
+/** \brief A Forward Range of name tree entries.
  *
  *  This type has .begin() and .end() methods which return Iterator.
  *  This type is usable with range-based for.
diff --git a/daemon/table/network-region-table.hpp b/daemon/table/network-region-table.hpp
index 96acf87..b4ee652 100644
--- a/daemon/table/network-region-table.hpp
+++ b/daemon/table/network-region-table.hpp
@@ -30,7 +30,7 @@
 
 namespace nfd {
 
-/** \brief stores a collection of producer region names
+/** \brief Stores a collection of producer region names.
  *
  *  This table is used in forwarding to process Interests with Link objects.
  *
@@ -40,7 +40,7 @@
 class NetworkRegionTable : public std::set<Name>
 {
 public:
-  /** \brief determines whether an Interest has reached a producer region
+  /** \brief Determines whether an Interest has reached a producer region.
    *  \param forwardingHint forwarding hint of an Interest
    *  \retval true the Interest has reached a producer region
    *  \retval false the Interest has not reached a producer region
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index bc4f1d3..f612512 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -38,12 +38,12 @@
 namespace nfd::pit {
 
 /**
- * \brief An unordered collection of in-records
+ * \brief An unordered collection of in-records.
  */
 using InRecordCollection = std::list<InRecord>;
 
 /**
- * \brief An unordered collection of out-records
+ * \brief An unordered collection of out-records.
  */
 using OutRecordCollection = std::list<OutRecord>;
 
@@ -134,24 +134,24 @@
     return m_inRecords.end();
   }
 
-  /** \brief get the in-record for \p face
+  /** \brief Get the in-record for \p face.
    *  \return an iterator to the in-record, or in_end() if it does not exist
    */
   InRecordCollection::iterator
   getInRecord(const Face& face);
 
-  /** \brief insert or update an in-record
+  /** \brief Insert or update an in-record.
    *  \return an iterator to the new or updated in-record
    */
   InRecordCollection::iterator
   insertOrUpdateInRecord(Face& face, const Interest& interest);
 
-  /** \brief delete the in-record for \p face if it exists
+  /** \brief Delete the in-record for \p face if it exists.
    */
   void
   deleteInRecord(const Face& face);
 
-  /** \brief delete all in-records
+  /** \brief Delete all in-records.
    */
   void
   clearInRecords();
@@ -201,35 +201,35 @@
     return m_outRecords.end();
   }
 
-  /** \brief get the out-record for \p face
+  /** \brief Get the out-record for \p face.
    *  \return an iterator to the out-record, or out_end() if it does not exist
    */
   OutRecordCollection::iterator
   getOutRecord(const Face& face);
 
-  /** \brief insert or update an out-record
+  /** \brief Insert or update an out-record.
    *  \return an iterator to the new or updated out-record
    */
   OutRecordCollection::iterator
   insertOrUpdateOutRecord(Face& face, const Interest& interest);
 
-  /** \brief delete the out-record for \p face if it exists
+  /** \brief Delete the out-record for \p face if it exists.
    */
   void
   deleteOutRecord(const Face& face);
 
 public:
-  /** \brief Expiry timer
+  /** \brief Expiry timer.
    *
    *  This timer is used in forwarding pipelines to delete the entry
    */
   scheduler::EventId expiryTimer;
 
-  /** \brief Indicates whether this PIT entry is satisfied
+  /** \brief Indicates whether this PIT entry is satisfied.
    */
   bool isSatisfied = false;
 
-  /** \brief Data freshness period
+  /** \brief Data freshness period.
    *  \note This field is meaningful only if isSatisfied is true
    */
   time::milliseconds dataFreshnessPeriod = 0_ms;
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index edb0783..830316e 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.hpp
@@ -31,9 +31,10 @@
 
 namespace nfd::pit {
 
-/** \brief Contains information about an Interest on an incoming or outgoing face
- *  \note This is an implementation detail to extract common functionality
- *        of InRecord and OutRecord
+/**
+ * \brief Contains information about an Interest on an incoming or outgoing face.
+ * \note This class is an implementation detail to extract common functionality
+ *       of InRecord and OutRecord.
  */
 class FaceRecord : public StrategyInfoHost
 {
@@ -45,33 +46,33 @@
   }
 
   Face&
-  getFace() const
+  getFace() const noexcept
   {
     return m_face;
   }
 
   Interest::Nonce
-  getLastNonce() const
+  getLastNonce() const noexcept
   {
     return m_lastNonce;
   }
 
-  time::steady_clock::TimePoint
-  getLastRenewed() const
+  time::steady_clock::time_point
+  getLastRenewed() const noexcept
   {
     return m_lastRenewed;
   }
 
-  /** \brief Returns the time point at which this record expires
+  /** \brief Returns the time point at which this record expires.
    *  \return getLastRenewed() + InterestLifetime
    */
-  time::steady_clock::TimePoint
-  getExpiry() const
+  time::steady_clock::time_point
+  getExpiry() const noexcept
   {
     return m_expiry;
   }
 
-  /** \brief updates lastNonce, lastRenewed, expiry fields
+  /** \brief Updates lastNonce, lastRenewed, expiry fields.
    */
   void
   update(const Interest& interest);
@@ -79,8 +80,8 @@
 private:
   Face& m_face;
   Interest::Nonce m_lastNonce{0, 0, 0, 0};
-  time::steady_clock::TimePoint m_lastRenewed = time::steady_clock::TimePoint::min();
-  time::steady_clock::TimePoint m_expiry = time::steady_clock::TimePoint::min();
+  time::steady_clock::time_point m_lastRenewed = time::steady_clock::time_point::min();
+  time::steady_clock::time_point m_expiry = time::steady_clock::time_point::min();
 };
 
 } // namespace nfd::pit
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index c61f61d..95dc710 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.hpp
@@ -30,7 +30,8 @@
 
 namespace nfd::pit {
 
-/** \brief Contains information about an Interest from an incoming face
+/**
+ * \brief Contains information about an Interest from an incoming face.
  */
 class InRecord : public FaceRecord
 {
@@ -38,7 +39,7 @@
   using FaceRecord::FaceRecord;
 
   const Interest&
-  getInterest() const
+  getInterest() const noexcept
   {
     BOOST_ASSERT(m_interest != nullptr);
     return *m_interest;
diff --git a/daemon/table/pit-iterator.hpp b/daemon/table/pit-iterator.hpp
index 014ddc1..2138b77 100644
--- a/daemon/table/pit-iterator.hpp
+++ b/daemon/table/pit-iterator.hpp
@@ -31,7 +31,8 @@
 
 namespace nfd::pit {
 
-/** \brief PIT iterator
+/**
+ * \brief PIT iterator.
  */
 class Iterator
 {
@@ -42,7 +43,7 @@
   using pointer           = value_type*;
   using reference         = value_type&;
 
-  /** \brief constructor
+  /** \brief Constructor.
    *  \param ntIt a name tree iterator that visits name tree entries with one or more PIT entries
    *  \param iPitEntry make this iterator to dereference to the i-th PIT entry in name tree entry
    */
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index aeb7523..f165370 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.hpp
@@ -30,42 +30,43 @@
 
 namespace nfd::pit {
 
-/** \brief Contains information about an Interest toward an outgoing face
+/**
+ * \brief Contains information about an Interest toward an outgoing face.
  */
 class OutRecord : public FaceRecord
 {
 public:
   using FaceRecord::FaceRecord;
 
-  /** \return last NACK returned by \p getFace()
+  /** \brief Returns the last NACK returned by getFace().
    *
    *  A nullptr return value means the Interest is still pending or has timed out.
    *  A non-null return value means the last outgoing Interest has been NACKed.
    */
   const lp::NackHeader*
-  getIncomingNack() const
+  getIncomingNack() const noexcept
   {
     return m_incomingNack.get();
   }
 
-  /** \brief sets a NACK received from \p getFace()
+  /** \brief Sets a NACK received from getFace().
    *  \return whether incoming NACK is accepted
    *
    *  This is invoked in incoming NACK pipeline.
-   *  An incoming NACK is accepted if its Nonce matches \p getLastNonce().
-   *  If accepted, \p nack.getHeader() will be copied,
-   *  and any pointer previously returned by \p .getIncomingNack() .
+   *  An incoming NACK is accepted if its Nonce matches getLastNonce().
+   *  If accepted, `nack.getHeader()` will be copied,
+   *  and any pointer previously returned by getIncomingNack().
    */
   bool
   setIncomingNack(const lp::Nack& nack);
 
-  /** \brief clears last NACK
+  /** \brief Clears last NACK.
    *
    *  This is invoked in outgoing Interest pipeline.
-   *  This invalidates any pointer previously returned by \p .getIncomingNack() .
+   *  This invalidates any pointer previously returned by getIncomingNack().
    */
   void
-  clearIncomingNack()
+  clearIncomingNack() noexcept
   {
     m_incomingNack.reset();
   }
