From 050af31b9566de875fce7dec874861694f657bc7 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 26 Mar 2008 13:51:24 -0700 Subject: [PATCH] use Ipv4InterfaceContainer to avoid hardcoding ip addresses. --- examples/tcp-large-transfer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tcp-large-transfer.cc b/examples/tcp-large-transfer.cc index 94f859c40..4d3d09179 100644 --- a/examples/tcp-large-transfer.cc +++ b/examples/tcp-large-transfer.cc @@ -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 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