bug 1058: InternetStackHelper pitfall: calling Install before adding routing protocols

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-05-12 21:49:50 -07:00
parent 4282582535
commit 289649516b
15 changed files with 15 additions and 14 deletions

View File

@@ -73,6 +73,7 @@ since ns-3.10, in many cases referencing the Bugzilla bug number.
- 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
------------

View File

@@ -69,7 +69,7 @@ main (int argc, char *argv[])
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

View File

@@ -162,7 +162,7 @@ main (int argc, char *argv[])
// 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.

View File

@@ -135,7 +135,7 @@ def main(argv):
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()

View File

@@ -383,7 +383,7 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
if (enableRouting)
{
internet.SetRoutingHelper(list);
internet.SetRoutingHelper(list); // has effect on the next Install ()
}
internet.Install (c);

View File

@@ -198,7 +198,7 @@ int main (int argc, char *argv[])
list.Add (olsr, 10);
InternetStackHelper internet;
internet.SetRoutingHelper (list);
internet.SetRoutingHelper (list); // has effect on the next Install ()
internet.Install (c);
Ipv4AddressHelper ipv4;

View File

@@ -192,7 +192,7 @@ AodvExample::InstallInternetStack ()
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");

View File

@@ -285,7 +285,7 @@ DsdvManetExample::InstallInternetStack (std::string tr_name)
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");

View File

@@ -134,7 +134,7 @@ main (int argc, char *argv[])
if (nix)
{
stack.SetRoutingHelper (list);
stack.SetRoutingHelper (list); // has effect on the next Install ()
}
// Create Campus Networks

View File

@@ -154,7 +154,7 @@ main (int argc, char *argv[])
if (nix)
{
stack.SetRoutingHelper (list);
stack.SetRoutingHelper (list); // has effect on the next Install ()
}
stack.InstallAll ();

View File

@@ -75,7 +75,7 @@ main (int argc, char *argv[])
list.Add (nixRouting, 10);
InternetStackHelper stack;
stack.SetRoutingHelper (list);
stack.SetRoutingHelper (list); // has effect on the next Install ()
stack.Install (allNodes);
NetDeviceContainer devices12;

View File

@@ -116,7 +116,7 @@ main (int argc, char *argv[])
if (nix)
{
stack.SetRoutingHelper (list);
stack.SetRoutingHelper (list); // has effect on the next Install ()
}
// Create Campus Networks

View File

@@ -188,7 +188,7 @@ int main (int argc, char *argv[])
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;

View File

@@ -95,7 +95,7 @@ main (int argc, char *argv[])
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

View File

@@ -112,7 +112,7 @@ int main (int argc, char *argv[])
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");