NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
retx-suppression.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #include "retx-suppression.hpp"
27 
28 namespace nfd {
29 namespace fw {
30 
33 {
34  pit::OutRecordCollection::const_iterator lastOutgoing = std::max_element(
35  pitEntry.out_begin(), pitEntry.out_end(),
36  [] (const pit::OutRecord& a, const pit::OutRecord& b) {
37  return a.getLastRenewed() < b.getLastRenewed();
38  });
39  BOOST_ASSERT(lastOutgoing != pitEntry.out_end()); // otherwise it's new PIT entry
40 
41  return lastOutgoing->getLastRenewed();
42 }
43 
44 } // namespace fw
45 } // namespace nfd
time_point TimePoint
Definition: time.hpp:120
OutRecordCollection::iterator out_end()
Definition: pit-entry.hpp:189
OutRecordCollection::iterator out_begin()
Definition: pit-entry.hpp:177
time::steady_clock::TimePoint getLastOutgoing(const pit::Entry &pitEntry) const
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
an Interest table entry
Definition: pit-entry.hpp:57
contains information about an Interest toward an outgoing face
time::steady_clock::TimePoint getLastRenewed() const