Correcting bugs with cleaning timeouts in PIT/RIT/ContentStore
Removing RIT concept. Instead, keep track of nonces for each PIT entry.
Many changes in CcnxL3Protocol regarding Interest/Data handling (NACK
are not yet handled at all)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! Remove when is not actual !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Code is not compiling !!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/model/ccnx-interest-header.cc b/model/ccnx-interest-header.cc
index f6295aa..cc21412 100644
--- a/model/ccnx-interest-header.cc
+++ b/model/ccnx-interest-header.cc
@@ -56,8 +56,7 @@
, m_scope (-1)
, m_interestLifetime (Seconds (0))
, m_nonce (0)
- , m_nack (false)
- , m_congested (false)
+ , m_nackType (NORMAL_INTEREST)
{
}
@@ -178,28 +177,16 @@
}
void
-CcnxInterestHeader::SetNack (bool isNack)
+CcnxInterestHeader::SetNack (uint32_t nackType)
{
- m_nack = isNack;
+ m_nackType = nackType;
}
-
-bool
+
+uint32_t
CcnxInterestHeader::IsNack () const
{
return m_nack;
}
-
-void
-CcnxInterestHeader::SetCongested (bool IsCongested)
-{
- m_congested = IsCongested;
-}
-
-bool
-CcnxInterestHeader::IsCongested () const
-{
- return m_congested;
-}
uint32_t
CcnxInterestHeader::GetSerializedSize (void) const
@@ -232,10 +219,23 @@
CcnxInterestHeader::Print (std::ostream &os) const
{
os << "<Interest>\n <Name>" << GetName () << "</Name>\n";
- if (IsNack ())
- os << " <NACK />\n";
- if(IsCongested())
- os << " <CONGESTED />\n";
+ if (GetNack ()>0)
+ {
+ os << " <NACK>";
+ switch (GetNack ())
+ {
+ case NACK_LOOP:
+ os << "loop";
+ break;
+ case NACK_CONGESTION:
+ os << "congestion";
+ break;
+ default:
+ os << "unknown";
+ break;
+ }
+ os << "</NACK>\n";
+ }
if (GetMinSuffixComponents () >= 0)
os << " <MinSuffixComponents>" << GetMinSuffixComponents () << "</MinSuffixComponents>\n";
if (GetMaxSuffixComponents () >= 0)