bug 1058: InternetStackHelper pitfall: calling Install before adding routing protocols
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 12 May 2011 21:49:50 -0700
changeset 7157 43d2fb5bfb12
parent 7156 2bdd52256e8a
child 7158 4fe055d32d78
bug 1058: InternetStackHelper pitfall: calling Install before adding routing protocols
RELEASE_NOTES
examples/routing/global-injection-slash32.cc
examples/wireless/mixed-wireless.cc
examples/wireless/mixed-wireless.py
examples/wireless/multirate.cc
examples/wireless/wifi-simple-adhoc-grid.cc
src/aodv/examples/aodv.cc
src/dsdv/examples/dsdv-manet.cc
src/mpi/examples/nms-p2p-nix-distributed.cc
src/mpi/examples/simple-distributed.cc
src/nix-vector-routing/examples/nix-simple.cc
src/nix-vector-routing/examples/nms-p2p-nix.cc
src/olsr/examples/olsr-hna.cc
src/olsr/examples/simple-point-to-point-olsr.cc
src/topology-read/examples/topology-example-sim.cc
--- a/RELEASE_NOTES	Thu May 12 21:19:07 2011 -0700
+++ b/RELEASE_NOTES	Thu May 12 21:49:50 2011 -0700
@@ -73,6 +73,7 @@
    - bug 445 - Is the class name Scalar in nstime.h appropriate?
    - bug 1044 - Seconds (1e-9) creates Time that is not IsPositive ()
    - bug 1056 - CSMA: padding not handled correctly for LLC encapsulation
+   - bug 1058 - documentation help to avoid InternetStackHelper pitfall
 
 Known issues
 ------------
--- a/examples/routing/global-injection-slash32.cc	Thu May 12 21:19:07 2011 -0700
+++ b/examples/routing/global-injection-slash32.cc	Thu May 12 21:49:50 2011 -0700
@@ -69,7 +69,7 @@
   Ipv4ListRoutingHelper staticonly;
   Ipv4ListRoutingHelper staticRouting;
   staticonly.Add(staticRouting, 0);
-  internet.SetRoutingHelper(staticonly);
+  internet.SetRoutingHelper(staticonly);  // has effect on the next Install ()
   internet.Install(NodeContainer(nC));
 
   // We create the channels first without any IP addressing information
--- a/examples/wireless/mixed-wireless.cc	Thu May 12 21:19:07 2011 -0700
+++ b/examples/wireless/mixed-wireless.cc	Thu May 12 21:49:50 2011 -0700
@@ -162,7 +162,7 @@
   // Add the IPv4 protocol stack to the nodes in our container
   //
   InternetStackHelper internet;
-  internet.SetRoutingHelper (olsr);
+  internet.SetRoutingHelper (olsr); // has effect on the next Install ()
   internet.Install (backbone);
 
   // re-initialize for non-olsr routing.
--- a/examples/wireless/mixed-wireless.py	Thu May 12 21:19:07 2011 -0700
+++ b/examples/wireless/mixed-wireless.py	Thu May 12 21:49:50 2011 -0700
@@ -135,7 +135,7 @@
     print "Enabling OLSR routing on all backbone nodes"
     internet = ns.internet.InternetStackHelper()
     olsr = ns.olsr.OlsrHelper()
-    internet.SetRoutingHelper(olsr);
+    internet.SetRoutingHelper(olsr); # has effect on the next Install ()
     internet.Install(backbone);
     # re-initialize for non-olsr routing.
     internet.Reset()
--- a/examples/wireless/multirate.cc	Thu May 12 21:19:07 2011 -0700
+++ b/examples/wireless/multirate.cc	Thu May 12 21:49:50 2011 -0700
@@ -383,7 +383,7 @@
 
   if (enableRouting)
     {
-      internet.SetRoutingHelper(list);
+      internet.SetRoutingHelper(list);  // has effect on the next Install ()
     }
   internet.Install (c);
 
--- a/examples/wireless/wifi-simple-adhoc-grid.cc	Thu May 12 21:19:07 2011 -0700
+++ b/examples/wireless/wifi-simple-adhoc-grid.cc	Thu May 12 21:49:50 2011 -0700
@@ -198,7 +198,7 @@
   list.Add (olsr, 10);
 
   InternetStackHelper internet;
-  internet.SetRoutingHelper (list);
+  internet.SetRoutingHelper (list); // has effect on the next Install ()
   internet.Install (c);
 
   Ipv4AddressHelper ipv4;
