From 57b04d6424c49240e69e6f2e69897693ee3a90c5 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Sat, 18 Jul 2020 14:56:48 +0200 Subject: [PATCH] fixup --- helper/arp-cache-helper.cc | 2 +- test/leo-test-suite.cc | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/helper/arp-cache-helper.cc b/helper/arp-cache-helper.cc index 75e3367..c1bb392 100644 --- a/helper/arp-cache-helper.cc +++ b/helper/arp-cache-helper.cc @@ -38,7 +38,7 @@ ArpCacheHelper::Install (NetDeviceContainer &devices, Ipv4InterfaceContainer &in // and associated address uint32_t otherIfIndex = otherDevice->GetIfIndex (); - Ipv4Address ipaddr = interfaces.GetAddress (otherIfIndex, 1); // IP + Ipv4Address ipaddr = interfaces.GetAddress (otherIfIndex, 0); // IP // update cache ArpCache::Entry* entry = cache->Lookup (ipaddr); diff --git a/test/leo-test-suite.cc b/test/leo-test-suite.cc index 4d25eda..7789f6f 100644 --- a/test/leo-test-suite.cc +++ b/test/leo-test-suite.cc @@ -40,22 +40,23 @@ LeoTestCase1::DoRun (void) std::vector satWps = { - "../contrib/leo/data/starlink/45212.waypoints", - "../contrib/leo/data/starlink/45213.waypoints", - "../contrib/leo/data/starlink/45214.waypoints", - "../contrib/leo/data/starlink/45215.waypoints", + "contrib/leo/data/test/waypoints.txt", + "contrib/leo/data/test/waypoints.txt", + "contrib/leo/data/test/waypoints.txt", + "contrib/leo/data/test/waypoints.txt", }; LeoSatNodeHelper satHelper; NodeContainer satellites = satHelper.Install (satWps); LeoGndNodeHelper gndHelper; - NodeContainer gateways = gndHelper.Install ("../contrib/leo/data/gateways"); - NodeContainer terminals = gndHelper.Install ("../contrib/leo/data/terminals"); + NodeContainer gateways = gndHelper.Install ("contrib/leo/data/test/ground-stations.txt"); + NodeContainer terminals = gndHelper.Install ("contrib/leo/data/test/ground-stations.txt"); LeoHelper leo; leo.SetDeviceAttribute ("DataRate", StringValue ("10Mbps")); leo.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel")); - leo.SetRoutingHelper (AodvHelper ()); + AodvHelper aodv; + leo.SetRoutingHelper (aodv); NetDeviceContainer allDevices = leo.Install (satellites, gateways, terminals); @@ -67,7 +68,7 @@ LeoTestCase1::DoRun (void) ApplicationContainer clientApps; for (uint32_t i = 1; i < terminals.GetN (); i++) { - Address remote = terminals.Get (i)->GetObject ()->GetAddress (1, 0).GetAddress (); + Address remote = terminals.Get (i)->GetObject ()->GetAddress (1, 0).GetLocal (); UdpEchoClientHelper echoClient (remote, 9); echoClient.SetAttribute ("MaxPackets", UintegerValue (1)); echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));