Repair regression in CcnxFib.
Successful experiment with BestRouting strategy (commented out code in
the abilene-topology.cc example)
One more rescan of python bindings
diff --git a/bindings/modulegen__gcc_LP64.py b/bindings/modulegen__gcc_LP64.py
index 4a612f3..1d3fd2f 100644
--- a/bindings/modulegen__gcc_LP64.py
+++ b/bindings/modulegen__gcc_LP64.py
@@ -3272,10 +3272,6 @@
'ns3::NodeContainer',
[],
is_virtual=True)
- ## annotated-topology-reader.h (module 'NDNabstraction'): void ns3::AnnotatedTopologyReader::SetBoundingBox(double ulx, double uly, double lrx, double lry) [member function]
- cls.add_method('SetBoundingBox',
- 'void',
- [param('double', 'ulx'), param('double', 'uly'), param('double', 'lrx'), param('double', 'lry')])
## annotated-topology-reader.h (module 'NDNabstraction'): void ns3::AnnotatedTopologyReader::AssignIpv4Addresses(ns3::Ipv4Address base) [member function]
cls.add_method('AssignIpv4Addresses',
'void',
diff --git a/examples/abilene-topology.cc b/examples/abilene-topology.cc
index 394b0e2..75a4b99 100644
--- a/examples/abilene-topology.cc
+++ b/examples/abilene-topology.cc
@@ -81,7 +81,6 @@
AnnotatedTopologyReader reader ("/abilene");
reader.SetFileName (input);
- reader.SetBoundingBox (100.0, 100.0, 5000.0, 5000.0);
NodeContainer nodes = reader.Read ();
@@ -91,6 +90,13 @@
return -1;
}
+ // InternetStackHelper stack;
+ // Ipv4GlobalRoutingHelper ipv4RoutingHelper ("ns3::Ipv4GlobalRoutingOrderedNexthops");
+ // stack.SetRoutingHelper (ipv4RoutingHelper);
+ // stack.Install (nodes);
+
+ // reader.AssignIpv4Addresses (Ipv4Address ("10.0.0.0"));
+
NS_LOG_INFO("Nodes = " << nodes.GetN());
NS_LOG_INFO("Links = " << reader.LinksSize ());
@@ -103,14 +109,18 @@
ccnxHelper.InstallAll ();
NS_LOG_INFO ("Installing Applications");
- CcnxConsumerHelper consumerHelper ("tralala");
+ CcnxConsumerHelper consumerHelper ("/5");
ApplicationContainer consumers = consumerHelper.Install (Names::Find<Node> ("/abilene", "ATLAng"));
- CcnxProducerHelper producerHelper ("tralala",1024);
+ CcnxProducerHelper producerHelper ("/5",1024);
ApplicationContainer producers = producerHelper.Install (Names::Find<Node> ("/abilene", "IPLSng"));
+ // // Populate FIB based on IPv4 global routing controller
+ // ccnxHelper.InstallFakeGlobalRoutes ();
+ // ccnxHelper.InstallRouteTo (Names::Find<Node> ("/abilene", "IPLSng"));
+
// Simulator::Schedule (Seconds (1.0), PrintFIBs);
- PrintFIBs ();
+ // PrintFIBs ();
Simulator::Schedule (Seconds (10.0), PrintTime);
diff --git a/model/annotated-topology-reader.cc b/model/annotated-topology-reader.cc
index 86918f7..76880a5 100644
--- a/model/annotated-topology-reader.cc
+++ b/model/annotated-topology-reader.cc
@@ -65,24 +65,24 @@
AnnotatedTopologyReader::AnnotatedTopologyReader (const std::string &path)
: m_path (path)
- , m_ulx (0)
- , m_uly (0)
- , m_lrx (100.0)
- , m_lry (100.0)
+ // , m_ulx (0)
+ // , m_uly (0)
+ // , m_lrx (100.0)
+ // , m_lry (100.0)
{
NS_LOG_FUNCTION (this);
}
-void
-AnnotatedTopologyReader::SetBoundingBox (double ulx, double uly, double lrx, double lry)
-{
- NS_LOG_FUNCTION (this << ulx << uly << lrx << lry);
+// void
+// AnnotatedTopologyReader::SetBoundingBox (double ulx, double uly, double lrx, double lry)
+// {
+// NS_LOG_FUNCTION (this << ulx << uly << lrx << lry);
- m_ulx = ulx;
- m_uly = uly;
- m_lrx = lrx;
- m_lry = lry;
-}
+// m_ulx = ulx;
+// m_uly = uly;
+// m_lrx = lrx;
+// m_lry = lry;
+// }
AnnotatedTopologyReader::~AnnotatedTopologyReader ()
{
@@ -280,7 +280,7 @@
link.GetToNetDevice ()->GetAttribute ("TxQueue", txQueueTo);
NS_ASSERT (txQueueTo.Get<DropTailQueue> () != 0);
- txQueueTo. Get<DropTailQueue> ()->SetAttribute ("MaxPackets", StringValue (link.GetAttribute("QueueSizeNode2")));
+ txQueueTo.Get<DropTailQueue> ()->SetAttribute ("MaxPackets", StringValue (link.GetAttribute("QueueSizeNode2")));
}
}
}
diff --git a/model/annotated-topology-reader.h b/model/annotated-topology-reader.h
index cfe5233..d97209b 100644
--- a/model/annotated-topology-reader.h
+++ b/model/annotated-topology-reader.h
@@ -59,11 +59,11 @@
virtual
NodeContainer Read (void);
- /**
- * \brief Set bounding box for the nodes
- */
- void
- SetBoundingBox (double ulx, double uly, double lrx, double lry);
+ // /**
+ // * \brief Set bounding box for the nodes
+ // */
+ // void
+ // SetBoundingBox (double ulx, double uly, double lrx, double lry);
/**
* \brief Assign IPv4 addresses to all links
@@ -87,14 +87,14 @@
void ApplyOspfMetric ();
private:
- AnnotatedTopologyReader (const AnnotatedTopologyReader&);
- AnnotatedTopologyReader& operator= (const AnnotatedTopologyReader&);
+ AnnotatedTopologyReader (const AnnotatedTopologyReader&);
+ AnnotatedTopologyReader& operator= (const AnnotatedTopologyReader&);
std::string m_path;
- double m_ulx;
- double m_uly;
- double m_lrx;
- double m_lry;
+ // double m_ulx;
+ // double m_uly;
+ // double m_lrx;
+ // double m_lry;
};
}
diff --git a/model/ccnx-fib.cc b/model/ccnx-fib.cc
index 5bb81c3..24f236f 100644
--- a/model/ccnx-fib.cc
+++ b/model/ccnx-fib.cc
@@ -180,11 +180,11 @@
CcnxFib::LongestPrefixMatch (const CcnxInterestHeader &interest) const
{
const CcnxNameComponents &name = interest.GetName ();
- for (size_t componentsCount = name.GetComponents ().size ();
- componentsCount >= 0;
+ for (size_t componentsCount = name.GetComponents ().size ()+1;
+ componentsCount > 0;
componentsCount--)
{
- CcnxNameComponents subPrefix (name.GetSubComponents (componentsCount));
+ CcnxNameComponents subPrefix (name.GetSubComponents (componentsCount-1));
CcnxFibEntryContainer::type::iterator match = m_fib.find (subPrefix);
if (match != m_fib.end())
return match;