model: Extending FIB and PIT interface to include Find call to search for exact match of FIB and PIT entry
diff --git a/model/fib/ndn-fib-impl.cc b/model/fib/ndn-fib-impl.cc
index 1e0f04f..218502b 100644
--- a/model/fib/ndn-fib-impl.cc
+++ b/model/fib/ndn-fib-impl.cc
@@ -83,6 +83,17 @@
return item->payload ();
}
+Ptr<fib::Entry>
+FibImpl::Find (const Name &prefix)
+{
+ super::iterator item = super::find_exact (prefix);
+
+ if (item == super::end ())
+ return 0;
+ else
+ return item->payload ();
+}
+
Ptr<Entry>
FibImpl::Add (const Name &prefix, Ptr<Face> face, int32_t metric)