Receive method for localFace
diff --git a/model/ccnx-local-face.cc b/model/ccnx-local-face.cc
index 80b0b52..36cad40 100644
--- a/model/ccnx-local-face.cc
+++ b/model/ccnx-local-face.cc
@@ -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>
*
*/
@@ -29,7 +30,8 @@
NS_LOG_COMPONENT_DEFINE ("CcnxLocalFace");
-namespace ns3 {
+namespace ns3
+{
NS_OBJECT_ENSURE_REGISTERED (CcnxLocalFace);
@@ -78,6 +80,13 @@
// m_device->Send (p, m_device->GetBroadcast (),
// CcnxL3Protocol::PROT_NUMBER);
}
+
+void
+CcnxLocalFace::Receive (Ptr<Packet> p)
+{
+ //ypedef Callback<void,const Ptr<CcnxFace>&,const Ptr<const Packet>& > ProtocolHandler;
+ m_protocolHandler ((const Ptr<CcnxFace>)this,(const Ptr<Packet>)p);
+}
std::ostream& operator<< (std::ostream& os, const CcnxLocalFace &localFace)
{
diff --git a/model/ccnx-local-face.h b/model/ccnx-local-face.h
index 792ef4d..3510eba 100644
--- a/model/ccnx-local-face.h
+++ b/model/ccnx-local-face.h
@@ -15,14 +15,17 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Authors:
+ * Authors: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ Ilya Moiseenko <iliamo@cs.ucla.edu>
*/
+
#ifndef CCNX_LOCAL_FACE_H
#define CCNX_LOCAL_FACE_H
#include "ccnx-face.h"
-namespace ns3 {
+namespace ns3
+{
/**
* \ingroup ccnx-face
@@ -57,6 +60,8 @@
virtual void Send (Ptr<Packet> p);
+ void Receive (Ptr<Packet> p);
+
////////////////////////////////////////////////////////////////////
/// \todo Need methods to implement application hooks