limits: Introducing modularity for Interest limits
Now ndn::Limits object can be aggregated on a face/FIB entry. A
forwarding strategy module is responsible in creating an appropriate
implementation of the Interest limits module.
diff --git a/model/ndn-l3-protocol.cc b/model/ndn-l3-protocol.cc
index 372df77..850f84f 100644
--- a/model/ndn-l3-protocol.cc
+++ b/model/ndn-l3-protocol.cc
@@ -164,6 +164,8 @@
m_faces.push_back (face);
m_faceCounter++;
+
+ m_forwardingStrategy->AddFace (face); // notify that face is added
return face->GetId ();
}
@@ -196,6 +198,9 @@
FaceList::iterator face_it = find (m_faces.begin(), m_faces.end(), face);
NS_ASSERT_MSG (face_it != m_faces.end (), "Attempt to remove face that doesn't exist");
m_faces.erase (face_it);
+
+ GetObject<Fib> ()->RemoveFromAll (face);
+ m_forwardingStrategy->RemoveFace (face); // notify that face is removed
}
Ptr<Face>