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/utils/tracers/l2-tracer.hpp b/utils/tracers/l2-tracer.hpp
index a2cd3a6..814a860 100644
--- a/utils/tracers/l2-tracer.hpp
+++ b/utils/tracers/l2-tracer.hpp
@@ -21,6 +21,8 @@
 #ifndef L2_TRACER_H
 #define L2_TRACER_H
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ns3/ptr.h"
 #include "ns3/simple-ref-count.h"
 #include "ns3/packet.h"
diff --git a/utils/tracers/ndn-app-delay-tracer.cpp b/utils/tracers/ndn-app-delay-tracer.cpp
index 666f945..fa9ab3a 100644
--- a/utils/tracers/ndn-app-delay-tracer.cpp
+++ b/utils/tracers/ndn-app-delay-tracer.cpp
@@ -26,8 +26,6 @@
 #include "ns3/callback.h"
 
 #include "ns3/ndn-app.hpp"
-#include "ns3/ndn-interest.hpp"
-#include "ns3/ndn-data.hpp"
 #include "ns3/simulator.h"
 #include "ns3/node-list.h"
 #include "ns3/log.h"
diff --git a/utils/tracers/ndn-app-delay-tracer.hpp b/utils/tracers/ndn-app-delay-tracer.hpp
index 64b695a..72cccec 100644
--- a/utils/tracers/ndn-app-delay-tracer.hpp
+++ b/utils/tracers/ndn-app-delay-tracer.hpp
@@ -21,6 +21,8 @@
 #ifndef CCNX_APP_DELAY_TRACER_H
 #define CCNX_APP_DELAY_TRACER_H
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ns3/ptr.h"
 #include "ns3/simple-ref-count.h"
 #include <ns3/nstime.h>
diff --git a/utils/tracers/ndn-cs-tracer.cpp b/utils/tracers/ndn-cs-tracer.cpp
index bc5d8de..f470aae 100644
--- a/utils/tracers/ndn-cs-tracer.cpp
+++ b/utils/tracers/ndn-cs-tracer.cpp
@@ -27,8 +27,6 @@
 #include "ns3/callback.h"
 
 #include "ns3/ndn-app.hpp"
-#include "ns3/ndn-interest.hpp"
-#include "ns3/ndn-data.hpp"
 #include "ns3/ndn-content-store.hpp"
 #include "ns3/simulator.h"
 #include "ns3/node-list.h"
@@ -271,13 +269,13 @@
 }
 
 void
-CsTracer::CacheHits(Ptr<const Interest>, Ptr<const Data>)
+CsTracer::CacheHits(shared_ptr<const Interest>, shared_ptr<const Data>)
 {
   m_stats.m_cacheHits++;
 }
 
 void
-CsTracer::CacheMisses(Ptr<const Interest>)
+CsTracer::CacheMisses(shared_ptr<const Interest>)
 {
   m_stats.m_cacheMisses++;
 }
diff --git a/utils/tracers/ndn-cs-tracer.hpp b/utils/tracers/ndn-cs-tracer.hpp
index 939df9b..d14d005 100644
--- a/utils/tracers/ndn-cs-tracer.hpp
+++ b/utils/tracers/ndn-cs-tracer.hpp
@@ -22,6 +22,8 @@
 #ifndef CCNX_CS_TRACER_H
 #define CCNX_CS_TRACER_H
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ns3/ptr.h"
 #include "ns3/simple-ref-count.h"
 #include <ns3/nstime.h>
