Another set of refactoring
diff --git a/model/ndn-l3-protocol.cc b/model/ndn-l3-protocol.cc
index 62c6241..315ad63 100644
--- a/model/ndn-l3-protocol.cc
+++ b/model/ndn-l3-protocol.cc
@@ -40,43 +40,41 @@
#include "ns3/ndn-face.h"
#include "ns3/ndn-forwarding-strategy.h"
-// #include "fib/ndn-fib-impl.h"
-
#include "ndn-net-device-face.h"
#include <boost/foreach.hpp>
-NS_LOG_COMPONENT_DEFINE ("NdnL3Protocol");
+NS_LOG_COMPONENT_DEFINE ("ndn.L3Protocol");
namespace ns3 {
+namespace ndn {
-const uint16_t NdnL3Protocol::ETHERNET_FRAME_TYPE = 0x7777;
+const uint16_t L3Protocol::ETHERNET_FRAME_TYPE = 0x7777;
-NS_OBJECT_ENSURE_REGISTERED (NdnL3Protocol);
+NS_OBJECT_ENSURE_REGISTERED (L3Protocol);
TypeId
-NdnL3Protocol::GetTypeId (void)
+L3Protocol::GetTypeId (void)
{
- static TypeId tid = TypeId ("ns3::NdnL3Protocol")
- .SetParent<Ndn> ()
+ static TypeId tid = TypeId ("ns3::ndn::L3Protocol")
.SetGroupName ("ndn")
- .AddConstructor<NdnL3Protocol> ()
+ .AddConstructor<L3Protocol> ()
.AddAttribute ("FaceList", "List of faces associated with ndn stack",
ObjectVectorValue (),
- MakeObjectVectorAccessor (&NdnL3Protocol::m_faces),
- MakeObjectVectorChecker<NdnFace> ())
+ MakeObjectVectorAccessor (&L3Protocol::m_faces),
+ MakeObjectVectorChecker<Face> ())
;
return tid;
}
-NdnL3Protocol::NdnL3Protocol()
+L3Protocol::L3Protocol()
: m_faceCounter (0)
{
NS_LOG_FUNCTION (this);
}
-NdnL3Protocol::~NdnL3Protocol ()
+L3Protocol::~L3Protocol ()
{
NS_LOG_FUNCTION (this);
}
@@ -86,7 +84,7 @@
* by setting the node in the ndn stack
*/
void
-NdnL3Protocol::NotifyNewAggregate ()
+L3Protocol::NotifyNewAggregate ()
{
// not really efficient, but this will work only once
if (m_node == 0)
@@ -95,37 +93,37 @@
if (m_node != 0)
{
// NS_ASSERT_MSG (m_pit != 0 && m_fib != 0 && m_contentStore != 0 && m_forwardingStrategy != 0,
- // "PIT, FIB, and ContentStore should be aggregated before NdnL3Protocol");
+ // "PIT, FIB, and ContentStore should be aggregated before L3Protocol");
NS_ASSERT_MSG (m_forwardingStrategy != 0,
- "Forwarding strategy should be aggregated before NdnL3Protocol");
+ "Forwarding strategy should be aggregated before L3Protocol");
}
}
// if (m_pit == 0)
// {
- // m_pit = GetObject<NdnPit> ();
+ // m_pit = GetObject<Pit> ();
// }
// if (m_fib == 0)
// {
- // m_fib = GetObject<NdnFib> ();
+ // m_fib = GetObject<Fib> ();
// }
if (m_forwardingStrategy == 0)
{
- m_forwardingStrategy = GetObject<NdnForwardingStrategy> ();
+ m_forwardingStrategy = GetObject<ForwardingStrategy> ();
}
// if (m_contentStore == 0)
// {
- // m_contentStore = GetObject<NdnContentStore> ();
+ // m_contentStore = GetObject<ContentStore> ();
// }
- Ndn::NotifyNewAggregate ();
+ Object::NotifyNewAggregate ();
}
void
-NdnL3Protocol::DoDispose (void)
+L3Protocol::DoDispose (void)
{
NS_LOG_FUNCTION (this);
- for (NdnFaceList::iterator i = m_faces.begin (); i != m_faces.end (); ++i)
+ for (FaceList::iterator i = m_faces.begin (); i != m_faces.end (); ++i)
{
*i = 0;
}
@@ -135,18 +133,18 @@
// Force delete on objects
m_forwardingStrategy = 0; // there is a reference to PIT stored in here
- Ndn::DoDispose ();
+ Object::DoDispose ();
}
uint32_t
-NdnL3Protocol::AddFace (const Ptr<NdnFace> &face)
+L3Protocol::AddFace (const Ptr<Face> &face)
{
NS_LOG_FUNCTION (this << &face);
face->SetId (m_faceCounter); // sets a unique ID of the face. This ID serves only informational purposes
// ask face to register in lower-layer stack
- face->RegisterProtocolHandler (MakeCallback (&NdnL3Protocol::Receive, this));
+ face->RegisterProtocolHandler (MakeCallback (&L3Protocol::Receive, this));
m_faces.push_back (face);
m_faceCounter++;
@@ -154,15 +152,15 @@
}
void
-NdnL3Protocol::RemoveFace (Ptr<NdnFace> face)
+L3Protocol::RemoveFace (Ptr<Face> face)
{
// ask face to register in lower-layer stack
- face->RegisterProtocolHandler (MakeNullCallback<void,const Ptr<NdnFace>&,const Ptr<const Packet>&> ());
- Ptr<NdnPit> pit = GetObject<NdnPit> ();
+ face->RegisterProtocolHandler (MakeNullCallback<void,const Ptr<Face>&,const Ptr<const Packet>&> ());
+ Ptr<Pit> pit = GetObject<Pit> ();
// just to be on a safe side. Do the process in two steps
- std::list< Ptr<NdnPitEntry> > entriesToRemoves;
- for (Ptr<NdnPitEntry> pitEntry = pit->Begin (); pitEntry != 0; pitEntry = pit->Next (pitEntry))
+ std::list< Ptr<pit::Entry> > entriesToRemoves;
+ for (Ptr<pit::Entry> pitEntry = pit->Begin (); pitEntry != 0; pitEntry = pit->Next (pitEntry))
{
pitEntry->RemoveAllReferencesToFace (face);
@@ -174,20 +172,20 @@
entriesToRemoves.push_back (pitEntry);
}
}
- BOOST_FOREACH (Ptr<NdnPitEntry> removedEntry, entriesToRemoves)
+ BOOST_FOREACH (Ptr<pit::Entry> removedEntry, entriesToRemoves)
{
pit->MarkErased (removedEntry);
}
- NdnFaceList::iterator face_it = find (m_faces.begin(), m_faces.end(), face);
+ FaceList::iterator face_it = find (m_faces.begin(), m_faces.end(), face);
NS_ASSERT_MSG (face_it != m_faces.end (), "Attempt to remove face that doesn't exist");
m_faces.erase (face_it);
}
-Ptr<NdnFace>
-NdnL3Protocol::GetFace (uint32_t index) const
+Ptr<Face>
+L3Protocol::GetFace (uint32_t index) const
{
- BOOST_FOREACH (const Ptr<NdnFace> &face, m_faces) // this function is not supposed to be called often, so linear search is fine
+ BOOST_FOREACH (const Ptr<Face> &face, m_faces) // this function is not supposed to be called often, so linear search is fine
{
if (face->GetId () == index)
return face;
@@ -195,12 +193,12 @@
return 0;
}
-Ptr<NdnFace>
-NdnL3Protocol::GetFaceByNetDevice (Ptr<NetDevice> netDevice) const
+Ptr<Face>
+L3Protocol::GetFaceByNetDevice (Ptr<NetDevice> netDevice) const
{
- BOOST_FOREACH (const Ptr<NdnFace> &face, m_faces) // this function is not supposed to be called often, so linear search is fine
+ BOOST_FOREACH (const Ptr<Face> &face, m_faces) // this function is not supposed to be called often, so linear search is fine
{
- Ptr<NdnNetDeviceFace> netDeviceFace = DynamicCast<NdnNetDeviceFace> (face);
+ Ptr<NetDeviceFace> netDeviceFace = DynamicCast<NetDeviceFace> (face);
if (netDeviceFace == 0) continue;
if (netDeviceFace->GetNetDevice () == netDevice)
@@ -210,14 +208,14 @@
}
uint32_t
-NdnL3Protocol::GetNFaces (void) const
+L3Protocol::GetNFaces (void) const
{
return m_faces.size ();
}
// Callback from lower layer
void
-NdnL3Protocol::Receive (const Ptr<NdnFace> &face, const Ptr<const Packet> &p)
+L3Protocol::Receive (const Ptr<Face> &face, const Ptr<const Packet> &p)
{
if (!face->IsUp ())
return;
@@ -229,12 +227,12 @@
Ptr<Packet> packet = p->Copy (); // give upper layers a rw copy of the packet
try
{
- NdnHeaderHelper::Type type = NdnHeaderHelper::GetNdnHeaderType (p);
+ HeaderHelper::Type type = HeaderHelper::GetNdnHeaderType (p);
switch (type)
{
- case NdnHeaderHelper::INTEREST:
+ case HeaderHelper::INTEREST:
{
- Ptr<NdnInterestHeader> header = Create<NdnInterestHeader> ();
+ Ptr<InterestHeader> header = Create<InterestHeader> ();
// Deserialization. Exception may be thrown
packet->RemoveHeader (*header);
@@ -247,11 +245,11 @@
// OnInterest (face, header, p/*original packet*/);
break;
}
- case NdnHeaderHelper::CONTENT_OBJECT:
+ case HeaderHelper::CONTENT_OBJECT:
{
- Ptr<NdnContentObjectHeader> header = Create<NdnContentObjectHeader> ();
+ Ptr<ContentObjectHeader> header = Create<ContentObjectHeader> ();
- static NdnContentObjectTail contentObjectTrailer; //there is no data in this object
+ static ContentObjectTail contentObjectTrailer; //there is no data in this object
// Deserialization. Exception may be thrown
packet->RemoveHeader (*header);
@@ -264,413 +262,14 @@
// exception will be thrown if packet is not recognized
}
- catch (NdnUnknownHeaderException)
+ catch (UnknownHeaderException)
{
- NS_ASSERT_MSG (false, "Unknown Ndn header. Should not happen");
- NS_LOG_ERROR ("Unknown Ndn header. Should not happen");
+ NS_ASSERT_MSG (false, "Unknown NDN header. Should not happen");
+ NS_LOG_ERROR ("Unknown NDN header. Should not happen");
return;
}
}
-// void
-// NdnL3Protocol::OnNack (const Ptr<NdnFace> &incomingFace,
-// Ptr<NdnInterestHeader> &header,
-// const Ptr<const Packet> &packet)
-// {
-// NS_LOG_FUNCTION (incomingFace << header << packet);
-// m_inNacks (header, incomingFace);
-// Ptr<NdnPitEntry> pitEntry = m_pit->Lookup (*header);
-// if (pitEntry == 0)
-// {
-// // somebody is doing something bad
-// m_dropNacks (header, NON_DUPLICATED, incomingFace);
-// return;
-// }
-
-// // NdnPitEntryIncomingFaceContainer::type::iterator inFace = pitEntry->GetIncoming ().find (incomingFace);
-// NdnPitEntryOutgoingFaceContainer::type::iterator outFace = pitEntry->GetOutgoing ().find (incomingFace);
-
-// if (outFace == pitEntry->GetOutgoing ().end ())
-// {
-// // NS_ASSERT_MSG (false,
-// // "Node " << GetObject<Node> ()->GetId () << ", outgoing entry should exist for face " << boost::cref(*incomingFace) << "\n" <<
-// // "size: " << pitEntry.GetOutgoing ().size ());
-
-// // m_dropNacks (header, NON_DUPLICATE, incomingFace);
-// return;
-// }
-
-// // This was done in error. Never, never do anything, except normal leakage. This way we ensure that we will not have losses,
-// // at least when there is only one client
-// //
-// // incomingFace->LeakBucketByOnePacket ();
-
-// NS_LOG_ERROR ("Nack on " << boost::cref(*incomingFace));
-
-// pitEntry->SetWaitingInVain (outFace);
-
-// // 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 (header->GetNack () == NdnInterestHeader::NACK_GIVEUP_PIT)
-// {
-// pitEntry->RemoveIncoming (incomingFace);
-// }
-
-// pitEntry->GetFibEntry ()->UpdateStatus (incomingFace, NdnFibFaceMetric::NDN_FIB_YELLOW);
-// // StaticCast<NdnFibImpl> (m_fib)->modify (pitEntry->GetFibEntry (),
-// // ll::bind (&NdnFibEntry::UpdateStatus,
-// // ll::_1, incomingFace, NdnFibFaceMetric::NDN_FIB_YELLOW));
-
-// if (pitEntry->GetIncoming ().size () == 0) // interest was actually satisfied
-// {
-// // no need to do anything
-// m_dropNacks (header, AFTER_SATISFIED, incomingFace);
-// return;
-// }
-
-// if (!pitEntry->AreAllOutgoingInVain ()) // not all ougtoing are in vain
-// {
-// NS_LOG_DEBUG ("Not all outgoing are in vain");
-// // suppress
-// // Don't do anything, we are still expecting data from some other face
-// m_dropNacks (header, SUPPRESSED, incomingFace);
-// return;
-// }
-
-// Ptr<Packet> nonNackInterest = Create<Packet> ();
-// header->SetNack (NdnInterestHeader::NORMAL_INTEREST);
-// nonNackInterest->AddHeader (*header);
-
-// bool propagated = m_forwardingStrategy->
-// PropagateInterest (pitEntry, incomingFace, header, nonNackInterest);
-
-// // // ForwardingStrategy will try its best to forward packet to at least one interface.
-// // // If no interests was propagated, then there is not other option for forwarding or
-// // // ForwardingStrategy failed to find it.
-// if (!propagated)
-// {
-// m_dropNacks (header, NO_FACES, incomingFace); // this headers doesn't have NACK flag set
-// GiveUpInterest (pitEntry, header);
-// }
-// }
-
-// Processing Interests
-//
-// // !!! Key point.
-// // !!! All interests should be answerred!!! Either later with data, immediately with data, or immediately with NACK
-// void NdnL3Protocol::OnInterest (const Ptr<NdnFace> &incomingFace,
-// Ptr<NdnInterestHeader> &header,
-// const Ptr<const Packet> &packet)
-// {
-// m_inInterests (header, incomingFace);
-
-// Ptr<NdnPitEntry> pitEntry = m_pit->Lookup (*header);
-// if (pitEntry == 0)
-// {
-// pitEntry = m_pit->Create (header);
-// }
-
-// if (pitEntry == 0)
-// {
-// // if it is still not created, then give up processing
-// m_dropInterests (header, PIT_LIMIT, incomingFace);
-// return;
-// }
-
-// bool isNew = pitEntry->GetIncoming ().size () == 0 && pitEntry->GetOutgoing ().size () == 0;
-// bool isDuplicated = true;
-// if (!pitEntry->IsNonceSeen (header->GetNonce ()))
-// {
-// pitEntry->AddSeenNonce (header->GetNonce ());
-// isDuplicated = false;
-// }
-
-// NS_LOG_FUNCTION (header->GetName () << header->GetNonce () << boost::cref (*incomingFace) << isDuplicated);
-
-// /////////////////////////////////////////////////////////////////////////////////////////
-// /////////////////////////////////////////////////////////////////////////////////////////
-// /////////////////////////////////////////////////////////////////////////////////////////
-// // //
-// // !!!! IMPORTANT CHANGE !!!! Duplicate interests will create incoming face entry !!!! //
-// // //
-// /////////////////////////////////////////////////////////////////////////////////////////
-// /////////////////////////////////////////////////////////////////////////////////////////
-// /////////////////////////////////////////////////////////////////////////////////////////
-
-// // Data is not in cache
-// NdnPitEntry::in_iterator inFace = pitEntry->GetIncoming ().find (incomingFace);
-// NdnPitEntry::out_iterator outFace = pitEntry->GetOutgoing ().find (incomingFace);
-
-// bool isRetransmitted = false;
-
-// if (inFace != pitEntry->GetIncoming ().end ())
-// {
-// // NdnPitEntryIncomingFace.m_arrivalTime keeps track arrival time of the first packet... why?
-
-// isRetransmitted = true;
-// // this is almost definitely a retransmission. But should we trust the user on that?
-// }
-// else
-// {
-// inFace = pitEntry->AddIncoming (incomingFace);
-// }
-// //////////////////////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////////////////////
-
-// if (isDuplicated)
-// {
-// NS_LOG_DEBUG ("Received duplicatie interest on " << *incomingFace);
-// m_dropInterests (header, DUPLICATED, incomingFace);
-
-// /**
-// * This condition will handle "routing" loops and also recently satisfied interests.
-// * Every time interest is satisfied, PIT entry (with empty incoming and outgoing faces)
-// * is kept for another small chunk of time.
-// */
-
-// if (m_nacksEnabled)
-// {
-// NS_LOG_DEBUG ("Sending NACK_LOOP");
-// header->SetNack (NdnInterestHeader::NACK_LOOP);
-// Ptr<Packet> nack = Create<Packet> ();
-// nack->AddHeader (*header);
-
-// incomingFace->Send (nack);
-// m_outNacks (header, incomingFace);
-// }
-
-// return;
-// }
-
-// Ptr<Packet> contentObject;
-// Ptr<const NdnContentObjectHeader> contentObjectHeader; // used for tracing
-// Ptr<const Packet> payload; // used for tracing
-// tie (contentObject, contentObjectHeader, payload) = m_contentStore->Lookup (header);
-// if (contentObject != 0)
-// {
-// NS_ASSERT (contentObjectHeader != 0);
-// NS_LOG_LOGIC("Found in cache");
-
-// OnDataDelayed (contentObjectHeader, payload, contentObject);
-// return;
-// }
-
-// // update PIT entry lifetime
-// pitEntry->UpdateLifetime (header->GetInterestLifetime ());
-
-// if (outFace != pitEntry->GetOutgoing ().end ())
-// {
-// NS_LOG_DEBUG ("Non duplicate interests from the face we have sent interest to. Don't suppress");
-// // got a non-duplicate interest from the face we have sent interest to
-// // Probably, there is no point in waiting data from that face... Not sure yet
-
-// // If we're expecting data from the interface we got the interest from ("producer" asks us for "his own" data)
-// // Mark interface YELLOW, but keep a small hope that data will come eventually.
-
-// // ?? not sure if we need to do that ?? ...
-
-// pitEntry->GetFibEntry ()->UpdateStatus (incomingFace, NdnFibFaceMetric::NDN_FIB_YELLOW);
-// // StaticCast<NdnFibImpl> (m_fib)->modify(pitEntry->GetFibEntry (),
-// // ll::bind (&NdnFibEntry::UpdateStatus,
-// // ll::_1, incomingFace, NdnFibFaceMetric::NDN_FIB_YELLOW));
-// }
-// else
-// if (!isNew && !isRetransmitted)
-// {
-// // Suppress this interest if we're still expecting data from some other face
-// NS_LOG_DEBUG ("Suppress interests");
-// m_dropInterests (header, SUPPRESSED, incomingFace);
-// return;
-// }
-
-// /////////////////////////////////////////////////////////////////////
-// // Propagate
-// /////////////////////////////////////////////////////////////////////
-
-// bool propagated = m_forwardingStrategy->
-// PropagateInterest (pitEntry, incomingFace, header, packet);
-
-// if (!propagated && isRetransmitted) //give another chance if retransmitted
-// {
-// // increase max number of allowed retransmissions
-// pitEntry->IncreaseAllowedRetxCount ();
-
-// // try again
-// propagated = m_forwardingStrategy->
-// PropagateInterest (pitEntry, incomingFace, header, packet);
-// }
-
-// // ForwardingStrategy will try its best to forward packet to at least one interface.
-// // If no interests was propagated, then there is not other option for forwarding or
-// // ForwardingStrategy failed to find it.
-// if (!propagated)
-// {
-// NS_LOG_DEBUG ("Not propagated");
-// m_dropInterests (header, NO_FACES, incomingFace);
-// GiveUpInterest (pitEntry, header);
-// }
-// }
-
-// void
-// NdnL3Protocol::OnDataDelayed (Ptr<const NdnContentObjectHeader> header,
-// Ptr<const Packet> payload,
-// const Ptr<const Packet> &packet)
-// {
-// // 1. Lookup PIT entry
-// Ptr<NdnPitEntry> pitEntry = m_pit->Lookup (*header);
-// if (pitEntry != 0)
-// {
-// //satisfy all pending incoming Interests
-// BOOST_FOREACH (const NdnPitEntryIncomingFace &incoming, pitEntry->GetIncoming ())
-// {
-// incoming.m_face->Send (packet->Copy ());
-// m_outData (header, payload, false, incoming.m_face);
-// NS_LOG_DEBUG ("Satisfy " << *incoming.m_face);
-
-// // successfull forwarded data trace
-// }
-
-// if (pitEntry->GetIncoming ().size () > 0)
-// {
-// // All incoming interests are satisfied. Remove them
-// pitEntry->ClearIncoming ();
-
-// // Remove all outgoing faces
-// pitEntry->ClearOutgoing ();
-
-// // Set pruning timout on PIT entry (instead of deleting the record)
-// m_pit->MarkErased (pitEntry);
-// }
-// }
-// else
-// {
-// NS_LOG_DEBUG ("Pit entry not found (was satisfied and removed before)");
-// return; // do not process unsoliced data packets
-// }
-// }
-
-// // Processing ContentObjects
-// void
-// NdnL3Protocol::OnData (const Ptr<NdnFace> &incomingFace,
-// Ptr<NdnContentObjectHeader> &header,
-// Ptr<Packet> &payload,
-// const Ptr<const Packet> &packet)
-// {
-
-// NS_LOG_FUNCTION (incomingFace << header->GetName () << payload << packet);
-// m_inData (header, payload, incomingFace);
-
-// // 1. Lookup PIT entry
-// Ptr<NdnPitEntry> pitEntry = m_pit->Lookup (*header);
-// if (pitEntry != 0)
-// {
-// // Note that with MultiIndex we need to modify entries indirectly
-
-// NdnPitEntry::out_iterator out = pitEntry->GetOutgoing ().find (incomingFace);
-
-// // If we have sent interest for this data via this face, then update stats.
-// if (out != pitEntry->GetOutgoing ().end ())
-// {
-// pitEntry->GetFibEntry ()->UpdateFaceRtt (incomingFace, Simulator::Now () - out->m_sendTime);
-// // StaticCast<NdnFibImpl> (m_fib)->modify (pitEntry->GetFibEntry (),
-// // ll::bind (&NdnFibEntry::UpdateFaceRtt,
-// // ll::_1,
-// // incomingFace,
-// // Simulator::Now () - out->m_sendTime));
-// }
-// else
-// {
-// // Unsolicited data, but we're interested in it... should we get it?
-// // Potential hole for attacks
-
-// if (m_cacheUnsolicitedData)
-// {
-// // Optimistically add or update entry in the content store
-// m_contentStore->Add (header, payload);
-// }
-// else
-// {
-// NS_LOG_ERROR ("Node "<< m_node->GetId() <<
-// ". PIT entry for "<< header->GetName ()<<" is valid, "
-// "but outgoing entry for interface "<< boost::cref(*incomingFace) <<" doesn't exist\n");
-// }
-// // ignore unsolicited data
-// return;
-// }
-
-// // Update metric status for the incoming interface in the corresponding FIB entry
-// pitEntry->GetFibEntry ()->UpdateStatus (incomingFace, NdnFibFaceMetric::NDN_FIB_GREEN);
-// // StaticCast<NdnFibImpl>(m_fib)->modify (pitEntry->GetFibEntry (),
-// // ll::bind (&NdnFibEntry::UpdateStatus, ll::_1,
-// // incomingFace, NdnFibFaceMetric::NDN_FIB_GREEN));
-
-// // Add or update entry in the content store
-// m_contentStore->Add (header, payload);
-
-// pitEntry->RemoveIncoming (incomingFace);
-
-// if (pitEntry->GetIncoming ().size () == 0)
-// {
-// // Set pruning timout on PIT entry (instead of deleting the record)
-// m_pit->MarkErased (pitEntry);
-// }
-// else
-// {
-// OnDataDelayed (header, payload, packet);
-// }
-// }
-// else
-// {
-// NS_LOG_DEBUG ("Pit entry not found");
-// if (m_cacheUnsolicitedData)
-// {
-// // Optimistically add or update entry in the content store
-// m_contentStore->Add (header, payload);
-// }
-// else
-// {
-// // Drop data packet if PIT entry is not found
-// // (unsolicited data packets should not "poison" content store)
-
-// //drop dulicated or not requested data packet
-// m_dropData (header, payload, UNSOLICITED, incomingFace);
-// }
-// return; // do not process unsoliced data packets
-// }
-// }
-
-// void
-// NdnL3Protocol::GiveUpInterest (Ptr<NdnPitEntry> pitEntry,
-// Ptr<NdnInterestHeader> header)
-// {
-// NS_LOG_FUNCTION (this);
-
-// if (m_nacksEnabled)
-// {
-// Ptr<Packet> packet = Create<Packet> ();
-// header->SetNack (NdnInterestHeader::NACK_GIVEUP_PIT);
-// packet->AddHeader (*header);
-
-// BOOST_FOREACH (const NdnPitEntryIncomingFace &incoming, pitEntry->GetIncoming ())
-// {
-// NS_LOG_DEBUG ("Send NACK for " << boost::cref (header->GetName ()) << " to " << boost::cref (*incoming.m_face));
-// incoming.m_face->Send (packet->Copy ());
-
-// m_outNacks (header, incoming.m_face);
-// }
-
-// // All incoming interests cannot be satisfied. Remove them
-// pitEntry->ClearIncoming ();
-
-// // Remove also outgoing
-// pitEntry->ClearOutgoing ();
-
-// // Set pruning timout on PIT entry (instead of deleting the record)
-// m_pit->MarkErased (pitEntry);
-// }
-// }
-
+} //namespace ndn
} //namespace ns3