Flooding forwarding strategy added
diff --git a/examples/ccnx-test.cc b/examples/ccnx-test.cc
index 49a5c00..555ae78 100644
--- a/examples/ccnx-test.cc
+++ b/examples/ccnx-test.cc
@@ -49,7 +49,7 @@
CcnxConsumerHelper helper ("/3");
ApplicationContainer app = helper.Install ("1");
app.Start (Seconds (1.0));
- app.Stop (Seconds (1.05));
+ app.Stop (Seconds (10.05));
/**
* \brief Add forwarding entry in FIB
diff --git a/helper/ccnx-consumer-helper.cc b/helper/ccnx-consumer-helper.cc
index 765f6b6..adb3c6e 100644
--- a/helper/ccnx-consumer-helper.cc
+++ b/helper/ccnx-consumer-helper.cc
@@ -19,10 +19,8 @@
*/
#include "ccnx-consumer-helper.h"
-#include "ns3/inet-socket-address.h"
-#include "ns3/packet-socket-address.h"
-#include "ns3/string.h"
-#include "ns3/names.h"
+
+NS_LOG_COMPONENT_DEFINE ("CcnxConsumerHelper");
namespace ns3
{
diff --git a/helper/ccnx-consumer-helper.h b/helper/ccnx-consumer-helper.h
index d885e2e..7d0011f 100644
--- a/helper/ccnx-consumer-helper.h
+++ b/helper/ccnx-consumer-helper.h
@@ -34,6 +34,9 @@
#include "ns3/ccnx-local-face.h"
#include "ns3/callback.h"
#include "ns3/ccnx-consumer.h"
+#include "ns3/log.h"
+#include "ns3/string.h"
+#include "ns3/names.h"
namespace ns3
{
diff --git a/helper/ccnx-forwarding-helper.cc b/helper/ccnx-forwarding-helper.cc
index 8f01194..c840d7a 100644
--- a/helper/ccnx-forwarding-helper.cc
+++ b/helper/ccnx-forwarding-helper.cc
@@ -1,6 +1,6 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2008 INRIA
+ * Copyright (c) 2011 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
@@ -15,8 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
*/
+
#include "ns3/node.h"
#include "ns3/node-list.h"
#include "ns3/simulator.h"
@@ -25,10 +26,36 @@
namespace ns3 {
-CcnxForwardingHelper::~CcnxForwardingHelper ()
+CcnxForwardingHelper::CcnxForwardingHelper()
{
+ m_strategy = Ccnx::NDN_FLOODING;
+}
+
+CcnxForwardingHelper::CcnxForwardingHelper(Ccnx::ForwardingStrategy strategy)
+{
+ m_strategy = strategy;
}
+CcnxForwardingHelper::~CcnxForwardingHelper ()
+{
+
+}
+
+void
+CcnxForwardingHelper::SetForwarding(Ptr<Ccnx> ccnx) const
+{
+ if(m_strategy == Ccnx::NDN_FLOODING)
+ {
+ Ptr<CcnxFloodingStrategy> ccnxForwarding = CreateObject<CcnxFloodingStrategy> ();
+ ccnxForwarding->SetCcnx(ccnx);
+ ccnx->SetForwardingStrategy (ccnxForwarding);
+ }
+ else if(m_strategy == Ccnx::NDN_BESTROUTE)
+ {}
+ else if (m_strategy == Ccnx::NDN_RANKING)
+ {}
+}
+
// void
// CcnxForwardingHelper::PrintForwardingTableAllAt (Time printTime, Ptr<OutputStreamWrapper> stream) const
// {
diff --git a/helper/ccnx-forwarding-helper.h b/helper/ccnx-forwarding-helper.h
index 8ac041e..c40bc12 100644
--- a/helper/ccnx-forwarding-helper.h
+++ b/helper/ccnx-forwarding-helper.h
@@ -1,6 +1,6 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2008 INRIA
+ * Copyright (c) 2011 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
@@ -15,18 +15,20 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
*/
+
#ifndef CCNX_FORWARDING_HELPER_H
#define CCNX_FORWARDING_HELPER_H
#include "ns3/ptr.h"
#include "ns3/nstime.h"
#include "ns3/output-stream-wrapper.h"
+#include "ns3/ccnx.h"
+#include "ns3/ccnx-flooding-strategy.h"
namespace ns3 {
-class CcnxForwardingStrategy;
class Node;
/**
@@ -39,26 +41,27 @@
class CcnxForwardingHelper
{
public:
+
+ /*
+ * \brief Default constructor, which sets NDN_FLOODING forwarding strategy
+ */
+ CcnxForwardingHelper();
+
+ /*
+ * \brief This constructor sets a specified forwarding strategy
+ */
+ CcnxForwardingHelper(Ccnx::ForwardingStrategy strategy);
+
/*
* Destroy an instance of an CcnxForwardingHelper
*/
- virtual ~CcnxForwardingHelper ();
+ ~CcnxForwardingHelper ();
- /**
- * \brief virtual constructor
- * \returns pointer to clone of this CcnxForwardingHelper
- *
- * This method is mainly for internal use by the other helpers;
- * clients are expected to free the dynamic memory allocated by this method
+ /*
+ * \brief creates a specified ForwardingStrategy object and binds it to Ccnx
*/
- virtual CcnxForwardingHelper* Copy () const = 0;
-
- /**
- * \param node the node within which the new forwarding protocol will run
- * \returns a newly-created forwarding protocol
- */
- virtual Ptr<CcnxForwardingStrategy> Create (Ptr<Node> node) const = 0;
-
+ void SetForwarding(Ptr<Ccnx> ccnx) const;
+
/**
* \brief prints the forwarding tables of all nodes at a particular time.
* \param printTime the time at which the forwarding table is supposed to be printed.
@@ -106,6 +109,7 @@
void PrintForwardingTableEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
private:
+ Ccnx::ForwardingStrategy m_strategy;
void Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
void PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
};
diff --git a/helper/ccnx-producer-helper.cc b/helper/ccnx-producer-helper.cc
index 433a15a..c3ec37e 100644
--- a/helper/ccnx-producer-helper.cc
+++ b/helper/ccnx-producer-helper.cc
@@ -19,8 +19,8 @@
*/
#include "ccnx-producer-helper.h"
-#include "ns3/string.h"
-#include "ns3/names.h"
+
+NS_LOG_COMPONENT_DEFINE ("CcnxProducerHelper");
namespace ns3
{
@@ -40,6 +40,7 @@
ApplicationContainer
CcnxProducerHelper::Install (Ptr<Node> node)
{
+ NS_LOG_FUNCTION(this);
return ApplicationContainer (InstallPriv (node));
}
@@ -72,6 +73,7 @@
Ptr<Application>
CcnxProducerHelper::InstallPriv (Ptr<Node> node)
{
+ NS_LOG_INFO ("InstallPriv started");
Ptr<CcnxLocalFace> localFace = Create<CcnxLocalFace> ();
localFace->SetNode(node);
diff --git a/helper/ccnx-producer-helper.h b/helper/ccnx-producer-helper.h
index eda0d04..ca2dd7a 100644
--- a/helper/ccnx-producer-helper.h
+++ b/helper/ccnx-producer-helper.h
@@ -36,6 +36,9 @@
#include "ns3/ccnx-producer.h"
#include "ns3/uinteger.h"
#include "ns3/ccnx-stack-helper.h"
+#include "ns3/log.h"
+#include "ns3/string.h"
+#include "ns3/names.h"
namespace ns3
{
diff --git a/helper/ccnx-stack-helper.cc b/helper/ccnx-stack-helper.cc
index 428ddef..e1a554a 100644
--- a/helper/ccnx-stack-helper.cc
+++ b/helper/ccnx-stack-helper.cc
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
/**
@@ -57,7 +57,6 @@
#include "ns3/log.h"
#include "ns3/object.h"
#include "ns3/names.h"
-#include "ns3/ccnx.h"
#include "ns3/packet-socket-factory.h"
#include "ns3/config.h"
#include "ns3/simulator.h"
@@ -112,10 +111,17 @@
static FaceFileMapCcnx g_faceFileMapCcnx; /**< A mapping of Ccnx/face pairs to pcap files */
static FaceStreamMapCcnx g_faceStreamMapCcnx; /**< A mapping of Ccnx/face pairs to ascii streams */
+
CcnxStackHelper::CcnxStackHelper ()
+ : m_forwardingHelper (Ccnx::NDN_FLOODING)
{
}
-
+
+CcnxStackHelper::CcnxStackHelper (Ccnx::ForwardingStrategy strategy)
+ : m_forwardingHelper (strategy)
+{
+}
+
CcnxStackHelper::~CcnxStackHelper ()
{
}
@@ -135,10 +141,10 @@
}
void
-CcnxStackHelper::SetForwardingHelper (const CcnxForwardingHelper &forwarding)
+CcnxStackHelper::SetForwardingStrategy (Ccnx::ForwardingStrategy strategy)
{
- // delete m_forwarding;
- // m_forwarding = forwarding.Copy ();
+ CcnxForwardingHelper newForwardingHelper (strategy);
+ m_forwardingHelper = newForwardingHelper;
}
Ptr<CcnxFaceContainer>
@@ -191,11 +197,15 @@
Ptr<CcnxNetDeviceFace> face = Create<CcnxNetDeviceFace> (node->GetDevice (index));
face->SetNode (node);
uint32_t __attribute__ ((unused)) face_id = ccnx->AddFace (face);
- NS_LOG_LOGIC ("Node " << node->GetId () << ": added CcxnNetDeviceFace as face #" << face_id);
+ NS_LOG_LOGIC ("Node " << node->GetId () << ": added CcnxNetDeviceFace as face #" << face_id);
+ face->SetUp ();
faces->Add (face);
}
- // Ptr<CcnxForwardingStrategy> ccnxForwarding = m_forwarding->Create (node);
+
+ m_forwardingHelper.SetForwarding(ccnx);
+
+ // Ptr<CcnxForwardingStrategy> ccnxForwarding = m_forwarding->Create (node);
// ccnx->SetForwardingStrategy (ccnxForwarding);
return faces;
diff --git a/helper/ccnx-stack-helper.h b/helper/ccnx-stack-helper.h
index 1e587e3..78cc121 100644
--- a/helper/ccnx-stack-helper.h
+++ b/helper/ccnx-stack-helper.h
@@ -15,7 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author:
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ * Ilya Moiseenko <iliamo@cs.ucla.edu>
*/
#ifndef CCNX_STACK_HELPER_H
@@ -26,11 +27,12 @@
#include "ns3/object-factory.h"
#include "ccnx-trace-helper.h"
+#include "ns3/ccnx-forwarding-helper.h"
+#include "ns3/ccnx.h"
namespace ns3 {
class Node;
-class CcnxForwardingHelper;
class CcnxFaceContainer;
/**
@@ -58,11 +60,14 @@
{
public:
/**
- * \brief Create a new CcnxStackHelper with empty forwarding by default.
- *
- * \todo set non-empty default forwarding
+ * \brief Create a new CcnxStackHelper with a default NDN_FLOODING forwarding stategy
*/
- CcnxStackHelper ();
+ CcnxStackHelper();
+
+ /**
+ * \brief Create a new CcnxStackHelper with a specified forwarding strategy
+ */
+ CcnxStackHelper (Ccnx::ForwardingStrategy);
/**
* \brief Destroy the CcnxStackHelper
@@ -82,7 +87,7 @@
* a single ns3::Ccnx object through its ns3::Ccnx::SetforwardingProtocol.
*/
void
- SetForwardingHelper (const CcnxForwardingHelper &forwarding);
+ SetForwardingStrategy (Ccnx::ForwardingStrategy strategy);
/**
* \brief Install CCNx stack on the node
@@ -148,6 +153,8 @@
AddRoute (std::string nodeName, std::string prefix, uint32_t faceId, int32_t metric);
private:
+ CcnxForwardingHelper m_forwardingHelper;
+
/**
* @brief Enable pcap output the indicated Ccnx and interface pair.
* @internal
diff --git a/model/ccnx-flooding-strategy.cc b/model/ccnx-flooding-strategy.cc
new file mode 100644
index 0000000..5bb4647
--- /dev/null
+++ b/model/ccnx-flooding-strategy.cc
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2011 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
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
+ */
+
+#include "ccnx-flooding-strategy.h"
+#include "ns3/assert.h"
+
+#include "ccnx-route.h"
+
+NS_LOG_COMPONENT_DEFINE ("CcnxFloodingStrategy");
+
+namespace ns3
+{
+
+NS_OBJECT_ENSURE_REGISTERED (CcnxFloodingStrategy);
+
+TypeId CcnxFloodingStrategy::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::CcnxFloodingStrategy")
+ .SetGroupName ("Ccnx")
+ .SetParent<Object> ()
+ ;
+ return tid;
+}
+
+CcnxFloodingStrategy::CcnxFloodingStrategy ()
+{
+}
+
+
+bool
+CcnxFloodingStrategy::PropagateInterest (const Ptr<CcnxFace> &incomingFace,
+ Ptr<CcnxInterestHeader> &header,
+ const Ptr<const Packet> &packet,
+ SendCallback ucb)
+{
+ //CcnxFibEntryContainer::type::iterator fibEntryArray = GetFib()->LongestPrefixMatch(*header);
+ NS_LOG_FUNCTION(this);
+
+ CcnxFibEntryContainer::type::iterator fibEntryArray = GetCcnx()->GetObject<CcnxFib>()->LongestPrefixMatch(*header);
+ NS_LOG_INFO(*fibEntryArray);
+
+ int count = 0;
+ for(CcnxFibFaceMetricContainer::type::iterator face = fibEntryArray->m_faces.begin ();
+ face != fibEntryArray->m_faces.end ();
+ face++)
+ {
+ if(face->m_face == incomingFace)
+ continue;
+
+ NS_LOG_INFO("count="<<count);
+ ucb (face->m_face, header, packet->Copy());
+ count++;
+ }
+
+ /*const CcnxFibEntryContainer& s,
+
+ for (CcnxFibEntryContainer::type::iterator entry = fibEntryArray.begin ();
+ entry != fibEntryArray.end ();
+ entry++)
+ {
+
+ const typename boost::multi_index::index<CcnxFibEntryContainer, Tag>::type& i = get<Tag>(s);
+
+ typedef typename CcnxFibEntryContainer::value_type value_type;
+
+ for(const CcnxFibEntryContainer& c = i.begin(); c != i.end (); c++)
+ {
+ c->
+ }
+
+ for(nth_index<CcnxFibEntryContainer,1>::type::iterator it1=get<i_prefix>(entry).begin();
+ it1!=get<i_prefix>(entry).end();++it1)
+ {
+ //std::cout<<it1->name()<<std::endl;
+
+ CcnxFibFaceMetricContainer faceContainer = it1->m_faces;
+
+ const typename boost::multi_index::index<CcnxFibFaceMetricContainer, __ccnx_private::i_face>::type& i = get<__ccnx_private::i_face>(faceContainer);
+
+ //typedef typename CcnxFibEntryContainer::value_type value_type;
+
+ for(const CcnxFibFaceMetricContainer& c = i.begin(); c != i.end (); c++)
+ {
+ Ptr<CcnxFace> face = c->m_face;
+
+ typedef
+ Callback<void, const Ptr<CcnxFace> &, const Ptr<CcnxInterestHeader> &, const Ptr<Packet> &>
+ SendCallback;
+
+ ucb (face, header, packet);
+ }
+
+ }
+
+
+ // obtain a reference to the index tagged by Tag
+
+ const typename boost::multi_index::index<MultiIndexContainer,Tag>::type& i=
+ get<Tag>(s);
+
+ typedef typename MultiIndexContainer::value_type value_type;
+
+ // dump the elements of the index to cout
+
+ std::copy(i.begin(),i.end(),std::ostream_iterator<value_type>(std::cout));
+ */
+
+ if(count == 0)
+ return false;
+ else
+ return true;
+}
+
+} //namespace ns3
diff --git a/model/ccnx-flooding-strategy.h b/model/ccnx-flooding-strategy.h
new file mode 100644
index 0000000..e79a604
--- /dev/null
+++ b/model/ccnx-flooding-strategy.h
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2011 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
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
+ */
+
+
+#ifndef CCNX_FLOODING_STRATEGY_H
+#define CCNX_FLOODING_STRATEGY_H
+
+#include "ns3/packet.h"
+#include "ns3/callback.h"
+#include "ns3/object.h"
+#include "ns3/log.h"
+
+#include "ccnx-forwarding-strategy.h"
+#include "ccnx.h"
+#include "ccnx-fib.h"
+
+namespace ns3
+{
+
+class CcnxFace;
+class CcnxInterestHeader;
+
+/**
+* \ingroup ccnx
+* \brief Flooding strategy
+*/
+
+class CcnxFloodingStrategy : public CcnxForwardingStrategy
+{
+public:
+ static TypeId GetTypeId (void);
+
+ CcnxFloodingStrategy ();
+
+ bool PropagateInterest (const Ptr<CcnxFace> &incomingFace,
+ Ptr<CcnxInterestHeader> &header,
+ const Ptr<const Packet> &packet,
+ SendCallback ucb);
+};
+
+} //namespace ns3
+
+#endif /* CCNX_FLOODING_STRATEGY_H */
diff --git a/model/ccnx-forwarding-strategy.cc b/model/ccnx-forwarding-strategy.cc
index b2aa342..b296959 100644
--- a/model/ccnx-forwarding-strategy.cc
+++ b/model/ccnx-forwarding-strategy.cc
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2009 University of Washington
+ * Copyright (c) 2011 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
@@ -14,6 +14,9 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ * Ilya Moiseenko <iliamo@cs.ucla.edu>
*/
#include "ns3/assert.h"
@@ -34,10 +37,20 @@
return tid;
}
-CcnxForwardingStrategy::CcnxForwardingStrategy (Ptr<CcnxFib> fib)
+CcnxForwardingStrategy::CcnxForwardingStrategy ()
{
- m_fib = fib;
}
-
+void
+CcnxForwardingStrategy::SetCcnx(Ptr<Ccnx> ccnx)
+{
+ m_ccnx = ccnx;
+}
+
+Ptr<Ccnx>
+CcnxForwardingStrategy::GetCcnx()
+{
+ return m_ccnx;
+}
+
} //namespace ns3
diff --git a/model/ccnx-forwarding-strategy.h b/model/ccnx-forwarding-strategy.h
index 0e6134e..6b4a832 100644
--- a/model/ccnx-forwarding-strategy.h
+++ b/model/ccnx-forwarding-strategy.h
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2009 University of Washington
+ * Copyright (c) 2011 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
@@ -15,7 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ * Ilya Moiseenko <iliamo@cs.ucla.edu>
*/
#ifndef CCNX_FORWARDING_STRATEGY_H
#define CCNX_FORWARDING_STRATEGY_H
@@ -41,8 +42,10 @@
public:
static TypeId GetTypeId (void);
- CcnxForwardingStrategy (Ptr<CcnxFib> fib);
-
+ CcnxForwardingStrategy ();
+
+ void SetCcnx(Ptr<Ccnx> ccnx);
+
typedef
Callback<void, const Ptr<CcnxFace> &, const Ptr<CcnxInterestHeader> &, const Ptr<Packet> &>
SendCallback;
@@ -51,9 +54,10 @@
Ptr<CcnxInterestHeader> &header,
const Ptr<const Packet> &packet,
SendCallback ucb) = 0;
-
-private:
- Ptr<CcnxFib> m_fib; ///< \brief FIB
+ Ptr<Ccnx> GetCcnx();
+
+private:
+ Ptr<Ccnx> m_ccnx;
};
} //namespace ns3
diff --git a/model/ccnx-net-device-face.cc b/model/ccnx-net-device-face.cc
index 8304711..a903da7 100644
--- a/model/ccnx-net-device-face.cc
+++ b/model/ccnx-net-device-face.cc
@@ -78,6 +78,7 @@
void
CcnxNetDeviceFace::RegisterProtocolHandler (ProtocolHandler handler)
{
+ NS_LOG_FUNCTION(this);
NS_ASSERT_MSG (m_netDevice != 0, "CcnxNetDeviceFace needs to be assigned NetDevice first");
m_protocolHandler = handler;