@@ -40,12 +42,6 @@
 
 namespace ndn {
 
-class Interest;
-class Data;
-
-typedef Interest InterestHeader;
-typedef Data DataHeader;
-
 namespace cs {
 
 /// @cond include_hidden
@@ -180,10 +176,10 @@
   Connect();
 
   void
-  CacheHits(Ptr<const Interest>, Ptr<const Data>);
+  CacheHits(shared_ptr<const Interest>, shared_ptr<const Data>);
 
   void
-  CacheMisses(Ptr<const Interest>);
+  CacheMisses(shared_ptr<const Interest>);
 
 private:
   void
diff --git a/utils/tracers/ndn-l3-aggregate-tracer.cpp b/utils/tracers/ndn-l3-aggregate-tracer.cpp
index d9fc671..708640b 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.cpp
+++ b/utils/tracers/ndn-l3-aggregate-tracer.cpp
@@ -26,8 +26,6 @@
 #include "ns3/callback.h"
 #include "ns3/ndn-app.hpp"
 #include "ns3/ndn-face.hpp"
-#include "ns3/ndn-interest.hpp"
-#include "ns3/ndn-data.hpp"
 #include "ns3/ndn-pit-entry.hpp"
 
 #include "ns3/simulator.h"
@@ -288,7 +286,7 @@
 }
 
 void
-L3AggregateTracer::OutInterests(Ptr<const Interest> interest, Ptr<const Face> face)
+L3AggregateTracer::OutInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outInterests++;
   if (interest->GetWire()) {
@@ -297,7 +295,7 @@
 }
 
 void
-L3AggregateTracer::InInterests(Ptr<const Interest> interest, Ptr<const Face> face)
+L3AggregateTracer::InInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inInterests++;
   if (interest->GetWire()) {
@@ -306,7 +304,7 @@
 }
 
 void
-L3AggregateTracer::DropInterests(Ptr<const Interest> interest, Ptr<const Face> face)
+L3AggregateTracer::DropInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropInterests++;
   if (interest->GetWire()) {
@@ -315,7 +313,7 @@
 }
 
 void
-L3AggregateTracer::OutNacks(Ptr<const Interest> nack, Ptr<const Face> face)
+L3AggregateTracer::OutNacks(shared_ptr<const Interest> nack, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outNacks++;
   if (nack->GetWire()) {
@@ -324,7 +322,7 @@
 }
 
 void
-L3AggregateTracer::InNacks(Ptr<const Interest> nack, Ptr<const Face> face)
+L3AggregateTracer::InNacks(shared_ptr<const Interest> nack, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inNacks++;
   if (nack->GetWire()) {
@@ -333,7 +331,7 @@
 }
 
 void
-L3AggregateTracer::DropNacks(Ptr<const Interest> nack, Ptr<const Face> face)
+L3AggregateTracer::DropNacks(shared_ptr<const Interest> nack, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropNacks++;
   if (nack->GetWire()) {
@@ -342,7 +340,7 @@
 }
 
 void
-L3AggregateTracer::OutData(Ptr<const Data> data, bool fromCache, Ptr<const Face> face)
+L3AggregateTracer::OutData(shared_ptr<const Data> data, bool fromCache, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outData++;
   if (data->GetWire()) {
@@ -351,7 +349,7 @@
 }
 
 void
-L3AggregateTracer::InData(Ptr<const Data> data, Ptr<const Face> face)
+L3AggregateTracer::InData(shared_ptr<const Data> data, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inData++;
   if (data->GetWire()) {
@@ -360,7 +358,7 @@
 }
 
 void
-L3AggregateTracer::DropData(Ptr<const Data> data, Ptr<const Face> face)
+L3AggregateTracer::DropData(shared_ptr<const Data> data, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropData++;
   if (data->GetWire()) {
diff --git a/utils/tracers/ndn-l3-aggregate-tracer.hpp b/utils/tracers/ndn-l3-aggregate-tracer.hpp
index bedfccc..aa5d82f 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.hpp
+++ b/utils/tracers/ndn-l3-aggregate-tracer.hpp
@@ -21,6 +21,8 @@
 #ifndef NDN_L3_AGGREGATE_TRACER_H
 #define NDN_L3_AGGREGATE_TRACER_H
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ndn-l3-tracer.hpp"
 
 #include <ns3/nstime.h>
@@ -141,31 +143,31 @@
   Print(std::ostream& os) const;
 
   virtual void
-  OutInterests(Ptr<const Interest>, Ptr<const Face>);
+  OutInterests(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  InInterests(Ptr<const Interest>, Ptr<const Face>);
+  InInterests(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  DropInterests(Ptr<const Interest>, Ptr<const Face>);
+  DropInterests(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  OutNacks(Ptr<const Interest>, Ptr<const Face>);
+  OutNacks(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  InNacks(Ptr<const Interest>, Ptr<const Face>);
+  InNacks(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  DropNacks(Ptr<const Interest>, Ptr<const Face>);
+  DropNacks(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  OutData(Ptr<const Data>, bool fromCache, Ptr<const Face>);
+  OutData(shared_ptr<const Data>, bool fromCache, Ptr<const Face>);
 
   virtual void
-  InData(Ptr<const Data>, Ptr<const Face>);
+  InData(shared_ptr<const Data>, Ptr<const Face>);
 
   virtual void
-  DropData(Ptr<const Data>, Ptr<const Face>);
+  DropData(shared_ptr<const Data>, Ptr<const Face>);
 
   virtual void
   SatisfiedInterests(Ptr<const pit::Entry>);
diff --git a/utils/tracers/ndn-l3-rate-tracer.cpp b/utils/tracers/ndn-l3-rate-tracer.cpp
index 38170bc..6bba93b 100644
--- a/utils/tracers/ndn-l3-rate-tracer.cpp
+++ b/utils/tracers/ndn-l3-rate-tracer.cpp
@@ -29,8 +29,6 @@
 
 #include "ns3/ndn-app.hpp"
 #include "ns3/ndn-face.hpp"
-#include "ns3/ndn-interest.hpp"
-#include "ns3/ndn-data.hpp"
 #include "ns3/ndn-pit-entry.hpp"
 
 #include <fstream>
@@ -312,7 +310,7 @@
 }
 
 void
-L3RateTracer::OutInterests(Ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::OutInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outInterests++;
   if (interest->GetWire()) {
@@ -321,7 +319,7 @@
 }
 
 void
-L3RateTracer::InInterests(Ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::InInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inInterests++;
   if (interest->GetWire()) {
@@ -330,7 +328,7 @@
 }
 
 void
-L3RateTracer::DropInterests(Ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::DropInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropInterests++;
   if (interest->GetWire()) {
@@ -339,7 +337,7 @@
 }
 
 void
-L3RateTracer::OutNacks(Ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::OutNacks(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outNacks++;
   if (interest->GetWire()) {
@@ -348,7 +346,7 @@
 }
 
 void
-L3RateTracer::InNacks(Ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::InNacks(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inNacks++;
   if (interest->GetWire()) {
@@ -357,7 +355,7 @@
 }
 
 void
-L3RateTracer::DropNacks(Ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::DropNacks(shared_ptr<const Interest> interest, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropNacks++;
   if (interest->GetWire()) {
@@ -366,7 +364,7 @@
 }
 
 void
-L3RateTracer::OutData(Ptr<const Data> data, bool fromCache, Ptr<const Face> face)
+L3RateTracer::OutData(shared_ptr<const Data> data, bool fromCache, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outData++;
   if (data->GetWire()) {
@@ -375,7 +373,7 @@
 }
 
 void
-L3RateTracer::InData(Ptr<const Data> data, Ptr<const Face> face)
+L3RateTracer::InData(shared_ptr<const Data> data, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inData++;
   if (data->GetWire()) {
@@ -384,7 +382,7 @@
 }
 
 void
-L3RateTracer::DropData(Ptr<const Data> data, Ptr<const Face> face)
+L3RateTracer::DropData(shared_ptr<const Data> data, Ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropData++;
   if (data->GetWire()) {
diff --git a/utils/tracers/ndn-l3-rate-tracer.hpp b/utils/tracers/ndn-l3-rate-tracer.hpp
index 21bb06c..41adf26 100644
--- a/utils/tracers/ndn-l3-rate-tracer.hpp
+++ b/utils/tracers/ndn-l3-rate-tracer.hpp
@@ -21,6 +21,8 @@
 #ifndef CCNX_RATE_L3_TRACER_H
 #define CCNX_RATE_L3_TRACER_H
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ndn-l3-tracer.hpp"
 
 #include "ns3/nstime.h"
@@ -128,31 +130,31 @@
 protected:
   // from L3Tracer
   virtual void
-  OutInterests(Ptr<const Interest>, Ptr<const Face>);
+  OutInterests(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  InInterests(Ptr<const Interest>, Ptr<const Face>);
+  InInterests(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  DropInterests(Ptr<const Interest>, Ptr<const Face>);
+  DropInterests(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  OutNacks(Ptr<const Interest>, Ptr<const Face>);
+  OutNacks(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  InNacks(Ptr<const Interest>, Ptr<const Face>);
+  InNacks(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  DropNacks(Ptr<const Interest>, Ptr<const Face>);
+  DropNacks(shared_ptr<const Interest>, Ptr<const Face>);
 
   virtual void
-  OutData(Ptr<const Data>, bool fromCache, Ptr<const Face>);
+  OutData(shared_ptr<const Data>, bool fromCache, Ptr<const Face>);
 
   virtual void
-  InData(Ptr<const Data>, Ptr<const Face>);
+  InData(shared_ptr<const Data>, Ptr<const Face>);
 
   virtual void
-  DropData(Ptr<const Data>, Ptr<const Face>);
+  DropData(shared_ptr<const Data>, Ptr<const Face>);
 
   virtual void
   SatisfiedInterests(Ptr<const pit::Entry>);
diff --git a/utils/tracers/ndn-l3-tracer.cpp b/utils/tracers/ndn-l3-tracer.cpp
index 8d59eb0..25e9f07 100644
--- a/utils/tracers/ndn-l3-tracer.cpp
+++ b/utils/tracers/ndn-l3-tracer.cpp
@@ -29,8 +29,6 @@
 #include <boost/lexical_cast.hpp>
 
 #include "ns3/ndn-face.hpp"
-#include "ns3/ndn-interest.hpp"
-#include "ns3/ndn-data.hpp"
 #include "ns3/ndn-pit-entry.hpp"
 
 using namespace std;
diff --git a/utils/tracers/ndn-l3-tracer.hpp b/utils/tracers/ndn-l3-tracer.hpp
index d3534fa..f916bd4 100644
--- a/utils/tracers/ndn-l3-tracer.hpp
+++ b/utils/tracers/ndn-l3-tracer.hpp
@@ -21,6 +21,8 @@
 #ifndef NDN_L3_TRACER_H
 #define NDN_L3_TRACER_H
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ns3/ptr.h"
 #include "ns3/simple-ref-count.h"
 
@@ -42,9 +44,6 @@
 
 class Face;
 
-class Interest;
-class Data;
-
 /**
  * @ingroup ndn-tracers
  * @brief Base class for network-layer (incoming/outgoing Interests and Data) tracing of NDN stack
@@ -89,31 +88,31 @@
   Connect();
 
   virtual void
-  OutInterests(Ptr<const Interest>, Ptr<const Face>) = 0;
+  OutInterests(shared_ptr<const Interest>, Ptr<const Face>) = 0;
 
   virtual void
-  InInterests(Ptr<const Interest>, Ptr<const Face>) = 0;
+  InInterests(shared_ptr<const Interest>, Ptr<const Face>) = 0;
 
   virtual void
-  DropInterests(Ptr<const Interest>, Ptr<const Face>) = 0;
+  DropInterests(shared_ptr<const Interest>, Ptr<const Face>) = 0;
 
   virtual void
-  OutNacks(Ptr<const Interest>, Ptr<const Face>) = 0;
+  OutNacks(shared_ptr<const Interest>, Ptr<const Face>) = 0;
 
   virtual void
-  InNacks(Ptr<const Interest>, Ptr<const Face>) = 0;
+  InNacks(shared_ptr<const Interest>, Ptr<const Face>) = 0;
 
   virtual void
-  DropNacks(Ptr<const Interest>, Ptr<const Face>) = 0;
+  DropNacks(shared_ptr<const Interest>, Ptr<const Face>) = 0;
 
   virtual void
-  OutData(Ptr<const Data>, bool fromCache, Ptr<const Face>) = 0;
+  OutData(shared_ptr<const Data>, bool fromCache, Ptr<const Face>) = 0;
 
   virtual void
-  InData(Ptr<const Data>, Ptr<const Face>) = 0;
+  InData(shared_ptr<const Data>, Ptr<const Face>) = 0;
 
   virtual void
-  DropData(Ptr<const Data>, Ptr<const Face>) = 0;
+  DropData(shared_ptr<const Data>, Ptr<const Face>) = 0;
 
   virtual void
   SatisfiedInterests(Ptr<const pit::Entry>) = 0;
diff --git a/utils/trie/trie.hpp b/utils/trie/trie.hpp
index 9afc8d1..bc7ab31 100644
--- a/utils/trie/trie.hpp
+++ b/utils/trie/trie.hpp
@@ -21,6 +21,8 @@
 #ifndef TRIE_H_
 #define TRIE_H_
 
+#include "ns3/ndnSIM/model/ndn-common.hpp"
+
 #include "ns3/ptr.h"
 
 #include <boost/intrusive/unordered_set.hpp>