Finishing with FIB initialization based on IPv4 global routing controller

Example ccnx-routing-simple.cc shows all necessary steps to make it work.
diff --git a/examples/ccnx-routing-simple.cc b/examples/ccnx-routing-simple.cc
index e277cfe..29fd49f 100644
--- a/examples/ccnx-routing-simple.cc
+++ b/examples/ccnx-routing-simple.cc
@@ -25,6 +25,7 @@
 #include "ns3/point-to-point-grid.h"
 #include "ns3/ipv4-global-routing-helper.h"
 #include "ns3/applications-module.h"
+#include "ns3/NDNabstraction-module.h"
 
 using namespace ns3;
 
@@ -34,15 +35,21 @@
 uint32_t nNodes = 2;
 uint32_t stopTime = 60;
 
-void TestDisable (Ptr<Node> node)
-{
-  NS_LOG_FUNCTION (node->GetId ());
+// void TestDisable (Ptr<Node> node)
+// {
+//   NS_LOG_FUNCTION (node->GetId ());
   
-  Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
-  NS_ASSERT_MSG (ipv4 != 0, "ipv4 should not be null");
+//   Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
+//   NS_ASSERT_MSG (ipv4 != 0, "ipv4 should not be null");
 
-  // The thing I didn't know is that interface status (isUp/isDown) and device status (isLinkUp) are two totally different things.  It is possible to set interface up and down, but there is not an easy way to alter status of device. This similar to reality: it is possible to programmatically disable interface, but to actually disable a link one needs to physically cut the cable
-  ipv4->SetDown (2);
+//   // The thing I didn't know is that interface status (isUp/isDown) and device status (isLinkUp) are two totally different things.  It is possible to set interface up and down, but there is not an easy way to alter status of device. This similar to reality: it is possible to programmatically disable interface, but to actually disable a link one needs to physically cut the cable
+//   ipv4->SetDown (2);
+// }
+
+void PrintCcnxFib (Ptr<Node> node, Ptr<OutputStreamWrapper> wrapper)
+{
+  Ptr<CcnxFib> fib = node->GetObject<CcnxFib> ();
+  *wrapper->GetStream () << *fib;
 }
 
 int main (int argc, char *argv[])
@@ -52,13 +59,15 @@
   cmd.AddValue ("stopTime", "Time to stop(seconds)", stopTime);
   cmd.Parse (argc, argv);
 
-  PointToPointHelper p2p;
   InternetStackHelper stack;
+  CcnxStackHelper ccnxHelper;
 
-  // Ipv4GlobalRoutingHelper ipv4RoutingHelper ("ns3::Ipv4GlobalRoutingOrderedNexthops");
-  Ipv4GlobalRoutingHelper ipv4RoutingHelper ("ns3::Ipv4GlobalRoutingUnorderedNexthops");
+  Ipv4GlobalRoutingHelper ipv4RoutingHelper ("ns3::Ipv4GlobalRoutingOrderedNexthops");
+  // Ipv4GlobalRoutingHelper ipv4RoutingHelper ("ns3::Ipv4GlobalRoutingUnorderedNexthops");
   stack.SetRoutingHelper (ipv4RoutingHelper);
 
+  PointToPointHelper p2p;
+
   PointToPointGridHelper grid (nNodes, nNodes, p2p);
   grid.BoundingBox(100,100,270,270);
   grid.InstallStack (stack);
@@ -68,36 +77,20 @@
                             Ipv4AddressHelper("10.2.0.0", "255.255.255.0")
                             );
 
-  for (uint32_t i=0; i<nNodes; i++)
-    for (uint32_t j=0; j<nNodes; j++)
-      grid.GetNode (i,j)->GetObject<GlobalRouter> ()->InjectRoute (Ipv4Address(grid.GetNode (i,j)->GetId ()),
-                                                                   Ipv4Mask("255.255.255.255"));
 
-  // // Create router nodes, initialize routing database and set up the routing
-  // // tables in the nodes.
-  // Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
-  // Ipv4GlobalRoutingHelper::PopulateAllPossibleRoutingTables ();
-  Ipv4GlobalRoutingHelper::PopulateRandomRoutingTables (5);
-  
-  // testing ip routing
-  UdpEchoClientHelper client (Ipv4Address ("10.2.1.1"), 1029);
-  client.SetAttribute ("MaxPackets", UintegerValue (1));
-  client.SetAttribute ("Interval", TimeValue (Seconds(1.0)));
-  client.SetAttribute ("PacketSize", UintegerValue (100));
-  client.Install (grid.GetNode (0,0));
-  // bla
-
-  
-  // apps.Stop (Seconds(150.0));
-
-  Simulator::ScheduleWithContext (grid.GetNode (0,0)->GetId (),
-                                  Seconds (80.0), TestDisable, grid.GetNode (0,0));
+  ccnxHelper.InstallAll ();
+  ccnxHelper.InstallFakeGlobalRoutes ();
+  // ccnxHelper.InstallRouteTo (grid.GetNode (0,0));
+  ccnxHelper.InstallRoutesToAll ();
 
   // Trace routing tables 
   Ptr<OutputStreamWrapper> routingStream = Create<OutputStreamWrapper> ("routes.log", std::ios::out);
   *routingStream->GetStream () << "Node (1,1)\n";
   ipv4RoutingHelper.PrintRoutingTableAt (Seconds (20), grid.GetNode (1,1), routingStream);
 
+  Simulator::ScheduleWithContext (grid.GetNode (1,1)->GetId (),
+                                  Seconds (20.0), PrintCcnxFib, grid.GetNode (1,1), routingStream);
+  
   Simulator::Stop (Seconds(160.0));
   Simulator::Run ();
   Simulator::Destroy ();