all: Replacing deprecated NameComponents class with Name

NameComponents is kept for backwards compatibility as typedef to Name

refs #29
diff --git a/model/cs/content-store-impl.h b/model/cs/content-store-impl.h
index ffbc925..7ed8ae3 100644
--- a/model/cs/content-store-impl.h
+++ b/model/cs/content-store-impl.h
@@ -67,12 +67,12 @@
 
 template<class Policy>
 class ContentStoreImpl : public ContentStore,
-                         protected ndnSIM::trie_with_policy< NameComponents,
+                         protected ndnSIM::trie_with_policy< Name,
                                                              ndnSIM::smart_pointer_payload_traits< EntryImpl< ContentStoreImpl< Policy > >, Entry >,
                                                              Policy >
 {
 public:
-  typedef ndnSIM::trie_with_policy< NameComponents,
+  typedef ndnSIM::trie_with_policy< Name,
                                     ndnSIM::smart_pointer_payload_traits< EntryImpl< ContentStoreImpl< Policy > >, Entry >,
                                     Policy > super;
 
diff --git a/model/cs/ndn-content-store.cc b/model/cs/ndn-content-store.cc
index fbe85ce..98e118d 100644
--- a/model/cs/ndn-content-store.cc
+++ b/model/cs/ndn-content-store.cc
@@ -23,7 +23,7 @@
 #include "ndn-content-store.h"
 #include "ns3/log.h"
 #include "ns3/packet.h"
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 #include "ns3/ndn-interest.h"
 #include "ns3/ndn-content-object.h"
 
@@ -78,7 +78,7 @@
   return packet;
 }
 
