fw: increment nOutNacks when sending a Nack from onInterestLoop
Also expand test coverage of all forwarder counters
Change-Id: I6948af05aca1b5589e2f1c8a1f23c002d39d0ec0
diff --git a/daemon/fw/forwarder-counters.hpp b/daemon/fw/forwarder-counters.hpp
index d6b2fde..c1242e1 100644
--- a/daemon/fw/forwarder-counters.hpp
+++ b/daemon/fw/forwarder-counters.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,8 @@
namespace nfd {
-/** \brief Counters provided by Forwarder
+/**
+ * \brief Counters provided by Forwarder.
*/
class ForwarderCounters
{
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 131b4f1..ff21ee7 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -183,6 +183,7 @@
lp::Nack nack(interest);
nack.setReason(lp::NackReason::DUPLICATE);
ingress.face.sendNack(nack);
+ ++m_counters.nOutNacks;
}
void
@@ -271,6 +272,7 @@
// send Interest
egress.sendInterest(interest);
++m_counters.nOutInterests;
+
return &*it;
}