Change in CcnxApp API.  Now callbacks also contain pointer of original
packet (useful to get packet tags, if they exist)

Reflecting changes in PackegTag API

Rescanning bindings

More work on packet-path-weight tracers
diff --git a/apps/ccnx-app.cc b/apps/ccnx-app.cc
index cc5e9b2..5093cf7 100644
--- a/apps/ccnx-app.cc
+++ b/apps/ccnx-app.cc
@@ -84,14 +84,14 @@
 }
     
 void
-CcnxApp::OnInterest (const Ptr<const CcnxInterestHeader> &interest)
+CcnxApp::OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet)
 {
   NS_LOG_FUNCTION (this << interest);
   m_receivedInterests (interest, this, m_face);
 }
 
 void
-CcnxApp::OnNack (const Ptr<const CcnxInterestHeader> &interest)
+CcnxApp::OnNack (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet)
 {
   NS_LOG_FUNCTION (this << interest);
   m_receivedNacks (interest, this, m_face);
@@ -99,7 +99,7 @@
 
 void
 CcnxApp::OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
-                          const Ptr<const Packet> &payload)
+                          Ptr<Packet> payload)
 {
   NS_LOG_FUNCTION (this << contentObject << payload);
   m_receivedContentObjects (contentObject, payload, this, m_face);
diff --git a/apps/ccnx-app.h b/apps/ccnx-app.h
index ae52048..80a789c 100644
--- a/apps/ccnx-app.h
+++ b/apps/ccnx-app.h
@@ -65,25 +65,27 @@
   /**
    * @brief Method that will be called every time new Interest arrives
    * @param interest Interest header
+   * @param packet   "Payload" of the interests packet. The actual payload should be zero, but packet itself
+   *                 may be useful to get packet tags
    */
   virtual void
-  OnInterest (const Ptr<const CcnxInterestHeader> &interest);
+  OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet);
 
   /**
    * @brief Method that will be called every time new NACK arrives
    * @param interest Interest header
    */
   virtual void
-  OnNack (const Ptr<const CcnxInterestHeader> &interest);
+  OnNack (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet);
   
   /**
    * @brief Method that will be called every time new ContentObject arrives
    * @param contentObject ContentObject header
-   * @param payload payload (potentially virtual) of the ContentObject packet
+   * @param payload payload (potentially virtual) of the ContentObject packet (may include packet tags of original packet)
    */
   virtual void
   OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
-                   const Ptr<const Packet> &payload);
+                   Ptr<Packet> payload);
         
 protected:
   virtual void
diff --git a/apps/ccnx-consumer-window.cc b/apps/ccnx-consumer-window.cc
index 060b2cc..1dd8369 100644
--- a/apps/ccnx-consumer-window.cc
+++ b/apps/ccnx-consumer-window.cc
@@ -145,7 +145,7 @@
 
 void
 CcnxConsumerWindow::OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
-                               const Ptr<const Packet> &payload)
+                                     Ptr<Packet> payload)
 {
   CcnxConsumer::OnContentObject (contentObject, payload);
 
@@ -156,9 +156,9 @@
 }
 
 void
-CcnxConsumerWindow::OnNack (const Ptr<const CcnxInterestHeader> &interest)
+CcnxConsumerWindow::OnNack (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> payload)
 {
-  CcnxConsumer::OnNack (interest);
+  CcnxConsumer::OnNack (interest, payload);
   if (m_inFlight > static_cast<uint32_t> (0)) m_inFlight--;
 
   if (m_window > static_cast<uint32_t> (0))
diff --git a/apps/ccnx-consumer-window.h b/apps/ccnx-consumer-window.h
index 0c24551..21a9759 100644
--- a/apps/ccnx-consumer-window.h
+++ b/apps/ccnx-consumer-window.h
@@ -47,11 +47,11 @@
   // OnInterest (const Ptr<const CcnxInterestHeader> &interest);
 
   virtual void
-  OnNack (const Ptr<const CcnxInterestHeader> &interest);
+  OnNack (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> payload);
 
   virtual void
   OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
-                   const Ptr<const Packet> &payload);
+                   Ptr<Packet> payload);
 
   virtual void
   OnTimeout (uint32_t sequenceNumber);
