fw: reorder function params to make the strategy API more uniform

Also add a non-const overload of Face::getCounters to avoid const_cast

Refs: #5173
Change-Id: Iff0bfbdedb90e68a373090cf3f247d9a7501f58d
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index d8959af..f337a27 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -107,7 +107,7 @@
 }
 
 void
-AsfStrategy::afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+AsfStrategy::afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
                                   const shared_ptr<pit::Entry>& pitEntry)
 {
   const auto& fibEntry = this->lookupFib(*pitEntry);
@@ -165,7 +165,7 @@
     NFD_LOG_DEBUG(interest << " retx-interest from=" << ingress << " retry-to=" << outFace.getId());
     // sendInterest() is used here instead of forwardInterest() because the measurements info
     // were already attached to this face in the previous forwarding
-    auto* outRecord = sendInterest(pitEntry, outFace, interest);
+    auto* outRecord = sendInterest(interest, outFace, pitEntry);
     if (outRecord && suppressResult == RetxSuppressionResult::FORWARD) {
       m_retxSuppression.incrementIntervalForOutRecord(*outRecord);
     }
@@ -173,8 +173,8 @@
 }
 
 void
-AsfStrategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
-                                   const FaceEndpoint& ingress, const Data& data)
+AsfStrategy::beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
+                                   const shared_ptr<pit::Entry>& pitEntry)
 {
   NamespaceInfo* namespaceInfo = m_measurements.getNamespaceInfo(pitEntry->getName());
   if (namespaceInfo == nullptr) {
@@ -207,7 +207,7 @@
 }
 
 void
-AsfStrategy::afterReceiveNack(const FaceEndpoint& ingress, const lp::Nack& nack,
+AsfStrategy::afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& ingress,
                               const shared_ptr<pit::Entry>& pitEntry)
 {
   NFD_LOG_DEBUG(nack.getInterest() << " nack from=" << ingress << " reason=" << nack.getReason());
@@ -221,7 +221,7 @@
   const auto& interestName = interest.getName();
   auto faceId = outFace.getId();
 
-  auto* outRecord = sendInterest(pitEntry, outFace, interest);
+  auto* outRecord = sendInterest(interest, outFace, pitEntry);
 
   FaceInfo& faceInfo = m_measurements.getOrCreateFaceInfo(fibEntry, interestName, faceId);
 
@@ -361,7 +361,7 @@
 {
   lp::NackHeader nackHeader;
   nackHeader.setReason(lp::NackReason::NO_ROUTE);
-  this->sendNack(pitEntry, face, nackHeader);
+  this->sendNack(nackHeader, face, pitEntry);
   this->rejectPendingInterest(pitEntry);
 }