This commit is contained in:
Tim Schubert 2020-07-03 12:58:30 +02:00
parent 227ae70a1d
commit 045eff04ff
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ main (int argc, char *argv[])
Ipv6InterfaceContainer interfaces = address.Assign (devices); Ipv6InterfaceContainer interfaces = address.Assign (devices);
NdCacheHelper nsHelper; NdCacheHelper nsHelper;
nsHelper.Install (nodes, interfaces); nsHelper.Install (devices, interfaces);
UdpEchoServerHelper echoServer (9); UdpEchoServerHelper echoServer (9);
ApplicationContainer serverApps = echoServer.Install (nodes); ApplicationContainer serverApps = echoServer.Install (nodes);

View file

@ -16,8 +16,8 @@ NdCacheHelper::Install (NetDeviceContainer &devices, Ipv6InterfaceContainer &int
{ {
Ptr<NetDevice> dev = devices.Get (i); Ptr<NetDevice> dev = devices.Get (i);
Ptr<Node> node = dev->GetNode (); Ptr<Node> node = dev->GetNode ();
uint32_t ifIndex = dev->GetIfIndex ();
Ptr<Ipv6L3Protocol> ipv6 = node->GetObject<Ipv6L3Protocol> (); Ptr<Ipv6L3Protocol> ipv6 = node->GetObject<Ipv6L3Protocol> ();
int32_t ifIndex = ipv6->GetInterfaceForDevice (dev);
Ptr<Ipv6Interface> interface = ipv6->GetInterface (ifIndex); Ptr<Ipv6Interface> interface = ipv6->GetInterface (ifIndex);
Ptr<NdiscCache> cache = interface->GetNdiscCache (); Ptr<NdiscCache> cache = interface->GetNdiscCache ();
for (uint32_t j = 0; j < devices.GetN (); j++) for (uint32_t j = 0; j < devices.GetN (); j++)