fw: per upstream retx exponential suppression for multicast strategy
refs: #4066
Change-Id: Ic1047b871dc9dc040e95ac5edceaae9994cd2849
diff --git a/daemon/fw/algorithm.cpp b/daemon/fw/algorithm.cpp
index 320a92a..db2c4cf 100644
--- a/daemon/fw/algorithm.cpp
+++ b/daemon/fw/algorithm.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -120,5 +120,18 @@
});
}
+time::steady_clock::TimePoint
+getLastOutgoing(const pit::Entry& pitEntry)
+{
+ pit::OutRecordCollection::const_iterator lastOutgoing = std::max_element(
+ pitEntry.out_begin(), pitEntry.out_end(),
+ [] (const pit::OutRecord& a, const pit::OutRecord& b) {
+ return a.getLastRenewed() < b.getLastRenewed();
+ });
+ BOOST_ASSERT(lastOutgoing != pitEntry.out_end());
+
+ return lastOutgoing->getLastRenewed();
+}
+
} // namespace fw
} // namespace nfd