From e2ea6b7b50feeddf9a0e3250da284de13bfcf850 Mon Sep 17 00:00:00 2001 From: apoorvabhargava Date: Thu, 7 Jun 2018 19:14:48 +0530 Subject: [PATCH 1/2] Remove unused interface object --- example/dce-iperf.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/example/dce-iperf.cc b/example/dce-iperf.cc index deffc8c7..b13e4e77 100644 --- a/example/dce-iperf.cc +++ b/example/dce-iperf.cc @@ -107,6 +107,7 @@ int main (int argc, char *argv[]) DceApplicationHelper dce; ApplicationContainer apps; + std::ostringstream serverIp; dce.SetStackSize (1 << 20); @@ -115,7 +116,13 @@ int main (int argc, char *argv[]) dce.ResetArguments (); dce.ResetEnvironment (); dce.AddArgument ("-c"); - dce.AddArgument ("10.1.1.2"); + + // Extract server IP address + Ptr ipv4Server = nodes.Get (1)->GetObject (); + Ipv4Address serverAddress = ipv4Server->GetAddress (1, 0).GetLocal (); + serverAddress.Print (serverIp); + + dce.AddArgument (serverIp.str()); dce.AddArgument ("-i"); dce.AddArgument ("1"); dce.AddArgument ("--time"); From 753117ff7f1b24d9b3c2ee69df9057b965c63fba Mon Sep 17 00:00:00 2001 From: apoorvabhargava Date: Sun, 10 Jun 2018 17:34:30 +0530 Subject: [PATCH 2/2] Remove unused devices and interface from dce-iperf example --- example/dce-iperf.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/example/dce-iperf.cc b/example/dce-iperf.cc index b13e4e77..fa6e537f 100644 --- a/example/dce-iperf.cc +++ b/example/dce-iperf.cc @@ -49,9 +49,8 @@ int main (int argc, char *argv[]) pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ms")); - NetDeviceContainer devices, devices2; + NetDeviceContainer devices; devices = pointToPoint.Install (nodes); - devices2 = pointToPoint.Install (nodes); DceManagerHelper dceManager; dceManager.SetTaskManagerAttribute ("FiberManagerType", StringValue ("UcontextFiberManager")); @@ -92,8 +91,6 @@ int main (int argc, char *argv[]) Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.252"); Ipv4InterfaceContainer interfaces = address.Assign (devices); - address.SetBase ("10.1.2.0", "255.255.255.252"); - interfaces = address.Assign (devices2); // setup ip routes Ipv4GlobalRoutingHelper::PopulateRoutingTables ();