use Ipv4InterfaceContainer to avoid hardcoding ip addresses.

This commit is contained in:
Mathieu Lacage
2008-03-26 13:51:24 -07:00
parent 89d089c506
commit 050af31b95

View File

@@ -149,7 +149,7 @@ int main (int argc, char *argv[])
ipv4.SetBase ("10.1.3.0", "255.255.255.0");
ipv4.Allocate (dev0);
ipv4.SetBase ("10.1.2.0", "255.255.255.0");
ipv4.Allocate (dev1);
Ipv4InterfaceContainer ipInterfs = ipv4.Allocate (dev1);
// and setup ip routing tables to get total ip-level connectivity.
GlobalRouteManager::PopulateRoutingTables ();
@@ -177,7 +177,7 @@ int main (int argc, char *argv[])
Ptr<Socket> localSocket = socketFactory->CreateSocket ();
localSocket->Bind ();
Simulator::ScheduleNow (&StartFlow, localSocket, nBytes,
Ipv4Address ("10.1.2.2"), servPort);
ipInterfs.GetAddress (1), servPort);
// Configure tracing of all enqueue, dequeue, and NetDevice receive events
// Trace output will be sent to the simple-examples.tr file