bug 1058: InternetStackHelper pitfall: calling Install before adding routing protocols
This commit is contained in:
@@ -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
|
||||
------------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user