Implementing face clean up callback in forwarding strategy
Necessary for FwStats strategy that uses CcnxFace object as a key to
several statistics parameters.
diff --git a/model/forwarding-strategy/ccnx-forwarding-strategy.cc b/model/forwarding-strategy/ccnx-forwarding-strategy.cc
index 88451e6..ddc4e51 100644
--- a/model/forwarding-strategy/ccnx-forwarding-strategy.cc
+++ b/model/forwarding-strategy/ccnx-forwarding-strategy.cc
@@ -473,4 +473,11 @@
// do nothing for now. may be need to do some logging
}
+
+void
+CcnxForwardingStrategy::RemoveFace (Ptr<CcnxFace> face)
+{
+ // do nothing here
+}
+
} //namespace ns3
diff --git a/model/forwarding-strategy/ccnx-forwarding-strategy.h b/model/forwarding-strategy/ccnx-forwarding-strategy.h
index 20ef1b5..ff0dcef 100644
--- a/model/forwarding-strategy/ccnx-forwarding-strategy.h
+++ b/model/forwarding-strategy/ccnx-forwarding-strategy.h
@@ -83,6 +83,9 @@
virtual void
WillErasePendingInterest (Ptr<CcnxPitEntry> pitEntry);
+
+ virtual void
+ RemoveFace (Ptr<CcnxFace> face);
protected:
// events
diff --git a/model/forwarding-strategy/fw-stats.cc b/model/forwarding-strategy/fw-stats.cc
index 9d15152..cd3b744 100644
--- a/model/forwarding-strategy/fw-stats.cc
+++ b/model/forwarding-strategy/fw-stats.cc
@@ -193,6 +193,13 @@
}
}
+void
+FwStats::RemoveFace (Ptr<CcnxFace> face)
+{
+ m_stats.RemoveFace (face);
+
+ super::RemoveFace (face);
+}
} // namespace ndnSIM
diff --git a/model/forwarding-strategy/fw-stats.h b/model/forwarding-strategy/fw-stats.h
index 1849fb2..67f2763 100644
--- a/model/forwarding-strategy/fw-stats.h
+++ b/model/forwarding-strategy/fw-stats.h
@@ -56,7 +56,10 @@
Ptr<CcnxContentObjectHeader> &header,
Ptr<Packet> &payload,
const Ptr<const Packet> &packet);
-
+
+ virtual void
+ RemoveFace (Ptr<CcnxFace> face);
+
protected:
virtual void
DidCreatePitEntry (const Ptr<CcnxFace> &incomingFace,