Removing legacy examples. Moving test application to `test' folder
diff --git a/examples/abilene-topology-backup.txt b/examples/abilene-topology-backup.txt
deleted file mode 100644
index f4f1d43..0000000
--- a/examples/abilene-topology-backup.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-12  30
-1   2   9920000 1   1   100 100
-2   1   9920000 1   1   100 100
-2   5   9920000 1176    1   100 100
-2   6   2480000 587 1   100 100
-2   12  9920000 846 1   100 100
-3   6   9920000 260 1   100 100
-3   9   9920000 700 1   100 100
-4   7   9920000 639 1   100 100
-4   10  9920000 1295 1   100 100
-4   11  9920000 2095    1   100 100
-5   2   9920000 1176    1   100 100
-5   7   9920000 902 1   100 100
-5   8   9920000 1893 1   100 100
-6   2   9920000 587 1   100 100
-6   3   2480000 260 1   100 100
-6   7   9920000 548 1   100 100
-7   4   9920000 639 1   100 100
-7   5   9920000 902 1   100 100
-7   6   9920000 548 1   100 100
-8   5   9920000 1893 1   100 100
-8   10  9920000 366 1   100 100
-9   3   9920000 700 1   100 100
-9   12  9920000 233 1   100 100
-10  4   9920000 1295 1   100 100
-10  8   9920000 366 1   100 100
-10  11  9920000 861 1   100 100
-11  4   9920000 2095 1   100 100
-11  10  9920000 861 1   100 100
-12  2   9920000 846 1   100 100
-12  9   9920000 233 1   100 100
diff --git a/examples/abilene-topology.cc b/examples/abilene-topology.cc
index 48ad6db..ff7f52d 100644
--- a/examples/abilene-topology.cc
+++ b/examples/abilene-topology.cc
@@ -117,7 +117,7 @@
   ccnxHelper.InstallAll ();
     
   NS_LOG_INFO ("Installing Applications");
-  CcnxAppHelper consumerHelper ("ns3::CcnxConsumer");
+  CcnxAppHelper consumerHelper ("ns3::CcnxConsumerCbr");
   consumerHelper.SetPrefix ("/Data");
   consumerHelper.SetAttribute ("MeanRate", StringValue ("1Mbps"));
   ApplicationContainer consumers = consumerHelper.Install (Names::Find<Node> ("/abilene", "SNVAng"));
@@ -146,7 +146,7 @@
     }
 
   CcnxTraceHelper traceHelper;
-  traceHelper.EnableAggregateAppAll ("ns3::CcnxConsumer");
+  traceHelper.EnableAggregateAppAll ("ns3::CcnxConsumerCbr");
   traceHelper.EnableAggregateAppAll ("ns3::CcnxProducer");
   traceHelper.EnableAggregateL3All ();
   traceHelper.SetL3TraceFile ("trace-l3.log");
diff --git a/examples/annotated-topology-read-example.cc b/examples/annotated-topology-read-example.cc
index 450d8d1..d000d57 100644
--- a/examples/annotated-topology-read-example.cc
+++ b/examples/annotated-topology-read-example.cc
@@ -93,7 +93,7 @@
   Ptr<CcnxFaceContainer> cf = ccnx.Install (nodes);
      
   NS_LOG_INFO ("Installing Applications");
-  CcnxAppHelper helper ("ns3::CcnxConsumer");
+  CcnxAppHelper helper ("ns3::CcnxConsumerCbr");
   helper.SetPrefix ("/3");
   ApplicationContainer app = helper.Install ("1");
   app.Start (Seconds (1.0));
diff --git a/examples/blackhole-abilene.cc b/examples/blackhole-abilene.cc
deleted file mode 100644
index 8b13789..0000000
--- a/examples/blackhole-abilene.cc
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/examples/ccnx-grid.cc b/examples/ccnx-grid.cc
index a4255be..15898aa 100644
--- a/examples/ccnx-grid.cc
+++ b/examples/ccnx-grid.cc
@@ -115,7 +115,7 @@
   std::ostringstream prefix;
   prefix << "/" << producer->GetId ();
   
-  CcnxAppHelper consumerHelper ("ns3::CcnxConsumer");
+  CcnxAppHelper consumerHelper ("ns3::CcnxConsumerCbr");
   consumerHelper.SetPrefix (prefix.str ());
   consumerHelper.SetAttribute ("MeanRate", StringValue ("1Mbps"));
   ApplicationContainer consumers = consumerHelper.Install (consumerNodes);
diff --git a/examples/ccnx-test.cc b/examples/ccnx-test.cc
deleted file mode 100644
index cae2815..0000000
--- a/examples/ccnx-test.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-
-#include "ns3/core-module.h"
-#include "ns3/network-module.h"
-#include "ns3/point-to-point-module.h"
-#include "ns3/NDNabstraction-module.h"
-
-using namespace ns3;
-
-NS_LOG_COMPONENT_DEFINE ("CcnxTest");
-
-int 
-main (int argc, char *argv[])
-{
-  // LogComponentEnable ("CcnxTest", LOG_ALL);
-  // LogComponentEnable ("CcnxStackHelper", LOG_ALL);
-  // LogComponentEnable ("CcnxRit", LOG_ALL);
-  
-  // Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
-  // Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));
-
-  Config::SetDefault ("ns3::PointToPointNetDevice::DataRate", StringValue ("10Mbps"));
-  Config::SetDefault ("ns3::PointToPointChannel::Delay", StringValue ("1ms"));
-
-  Packet::EnableChecking();
-  Packet::EnablePrinting();
-  CommandLine cmd;
-  cmd.Parse (argc, argv);
-  
-  // Here, we will explicitly create seven nodes. 
-  NodeContainer c;
-  c.Create (3);
-  Names::Add ("1", c.Get (0));
-  Names::Add ("2", c.Get (1));
-  Names::Add ("3", c.Get (2));
-  
-  // NodeContainer n1 = NodeContainer ("1") ("2");
-  // NodeContainer n2 = NodeContainer ("2") ("3");
-  
-  NS_LOG_INFO ("Create channels.");
-  PointToPointHelper p2p;
-  p2p.Install ("1", "2");
-  p2p.Install ("2", "3");
-
-  NS_LOG_INFO ("Installing NDN stack");
-  CcnxStackHelper ccnx;
-  Ptr<CcnxFaceContainer> cf = ccnx.Install (c);
-
-  CcnxAppHelper helper ("ns3::CcnxConsumer");
-  helper.SetPrefix ("/3");
-  ApplicationContainer app = helper.Install ("1");
-  app.Start (Seconds (1.0));
-  app.Stop (Seconds (10.05));
-
-  CcnxAppHelper helper2 ("ns3::CcnxProducer");
-  helper2.SetPrefix ("/3");
-  helper2.SetAttribute ("PayloadSize", StringValue("1024"));
-  ApplicationContainer app2 = helper2.Install("3");
-  
-  app2.Start(Seconds(0.0));
-  app2.Stop(Seconds(15.0));
-  
-  /**
-   * \brief Add forwarding entry in FIB
-   *
-   * \param node Node
-   * \param prefix Routing prefix
-   * \param face Face index
-   * \param metric Routing metric
-   */
-  ccnx.AddRoute ("1", "/3", 0, 1);
-  ccnx.AddRoute ("2", "/3", 1, 1);
-  ccnx.AddRoute ("2", "/3", 0, 10000);
-  NS_LOG_INFO ("FIB dump:\n" << *c.Get(0)->GetObject<CcnxFib> ());
-  NS_LOG_INFO ("FIB dump:\n" << *c.Get(1)->GetObject<CcnxFib> ());
-
-  // Create the OnOff application to send UDP datagrams of size
-  // 210 bytes at a rate of 448 Kb/s from n0 to n4
-  // NS_LOG_INFO ("Create Applications.");
-  
-  // std::string sendsizeattr = "SendSize";
-  // //flow2 7-->2
-  // BulkSendHelper bulksend0 ("ns3::CcnxLocalFaceFactory", InetSocketAddress (i23.GetAddress (0), port));
-  // //bulksend0.SetAttribute(sendsizeattr, AttributeValue(ConstantVariable(2560)));
-  // bulksend0.SetAttribute("MaxBytes", UintegerValue(2560));
-  // ApplicationContainer apps = bulksend0.Install(c.Get(6));
-  // apps.Start(Seconds (1.0));
-  // apps.Stop(Seconds (10.0));
-
-  // AsciiTraceHelper ascii;
-  // p2p.EnableAsciiAll (ascii.CreateFileStream ("ccnx-test.tr"));
-  // p2p.EnablePcapAll ("ccnx-test");
-  
-  Simulator::Stop (Seconds (20));
-  
-  NS_LOG_INFO ("Run Simulation.");
-  Simulator::Run ();
-  Simulator::Destroy ();
-  NS_LOG_INFO ("Done.");
-  
-  return 0;
-}
diff --git a/examples/syntactic-topology-ndnabstraction.cc b/examples/syntactic-topology-ndnabstraction.cc
deleted file mode 100644
index 3fc04a1..0000000
--- a/examples/syntactic-topology-ndnabstraction.cc
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*-  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 "ns3/core-module.h"
-#include "ns3/network-module.h"
-#include "ns3/point-to-point-module.h"
-#include "ns3/NDNabstraction-module.h"
-#include <ns3/point-to-point-grid.h>
-#include "ns3/ipv4-global-routing-helper.h"
-
-#include <iostream>
-#include <sstream>
-
-#include "ns3/ccnx.h"
-
-
-using namespace ns3;
-
-NS_LOG_COMPONENT_DEFINE ("SyncTopologyNDNabstraction");
-
-int 
-main (int argc, char *argv[])
-{
-  // Set up some default values for the simulation.  Use the 
-  
-  Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
-  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));
-  
-  Packet::EnableChecking();
-  Packet::EnablePrinting();
-
-  // Allow the user to override any of the defaults and the above
-  // DefaultValue::Bind ()s at run-time, via command-line arguments
-  CommandLine cmd;
-  cmd.Parse (argc, argv);
-  
-  // Here, we will explicitly create seven nodes. 
-  NS_LOG_INFO ("Create nodes.");
-  NodeContainer c;
-  c.Create (7);
-  Names::Add ("1", c.Get (0));
-  Names::Add ("2", c.Get (1));
-  Names::Add ("3", c.Get (2));
-  Names::Add ("4", c.Get (3));
-  Names::Add ("5", c.Get (4));
-  Names::Add ("6", c.Get (5));
-  Names::Add ("7", c.Get (6));
-    
-    
-  NodeContainer n13 = NodeContainer (c.Get (0), c.Get (2));
-  NodeContainer n23 = NodeContainer (c.Get (1), c.Get (2));
-  NodeContainer n35 = NodeContainer (c.Get (2), c.Get (4));
-  NodeContainer n34 = NodeContainer (c.Get (2), c.Get (3));
-  NodeContainer n45 = NodeContainer (c.Get (3), c.Get (4));
-  NodeContainer n56 = NodeContainer (c.Get (4), c.Get (5));
-  NodeContainer n57 = NodeContainer (c.Get (4), c.Get (6));
-  
-  //Ipv4StaticRoutingHelper staticRouting;
-  
-  //Ipv4ListRoutingHelper list;
-  //list.Add (staticRouting, 1);
-  
-  //Add static routing
-  //InternetStackHelper internet;
-  //internet.SetRoutingHelper (list); // has effect on the next Install ()
-  //internet.Install (c);
-  
-  // We create the channels first without any IP addressing information
-  NS_LOG_INFO ("Create channels.");
-  PointToPointHelper p2p;
-  p2p.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));
-  p2p.SetChannelAttribute ("Delay", StringValue ("1ms"));
-  NetDeviceContainer nd13 = p2p.Install (n13);
-  NetDeviceContainer nd23 = p2p.Install (n23);
-  NetDeviceContainer nd56 = p2p.Install (n56);
-  
-  p2p.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));
-  p2p.SetChannelAttribute ("Delay", StringValue ("50ms"));
-  NetDeviceContainer nd57 = p2p.Install (n57);
-  
-  p2p.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
-  p2p.SetChannelAttribute ("Delay", StringValue ("1ms"));
-  NetDeviceContainer nd34 = p2p.Install (n34);
-  NetDeviceContainer nd45 = p2p.Install (n45);
-  
-  p2p.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
-  p2p.SetChannelAttribute ("Delay", StringValue ("50ms"));
-  NetDeviceContainer nd35 = p2p.Install (n35);
-  
-  InternetStackHelper stack;
-  Ipv4GlobalRoutingHelper ipv4RoutingHelper;
-  // Ptr<Ipv4RoutingHelper> ipv4RoutingHelper = stack.GetRoutingHelper ();
-  stack.SetRoutingHelper (ipv4RoutingHelper);
-  stack.Install(c);
-  // // Create router nodes, initialize routing database and set up the routing
-  // // tables in the nodes.
-  Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
-    
-  // Later, we add IP addresses.
-  NS_LOG_INFO ("Assign IP Addresses.");
-  Ipv4AddressHelper ipv4;
-  ipv4.SetBase ("192.168.1.0", "255.255.255.0");
-  Ipv4InterfaceContainer i13 = ipv4.Assign (nd13);
-  Ipv4InterfaceContainer i23 = ipv4.Assign (nd23);
-  Ipv4InterfaceContainer i35 = ipv4.Assign (nd35);
-  Ipv4InterfaceContainer i34 = ipv4.Assign (nd34);
-  Ipv4InterfaceContainer i45 = ipv4.Assign (nd45);
-  Ipv4InterfaceContainer i56 = ipv4.Assign (nd56);
-  Ipv4InterfaceContainer i57 = ipv4.Assign (nd57);
-  
-    
-    
-    
-  CcnxStackHelper ccnx;
-  ccnx.SetForwardingStrategy ("ns3::CcnxFloodingStrategy");
-  ccnx.EnableLimits (false);
-  Ptr<CcnxFaceContainer> cf = ccnx.Install (c);
-    
-  NS_LOG_INFO ("Installing Applications");
-  CcnxConsumerHelper helper ("/3");
-  ApplicationContainer app = helper.Install (c.Get(1));
-  app.Start (Seconds (1.0));
-  app.Stop (Seconds (1000.05));
-    
-  /*CcnxConsumerHelper helper2 ("/4");
-    ApplicationContainer app2 = helper2.Install(c.Get(5));
-    app2.Start (Seconds (1.0));
-    app2.Stop (Seconds (1000.05));
-  */
-  CcnxProducerHelper helper3 ("/3",120);
-  ApplicationContainer app3 = helper3.Install(c.Get(6));
-  app3.Start(Seconds(0.0));
-  app3.Stop(Seconds(1500.0));
-  /*
-    CcnxProducerHelper helper4 ("/4",150);
-    ApplicationContainer app4 = helper4.Install(c.Get(0));
-    app4.Start(Seconds(0.0));
-    app4.Stop(Seconds(1500.0));
-  */
-    
-  ccnx.AddRoute("1","/3",0,1);
-  ccnx.AddRoute("3","/3",2,1);
-  ccnx.AddRoute("3","/3",3,1);
-  ccnx.AddRoute("4","/3",1,1);
-  ccnx.AddRoute("5","/3",2,1);
-    
-  /*ccnx.AddRoute ("1", "/3", 0, 1);
-    ccnx.AddRoute ("1", "/3", 1, 1);
-    
-    ccnx.AddRoute ("2", "/3", 1, 1);
-    
-    ccnx.AddRoute ("3", "/3", 1, 1);
-    
-    ccnx.AddRoute ("4", "/3", 2, 1);
-    
-    ccnx.AddRoute ("6", "/3", 2, 1);
-    
-    ccnx.AddRoute ("7", "/3", 1, 1);
-    
-    ccnx.AddRoute ("8", "/3", 1, 1);
-  */
-    
-  // Create the OnOff application to send UDP datagrams of size
-  // 210 bytes at a rate of 448 Kb/s from n0 to n4
-  /*NS_LOG_INFO ("Create Applications.");
-    uint16_t port = 9;   // Discard port (RFC 863)
-  
-    std::string sendsizeattr = "SendSize";
-    //flow2 7-->2
-    BulkSendHelper bulksend0 ("ns3::UdpSocketFactory", InetSocketAddress (i23.GetAddress (0), port));
-    //bulksend0.SetAttribute(sendsizeattr, AttributeValue(ConstantVariable(2560)));
-    bulksend0.SetAttribute("MaxBytes", UintegerValue(2560));
-    ApplicationContainer apps = bulksend0.Install(c.Get(6));
-    apps.Start(Seconds (1.0));
-    apps.Stop(Seconds (10.0));
-  
-    // Create a packet sink to receive these packets
-    PacketSinkHelper sink0 ("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny (), port));
-    apps = sink0.Install(c.Get(1));
-    apps.Start(Seconds(0.0));
-    apps.Stop(Seconds(20.0));
-  
-    //flow1 1-->6
-    BulkSendHelper bulksend ("ns3::UdpSocketFactory", InetSocketAddress (i56.GetAddress (1), port));
-    //bulksend.SetAttribute(sendsizeattr, AttributeValue( ConstantVariable(2560)));
-    bulksend0.SetAttribute("MaxBytes", UintegerValue(2560));
-    apps = bulksend.Install (c.Get (0));
-    apps.Start (Seconds (6.0));
-    apps.Stop (Seconds (20.0));
-  
-    // Create a packet sink to receive these packets
-    PacketSinkHelper sink ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), port));
-    apps = sink.Install (c.Get (5));
-    apps.Start(Seconds(0.0));
-    apps.Stop(Seconds(20.0));
-  
-    AsciiTraceHelper ascii;
-    p2p.EnableAsciiAll (ascii.CreateFileStream ("sync-topology-ndnabstraction.tr"));
-    p2p.EnablePcapAll ("sync-topology-ndnabstraction");*/
-  
-  Simulator::Stop (Seconds (2000));
-  
-  NS_LOG_INFO ("Run Simulation.");
-  Simulator::Run ();
-  Simulator::Destroy ();
-  NS_LOG_INFO ("Done.");
-  
-  return 0;
-}
diff --git a/examples/synthetic-topology.cc b/examples/synthetic-topology.cc
index 971bbe1..250a936 100644
--- a/examples/synthetic-topology.cc
+++ b/examples/synthetic-topology.cc
@@ -89,7 +89,7 @@
   ccnxHelper.InstallAll ();
     
   NS_LOG_INFO ("Installing Applications");
-  CcnxAppHelper consumerHelper ("ns3::CcnxConsumer");
+  CcnxAppHelper consumerHelper ("ns3::CcnxConsumerCbr");
 
   consumerHelper.SetPrefix ("/6");
   consumerHelper.SetAttribute ("MeanRate", StringValue ("2Mbps"));
@@ -142,13 +142,13 @@
   Simulator::Stop (finishTime);
 
   CcnxTraceHelper traceHelper;
-  // traceHelper.EnableAggregateAppAll ("ns3::CcnxConsumer");
+  // traceHelper.EnableAggregateAppAll ("ns3::CcnxConsumerCbr");
   // traceHelper.EnableAggregateAppAll ("ns3::CcnxProducer");
   // traceHelper.EnableAggregateL3All ();
   // traceHelper.SetL3TraceFile ("trace-l3.log");
   // traceHelper.SetAppTraceFile ("trace-app.log");
   // traceHelper.EnableRateL3All ("rate-trace.log");
-  traceHelper.EnableSeqsAppAll ("ns3::CcnxConsumer", "consumers-seqs.log");
+  traceHelper.EnableSeqsAppAll ("ns3::CcnxConsumerCbr", "consumers-seqs.log");
 
   NS_LOG_INFO ("Run Simulation.");
   Simulator::Run ();
diff --git a/examples/content-object-example.cc b/test/content-object-example.cc
similarity index 100%
rename from examples/content-object-example.cc
rename to test/content-object-example.cc
diff --git a/examples/interest-header-example.cc b/test/interest-header-example.cc
similarity index 100%
rename from examples/interest-header-example.cc
rename to test/interest-header-example.cc
diff --git a/examples/packet-sizes.cc b/test/packet-sizes.cc
similarity index 100%
rename from examples/packet-sizes.cc
rename to test/packet-sizes.cc
diff --git a/wscript b/wscript
index 735186f..b3470df 100644
--- a/wscript
+++ b/wscript
@@ -84,24 +84,15 @@
     tests.source = bld.path.ant_glob('test/*.cc');
 
     if True or bld.env['ENABLE_EXAMPLES']:
-        obj = bld.create_ns3_program('ccnx-test', ['NDNabstraction', 'internet'])
-        obj.source = 'examples/ccnx-test.cc'
-        
-        obj = bld.create_ns3_program('ccnx-routing-simple', ['NDNabstraction', 'point-to-point-layout'])
+        obj = bld.create_ns3_program('ccnx-routing-simple', ['NDNabstraction'])
         obj.source = 'examples/ccnx-routing-simple.cc'
         
-        obj = bld.create_ns3_program('ccnx-grid', ['NDNabstraction', 'point-to-point-layout'])
+        obj = bld.create_ns3_program('ccnx-grid', ['NDNabstraction'])
         obj.source = 'examples/ccnx-grid.cc'
 
-        obj = bld.create_ns3_program('annotated-topology', ['NDNabstraction', 'point-to-point-layout'])
+        obj = bld.create_ns3_program('annotated-topology', ['NDNabstraction'])
         obj.source = 'examples/annotated-topology-read-example.cc'
 
-        obj = bld.create_ns3_program('interest-header-example', ['NDNabstraction'])
-        obj.source = 'examples/interest-header-example.cc'
-
-        obj = bld.create_ns3_program('packet-sizes', ['NDNabstraction'])
-        obj.source = 'examples/packet-sizes.cc'
-
         obj = bld.create_ns3_program('ccnx-sprint-topology', ['NDNabstraction'])
         obj.source = 'examples/sprint-topology.cc'
 
@@ -116,14 +107,8 @@
 
         #obj = bld.create_ns3_program('link-failure-sprint', ['NDNabstraction'])
         #obj.source = 'examples/link-failure-sprint.cc'
-        
-        #obj = bld.create_ns3_program('link-failure-abilene', ['NDNabstraction'])
-        #obj.source = 'examples/link-failure-abilene.cc'
 
         #obj = bld.create_ns3_program('blackhole-sprint', ['NDNabstraction'])
         #obj.source = 'examples/blackhole-sprint.cc'
 
-        #obj = bld.create_ns3_program('blackhole-abilene', ['NDNabstraction'])
-        #obj.source = 'examples/blackhole-abilene.cc'
-
     bld.ns3_python_bindings()