This commit is contained in:
Tim Schubert 2020-07-18 14:56:48 +02:00
parent a55177cd67
commit 57b04d6424
2 changed files with 10 additions and 9 deletions

View file

@ -38,7 +38,7 @@ ArpCacheHelper::Install (NetDeviceContainer &devices, Ipv4InterfaceContainer &in
// and associated address // and associated address
uint32_t otherIfIndex = otherDevice->GetIfIndex (); uint32_t otherIfIndex = otherDevice->GetIfIndex ();
Ipv4Address ipaddr = interfaces.GetAddress (otherIfIndex, 1); // IP Ipv4Address ipaddr = interfaces.GetAddress (otherIfIndex, 0); // IP
// update cache // update cache
ArpCache::Entry* entry = cache->Lookup (ipaddr); ArpCache::Entry* entry = cache->Lookup (ipaddr);

View file

@ -40,22 +40,23 @@ LeoTestCase1::DoRun (void)
std::vector<std::string> satWps = std::vector<std::string> satWps =
{ {
"../contrib/leo/data/starlink/45212.waypoints", "contrib/leo/data/test/waypoints.txt",
"../contrib/leo/data/starlink/45213.waypoints", "contrib/leo/data/test/waypoints.txt",
"../contrib/leo/data/starlink/45214.waypoints", "contrib/leo/data/test/waypoints.txt",
"../contrib/leo/data/starlink/45215.waypoints", "contrib/leo/data/test/waypoints.txt",
}; };
LeoSatNodeHelper satHelper; LeoSatNodeHelper satHelper;
NodeContainer satellites = satHelper.Install (satWps); NodeContainer satellites = satHelper.Install (satWps);
LeoGndNodeHelper gndHelper; LeoGndNodeHelper gndHelper;
NodeContainer gateways = gndHelper.Install ("../contrib/leo/data/gateways"); NodeContainer gateways = gndHelper.Install ("contrib/leo/data/test/ground-stations.txt");
NodeContainer terminals = gndHelper.Install ("../contrib/leo/data/terminals"); NodeContainer terminals = gndHelper.Install ("contrib/leo/data/test/ground-stations.txt");
LeoHelper leo; LeoHelper leo;
leo.SetDeviceAttribute ("DataRate", StringValue ("10Mbps")); leo.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));
leo.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel")); leo.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel"));
leo.SetRoutingHelper (AodvHelper ()); AodvHelper aodv;
leo.SetRoutingHelper (aodv);
NetDeviceContainer allDevices = leo.Install (satellites, gateways, terminals); NetDeviceContainer allDevices = leo.Install (satellites, gateways, terminals);
@ -67,7 +68,7 @@ LeoTestCase1::DoRun (void)
ApplicationContainer clientApps; ApplicationContainer clientApps;
for (uint32_t i = 1; i < terminals.GetN (); i++) for (uint32_t i = 1; i < terminals.GetN (); i++)
{ {
Address remote = terminals.Get (i)->GetObject<Ipv6> ()->GetAddress (1, 0).GetAddress (); Address remote = terminals.Get (i)->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();
UdpEchoClientHelper echoClient (remote, 9); UdpEchoClientHelper echoClient (remote, 9);
echoClient.SetAttribute ("MaxPackets", UintegerValue (1)); echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0))); echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));