diff --git a/daemon/table/measurements.cpp b/daemon/table/measurements.cpp
index f9b9bd3..03042ba 100644
--- a/daemon/table/measurements.cpp
+++ b/daemon/table/measurements.cpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne Universit
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -90,22 +90,38 @@
   return this->get(*nte);
 }
 
+template<typename K>
 shared_ptr<Entry>
-Measurements::findLongestPrefixMatch(const Name& name,
-                                     const measurements::EntryPredicate& pred) const
+Measurements::findLongestPrefixMatchImpl(const K& key,
+                                         const measurements::EntryPredicate& pred) const
 {
-  shared_ptr<name_tree::Entry> nte = m_nameTree.findLongestPrefixMatch(name,
+  shared_ptr<name_tree::Entry> match = m_nameTree.findLongestPrefixMatch(key,
       [pred] (const name_tree::Entry& nte) -> bool {
         shared_ptr<Entry> entry = nte.getMeasurementsEntry();
         return entry != nullptr && pred(*entry);
       });
-  if (nte != nullptr) {
-    return nte->getMeasurementsEntry();
+  if (match != nullptr) {
+    return match->getMeasurementsEntry();
   }
   return nullptr;
 }
 
 shared_ptr<Entry>
+Measurements::findLongestPrefixMatch(const Name& name,
+                                     const measurements::EntryPredicate& pred) const
+{
+  return this->findLongestPrefixMatchImpl(name, pred);
+}
+
+shared_ptr<Entry>
+Measurements::findLongestPrefixMatch(const pit::Entry& pitEntry,
+                                     const measurements::EntryPredicate& pred) const
+{
+  shared_ptr<name_tree::Entry> nte = m_nameTree.get(pitEntry);
+  return this->findLongestPrefixMatchImpl(nte, pred);
+}
+
+shared_ptr<Entry>
 Measurements::findExactMatch(const Name& name) const
 {
   shared_ptr<name_tree::Entry> nte = m_nameTree.lookup(name);
diff --git a/daemon/table/measurements.hpp b/daemon/table/measurements.hpp
index 4d19f34..068c488 100644
--- a/daemon/table/measurements.hpp
+++ b/daemon/table/measurements.hpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne Universit
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -78,17 +78,17 @@
   explicit
   Measurements(NameTree& nametree);
 
-  /** \brief find or insert a Measurements entry for name
+  /** \brief find or insert a Measurements entry for \p name
    */
   shared_ptr<measurements::Entry>
   get(const Name& name);
 
-  /** \brief find or insert a Measurements entry for fibEntry->getPrefix()
+  /** \brief find or insert a Measurements entry for \p fibEntry.getPrefix()
    */
   shared_ptr<measurements::Entry>
   get(const fib::Entry& fibEntry);
 
-  /** \brief find or insert a Measurements entry for pitEntry->getName()
+  /** \brief find or insert a Measurements entry for \p pitEntry.getName()
    */
   shared_ptr<measurements::Entry>
   get(const pit::Entry& pitEntry);
@@ -99,13 +99,20 @@
   shared_ptr<measurements::Entry>
   getParent(const measurements::Entry& child);
 
-  /** \brief perform a longest prefix match
+  /** \brief perform a longest prefix match for \p name
    */
   shared_ptr<measurements::Entry>
   findLongestPrefixMatch(const Name& name,
                          const measurements::EntryPredicate& pred =
                              measurements::AnyEntry()) const;
 
+  /** \brief perform a longest prefix match for \p pitEntry.getName()
+   */
+  shared_ptr<measurements::Entry>
+  findLongestPrefixMatch(const pit::Entry& pitEntry,
+                         const measurements::EntryPredicate& pred =
+                             measurements::AnyEntry()) const;
+
   /** \brief perform an exact match
    */
   shared_ptr<measurements::Entry>
@@ -131,6 +138,12 @@
   shared_ptr<measurements::Entry>
   get(name_tree::Entry& nte);
 
+  /** \tparam K Name or shared_ptr<name_tree::Entry>
+   */
+  template<typename K>
+  shared_ptr<measurements::Entry>
+  findLongestPrefixMatchImpl(const K& key, const measurements::EntryPredicate& pred) const;
+
 private:
   NameTree& m_nameTree;
   size_t m_nItems;
