model: Implementing two more events for forwarding strategy: DidAddFibEntry and WillRemoveFibEntry
Currently, only DidAddFibEntry method is used and only in PerFibLimits
strategy. Change logic in global routing helper: set per FIB limits only if
forwarding strategy has created a corresponding Limit object.
diff --git a/model/fw/ndn-forwarding-strategy.h b/model/fw/ndn-forwarding-strategy.h
index d3b5c37..b838565 100644
--- a/model/fw/ndn-forwarding-strategy.h
+++ b/model/fw/ndn-forwarding-strategy.h
@@ -36,6 +36,7 @@
namespace pit { class Entry; }
class FibFaceMetric;
class Fib;
+namespace fib { class Entry; }
class ContentStore;
/**
@@ -109,6 +110,20 @@
*/
virtual void
RemoveFace (Ptr<Face> face);
+
+ /**
+ * @brief Event fired every time a FIB entry is added to FIB
+ * @param fibEntry FIB entry that was added
+ */
+ virtual void
+ DidAddFibEntry (Ptr<fib::Entry> fibEntry);
+
+ /**
+ * @brief Fired just before FIB entry will be removed from FIB
+ * @param fibEntry FIB entry that will be removed
+ */
+ virtual void
+ WillRemoveFibEntry (Ptr<fib::Entry> fibEntry);
protected:
/**