--- a/src/aodv/examples/aodv.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/aodv/examples/aodv.cc	Thu May 12 21:49:50 2011 -0700
@@ -192,7 +192,7 @@
   AodvHelper aodv;
   // you can configure AODV attributes here using aodv.Set(name, value)
   InternetStackHelper stack;
-  stack.SetRoutingHelper (aodv);
+  stack.SetRoutingHelper (aodv); // has effect on the next Install ()
   stack.Install (nodes);
   Ipv4AddressHelper address;
   address.SetBase ("10.0.0.0", "255.0.0.0");
--- a/src/dsdv/examples/dsdv-manet.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/dsdv/examples/dsdv-manet.cc	Thu May 12 21:49:50 2011 -0700
@@ -285,7 +285,7 @@
   dsdv.Set ("PeriodicUpdateInterval", TimeValue (Seconds (m_periodicUpdateInterval)));
   dsdv.Set ("SettlingTime", TimeValue (Seconds (m_settlingTime)));
   InternetStackHelper stack;
-  stack.SetRoutingHelper (dsdv);
+  stack.SetRoutingHelper (dsdv); // has effect on the next Install ()
   stack.Install (nodes);
   Ipv4AddressHelper address;
   address.SetBase ("10.1.1.0", "255.255.255.0");
--- a/src/mpi/examples/nms-p2p-nix-distributed.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/mpi/examples/nms-p2p-nix-distributed.cc	Thu May 12 21:49:50 2011 -0700
@@ -134,7 +134,7 @@
 
   if (nix)
     {
-      stack.SetRoutingHelper (list);
+      stack.SetRoutingHelper (list); // has effect on the next Install ()
     }
 
   // Create Campus Networks
--- a/src/mpi/examples/simple-distributed.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/mpi/examples/simple-distributed.cc	Thu May 12 21:49:50 2011 -0700
@@ -154,7 +154,7 @@
 
   if (nix)
     {
-      stack.SetRoutingHelper (list);
+      stack.SetRoutingHelper (list); // has effect on the next Install ()
     }
 
   stack.InstallAll ();
--- a/src/nix-vector-routing/examples/nix-simple.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/nix-vector-routing/examples/nix-simple.cc	Thu May 12 21:49:50 2011 -0700
@@ -75,7 +75,7 @@
   list.Add (nixRouting, 10);
 
   InternetStackHelper stack;
-  stack.SetRoutingHelper (list);
+  stack.SetRoutingHelper (list); // has effect on the next Install ()
   stack.Install (allNodes);
 
   NetDeviceContainer devices12;
--- a/src/nix-vector-routing/examples/nms-p2p-nix.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/nix-vector-routing/examples/nms-p2p-nix.cc	Thu May 12 21:49:50 2011 -0700
@@ -116,7 +116,7 @@
 
   if (nix)
     {
-      stack.SetRoutingHelper (list);
+      stack.SetRoutingHelper (list); // has effect on the next Install ()
     }
 
   // Create Campus Networks
--- a/src/olsr/examples/olsr-hna.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/olsr/examples/olsr-hna.cc	Thu May 12 21:49:50 2011 -0700
@@ -188,7 +188,7 @@
   list.Add (olsr, 10);
 
   InternetStackHelper internet_olsr;
-  internet_olsr.SetRoutingHelper (list);
+  internet_olsr.SetRoutingHelper (list); // has effect on the next Install ()
   internet_olsr.Install (olsrNodes);
 
   InternetStackHelper internet_csma;
--- a/src/olsr/examples/simple-point-to-point-olsr.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/olsr/examples/simple-point-to-point-olsr.cc	Thu May 12 21:49:50 2011 -0700
@@ -95,7 +95,7 @@
   list.Add (olsr, 10);
 
   InternetStackHelper internet;
-  internet.SetRoutingHelper (list);
+  internet.SetRoutingHelper (list); // has effect on the next Install ()
   internet.Install (c);
 
   // We create the channels first without any IP addressing information
--- a/src/topology-read/examples/topology-example-sim.cc	Thu May 12 21:19:07 2011 -0700
+++ b/src/topology-read/examples/topology-example-sim.cc	Thu May 12 21:49:50 2011 -0700
@@ -112,7 +112,7 @@
   listRH.Add (staticRouting, 0);
   listRH.Add (nixRouting, 10);
 
-  stack.SetRoutingHelper (listRH);
+  stack.SetRoutingHelper (listRH);  // has effect on the next Install ()
   stack.Install (nodes);
 
   NS_LOG_INFO ("creating ip4 addresses");