fw: handle dropped packets in strategies
refs #5128
Change-Id: Ic7f7e61b2dde66004d0291bb41e008961fc7b252
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 7c93327..37b1553 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -255,8 +255,9 @@
* \param pitEntry the PIT entry
* \param egress face through which to send out the Interest
* \param interest the Interest packet
+ * \return A pointer to the out-record created or nullptr if the Interest was dropped
*/
- VIRTUAL_WITH_TESTS void
+ VIRTUAL_WITH_TESTS pit::OutRecord*
sendInterest(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
const Interest& interest);
@@ -264,8 +265,9 @@
* \param pitEntry the PIT entry
* \param data the Data packet
* \param egress face through which to send out the Data
+ * \return Whether the Data was sent (true) or dropped (false)
*/
- VIRTUAL_WITH_TESTS void
+ VIRTUAL_WITH_TESTS bool
sendData(const shared_ptr<pit::Entry>& pitEntry, const Data& data, Face& egress);
/** \brief Send a Data packet to all matched and qualified faces.
@@ -298,12 +300,13 @@
* \param pitEntry the PIT entry
* \param egress face through which to send out the Nack
* \param header the Nack header
+ * \return Whether the Nack was sent (true) or dropped (false)
*/
- VIRTUAL_WITH_TESTS void
+ VIRTUAL_WITH_TESTS bool
sendNack(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
const lp::NackHeader& header)
{
- m_forwarder.onOutgoingNack(pitEntry, egress, header);
+ return m_forwarder.onOutgoingNack(pitEntry, egress, header);
}
/** \brief Send Nack to every face that has an in-record, except those in \p exceptFaces