ndnSIM-v2: Initial implementation
- Name, name::Components, Interest, Data now use ndn-cxx
- Ptr is replaced with shared_ptr for ndn-cxx structures
Credits for the change also to Mickey Sweat, Wentao Shang, and Alex Afanasyev
diff --git a/apps/ndn-app.cpp b/apps/ndn-app.cpp
index f353e62..b5d3e35 100644
--- a/apps/ndn-app.cpp
+++ b/apps/ndn-app.cpp
@@ -23,8 +23,6 @@
#include "ns3/assert.h"
#include "ns3/packet.h"
-#include "ns3/ndn-interest.hpp"
-#include "ns3/ndn-data.hpp"
#include "ns3/ndn-l3-protocol.hpp"
#include "ns3/ndn-fib.hpp"
#include "ns3/ndn-app-face.hpp"
@@ -48,9 +46,6 @@
.AddTraceSource("ReceivedInterests", "ReceivedInterests",
MakeTraceSourceAccessor(&App::m_receivedInterests))
- .AddTraceSource("ReceivedNacks", "ReceivedNacks",
- MakeTraceSourceAccessor(&App::m_receivedNacks))
-
.AddTraceSource("ReceivedDatas", "ReceivedDatas",
MakeTraceSourceAccessor(&App::m_receivedDatas))
@@ -93,24 +88,17 @@
}
void
-App::OnInterest(Ptr<const Interest> interest)
+App::OnInterest(shared_ptr<const Interest> interest)
{
NS_LOG_FUNCTION(this << interest);
m_receivedInterests(interest, this, m_face);
}
void
-App::OnNack(Ptr<const Interest> interest)
+App::OnData(shared_ptr<const Data> data)
{
- NS_LOG_FUNCTION(this << interest);
- m_receivedNacks(interest, this, m_face);
-}
-
-void
-App::OnData(Ptr<const Data> contentObject)
-{
- NS_LOG_FUNCTION(this << contentObject);
- m_receivedDatas(contentObject, this, m_face);
+ NS_LOG_FUNCTION(this << data);
+ m_receivedDatas(data, this, m_face);
}
// Application Methods