From e2ea6b7b50feeddf9a0e3250da284de13bfcf850 Mon Sep 17 00:00:00 2001 From: apoorvabhargava Date: Thu, 7 Jun 2018 19:14:48 +0530 Subject: [PATCH] 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");