model: Add ns3::ndn::Pit::MaxPitEntryLifetime to configure maximum time for which routers are willing to accept any incoming interest
Actual PIT lifetime should be minimum of MaxPitEntryLifetime and
InterestLifetime specified in the Interest packet.
diff --git a/model/pit/ndn-pit.cc b/model/pit/ndn-pit.cc
index 224e013..ea84496 100644
--- a/model/pit/ndn-pit.cc
+++ b/model/pit/ndn-pit.cc
@@ -50,6 +50,13 @@
TimeValue (), // by default, PIT entries are removed instantly
MakeTimeAccessor (&Pit::m_PitEntryPruningTimout),
MakeTimeChecker ())
+
+ .AddAttribute ("MaxPitEntryLifetime",
+ "Maximum amount of time for which a router is willing to maintain a PIT entry. "
+ "Actual PIT lifetime should be minimum of MaxPitEntryLifetime and InterestLifetime specified in the Interest packet",
+ TimeValue (), // by default, PIT entries are kept for the time, specified by the InterestLifetime
+ MakeTimeAccessor (&Pit::GetMaxPitEntryLifetime, &Pit::SetMaxPitEntryLifetime),
+ MakeTimeChecker ())
;
return tid;