table: pit::Entry checks Interest matches entry when updating in/out-record
pit::Entry::canMatch is the single place to determine whether an Interest
matches an Interest table entry. This condition is asserted when an in/out-
record is inserted or updated. This prevents a strategy from incorrectly
picking an Interest that is incompatible with the Interest table entry.
refs #1756
Change-Id: Ibf61a0e2e32b7a0e04e581f01ef07b791c6010a2
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index d28cb90..31a2f04 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -79,6 +79,13 @@
return m_interest->getName();
}
+ /** \return whether interest matches this entry
+ * \param interest the Interest
+ * \param nEqualNameComps number of initial name components guaranteed to be equal
+ */
+ bool
+ canMatch(const Interest& interest, size_t nEqualNameComps = 0) const;
+
public: // in-record
/** \return collection of in-records
*/