diff --git a/apps/ccnx-consumer.cc b/apps/ccnx-consumer.cc
index 6c58bc7..c81e464 100644
--- a/apps/ccnx-consumer.cc
+++ b/apps/ccnx-consumer.cc
@@ -254,7 +254,7 @@
 
 void
 CcnxConsumer::OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
-                               const Ptr<const Packet> &payload)
+                               Ptr<Packet> payload)
 {
   if (!m_active) return;
 
@@ -284,11 +284,11 @@
 }
 
 void
-CcnxConsumer::OnNack (const Ptr<const CcnxInterestHeader> &interest)
+CcnxConsumer::OnNack (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> origPacket)
 {
   if (!m_active) return;
   
-  CcnxApp::OnNack (interest); // tracing inside
+  CcnxApp::OnNack (interest, origPacket); // tracing inside
   
   NS_LOG_DEBUG ("Nack type: " << interest->GetNack ());
   boost::mutex::scoped_lock (m_seqTimeoutsGuard);
diff --git a/apps/ccnx-consumer.h b/apps/ccnx-consumer.h
index e53ff89..9f2ae53 100644
--- a/apps/ccnx-consumer.h
+++ b/apps/ccnx-consumer.h
@@ -62,11 +62,11 @@
   // OnInterest (const Ptr<const CcnxInterestHeader> &interest);
 
   virtual void
-  OnNack (const Ptr<const CcnxInterestHeader> &interest);
+  OnNack (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet);
 
   virtual void
   OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
-                   const Ptr<const Packet> &payload);
+                   Ptr<Packet> payload);
 
   virtual void
   OnTimeout (uint32_t sequenceNumber);
diff --git a/apps/ccnx-hijacker.cc b/apps/ccnx-hijacker.cc
index 0bcad9d..f09b098 100644
--- a/apps/ccnx-hijacker.cc
+++ b/apps/ccnx-hijacker.cc
@@ -98,9 +98,9 @@
 
 
 void
-CcnxHijacker::OnInterest (const Ptr<const CcnxInterestHeader> &interest)
+CcnxHijacker::OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet)
 {
-  CcnxApp::OnInterest (interest); // tracing inside
+  CcnxApp::OnInterest (interest, packet); // tracing inside
 
   NS_LOG_FUNCTION (this << interest);
 
diff --git a/apps/ccnx-hijacker.h b/apps/ccnx-hijacker.h
index 20adf46..3269599 100644
--- a/apps/ccnx-hijacker.h
+++ b/apps/ccnx-hijacker.h
@@ -39,7 +39,7 @@
   CcnxHijacker ();
 
   // inherited from CcnxApp
-  void OnInterest (const Ptr<const CcnxInterestHeader> &interest);
+  void OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet);
 
 protected:
   // inherited from Application base class.
diff --git a/apps/ccnx-producer.cc b/apps/ccnx-producer.cc
index 48c8991..cff6af4 100644
--- a/apps/ccnx-producer.cc
+++ b/apps/ccnx-producer.cc
@@ -98,9 +98,9 @@
 
 
 void
-CcnxProducer::OnInterest (const Ptr<const CcnxInterestHeader> &interest)
+CcnxProducer::OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> origPacket)
 {
-  CcnxApp::OnInterest (interest); // tracing inside
+  CcnxApp::OnInterest (interest, origPacket); // tracing inside
 
   NS_LOG_FUNCTION (this << interest);
 
diff --git a/apps/ccnx-producer.h b/apps/ccnx-producer.h
index a239d84..45794b2 100644
--- a/apps/ccnx-producer.h
+++ b/apps/ccnx-producer.h
@@ -39,7 +39,7 @@
   CcnxProducer ();
 
   // inherited from CcnxApp
-  void OnInterest (const Ptr<const CcnxInterestHeader> &interest);
+  void OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet);
 
 protected:
   // inherited from Application base class.
