Some progress on CcnxPit. Partially working
diff --git a/model/ccnx-pit-entry.cc b/model/ccnx-pit-entry.cc
index ad81781..491896e 100644
--- a/model/ccnx-pit-entry.cc
+++ b/model/ccnx-pit-entry.cc
@@ -21,6 +21,7 @@
#include "ccnx-pit-entry.h"
#include "ccnx-name-components.h"
#include "ccnx-fib.h"
+#include "ccnx-interest-header.h"
#include "ns3/simulator.h"
#include "ns3/log.h"
@@ -35,14 +36,14 @@
namespace ns3
{
-CcnxPitEntry::CcnxPitEntry (Ptr<const CcnxNameComponents> prefix,
- const Time &expireTime,
+CcnxPitEntry::CcnxPitEntry (Ptr<const CcnxInterestHeader> header,
Ptr<CcnxFibEntry> fibEntry)
- : m_prefix (prefix)
+ : m_prefix (header->GetNamePtr ())
+ , m_expireTime (Simulator::Now () + header->GetInterestLifetime ())
, m_fibEntry (fibEntry)
- , m_expireTime (Simulator::Now () + expireTime)
, m_maxRetxCount (0)
{
+ // note that if interest lifetime is not set, the behavior is undefined
}
void