all: InterestHeader and ContentObjectHeader refactoring to Interest and ContentObject
refs #29
diff --git a/model/cs/content-store-impl.h b/model/cs/content-store-impl.h
index 7ed8ae3..ffe8038 100644
--- a/model/cs/content-store-impl.h
+++ b/model/cs/content-store-impl.h
@@ -44,7 +44,7 @@
typedef Entry base_type;
public:
- EntryImpl (Ptr<ContentStore> cs, Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet)
+ EntryImpl (Ptr<ContentStore> cs, Ptr<const ContentObject> header, Ptr<const Packet> packet)
: Entry (cs, header, packet)
, item_ (0)
{
@@ -86,14 +86,14 @@
// from ContentStore
- virtual inline boost::tuple<Ptr<Packet>, Ptr<const ContentObjectHeader>, Ptr<const Packet> >
- Lookup (Ptr<const InterestHeader> interest);
+ virtual inline boost::tuple<Ptr<Packet>, Ptr<const ContentObject>, Ptr<const Packet> >
+ Lookup (Ptr<const Interest> interest);
virtual inline bool
- Add (Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet);
+ Add (Ptr<const ContentObject> header, Ptr<const Packet> packet);
// virtual bool
- // Remove (Ptr<InterestHeader> header);
+ // Remove (Ptr<Interest> header);
virtual inline void
Print (std::ostream &os) const;
@@ -156,8 +156,8 @@
}
template<class Policy>
-boost::tuple<Ptr<Packet>, Ptr<const ContentObjectHeader>, Ptr<const Packet> >
-ContentStoreImpl<Policy>::Lookup (Ptr<const InterestHeader> interest)
+boost::tuple<Ptr<Packet>, Ptr<const ContentObject>, Ptr<const Packet> >
+ContentStoreImpl<Policy>::Lookup (Ptr<const Interest> interest)
{
NS_LOG_FUNCTION (this << interest->GetName ());
@@ -177,13 +177,13 @@
{
// NS_LOG_DEBUG ("cache miss for " << interest->GetName ());
this->m_cacheMissesTrace (interest);
- return boost::tuple<Ptr<Packet>, Ptr<ContentObjectHeader>, Ptr<Packet> > (0, 0, 0);
+ return boost::tuple<Ptr<Packet>, Ptr<ContentObject>, Ptr<Packet> > (0, 0, 0);
}
}
template<class Policy>
bool
-ContentStoreImpl<Policy>::Add (Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet)
+ContentStoreImpl<Policy>::Add (Ptr<const ContentObject> header, Ptr<const Packet> packet)
{
NS_LOG_FUNCTION (this << header->GetName ());
diff --git a/model/cs/content-store-with-freshness.h b/model/cs/content-store-with-freshness.h
index 6858f97..dab654c 100644
--- a/model/cs/content-store-with-freshness.h
+++ b/model/cs/content-store-with-freshness.h
@@ -43,7 +43,7 @@
GetTypeId ();
virtual inline bool
- Add (Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet);
+ Add (Ptr<const ContentObject> header, Ptr<const Packet> packet);
private:
inline void
@@ -87,7 +87,7 @@
template<class Policy>
inline bool
-ContentStoreWithFreshness< Policy >::Add (Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet)
+ContentStoreWithFreshness< Policy >::Add (Ptr<const ContentObject> header, Ptr<const Packet> packet)
{
bool ok = super::Add (header, packet);
if (!ok) return false;
diff --git a/model/cs/ndn-content-store.cc b/model/cs/ndn-content-store.cc
index 98e118d..c99d7ed 100644
--- a/model/cs/ndn-content-store.cc
+++ b/model/cs/ndn-content-store.cc
@@ -60,7 +60,7 @@
//////////////////////////////////////////////////////////////////////
-Entry::Entry (Ptr<ContentStore> cs, Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet)
+Entry::Entry (Ptr<ContentStore> cs, Ptr<const ContentObject> header, Ptr<const Packet> packet)
: m_cs (cs)
, m_header (header)
, m_packet (packet->Copy ())
@@ -84,7 +84,7 @@
return m_header->GetName ();
}
-Ptr<const ContentObjectHeader>
+Ptr<const ContentObject>
Entry::GetHeader () const
{
return m_header;
diff --git a/model/cs/ndn-content-store.h b/model/cs/ndn-content-store.h
index 1e01a6e..9edfb52 100644
--- a/model/cs/ndn-content-store.h
+++ b/model/cs/ndn-content-store.h
@@ -34,8 +34,8 @@
namespace ndn {
-class ContentObjectHeader;
-class InterestHeader;
+class ContentObject;
+class Interest;
class Name;
class ContentStore;
@@ -65,7 +65,7 @@
* The constructor will make a copy of the supplied packet and calls
* RemoveHeader and RemoveTail on the copy.
*/
- Entry (Ptr<ContentStore> cs, Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet);
+ Entry (Ptr<ContentStore> cs, Ptr<const ContentObject> header, Ptr<const Packet> packet);
/**
* \brief Get prefix of the stored entry
@@ -75,10 +75,10 @@
GetName () const;
/**
- * \brief Get ContentObjectHeader of the stored entry
- * \returns ContentObjectHeader of the stored entry
+ * \brief Get ContentObject of the stored entry
+ * \returns ContentObject of the stored entry
*/
- Ptr<const ContentObjectHeader>
+ Ptr<const ContentObject>
GetHeader () const;
/**
@@ -90,7 +90,7 @@
/**
* \brief Convenience method to create a fully formed Ndn packet from stored header and content
- * \returns A read-write copy of the packet with ContentObjectHeader and ContentObjectTail
+ * \returns A read-write copy of the packet with ContentObject and ContentObjectTail
*/
Ptr<Packet>
GetFullyFormedNdnPacket () const;
@@ -103,7 +103,7 @@
private:
Ptr<ContentStore> m_cs; ///< \brief content store to which entry is added
- Ptr<const ContentObjectHeader> m_header; ///< \brief non-modifiable ContentObjectHeader
+ Ptr<const ContentObject> m_header; ///< \brief non-modifiable ContentObject
Ptr<Packet> m_packet; ///< \brief non-modifiable content of the ContentObject packet
};
@@ -142,19 +142,19 @@
* If an entry is found, it is promoted to the top of most recent
* used entries index, \see m_contentStore
*/
- virtual boost::tuple<Ptr<Packet>, Ptr<const ContentObjectHeader>, Ptr<const Packet> >
- Lookup (Ptr<const InterestHeader> interest) = 0;
+ virtual boost::tuple<Ptr<Packet>, Ptr<const ContentObject>, Ptr<const Packet> >
+ Lookup (Ptr<const Interest> interest) = 0;
/**
* \brief Add a new content to the content store.
*
- * \param header Fully parsed ContentObjectHeader
+ * \param header Fully parsed ContentObject
* \param packet Fully formed Ndn packet to add to content store
* (will be copied and stripped down of headers)
* @returns true if an existing entry was updated, false otherwise
*/
virtual bool
- Add (Ptr<const ContentObjectHeader> header, Ptr<const Packet> packet) = 0;
+ Add (Ptr<const ContentObject> header, Ptr<const Packet> packet) = 0;
// /*
// * \brief Add a new content to the content store.
@@ -163,7 +163,7 @@
// * @returns true if an existing entry was removed, false otherwise
// */
// virtual bool
- // Remove (Ptr<InterestHeader> header) = 0;
+ // Remove (Ptr<Interest> header) = 0;
/**
* \brief Print out content store entries
@@ -207,10 +207,10 @@
GetContentStore (Ptr<Object> node);
protected:
- TracedCallback<Ptr<const InterestHeader>,
- Ptr<const ContentObjectHeader> > m_cacheHitsTrace; ///< @brief trace of cache hits
+ TracedCallback<Ptr<const Interest>,
+ Ptr<const ContentObject> > m_cacheHitsTrace; ///< @brief trace of cache hits
- TracedCallback<Ptr<const InterestHeader> > m_cacheMissesTrace; ///< @brief trace of cache misses
+ TracedCallback<Ptr<const Interest> > m_cacheMissesTrace; ///< @brief trace of cache misses
};
inline std::ostream&
diff --git a/model/fib/ndn-fib-impl.cc b/model/fib/ndn-fib-impl.cc
index 18ee6ac..1e0f04f 100644
--- a/model/fib/ndn-fib-impl.cc
+++ b/model/fib/ndn-fib-impl.cc
@@ -72,7 +72,7 @@
Ptr<Entry>
-FibImpl::LongestPrefixMatch (const InterestHeader &interest)
+FibImpl::LongestPrefixMatch (const Interest &interest)
{
super::iterator item = super::longest_prefix_match (interest.GetName ());
// @todo use predicate to search with exclude filters
diff --git a/model/fib/ndn-fib-impl.h b/model/fib/ndn-fib-impl.h
index 9b45ba2..0755b35 100644
--- a/model/fib/ndn-fib-impl.h
+++ b/model/fib/ndn-fib-impl.h
@@ -86,7 +86,7 @@
FibImpl ();
virtual Ptr<Entry>
- LongestPrefixMatch (const InterestHeader &interest);
+ LongestPrefixMatch (const Interest &interest);
virtual Ptr<Entry>
Add (const Name &prefix, Ptr<Face> face, int32_t metric);
diff --git a/model/fib/ndn-fib.h b/model/fib/ndn-fib.h
index 141a402..85e0eaf 100644
--- a/model/fib/ndn-fib.h
+++ b/model/fib/ndn-fib.h
@@ -29,7 +29,7 @@
namespace ns3 {
namespace ndn {
-class InterestHeader;
+class Interest;
/**
* \ingroup ndn
@@ -63,7 +63,7 @@
* \returns If entry found a valid iterator (Ptr<fib::Entry>) will be returned, otherwise End () (==0)
*/
virtual Ptr<fib::Entry>
- LongestPrefixMatch (const InterestHeader &interest) = 0;
+ LongestPrefixMatch (const Interest &interest) = 0;
/**
* \brief Add or update FIB entry
diff --git a/model/fw/best-route.cc b/model/fw/best-route.cc
index 08bbd7c..59f8720 100644
--- a/model/fw/best-route.cc
+++ b/model/fw/best-route.cc
@@ -65,7 +65,7 @@
bool
BestRoute::DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
diff --git a/model/fw/best-route.h b/model/fw/best-route.h
index 6e17b99..f7caa19 100644
--- a/model/fw/best-route.h
+++ b/model/fw/best-route.h
@@ -58,7 +58,7 @@
// from super
virtual bool
DoPropagateInterest (Ptr<Face> incomingFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
protected:
diff --git a/model/fw/flooding.cc b/model/fw/flooding.cc
index 0c369b7..3672b24 100644
--- a/model/fw/flooding.cc
+++ b/model/fw/flooding.cc
@@ -66,7 +66,7 @@
bool
Flooding::DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
diff --git a/model/fw/flooding.h b/model/fw/flooding.h
index c4f6205..5eadabb 100644
--- a/model/fw/flooding.h
+++ b/model/fw/flooding.h
@@ -60,7 +60,7 @@
// inherited from Nacks/ForwardingStrategy
virtual bool
DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
diff --git a/model/fw/green-yellow-red.cc b/model/fw/green-yellow-red.cc
index 3b5fd13..5d6a001 100644
--- a/model/fw/green-yellow-red.cc
+++ b/model/fw/green-yellow-red.cc
@@ -64,7 +64,7 @@
bool
GreenYellowRed::DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -123,15 +123,15 @@
void
GreenYellowRed::DidReceiveValidNack (Ptr<Face> inFace,
uint32_t nackCode,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
super::DidReceiveValidNack (inFace, nackCode, header, origPacket, pitEntry);
if (inFace != 0 &&
- (nackCode == InterestHeader::NACK_CONGESTION ||
- nackCode == InterestHeader::NACK_GIVEUP_PIT))
+ (nackCode == Interest::NACK_CONGESTION ||
+ nackCode == Interest::NACK_GIVEUP_PIT))
{
pitEntry->GetFibEntry ()->UpdateStatus (inFace, fib::FaceMetric::NDN_FIB_YELLOW);
}
diff --git a/model/fw/green-yellow-red.h b/model/fw/green-yellow-red.h
index e82c93b..1c4dcde 100644
--- a/model/fw/green-yellow-red.h
+++ b/model/fw/green-yellow-red.h
@@ -44,7 +44,7 @@
virtual bool
DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -54,7 +54,7 @@
virtual void
DidReceiveValidNack (Ptr<Face> incomingFace,
uint32_t nackCode,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
private:
diff --git a/model/fw/nacks.cc b/model/fw/nacks.cc
index 00bf840..6bafefb 100644
--- a/model/fw/nacks.cc
+++ b/model/fw/nacks.cc
@@ -75,7 +75,7 @@
void
Nacks::OnInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket)
{
if (header->GetNack () > 0)
@@ -86,7 +86,7 @@
void
Nacks::OnNack (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket)
{
// NS_LOG_FUNCTION (inFace << header->GetName ());
@@ -105,7 +105,7 @@
void
Nacks::DidReceiveDuplicateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -114,8 +114,8 @@
if (m_nacksEnabled)
{
NS_LOG_DEBUG ("Sending NACK_LOOP");
- Ptr<InterestHeader> nackHeader = Create<InterestHeader> (*header);
- nackHeader->SetNack (InterestHeader::NACK_LOOP);
+ Ptr<Interest> nackHeader = Create<Interest> (*header);
+ nackHeader->SetNack (Interest::NACK_LOOP);
Ptr<Packet> nack = Create<Packet> ();
nack->AddHeader (*nackHeader);
@@ -136,15 +136,15 @@
void
Nacks::DidExhaustForwardingOptions (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
if (m_nacksEnabled)
{
Ptr<Packet> packet = Create<Packet> ();
- Ptr<InterestHeader> nackHeader = Create<InterestHeader> (*header);
- nackHeader->SetNack (InterestHeader::NACK_GIVEUP_PIT);
+ Ptr<Interest> nackHeader = Create<Interest> (*header);
+ nackHeader->SetNack (Interest::NACK_GIVEUP_PIT);
packet->AddHeader (*nackHeader);
FwHopCountTag hopCountTag;
@@ -174,7 +174,7 @@
void
Nacks::DidReceiveValidNack (Ptr<Face> inFace,
uint32_t nackCode,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -182,14 +182,14 @@
// If NACK is NACK_GIVEUP_PIT, then neighbor gave up trying to and removed it's PIT entry.
// So, if we had an incoming entry to this neighbor, then we can remove it now
- if (nackCode == InterestHeader::NACK_GIVEUP_PIT)
+ if (nackCode == Interest::NACK_GIVEUP_PIT)
{
pitEntry->RemoveIncoming (inFace);
}
- if (nackCode == InterestHeader::NACK_LOOP ||
- nackCode == InterestHeader::NACK_CONGESTION ||
- nackCode == InterestHeader::NACK_GIVEUP_PIT)
+ if (nackCode == Interest::NACK_LOOP ||
+ nackCode == Interest::NACK_CONGESTION ||
+ nackCode == Interest::NACK_GIVEUP_PIT)
{
pitEntry->SetWaitingInVain (inFace);
@@ -203,8 +203,8 @@
}
Ptr<Packet> nonNackInterest = Create<Packet> ();
- Ptr<InterestHeader> nonNackHeader = Create<InterestHeader> (*header);
- nonNackHeader->SetNack (InterestHeader::NORMAL_INTEREST);
+ Ptr<Interest> nonNackHeader = Create<Interest> (*header);
+ nonNackHeader->SetNack (Interest::NORMAL_INTEREST);
nonNackInterest->AddHeader (*nonNackHeader);
FwHopCountTag hopCountTag;
diff --git a/model/fw/nacks.h b/model/fw/nacks.h
index 421897b..19a9ecb 100644
--- a/model/fw/nacks.h
+++ b/model/fw/nacks.h
@@ -43,46 +43,46 @@
// from super
virtual void
OnInterest (Ptr<Face> face,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket);
protected:
// from super
virtual void
DidReceiveDuplicateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> packet,
Ptr<pit::Entry> pitEntry);
// from super
virtual void
DidExhaustForwardingOptions (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> packet,
Ptr<pit::Entry> pitEntry);
virtual void
OnNack (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket);
virtual void
DidReceiveValidNack (Ptr<Face> inFace,
uint32_t nackCode,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
protected:
bool m_nacksEnabled;
- TracedCallback<Ptr<const InterestHeader>,
+ TracedCallback<Ptr<const Interest>,
Ptr<const Face> > m_outNacks; ///< @brief trace of outgoing NACKs
- TracedCallback<Ptr<const InterestHeader>,
+ TracedCallback<Ptr<const Interest>,
Ptr<const Face> > m_inNacks; ///< @brief trace of incoming NACKs
- TracedCallback<Ptr<const InterestHeader>,
+ TracedCallback<Ptr<const Interest>,
Ptr<const Face> > m_dropNacks; ///< @brief trace of dropped NACKs
};
diff --git a/model/fw/ndn-forwarding-strategy.cc b/model/fw/ndn-forwarding-strategy.cc
index 6dc5bb0..7532f13 100644
--- a/model/fw/ndn-forwarding-strategy.cc
+++ b/model/fw/ndn-forwarding-strategy.cc
@@ -132,7 +132,7 @@
void
ForwardingStrategy::OnInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket)
{
m_inInterests (header, inFace);
@@ -168,7 +168,7 @@
}
Ptr<Packet> contentObject;
- Ptr<const ContentObjectHeader> contentObjectHeader; // used for tracing
+ Ptr<const ContentObject> contentObjectHeader; // used for tracing
Ptr<const Packet> payload; // used for tracing
boost::tie (contentObject, contentObjectHeader, payload) = m_contentStore->Lookup (header);
if (contentObject != 0)
@@ -215,7 +215,7 @@
void
ForwardingStrategy::OnData (Ptr<Face> inFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<Packet> payload,
Ptr<const Packet> origPacket)
{
@@ -287,7 +287,7 @@
void
ForwardingStrategy::DidCreatePitEntry (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntrypitEntry)
{
@@ -295,7 +295,7 @@
void
ForwardingStrategy::FailedToCreatePitEntry (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket)
{
m_dropInterests (header, inFace);
@@ -303,7 +303,7 @@
void
ForwardingStrategy::DidReceiveDuplicateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -318,7 +318,7 @@
void
ForwardingStrategy::DidSuppressSimilarInterest (Ptr<Face> face,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -326,7 +326,7 @@
void
ForwardingStrategy::DidForwardSimilarInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -334,7 +334,7 @@
void
ForwardingStrategy::DidExhaustForwardingOptions (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -358,7 +358,7 @@
bool
ForwardingStrategy::DetectRetransmittedInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> packet,
Ptr<pit::Entry> pitEntry)
{
@@ -377,7 +377,7 @@
void
ForwardingStrategy::SatisfyPendingInterest (Ptr<Face> inFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
@@ -417,7 +417,7 @@
void
ForwardingStrategy::DidReceiveSolicitedData (Ptr<Face> inFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
bool didCreateCacheEntry)
@@ -427,7 +427,7 @@
void
ForwardingStrategy::DidReceiveUnsolicitedData (Ptr<Face> inFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
bool didCreateCacheEntry)
@@ -450,7 +450,7 @@
bool
ForwardingStrategy::ShouldSuppressIncomingInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -485,7 +485,7 @@
void
ForwardingStrategy::PropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -526,7 +526,7 @@
bool
ForwardingStrategy::CanSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -557,7 +557,7 @@
bool
ForwardingStrategy::TrySendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -580,7 +580,7 @@
void
ForwardingStrategy::DidSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
@@ -590,7 +590,7 @@
void
ForwardingStrategy::DidSendOutData (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
diff --git a/model/fw/ndn-forwarding-strategy.h b/model/fw/ndn-forwarding-strategy.h
index 04b34a2..5e624b6 100644
--- a/model/fw/ndn-forwarding-strategy.h
+++ b/model/fw/ndn-forwarding-strategy.h
@@ -30,8 +30,8 @@
namespace ndn {
class Face;
-class InterestHeader;
-class ContentObjectHeader;
+class Interest;
+class ContentObject;
class Pit;
namespace pit { class Entry; }
class FibFaceMetric;
@@ -70,7 +70,7 @@
*/
virtual void
OnInterest (Ptr<Face> face,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket);
/**
@@ -84,7 +84,7 @@
*/
virtual void
OnData (Ptr<Face> face,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<Packet> payload,
Ptr<const Packet> origPacket);
@@ -144,7 +144,7 @@
*/
virtual void
DidCreatePitEntry (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -160,7 +160,7 @@
*/
virtual void
FailedToCreatePitEntry (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket);
/**
@@ -177,7 +177,7 @@
*/
virtual void
DidReceiveDuplicateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -195,7 +195,7 @@
*/
virtual void
DidSuppressSimilarInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -213,7 +213,7 @@
*/
virtual void
DidForwardSimilarInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -232,7 +232,7 @@
*/
virtual void
DidExhaustForwardingOptions (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -252,7 +252,7 @@
*/
virtual bool
DetectRetransmittedInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -281,7 +281,7 @@
*/
virtual void
SatisfyPendingInterest (Ptr<Face> inFace, // 0 allowed (from cache)
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -299,7 +299,7 @@
virtual void
DidSendOutData (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -315,7 +315,7 @@
*/
virtual void
DidReceiveSolicitedData (Ptr<Face> inFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
bool didCreateCacheEntry);
@@ -334,7 +334,7 @@
*/
virtual void
DidReceiveUnsolicitedData (Ptr<Face> inFace,
- Ptr<const ContentObjectHeader> header,
+ Ptr<const ContentObject> header,
Ptr<const Packet> payload,
Ptr<const Packet> origPacket,
bool didCreateCacheEntry);
@@ -354,7 +354,7 @@
*/
virtual bool
ShouldSuppressIncomingInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -377,7 +377,7 @@
virtual bool
CanSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -397,7 +397,7 @@
virtual bool
TrySendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -413,7 +413,7 @@
virtual void
DidSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -432,7 +432,7 @@
*/
virtual void
PropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -457,7 +457,7 @@
*/
virtual bool
DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry) = 0;
@@ -474,27 +474,27 @@
bool m_cacheUnsolicitedData;
bool m_detectRetransmissions;
- TracedCallback<Ptr<const InterestHeader>,
+ TracedCallback<Ptr<const Interest>,
Ptr<const Face> > m_outInterests; ///< @brief Transmitted interests trace
- TracedCallback<Ptr<const InterestHeader>,
+ TracedCallback<Ptr<const Interest>,
Ptr<const Face> > m_inInterests; ///< @brief trace of incoming Interests
- TracedCallback<Ptr<const InterestHeader>,
+ TracedCallback<Ptr<const Interest>,
Ptr<const Face> > m_dropInterests; ///< @brief trace of dropped Interests
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
- TracedCallback<Ptr<const ContentObjectHeader>, Ptr<const Packet>,
+ TracedCallback<Ptr<const ContentObject>, Ptr<const Packet>,
bool /*from cache*/,
Ptr<const Face> > m_outData; ///< @brief trace of outgoing Data
- TracedCallback<Ptr<const ContentObjectHeader>, Ptr<const Packet>,
+ TracedCallback<Ptr<const ContentObject>, Ptr<const Packet>,
Ptr<const Face> > m_inData; ///< @brief trace of incoming Data
- TracedCallback<Ptr<const ContentObjectHeader>, Ptr<const Packet>,
+ TracedCallback<Ptr<const ContentObject>, Ptr<const Packet>,
Ptr<const Face> > m_dropData; ///< @brief trace of dropped Data
};
diff --git a/model/fw/per-fib-limits.h b/model/fw/per-fib-limits.h
index 4affec9..6a18f13 100644
--- a/model/fw/per-fib-limits.h
+++ b/model/fw/per-fib-limits.h
@@ -99,7 +99,7 @@
virtual bool
CanSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -141,7 +141,7 @@
bool
PerFibLimits<Parent>::CanSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
diff --git a/model/fw/per-out-face-limits.h b/model/fw/per-out-face-limits.h
index 2c4a935..2929b5b 100644
--- a/model/fw/per-out-face-limits.h
+++ b/model/fw/per-out-face-limits.h
@@ -87,7 +87,7 @@
virtual bool
CanSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
@@ -134,7 +134,7 @@
bool
PerOutFaceLimits<Parent>::CanSendOutInterest (Ptr<Face> inFace,
Ptr<Face> outFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
diff --git a/model/fw/smart-flooding.cc b/model/fw/smart-flooding.cc
index c8b8406..97faaf7 100644
--- a/model/fw/smart-flooding.cc
+++ b/model/fw/smart-flooding.cc
@@ -66,7 +66,7 @@
bool
SmartFlooding::DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry)
{
diff --git a/model/fw/smart-flooding.h b/model/fw/smart-flooding.h
index f66d1e8..e1637aa 100644
--- a/model/fw/smart-flooding.h
+++ b/model/fw/smart-flooding.h
@@ -55,7 +55,7 @@
// inherited
virtual bool
DoPropagateInterest (Ptr<Face> inFace,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
diff --git a/model/ndn-app-face.cc b/model/ndn-app-face.cc
index e735b9a..9f9265e 100644
--- a/model/ndn-app-face.cc
+++ b/model/ndn-app-face.cc
@@ -103,7 +103,7 @@
{
case HeaderHelper::INTEREST_NDNSIM:
{
- Ptr<InterestHeader> header = Create<InterestHeader> ();
+ Ptr<Interest> header = Create<Interest> ();
p->RemoveHeader (*header);
if (header->GetNack () > 0)
@@ -116,7 +116,7 @@
case HeaderHelper::CONTENT_OBJECT_NDNSIM:
{
static ContentObjectTail tail;
- Ptr<ContentObjectHeader> header = Create<ContentObjectHeader> ();
+ Ptr<ContentObject> header = Create<ContentObject> ();
p->RemoveHeader (*header);
p->RemoveTrailer (tail);
m_app->OnContentObject (header, p/*payload*/);
diff --git a/model/ndn-app-face.h b/model/ndn-app-face.h
index 2e58705..276fdfd 100644
--- a/model/ndn-app-face.h
+++ b/model/ndn-app-face.h
@@ -31,8 +31,8 @@
namespace ndn {
-class InterestHeader;
-class ContentObjectHeader;
+class Interest;
+class ContentObject;
class App;
/**
diff --git a/model/ndn-content-object.h b/model/ndn-content-object.h
index db7bdcf..2022f2f 100644
--- a/model/ndn-content-object.h
+++ b/model/ndn-content-object.h
@@ -42,7 +42,7 @@
*
* Only few important fields are actually implemented in the simulation
*
- * ContentObjectHeader serializes/deserializes header up-to and including <Content> tags
+ * ContentObject serializes/deserializes header up-to and including <Content> tags
* Necessary closing tags should be added using ContentObjectTail
*
* Optimized and simplified formatting of Interest packets
@@ -127,7 +127,7 @@
Time m_timestamp;
};
-class ContentObjectHeader : public ContentObject { };
+typedef ContentObject ContentObjectHeader;
/**
* ContentObjectTail for compatibility with other packet formats
@@ -151,7 +151,7 @@
* @ingroup ndn-exceptions
* @brief Class for ContentObject parsing exception
*/
-class ContentObjectHeaderException {};
+class ContentObjectException {};
} // namespace ndn
} // namespace ns3
diff --git a/model/ndn-interest.cc b/model/ndn-interest.cc
index 362dfe2..fb7e449 100644
--- a/model/ndn-interest.cc
+++ b/model/ndn-interest.cc
@@ -24,26 +24,26 @@
#include "ns3/unused.h"
#include "ns3/packet.h"
-NS_LOG_COMPONENT_DEFINE ("ndn.InterestHeader");
+NS_LOG_COMPONENT_DEFINE ("ndn.Interest");
namespace ns3 {
namespace ndn {
-NS_OBJECT_ENSURE_REGISTERED (InterestHeader);
+NS_OBJECT_ENSURE_REGISTERED (Interest);
TypeId
-InterestHeader::GetTypeId (void)
+Interest::GetTypeId (void)
{
- static TypeId tid = TypeId ("ns3::ndn::InterestHeader")
+ static TypeId tid = TypeId ("ns3::ndn::Interest")
.SetGroupName ("Ndn")
.SetParent<Header> ()
- .AddConstructor<InterestHeader> ()
+ .AddConstructor<Interest> ()
;
return tid;
}
-InterestHeader::InterestHeader ()
+Interest::Interest ()
: m_name ()
, m_scope (0xFF)
, m_interestLifetime (Seconds (0))
@@ -52,7 +52,7 @@
{
}
-InterestHeader::InterestHeader (const InterestHeader &interest)
+Interest::Interest (const Interest &interest)
: m_name (Create<Name> (interest.GetName ()))
, m_scope (interest.m_scope)
, m_interestLifetime (interest.m_interestLifetime)
@@ -61,84 +61,84 @@
{
}
-Ptr<InterestHeader>
-InterestHeader::GetInterest (Ptr<Packet> packet)
+Ptr<Interest>
+Interest::GetInterest (Ptr<Packet> packet)
{
- Ptr<InterestHeader> interest = Create<InterestHeader> ();
+ Ptr<Interest> interest = Create<Interest> ();
packet->RemoveHeader (*interest);
return interest;
}
void
-InterestHeader::SetName (Ptr<Name> name)
+Interest::SetName (Ptr<Name> name)
{
m_name = name;
}
const Name&
-InterestHeader::GetName () const
+Interest::GetName () const
{
- if (m_name==0) throw InterestHeaderException();
+ if (m_name==0) throw InterestException();
return *m_name;
}
Ptr<const Name>
-InterestHeader::GetNamePtr () const
+Interest::GetNamePtr () const
{
return m_name;
}
void
-InterestHeader::SetScope (int8_t scope)
+Interest::SetScope (int8_t scope)
{
m_scope = scope;
}
int8_t
-InterestHeader::GetScope () const
+Interest::GetScope () const
{
return m_scope;
}
void
-InterestHeader::SetInterestLifetime (Time lifetime)
+Interest::SetInterestLifetime (Time lifetime)
{
m_interestLifetime = lifetime;
}
Time
-InterestHeader::GetInterestLifetime () const
+Interest::GetInterestLifetime () const
{
return m_interestLifetime;
}
void
-InterestHeader::SetNonce (uint32_t nonce)
+Interest::SetNonce (uint32_t nonce)
{
m_nonce = nonce;
}
uint32_t
-InterestHeader::GetNonce () const
+Interest::GetNonce () const
{
return m_nonce;
}
void
-InterestHeader::SetNack (uint8_t nackType)
+Interest::SetNack (uint8_t nackType)
{
m_nackType = nackType;
}
uint8_t
-InterestHeader::GetNack () const
+Interest::GetNack () const
{
return m_nackType;
}
uint32_t
-InterestHeader::GetSerializedSize (void) const
+Interest::GetSerializedSize (void) const
{
size_t size = 2 + (1 + 4 + 2 + 1 + (m_name->GetSerializedSize ()) + (2 + 0) + (2 + 0));
NS_LOG_INFO ("Serialize size = " << size);
@@ -147,7 +147,7 @@
}
void
-InterestHeader::Serialize (Buffer::Iterator start) const
+Interest::Serialize (Buffer::Iterator start) const
{
start.WriteU8 (0x80); // version
start.WriteU8 (0x00); // packet type
@@ -170,15 +170,15 @@
}
uint32_t
-InterestHeader::Deserialize (Buffer::Iterator start)
+Interest::Deserialize (Buffer::Iterator start)
{
Buffer::Iterator i = start;
if (i.ReadU8 () != 0x80)
- throw new InterestHeaderException ();
+ throw new InterestException ();
if (i.ReadU8 () != 0x00)
- throw new InterestHeaderException ();
+ throw new InterestException ();
m_nonce = i.ReadU32 ();
m_scope = i.ReadU8 ();
@@ -199,13 +199,13 @@
}
TypeId
-InterestHeader::GetInstanceTypeId (void) const
+Interest::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
-InterestHeader::Print (std::ostream &os) const
+Interest::Print (std::ostream &os) const
{
os << "I: " << GetName ();
diff --git a/model/ndn-interest.h b/model/ndn-interest.h
index 1ee3010..7138058 100644
--- a/model/ndn-interest.h
+++ b/model/ndn-interest.h
@@ -40,7 +40,7 @@
namespace ndn {
/**
- * @brief NDN InterestHeader and routines to serialize/deserialize
+ * @brief NDN Interest and routines to serialize/deserialize
*
* Optimized and simplified formatting of Interest packets
*
@@ -256,13 +256,13 @@
uint8_t m_nackType; ///< Negative Acknowledgement type
};
-class InterestHeader : public Interest { };
+typedef Interest InterestHeader;
/**
* @ingroup ndn-exceptions
* @brief Class for Interest parsing exception
*/
-class InterestHeaderException {};
+class InterestException {};
} // namespace ndn
} // namespace ns3
diff --git a/model/ndn-l3-protocol.cc b/model/ndn-l3-protocol.cc
index 28d337b..4719434 100644
--- a/model/ndn-l3-protocol.cc
+++ b/model/ndn-l3-protocol.cc
@@ -261,7 +261,7 @@
case HeaderHelper::INTEREST_NDNSIM:
{
s_interestCounter ++;
- Ptr<InterestHeader> header = Create<InterestHeader> ();
+ Ptr<Interest> header = Create<Interest> ();
// Deserialization. Exception may be thrown
packet->RemoveHeader (*header);
@@ -277,7 +277,7 @@
case HeaderHelper::CONTENT_OBJECT_NDNSIM:
{
s_dataCounter ++;
- Ptr<ContentObjectHeader> header = Create<ContentObjectHeader> ();
+ Ptr<ContentObject> header = Create<ContentObject> ();
static ContentObjectTail contentObjectTrailer; //there is no data in this object
diff --git a/model/ndn-l3-protocol.h b/model/ndn-l3-protocol.h
index 40278d6..36330cb 100644
--- a/model/ndn-l3-protocol.h
+++ b/model/ndn-l3-protocol.h
@@ -39,8 +39,8 @@
class Face;
class ForwardingStrategy;
-class InterestHeader;
-class ContentObjectHeader;
+class Interest;
+class ContentObject;
/**
* \defgroup ndn ndnSIM: NDN simulation module
diff --git a/model/pit/ndn-pit-entry-impl.h b/model/pit/ndn-pit-entry-impl.h
index 025ef54..751402f 100644
--- a/model/pit/ndn-pit-entry-impl.h
+++ b/model/pit/ndn-pit-entry-impl.h
@@ -39,7 +39,7 @@
public:
EntryImpl (Pit &pit,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<fib::Entry> fibEntry)
: Entry (pit, header, fibEntry)
, item_ (0)
diff --git a/model/pit/ndn-pit-entry.cc b/model/pit/ndn-pit-entry.cc
index 6d16048..49a180e 100644
--- a/model/pit/ndn-pit-entry.cc
+++ b/model/pit/ndn-pit-entry.cc
@@ -39,7 +39,7 @@
namespace pit {
Entry::Entry (Pit &container,
- Ptr<const InterestHeader> header,
+ Ptr<const Interest> header,
Ptr<fib::Entry> fibEntry)
: m_container (container)
, m_interest (header)
@@ -260,7 +260,7 @@
return m_maxRetxCount;
}
-Ptr<const InterestHeader>
+Ptr<const Interest>
Entry::GetInterest () const
{
return m_interest;
diff --git a/model/pit/ndn-pit-entry.h b/model/pit/ndn-pit-entry.h
index 694fd9f..3cb5371 100644
--- a/model/pit/ndn-pit-entry.h
+++ b/model/pit/ndn-pit-entry.h
@@ -106,7 +106,7 @@
* \param offsetTime Relative time to the current moment, representing PIT entry lifetime
* \param fibEntry A FIB entry associated with the PIT entry
*/
- Entry (Pit &container, Ptr<const InterestHeader> header, Ptr<fib::Entry> fibEntry);
+ Entry (Pit &container, Ptr<const Interest> header, Ptr<fib::Entry> fibEntry);
/**
* @brief Virtual destructor
@@ -289,9 +289,9 @@
RemoveFwTag ();
/**
- * @brief Get InterestHeader (if several interests are received, then nonce is from the first Interest)
+ * @brief Get Interest (if several interests are received, then nonce is from the first Interest)
*/
- Ptr<const InterestHeader>
+ Ptr<const Interest>
GetInterest () const;
private:
@@ -300,7 +300,7 @@
protected:
Pit &m_container; ///< @brief Reference to the container (to rearrange indexes, if necessary)
- Ptr<const InterestHeader> m_interest; ///< \brief Interest of the PIT entry (if several interests are received, then nonce is from the first Interest)
+ Ptr<const Interest> m_interest; ///< \brief Interest of the PIT entry (if several interests are received, then nonce is from the first Interest)
Ptr<fib::Entry> m_fibEntry; ///< \brief FIB entry related to this prefix
nonce_container m_seenNonces; ///< \brief map of nonces that were seen for this prefix
diff --git a/model/pit/ndn-pit-impl.cc b/model/pit/ndn-pit-impl.cc
index 27fcab2..3a61c09 100644
--- a/model/pit/ndn-pit-impl.cc
+++ b/model/pit/ndn-pit-impl.cc
@@ -182,7 +182,7 @@
template<class Policy>
Ptr<Entry>
-PitImpl<Policy>::Lookup (const ContentObjectHeader &header)
+PitImpl<Policy>::Lookup (const ContentObject &header)
{
/// @todo use predicate to search with exclude filters
typename super::iterator item = super::longest_prefix_match_if (header.GetName (), EntryIsNotEmpty ());
@@ -195,7 +195,7 @@
template<class Policy>
Ptr<Entry>
-PitImpl<Policy>::Lookup (const InterestHeader &header)
+PitImpl<Policy>::Lookup (const Interest &header)
{
// NS_LOG_FUNCTION (header.GetName ());
NS_ASSERT_MSG (m_fib != 0, "FIB should be set");
@@ -213,7 +213,7 @@
template<class Policy>
Ptr<Entry>
-PitImpl<Policy>::Create (Ptr<const InterestHeader> header)
+PitImpl<Policy>::Create (Ptr<const Interest> header)
{
NS_LOG_DEBUG (header->GetName ());
Ptr<fib::Entry> fibEntry = m_fib->LongestPrefixMatch (*header);
diff --git a/model/pit/ndn-pit-impl.h b/model/pit/ndn-pit-impl.h
index bd86838..f3e49f9 100644
--- a/model/pit/ndn-pit-impl.h
+++ b/model/pit/ndn-pit-impl.h
@@ -75,13 +75,13 @@
// inherited from Pit
virtual Ptr<Entry>
- Lookup (const ContentObjectHeader &header);
+ Lookup (const ContentObject &header);
virtual Ptr<Entry>
- Lookup (const InterestHeader &header);
+ Lookup (const Interest &header);
virtual Ptr<Entry>
- Create (Ptr<const InterestHeader> header);
+ Create (Ptr<const Interest> header);
virtual void
MarkErased (Ptr<Entry> entry);
diff --git a/model/pit/ndn-pit.h b/model/pit/ndn-pit.h
index f8eeafb..1968bd4 100644
--- a/model/pit/ndn-pit.h
+++ b/model/pit/ndn-pit.h
@@ -32,8 +32,8 @@
class L3Protocol;
class Face;
-class ContentObjectHeader;
-class InterestHeader;
+class ContentObject;
+class Interest;
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
@@ -74,7 +74,7 @@
* returns 0
*/
virtual Ptr<pit::Entry>
- Lookup (const ContentObjectHeader &header) = 0;
+ Lookup (const ContentObject &header) = 0;
/**
* \brief Find a PIT entry for the given content interest
@@ -83,7 +83,7 @@
* return end() iterator
*/
virtual Ptr<pit::Entry>
- Lookup (const InterestHeader &header) = 0;
+ Lookup (const Interest &header) = 0;
/**
* @brief Creates a PIT entry for the given interest
@@ -94,7 +94,7 @@
* Note. This call assumes that the entry does not exist (i.e., there was a Lookup call before)
*/
virtual Ptr<pit::Entry>
- Create (Ptr<const InterestHeader> header) = 0;
+ Create (Ptr<const Interest> header) = 0;
/**
* @brief Mark PIT entry deleted