diff --git a/apps/stupid-interest-generator.cc b/apps/stupid-interest-generator.cc
deleted file mode 100644
index 8606117..0000000
--- a/apps/stupid-interest-generator.cc
+++ /dev/null
@@ -1,177 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-//
-//  ndn_stupidinterestgenerator.cpp
-//  Abstraction
-//
-//  Created by Ilya Moiseenko on 05.08.11.
-//  Copyright 2011 UCLA. All rights reserved.
-//
-
-#include "stupid-interest-generator.h"
-
-#include "ns3/socket-factory.h"
-#include "ns3/simulator.h"
-
-#include "ns3/ccnx-interest-header.h"
-#include "ns3/ccnx-content-object-header.h"
-
-NS_LOG_COMPONENT_DEFINE ("StupidInterestGenerator");
-
-namespace ns3
-{
-    
-NS_OBJECT_ENSURE_REGISTERED (StupidInterestGenerator);
-    
-TypeId
-StupidInterestGenerator::GetTypeId (void)
-{
-	static TypeId tid = TypeId ("ns3::StupidInterestGenerator")
-        .SetParent<Application> ()
-        .AddConstructor<StupidInterestGenerator> ()
-        .AddAttribute ("Remote", "The address of the destination",
-                       AddressValue (),
-                       MakeAddressAccessor (&StupidInterestGenerator::m_peer),
-                       MakeAddressChecker ())
-        .AddAttribute ("OffTime", "Time interval between packets",
-                       TimeValue (Seconds (0.1)),
-                       MakeTimeAccessor (&StupidInterestGenerator::m_offTime),
-                       MakeTimeChecker ())
-        .AddAttribute ("Protocol", "The type of protocol to use.",
-                       TypeIdValue (UdpSocketFactory::GetTypeId ()),
-                       MakeTypeIdAccessor (&StupidInterestGenerator::m_tid),
-                       MakeTypeIdChecker ())
-        ;
-	return tid;
-}
-
-StupidInterestGenerator::StupidInterestGenerator ()
-{
-	NS_LOG_FUNCTION_NOARGS ();
-	m_socket = 0;
-	//m_connected = false;
-	//m_residualBits = 0;
-	//m_lastStartTime = Seconds (0);
-	//m_totBytes = 0;
-}
-    
-StupidInterestGenerator::~StupidInterestGenerator()
-{
-	NS_LOG_FUNCTION_NOARGS ();
-}
-    
-void
-StupidInterestGenerator::DoDispose (void)
-{
-	NS_LOG_FUNCTION_NOARGS ();
-        
-	m_socket = 0;
-	// chain up
-	Application::DoDispose ();
-}
-    
-// Application Methods
-void StupidInterestGenerator::StartApplication () // Called at time specified by Start
-{
-	NS_LOG_FUNCTION_NOARGS ();
-        
-	// Create the socket if not already
-	if (!m_socket)
-	{
-		m_socket = Socket::CreateSocket (GetNode (), m_tid);
-		m_socket->Bind ();
-		m_socket->Connect (m_peer);
-		m_socket->SetAllowBroadcast (true);
-		m_socket->ShutdownRecv ();
-	}
-	// Insure no pending event
-	CancelEvents ();
-	// If we are not yet connected, there is nothing to do here
-	// The ConnectionComplete upcall will start timers at that time
-	//if (!m_connected) return;
-	ScheduleStartEvent ();
-}
-    
-void StupidInterestGenerator::StopApplication () // Called at time specified by Stop
-{
-	NS_LOG_FUNCTION_NOARGS ();
-        
-	CancelEvents ();
-	if(m_socket != 0)
-	{
-		m_socket->Close ();
-	}
-	else
-	{
-		NS_LOG_WARN ("OnOffApplication found null socket to close in StopApplication");
-	}
-}
-    
-void StupidInterestGenerator::CancelEvents ()
-{
-	NS_LOG_FUNCTION_NOARGS ();
-        
-	Simulator::Cancel (m_sendEvent);
-	Simulator::Cancel (m_startStopEvent);
-}
-
-void StupidInterestGenerator::ScheduleStartEvent ()
-{  // Schedules the event to start sending data (switch to the "On" state)
-	NS_LOG_FUNCTION_NOARGS ();
-        
-	Time offInterval = Seconds (m_offTime);
-	NS_LOG_LOGIC ("start at " << offInterval);
-	m_startStopEvent = Simulator::Schedule (offInterval, &StupidInterestGenerator::StartSending, this);
-}
-    
-// Event handlers
-void StupidInterestGenerator::StartSending ()
-{
-	NS_LOG_FUNCTION_NOARGS ();
-	//m_lastStartTime = Simulator::Now ();
-	ScheduleNextTx ();  // Schedule the send packet event
-	//ScheduleStopEvent ();
-}
-    
-void StupidInterestGenerator::StopSending ()
-{
-	NS_LOG_FUNCTION_NOARGS ();
-	CancelEvents ();
-        
-	ScheduleStartEvent ();
-}
-    
-// Private helpers
-void StupidInterestGenerator::ScheduleNextTx ()
-{
-	NS_LOG_FUNCTION_NOARGS ();
-        
-
-	Time nextTime = Seconds(0.); //send now
-	m_sendEvent = Simulator::Schedule (nextTime,
-									   &StupidInterestGenerator::SendPacket, this);
-}
-
-        
-void StupidInterestGenerator::SendPacket ()
-{
-	// NS_LOG_FUNCTION_NOARGS ();
-	// NS_LOG_LOGIC ("sending packet at " << Simulator::Now ());
-	// NS_ASSERT (m_sendEvent.IsExpired ());
-        
-	// NameBuilder name;
-	// name("prefix1")("prefix2")("filename");
-	CcnxInterestHeader ();
-
-	CcnxContentObjectHeader ();
-		
-	// const ccn_charbuf *output = name.GetName();
-	// Ptr<InterestPacket> packet = Create<InterestPacket>(name,(uint32_t)output->length);
-	// packet->AddTimeout(4000);
-	// UniformVariable var;
-	// packet->AddNonce(var.GetInteger(1,10000));
-	// m_socket->Send(packet);
-        
-	// ScheduleStartEvent();
-}
-
-}
diff --git a/apps/stupid-interest-generator.h b/apps/stupid-interest-generator.h
deleted file mode 100644
index f4fb287..0000000
--- a/apps/stupid-interest-generator.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-//
-//  ndn_stupidinterestgenerator.h
-//  Abstraction
-//
-//  Created by Ilya Moiseenko on 05.08.11.
-//  Copyright 2011 UCLA. All rights reserved.
-//
-
-#include "ns3/application.h"
-#include "ns3/log.h"
-#include "ns3/address.h"
-#include "ns3/random-variable.h"
-#include "ns3/nstime.h"
-#include "ns3/event-id.h"
-#include "ns3/ptr.h"
-#include "ns3/udp-socket-factory.h"
-#include "ns3/socket.h"
-
-namespace ns3 
-{
-
-//namespace NDNabstraction
-//{
-    class Socket; //dynamic linking works in a somehow strange way
-    
-    class StupidInterestGenerator: public Application
-    {
-    public: 
-        static TypeId GetTypeId (void);
-        
-        StupidInterestGenerator ();
-        
-        virtual ~StupidInterestGenerator();
-        
-                
-    protected:
-        virtual void DoDispose (void);
-    private:
-        // inherited from Application base class.
-        virtual void StartApplication (void);    // Called at time specified by Start
-        virtual void StopApplication (void);     // Called at time specified by Stop
-        
-        //Time m_onTime;
-        Time m_offTime;
-        
-        Address         m_peer;         // Peer address
-        Ptr<Socket>     m_socket;
-        EventId         m_startStopEvent;     // Event id for next start or stop event
-        EventId         m_sendEvent;    // Eventid of pending "send packet" event
-        TypeId          m_tid;
-        
-        //helpers
-        void CancelEvents ();
-        
-        void Construct (Ptr<Node> n,
-                        const Address &remote,
-                        std::string tid,
-                        const RandomVariable& ontime,
-                        const RandomVariable& offtime,
-                        uint32_t size);
-        
-        // Event handlers
-        void StartSending ();
-        void StopSending ();
-        void SendPacket ();
-        
-    private:
-        void ScheduleNextTx ();
-        void ScheduleStartEvent ();
-        void ScheduleStopEvent ();
-        void ConnectionSucceeded (Ptr<Socket>);
-        void ConnectionFailed (Ptr<Socket>);
-        void Ignore (Ptr<Socket>);
-
-    };
-//}
-}
diff --git a/apps/stupid-interest-sink.cc b/apps/stupid-interest-sink.cc
deleted file mode 100644
index c9b166e..0000000
--- a/apps/stupid-interest-sink.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-//
-//  stupid-interest-sink.cpp
-//  Abstraction
-//
-//  Created by Ilya Moiseenko on 10.08.11.
-//  Copyright 2011 UCLA. All rights reserved.
-//
-
-#include "stupid-interest-sink.h"
-
-#include "ns3/address.h"
-#include "ns3/address-utils.h"
-#include "ns3/log.h"
-#include "ns3/inet-socket-address.h"
-#include "ns3/node.h"
-#include "ns3/socket.h"
-#include "ns3/udp-socket.h"
-#include "ns3/simulator.h"
-#include "ns3/socket-factory.h"
-#include "ns3/packet.h"
-#include "ns3/trace-source-accessor.h"
-#include "ns3/udp-socket-factory.h"
-
-using namespace std;
-
-namespace ns3 {
-    
-    NS_LOG_COMPONENT_DEFINE ("StupidInterestSink");
-    NS_OBJECT_ENSURE_REGISTERED (StupidInterestSink);
-    
-    TypeId 
-    StupidInterestSink::GetTypeId (void)
-    {
-        static TypeId tid = TypeId ("ns3::StupidInterestSink")
-        .SetParent<Application> ()
-        .AddConstructor<StupidInterestSink> ()
-        .AddAttribute ("Local", "The Address on which to Bind the rx socket.",
-                       AddressValue (),
-                       MakeAddressAccessor (&StupidInterestSink::m_local),
-                       MakeAddressChecker ())
-        .AddAttribute ("Protocol", "The type id of the protocol to use for the rx socket.",
-                       TypeIdValue (UdpSocketFactory::GetTypeId ()),
-                       MakeTypeIdAccessor (&StupidInterestSink::m_tid),
-                       MakeTypeIdChecker ())
-        .AddTraceSource ("Rx", "A packet has been received",
-                         MakeTraceSourceAccessor (&StupidInterestSink::m_rxTrace))
-        ;
-        return tid;
-    }
-    
-    StupidInterestSink::StupidInterestSink ()
-    {
-        NS_LOG_FUNCTION (this);
-        m_socket = 0;
-        m_totalRx = 0;
-    }
-    
-    StupidInterestSink::~StupidInterestSink()
-    {
-        NS_LOG_FUNCTION (this);
-    }
-    
-    uint32_t StupidInterestSink::GetTotalRx () const
-    {
-        return m_totalRx;
-    }
-    
-    Ptr<Socket>
-    StupidInterestSink::GetListeningSocket (void) const
-    {
-        NS_LOG_FUNCTION (this);
-        return m_socket;
-    }
-    
-    std::list<Ptr<Socket> >
-    StupidInterestSink::GetAcceptedSockets (void) const
-    {
-        NS_LOG_FUNCTION (this);
-        return m_socketList;
-    }
-    
-    void StupidInterestSink::DoDispose (void)
-    {
-        NS_LOG_FUNCTION (this);
-        m_socket = 0;
-        m_socketList.clear ();
-        
-        // chain up
-        Application::DoDispose ();
-    }
-    
-    
-    // Application Methods
-    void StupidInterestSink::StartApplication ()    // Called at time specified by Start
-    {
-        NS_LOG_FUNCTION (this);
-        // Create the socket if not already
-        if (!m_socket)
-        {
-            m_socket = Socket::CreateSocket (GetNode (), m_tid);
-            m_socket->Bind (m_local);
-            m_socket->Listen ();
-            m_socket->ShutdownSend ();
-            if (addressUtils::IsMulticast (m_local))
-            {
-                Ptr<UdpSocket> udpSocket = DynamicCast<UdpSocket> (m_socket);
-                if (udpSocket)
-                {
-                    // equivalent to setsockopt (MCAST_JOIN_GROUP)
-                    udpSocket->MulticastJoinGroup (0, m_local);
-                }
-                else
-                {
-                    NS_FATAL_ERROR ("Error: joining multicast on a non-UDP socket");
-                }
-            }
-        }
-        
-        m_socket->SetRecvCallback (MakeCallback (&StupidInterestSink::HandleRead, this));
-        m_socket->SetAcceptCallback (
-                                     MakeNullCallback<bool, Ptr<Socket>, const Address &> (),
-                                     MakeCallback (&StupidInterestSink::HandleAccept, this));
-        m_socket->SetCloseCallbacks (
-                                     MakeCallback (&StupidInterestSink::HandlePeerClose, this),
-                                     MakeCallback (&StupidInterestSink::HandlePeerError, this));
-    }
-    
-    void StupidInterestSink::StopApplication ()     // Called at time specified by Stop
-    {
-        NS_LOG_FUNCTION (this);
-        while(!m_socketList.empty ()) //these are accepted sockets, close them
-        {
-            Ptr<Socket> acceptedSocket = m_socketList.front ();
-            m_socketList.pop_front ();
-            acceptedSocket->Close ();
-        }
-        if (m_socket) 
-        {
-            m_socket->Close ();
-            m_socket->SetRecvCallback (MakeNullCallback<void, Ptr<Socket> > ());
-        }
-    }
-    
-    void StupidInterestSink::HandleRead (Ptr<Socket> socket)
-    {
-        NS_LOG_FUNCTION (this << socket);
-        Ptr<Packet> packet;
-        Address from;
-        while (packet = socket->RecvFrom (from))
-        {
-            if (packet->GetSize () == 0)
-            { //EOF
-                break;
-            }
-            if (InetSocketAddress::IsMatchingType (from))
-            {
-                m_totalRx += packet->GetSize ();
-                InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
-                NS_LOG_INFO ("Received " << packet->GetSize () << " bytes from " <<
-                             address.GetIpv4 () << " [" << address << "]"
-                             << " total Rx " << m_totalRx);
-                //cast address to void , to suppress 'address' set but not used 
-                //compiler warning in optimized builds
-                (void) address;
-            }
-            m_rxTrace (packet, from);
-        }
-    }
-    
-    void StupidInterestSink::HandlePeerClose (Ptr<Socket> socket)
-    {
-        NS_LOG_INFO ("PktSink, peerClose");
-    }
-    
-    void StupidInterestSink::HandlePeerError (Ptr<Socket> socket)
-    {
-        NS_LOG_INFO ("PktSink, peerError");
-    }
-    
-    
-    void StupidInterestSink::HandleAccept (Ptr<Socket> s, const Address& from)
-    {
-        NS_LOG_FUNCTION (this << s << from);
-        s->SetRecvCallback (MakeCallback (&StupidInterestSink::HandleRead, this));
-        m_socketList.push_back (s);
-    }
-    
-} // Namespace ns3
diff --git a/apps/stupid-interest-sink.h b/apps/stupid-interest-sink.h
deleted file mode 100644
index b750907..0000000
--- a/apps/stupid-interest-sink.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-//
-//  stupid-interest-sink.h
-//  Abstraction
-//
-//  Created by Ilya Moiseenko on 10.08.11.
-//  Copyright 2011 UCLA. All rights reserved.
-//
-
-#include "ns3/application.h"
-#include "ns3/event-id.h"
-#include "ns3/ptr.h"
-#include "ns3/traced-callback.h"
-#include "ns3/address.h"
-
-namespace ns3 
-{
-    
-    class Address;
-    class Socket;
-    class Packet;
-
-    class StupidInterestSink : public Application
-    {
-    public:
-        static TypeId GetTypeId (void);
-        StupidInterestSink ();
-        
-        virtual ~StupidInterestSink ();
-        
-        /**
-         * \return the total bytes received in this sink app
-         */
-        uint32_t GetTotalRx () const;
-        
-        /**
-         * \return pointer to listening socket
-         */
-        Ptr<Socket> GetListeningSocket (void) const;
-        
-        /**
-         * \return list of pointers to accepted sockets
-         */
-        std::list<Ptr<Socket> > GetAcceptedSockets (void) const;
-        
-    protected:
-        virtual void DoDispose (void);
-    private:
-        // inherited from Application base class.
-        virtual void StartApplication (void);    // Called at time specified by Start
-        virtual void StopApplication (void);     // Called at time specified by Stop
-        
-        void HandleRead (Ptr<Socket>);
-        void HandleAccept (Ptr<Socket>, const Address& from);
-        void HandlePeerClose (Ptr<Socket>);
-        void HandlePeerError (Ptr<Socket>);
-        
-        // In the case of TCP, each socket accept returns a new socket, so the 
-        // listening socket is stored seperately from the accepted sockets
-        Ptr<Socket>     m_socket;       // Listening socket
-        std::list<Ptr<Socket> > m_socketList; //the accepted sockets
-        
-        Address         m_local;        // Local address to bind to
-        uint32_t        m_totalRx;      // Total bytes received
-        TypeId          m_tid;          // Protocol TypeId
-        TracedCallback<Ptr<const Packet>, const Address &> m_rxTrace;
-    };
-}