Initial steps for Interest packet processing
diff --git a/model/ccnx-pit.cc b/model/ccnx-pit.cc
index 15e4824..614c89c 100644
--- a/model/ccnx-pit.cc
+++ b/model/ccnx-pit.cc
@@ -50,22 +50,22 @@
// return count;
// }
-// TypeId
-// CcnxPit::GetTypeId ()
-// {
-// static TypeId tid = TypeId ("ns3::CcnxPit")
-// .SetGroupName ("Ccnx")
-// .SetParent<Object> ()
-// .AddConstructor<CcnxPit> ()
-// .AddAttribute ("CleanupTimeout",
-// "Timeout defining how frequent RIT should be cleaned up",
-// TimeValue (Seconds (1)),
-// MakeTimeAccessor (&CcnxPit::GetCleanupTimeout, &CcnxPit::SetCleanupTimeout),
-// MakeTimeChecker ())
-// ;
+TypeId
+CcnxPit::GetTypeId ()
+{
+ static TypeId tid = TypeId ("ns3::CcnxPit")
+ .SetGroupName ("Ccnx")
+ .SetParent<Object> ()
+ .AddConstructor<CcnxPit> ()
+ .AddAttribute ("CleanupTimeout",
+ "Timeout defining how frequent RIT should be cleaned up",
+ TimeValue (Seconds (1)),
+ MakeTimeAccessor (&CcnxPit::GetCleanupTimeout, &CcnxPit::SetCleanupTimeout),
+ MakeTimeChecker ())
+ ;
-// return tid;
-// }
+ return tid;
+}
CcnxPit::CcnxPit ()
{
@@ -122,13 +122,13 @@
}
const CcnxPitEntry&
-CcnxPit::Lookup (const CcnxInterestHeader &header) const
+CcnxPit::Lookup (const CcnxInterestHeader &header)
{
CcnxPitEntryContainer::type::iterator entry =
get<i_prefix> ().find (header.GetName ());
- // if (entry != m_pit.end ())
- // entry = m_pit.insert (m_pit.end (), CcnxPitEntry (Create<CcnxNameComponents> (header.GetName ())));
+ if (entry != end ())
+ entry = insert (end (), CcnxPitEntry (Create<CcnxNameComponents> (header.GetName ())));
return *entry;
}