refactor stuff

This commit is contained in:
Tim Schubert 2020-07-20 15:48:24 +02:00
parent 57b04d6424
commit 97de8c9d24
15 changed files with 135 additions and 88 deletions

View file

@ -3,6 +3,7 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/log.h"
#include "../model/leo-mock-net-device.h"
#include "nd-cache-helper.h"
@ -10,9 +11,13 @@
namespace ns3
{
NS_LOG_COMPONENT_DEFINE ("NdCacheHelper");
void
NdCacheHelper::Install (NetDeviceContainer &devices, Ipv6InterfaceContainer &interfaces) const
{
NS_LOG_FUNCTION (this);
// prepare NDS cache
for (uint32_t i = 0; i < devices.GetN (); i++)
{
@ -47,6 +52,8 @@ NdCacheHelper::Install (NetDeviceContainer &devices, Ipv6InterfaceContainer &int
entry = cache->Add (ipaddr);
}
entry->SetMacAddress (address);
NS_LOG_DEBUG ("Added entry for " << address);
}
}
}