-const NameComponents&
+const Name&
 Entry::GetName () const
 {
   return m_header->GetName ();
diff --git a/model/cs/ndn-content-store.h b/model/cs/ndn-content-store.h
index f03e4c9..1e01a6e 100644
--- a/model/cs/ndn-content-store.h
+++ b/model/cs/ndn-content-store.h
@@ -36,7 +36,7 @@
 
 class ContentObjectHeader;
 class InterestHeader;
-class NameComponents;
+class Name;
 
 class ContentStore;
 
@@ -71,7 +71,7 @@
    * \brief Get prefix of the stored entry
    * \returns prefix of the stored entry
    */
-  const NameComponents&
+  const Name&
   GetName () const;
 
   /**
diff --git a/model/fib/ndn-fib-entry.cc b/model/fib/ndn-fib-entry.cc
index 35b3a99..09b3ec6 100644
--- a/model/fib/ndn-fib-entry.cc
+++ b/model/fib/ndn-fib-entry.cc
@@ -20,7 +20,7 @@
 
 #include "ndn-fib-entry.h"
 
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 #include "ns3/log.h"
 #include "ns3/simulator.h"
 
diff --git a/model/fib/ndn-fib-entry.h b/model/fib/ndn-fib-entry.h
index 93fa2aa..9cb3aec 100644
--- a/model/fib/ndn-fib-entry.h
+++ b/model/fib/ndn-fib-entry.h
@@ -24,7 +24,7 @@
 #include "ns3/ptr.h"
 #include "ns3/nstime.h"
 #include "ns3/ndn-face.h"
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 #include "ns3/ndn-limits.h"
 #include "ns3/traced-value.h"
 
@@ -40,7 +40,7 @@
 namespace ns3 {
 namespace ndn {
 
-class NameComponents;
+class Name;
 
 namespace fib {
 
@@ -245,7 +245,7 @@
    * \brief Constructor
    * \param prefix smart pointer to the prefix for the FIB entry
    */
-  Entry (const Ptr<const NameComponents> &prefix)
+  Entry (const Ptr<const Name> &prefix)
   : m_prefix (prefix)
   , m_needsProbing (false)
   {
@@ -287,7 +287,7 @@
   /**
    * \brief Get prefix for the FIB entry
    */
-  const NameComponents&
+  const Name&
   GetPrefix () const { return *m_prefix; }
 
   /**
@@ -311,7 +311,7 @@
   friend std::ostream& operator<< (std::ostream& os, const Entry &entry);
 
 public:
-  Ptr<const NameComponents> m_prefix; ///< \brief Prefix of the FIB entry
+  Ptr<const Name> m_prefix; ///< \brief Prefix of the FIB entry
   FaceMetricContainer::type m_faces; ///< \brief Indexed list of faces
 
   bool m_needsProbing;      ///< \brief flag indicating that probing should be performed
diff --git a/model/fib/ndn-fib-impl.cc b/model/fib/ndn-fib-impl.cc
index 3fc29a4..18ee6ac 100644
--- a/model/fib/ndn-fib-impl.cc
+++ b/model/fib/ndn-fib-impl.cc
@@ -85,13 +85,13 @@
 
 
 Ptr<Entry>
-FibImpl::Add (const NameComponents &prefix, Ptr<Face> face, int32_t metric)
+FibImpl::Add (const Name &prefix, Ptr<Face> face, int32_t metric)
 {
-  return Add (Create<NameComponents> (prefix), face, metric);
+  return Add (Create<Name> (prefix), face, metric);
 }
   
 Ptr<Entry>
-FibImpl::Add (const Ptr<const NameComponents> &prefix, Ptr<Face> face, int32_t metric)
+FibImpl::Add (const Ptr<const Name> &prefix, Ptr<Face> face, int32_t metric)
 {
   NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId () << boost::cref(*prefix) << boost::cref(*face) << metric);
 
@@ -123,7 +123,7 @@
 }
 
 void
-FibImpl::Remove (const Ptr<const NameComponents> &prefix)
+FibImpl::Remove (const Ptr<const Name> &prefix)
 {
   NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId () << boost::cref(*prefix));
 
@@ -140,7 +140,7 @@
 }
 
 // void
-// FibImpl::Invalidate (const Ptr<const NameComponents> &prefix)
+// FibImpl::Invalidate (const Ptr<const Name> &prefix)
 // {
 //   NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId () << boost::cref(*prefix));
 
diff --git a/model/fib/ndn-fib-impl.h b/model/fib/ndn-fib-impl.h
index f47a7d1..9b45ba2 100644
--- a/model/fib/ndn-fib-impl.h
+++ b/model/fib/ndn-fib-impl.h
@@ -22,7 +22,7 @@
 #define	_NDN_FIB_IMPL_H_
 
 #include "ns3/ndn-fib.h"
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 
 #include "../../utils/trie/trie-with-policy.h"
 #include "../../utils/trie/counting-policy.h"
@@ -35,12 +35,12 @@
 {
 public:
   typedef ndnSIM::trie_with_policy<
-    NameComponents,
+    Name,
     ndnSIM::smart_pointer_payload_traits<EntryImpl>,
     ndnSIM::counting_policy_traits
     > trie;
 
-  EntryImpl (const Ptr<const NameComponents> &prefix)
+  EntryImpl (const Ptr<const Name> &prefix)
     : Entry (prefix)
     , item_ (0)
   {
@@ -64,12 +64,12 @@
  * \brief Class implementing FIB functionality
  */
 class FibImpl : public Fib,
-                protected ndnSIM::trie_with_policy< NameComponents,
+                protected ndnSIM::trie_with_policy< Name,
                                                     ndnSIM::smart_pointer_payload_traits< EntryImpl >,
                                                     ndnSIM::counting_policy_traits >
 {
 public:
-  typedef ndnSIM::trie_with_policy< NameComponents,
+  typedef ndnSIM::trie_with_policy< Name,
                                     ndnSIM::smart_pointer_payload_traits<EntryImpl>,
                                     ndnSIM::counting_policy_traits > super;
   
@@ -89,13 +89,13 @@
   LongestPrefixMatch (const InterestHeader &interest);
   
   virtual Ptr<Entry>
-  Add (const NameComponents &prefix, Ptr<Face> face, int32_t metric);
+  Add (const Name &prefix, Ptr<Face> face, int32_t metric);
 
   virtual Ptr<Entry>
-  Add (const Ptr<const NameComponents> &prefix, Ptr<Face> face, int32_t metric);
+  Add (const Ptr<const Name> &prefix, Ptr<Face> face, int32_t metric);
 
   virtual void
-  Remove (const Ptr<const NameComponents> &prefix);
+  Remove (const Ptr<const Name> &prefix);
 
   virtual void
   InvalidateAll ();
diff --git a/model/fib/ndn-fib.h b/model/fib/ndn-fib.h
index 951f2cb..141a402 100644
--- a/model/fib/ndn-fib.h
+++ b/model/fib/ndn-fib.h
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2011 University of California, Los Angeles
+ * Copyright (c) 2011-2013 University of California, Los Angeles
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -60,7 +60,7 @@
    * \todo Implement exclude filters
    *
    * \param interest Interest packet header
-   * \returns If entry found a valid iterator will be returned, otherwise end ()
+   * \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;
@@ -77,7 +77,7 @@
    * @param metric	Routing metric
    */
   virtual Ptr<fib::Entry>
-  Add (const NameComponents &prefix, Ptr<Face> face, int32_t metric) = 0;
+  Add (const Name &prefix, Ptr<Face> face, int32_t metric) = 0;
 
   /**
    * \brief Add or update FIB entry using smart pointer to prefix
@@ -91,7 +91,7 @@
    * @param metric	Routing metric
    */
   virtual Ptr<fib::Entry>
-  Add (const Ptr<const NameComponents> &prefix, Ptr<Face> face, int32_t metric) = 0;
+  Add (const Ptr<const Name> &prefix, Ptr<Face> face, int32_t metric) = 0;
 
   /**
    * @brief Remove FIB entry
@@ -102,7 +102,7 @@
    * @param name	Smart pointer to prefix
    */
   virtual void
-  Remove (const Ptr<const NameComponents> &prefix) = 0;
+  Remove (const Ptr<const Name> &prefix) = 0;
 
   // /**
   //  * @brief Invalidate FIB entry ("Safe" version of Remove)
@@ -111,7 +111,7 @@
   //  * @param name	Smart pointer to prefix
   //  */
   // virtual void
-  // Invalidate (const Ptr<const NameComponents> &prefix) = 0;
+  // Invalidate (const Ptr<const Name> &prefix) = 0;
 
   /**
    * @brief Invalidate all FIB entries
diff --git a/model/ndn-content-object.cc b/model/ndn-content-object.cc
index e03387c..91d890d 100644
--- a/model/ndn-content-object.cc
+++ b/model/ndn-content-object.cc
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2011 University of California, Los Angeles
+ * Copyright (c) 2011-2013 University of California, Los Angeles
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -25,76 +25,76 @@
 
 #include <boost/foreach.hpp>
 
-NS_LOG_COMPONENT_DEFINE ("ndn.ContentObjectHeader");
+NS_LOG_COMPONENT_DEFINE ("ndn.ContentObject");
 
 namespace ns3 {
 namespace ndn {
 
-NS_OBJECT_ENSURE_REGISTERED (ContentObjectHeader);
+NS_OBJECT_ENSURE_REGISTERED (ContentObject);
 NS_OBJECT_ENSURE_REGISTERED (ContentObjectTail);
 
 TypeId
-ContentObjectHeader::GetTypeId (void)
+ContentObject::GetTypeId (void)
 {
-  static TypeId tid = TypeId ("ns3::ndn::ContentObjectHeader")
+  static TypeId tid = TypeId ("ns3::ndn::ContentObject")
     .SetGroupName ("Ndn")
     .SetParent<Header> ()
-    .AddConstructor<ContentObjectHeader> ()
+    .AddConstructor<ContentObject> ()
     ;
   return tid;
 }
 
-ContentObjectHeader::ContentObjectHeader ()
+ContentObject::ContentObject ()
 {
 }
 
 void
-ContentObjectHeader::SetName (const Ptr<NameComponents> &name)
+ContentObject::SetName (const Ptr<Name> &name)
 {
   m_name = name;
 }
 
-const NameComponents&
-ContentObjectHeader::GetName () const
+const Name&
+ContentObject::GetName () const
 {
-  if (m_name==0) throw ContentObjectHeaderException();
+  if (m_name==0) throw ContentObjectException();
   return *m_name;
 }
 
-Ptr<const NameComponents>
-ContentObjectHeader::GetNamePtr () const
+Ptr<const Name>
+ContentObject::GetNamePtr () const
 {
   return m_name;
 }
 
 
 void
-ContentObjectHeader::SetTimestamp (const Time &timestamp)
+ContentObject::SetTimestamp (const Time &timestamp)
 {
   m_timestamp = timestamp;
 }
 
 Time
-ContentObjectHeader::GetTimestamp () const
+ContentObject::GetTimestamp () const
 {
   return m_timestamp;
 }
     
 void
-ContentObjectHeader::SetFreshness (const Time &freshness)
+ContentObject::SetFreshness (const Time &freshness)
 {
   m_freshness = freshness;
 }
 
 Time
-ContentObjectHeader::GetFreshness () const
+ContentObject::GetFreshness () const
 {
   return m_freshness;
 }
 
 
 uint32_t
-ContentObjectHeader::GetSerializedSize () const
+ContentObject::GetSerializedSize () const
 {
   uint32_t size = 2 + ((2 + 2) + (m_name->GetSerializedSize ()) + (2 + 2 + 4 + 2 + 2 + (2 + 0)));
   NS_LOG_INFO ("Serialize size = " << size);
@@ -102,7 +102,7 @@
 }
 
 void
-ContentObjectHeader::Serialize (Buffer::Iterator start) const
+ContentObject::Serialize (Buffer::Iterator start) const
 {
   start.WriteU8 (0x80); // version
   start.WriteU8 (0x01); // packet type
@@ -129,54 +129,54 @@
 
 
 uint32_t
-ContentObjectHeader::Deserialize (Buffer::Iterator start)
+ContentObject::Deserialize (Buffer::Iterator start)
 {
   Buffer::Iterator i = start;
 
   if (i.ReadU8 () != 0x80)
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
 
   if (i.ReadU8 () != 0x01)
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
 
   if (i.ReadU16 () != 2) // signature length
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
   
   if (i.ReadU16 () != 0) // signature type
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
 
-  m_name = Create<NameComponents> ();
+  m_name = Create<Name> ();
   uint32_t offset = m_name->Deserialize (i);
   i.Next (offset);
 
   if (i.ReadU16 () != (2 + 4 + 2 + 2 + (2 + 0))) // content length
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
 
   if (i.ReadU16 () != (4 + 2 + 2 + (2 + 0))) // Length (content Info)
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
 
   m_timestamp = Seconds (i.ReadU32 ());
   m_freshness = Seconds (i.ReadU16 ());
 
   if (i.ReadU16 () != 0) // Reserved
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
   if (i.ReadU16 () != 0) // Length (ContentInfoOptions)
-    throw new ContentObjectHeaderException ();
+    throw new ContentObjectException ();
 
   NS_ASSERT_MSG (i.GetDistanceFrom (start) == GetSerializedSize (),
-                 "Something wrong with ContentObjectHeader::Deserialize");
+                 "Something wrong with ContentObject::Deserialize");
   
   return i.GetDistanceFrom (start);
 }
   
 TypeId
-ContentObjectHeader::GetInstanceTypeId (void) const
+ContentObject::GetInstanceTypeId (void) const
 {
   return GetTypeId ();
 }
   
 void
-ContentObjectHeader::Print (std::ostream &os) const
+ContentObject::Print (std::ostream &os) const
 {
   os << "D: " << GetName ();
   // os << "<ContentObject><Name>" << GetName () << "</Name><Content>";
diff --git a/model/ndn-content-object.h b/model/ndn-content-object.h
index 79f04df..db7bdcf 100644
--- a/model/ndn-content-object.h
+++ b/model/ndn-content-object.h
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2011 University of California, Los Angeles
+ * Copyright (c) 2011-2013 University of California, Los Angeles
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -32,7 +32,7 @@
 #include <vector>
 #include <list>
 
-#include "ndn-name-components.h"
+#include "ndn-name.h"
 
 namespace ns3 {
 namespace ndn {
@@ -56,7 +56,7 @@
  * "<ContentObject><Signature>..</Signature><Name>...</Name><SignedInfo>...</SignedInfo><Content>"
  * 
  */
-class ContentObjectHeader : public SimpleRefCount<ContentObjectHeader,Header>
+class ContentObject : public SimpleRefCount<ContentObject,Header>
 {
 public:
   /**
@@ -64,26 +64,26 @@
    *
    * Creates a null header
    **/
-  ContentObjectHeader ();
+  ContentObject ();
 
   /**
    * \brief Set content object name
    *
-   * Sets name of the content object. For example, SetName( NameComponents("prefix")("postfix") );
+   * Sets name of the content object. For example, SetName( Name("prefix")("postfix") );
    **/
   void
-  SetName (const Ptr<NameComponents> &name);
+  SetName (const Ptr<Name> &name);
 
   /**
    * @brief Get name of the content object
    */
-  const NameComponents&
+  const Name&
   GetName () const;
 
   /**
    * @brief Get smart pointer to the interest name (to avoid extra memory usage)
    */
-  Ptr<const NameComponents>
+  Ptr<const Name>
   GetNamePtr () const;
 
   /**
@@ -122,11 +122,13 @@
   virtual uint32_t Deserialize (Buffer::Iterator start); ///< @brief Deserialize the Header
   
 private:
-  Ptr<NameComponents> m_name;
+  Ptr<Name> m_name;
   Time m_freshness;
   Time m_timestamp;
 };
 
+class ContentObjectHeader : public ContentObject { };
+
 /**
  * ContentObjectTail for compatibility with other packet formats
  */
diff --git a/model/ndn-global-router.cc b/model/ndn-global-router.cc
index 8020f43..b3a0b1b 100644
--- a/model/ndn-global-router.cc
+++ b/model/ndn-global-router.cc
@@ -22,7 +22,7 @@
 
 #include "ns3/ndn-l3-protocol.h"
 #include "ns3/ndn-face.h"
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 
 #include "ns3/channel.h"
 
@@ -74,7 +74,7 @@
 }
 
 void
-GlobalRouter::AddLocalPrefix (Ptr< NameComponents > prefix)
+GlobalRouter::AddLocalPrefix (Ptr< Name > prefix)
 {
   m_localPrefixes.push_back (prefix);
 }
diff --git a/model/ndn-global-router.h b/model/ndn-global-router.h
index d277bb8..582b6e1 100644
--- a/model/ndn-global-router.h
+++ b/model/ndn-global-router.h
@@ -35,7 +35,7 @@
 
 class L3Protocol;
 class Face;
-class NameComponents;
+class Name;
 
 /**
  * @brief Class representing global router interface for ndnSIM
@@ -54,7 +54,7 @@
   /**
    * @brief List of locally exported prefixes
    */
-  typedef std::list< Ptr<NameComponents> > LocalPrefixList;
+  typedef std::list< Ptr<Name> > LocalPrefixList;
   
   /**
    * \brief Interface ID
@@ -86,7 +86,7 @@
    * @param prefix Prefix
    */
   void
-  AddLocalPrefix (Ptr< NameComponents > prefix);
+  AddLocalPrefix (Ptr< Name > prefix);
 
   /**
    * @brief Add edge to the node
diff --git a/model/ndn-interest.cc b/model/ndn-interest.cc
index dae23ab..362dfe2 100644
--- a/model/ndn-interest.cc
+++ b/model/ndn-interest.cc
@@ -53,7 +53,7 @@
 }
 
 InterestHeader::InterestHeader (const InterestHeader &interest)
-  : m_name                (Create<NameComponents> (interest.GetName ()))
+  : m_name                (Create<Name> (interest.GetName ()))
   , m_scope               (interest.m_scope)
   , m_interestLifetime    (interest.m_interestLifetime)
   , m_nonce               (interest.m_nonce)
@@ -71,19 +71,19 @@
 }
 
 void
-InterestHeader::SetName (Ptr<NameComponents> name)
+InterestHeader::SetName (Ptr<Name> name)
 {
   m_name = name;
 }
 
-const NameComponents&
+const Name&
 InterestHeader::GetName () const
 {
   if (m_name==0) throw InterestHeaderException();
   return *m_name;
 }
 
-Ptr<const NameComponents>
+Ptr<const Name>
 InterestHeader::GetNamePtr () const
 {
   return m_name;
@@ -186,7 +186,7 @@
   
   m_interestLifetime = Seconds (i.ReadU16 ());
 
-  m_name = Create<NameComponents> ();
+  m_name = Create<Name> ();
   uint32_t offset = m_name->Deserialize (i);
   i.Next (offset);
   
diff --git a/model/ndn-interest.h b/model/ndn-interest.h
index 096dc7b..1ee3010 100644
--- a/model/ndn-interest.h
+++ b/model/ndn-interest.h
@@ -31,7 +31,7 @@
 #include <vector>
 #include <list>
 
-#include "ndn-name-components.h"
+#include "ndn-name.h"
 
 namespace ns3 {
 
@@ -83,7 +83,7 @@
   *        |							           |	
   *        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   * **/
-class InterestHeader : public SimpleRefCount<InterestHeader, Header>
+class Interest : public SimpleRefCount<Interest, Header>
 {
 public:
   /**
@@ -91,34 +91,34 @@
    *
    * Creates a null header
    **/
-  InterestHeader ();
+  Interest ();
 
   /**
    * @brief Copy constructor
    */
-  InterestHeader (const InterestHeader &interest);
+  Interest (const Interest &interest);
 
   /**
    * \brief Set interest name
    *
-   * Sets name of the interest. For example, SetName( ndnNameComponents("prefix")("postfix") );
-   * @param[in] name const pointer to ndnNameComponents object that contains an interest name
+   * Sets name of the interest. For example, SetName( ndnName("prefix")("postfix") );
+   * @param[in] name const pointer to ndnName object that contains an interest name
    **/
   void
-  SetName (Ptr<NameComponents> name);
+  SetName (Ptr<Name> name);
 
   /**
    * \brief Get interest name
    *
    * Gets name of the interest.
    **/
-  const NameComponents&
+  const Name&
   GetName () const;
 
   /**
    * @brief Get smart pointer to the interest name (to avoid extra memory usage)
    */
-  Ptr<const NameComponents>
+  Ptr<const Name>
   GetNamePtr () const;
 
   /**
@@ -245,17 +245,19 @@
   /**
    * @brief Cheat for python bindings
    */
-  static Ptr<InterestHeader>
+  static Ptr<Interest>
   GetInterest (Ptr<Packet> packet);
   
 private:
-  Ptr<NameComponents> m_name;    ///< Interest name
+  Ptr<Name> m_name;    ///< Interest name
   uint8_t m_scope;                ///< 0xFF not set, 0 local scope, 1 this host, 2 immediate neighborhood
   Time  m_interestLifetime;      ///< InterestLifetime
   uint32_t m_nonce;              ///< Nonce. not used if zero
   uint8_t  m_nackType;           ///< Negative Acknowledgement type
 };
 
+class InterestHeader : public Interest { };
+
 /**
  * @ingroup ndn-exceptions
  * @brief Class for Interest parsing exception 
diff --git a/model/ndn-name.cc b/model/ndn-name.cc
index 8e7a872..a1624fb 100644
--- a/model/ndn-name.cc
+++ b/model/ndn-name.cc
@@ -19,7 +19,7 @@
  *         Ilya Moiseenko <iliamo@cs.ucla.edu>
  */
 
-#include "ndn-name-components.h"
+#include "ndn-name.h"
 #include <boost/foreach.hpp>
 #include "ns3/log.h"
 
@@ -33,7 +33,6 @@
 namespace ndn {
 
 ATTRIBUTE_HELPER_CPP (Name);
-ATTRIBUTE_HELPER_CPP (NameComponents);
 
 Name::Name (/* root */)
 {
diff --git a/model/ndn-name.h b/model/ndn-name.h
index 7f24784..2f01f36 100644
--- a/model/ndn-name.h
+++ b/model/ndn-name.h
@@ -302,23 +302,8 @@
 
 ATTRIBUTE_HELPER_HEADER (Name);
 
-/**
- * @ingroup Ndn
- * @brief For backwards compatibility
- */
-class NameComponents : public Name
-{
-public:
-  NameComponents () : Name () { }
-
-  NameComponents (const std::list<boost::reference_wrapper<const std::string> > &components) : Name (components) { }
-
-  NameComponents (const std::string &prefix) : Name (prefix) { }
-
-  NameComponents (const char *prefix) : Name (prefix) { }
-};
-
-ATTRIBUTE_HELPER_HEADER (NameComponents);
+// for backwards compatibility
+typedef Name NameComponents;
 
 } // namespace ndn
 } // namespace ns3
diff --git a/model/ndn-net-device-face.cc b/model/ndn-net-device-face.cc
index 997195f..67dc659 100644
--- a/model/ndn-net-device-face.cc
+++ b/model/ndn-net-device-face.cc
@@ -31,7 +31,7 @@
 // #include "ns3/address.h"
 #include "ns3/point-to-point-net-device.h"
 #include "ns3/channel.h"
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 
 NS_LOG_COMPONENT_DEFINE ("ndn.NetDeviceFace");
 
diff --git a/model/pit/ndn-pit-entry.cc b/model/pit/ndn-pit-entry.cc
index accfcf1..6d16048 100644
--- a/model/pit/ndn-pit-entry.cc
+++ b/model/pit/ndn-pit-entry.cc
@@ -21,7 +21,7 @@
 #include "ndn-pit-entry.h"
 
 #include "ns3/ndn-fib.h"
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 #include "ns3/ndn-interest.h"
 
 #include "ns3/simulator.h"
@@ -82,7 +82,7 @@
 }
 
 
-const NameComponents &
+const Name &
 Entry::GetPrefix () const
 {
   return m_interest->GetName ();
diff --git a/model/pit/ndn-pit-entry.h b/model/pit/ndn-pit-entry.h
index 9680ac2..694fd9f 100644
--- a/model/pit/ndn-pit-entry.h
+++ b/model/pit/ndn-pit-entry.h
@@ -137,7 +137,7 @@
   /**
    * @brief Get prefix of the PIT entry
    */
-  const NameComponents &
+  const Name &
   GetPrefix () const;
 
   /**
diff --git a/model/pit/ndn-pit-impl.h b/model/pit/ndn-pit-impl.h
index 7a346d2..bd86838 100644
--- a/model/pit/ndn-pit-impl.h
+++ b/model/pit/ndn-pit-impl.h
@@ -27,7 +27,7 @@
 
 #include "ndn-pit-entry-impl.h"
 
-#include "ns3/ndn-name-components.h"
+#include "ns3/ndn-name.h"
 
 namespace ns3 {
 namespace ndn {
@@ -42,14 +42,14 @@
  */
 template<class Policy>
 class PitImpl : public Pit
-              , protected ndnSIM::trie_with_policy<NameComponents,
+              , protected ndnSIM::trie_with_policy<Name,
                                                    ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< Policy > > >,
                                                    // ndnSIM::persistent_policy_traits
                                                    Policy
                                                    >
 {
 public:
-  typedef ndnSIM::trie_with_policy<NameComponents,
+  typedef ndnSIM::trie_with_policy<Name,
                                    ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< Policy > > >,
                                    // ndnSIM::persistent_policy_traits
                                    Policy