mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 18:13:57 +02:00
Add ARP cache helper
This commit is contained in:
parent
4628af9511
commit
bbf9269a14
5 changed files with 95 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
|||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
|
||||
#include "nd-cache-helper.h"
|
||||
|
||||
#include "arp-cache-helper.h"
|
||||
#include "ns3/ipv4-address-helper.h"
|
||||
#include "ns3/ipv4-interface-container.h"
|
||||
#include "leo-helper.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
@ -40,6 +42,17 @@ LeoHelper::Install (NodeContainer &satellites, NodeContainer &gateways, NodeCont
|
|||
ndCache.Install (gwNet, gwAddrs);
|
||||
ndCache.Install (utNet, utAddrs);
|
||||
|
||||
// Make all networks addressable for legacy protocol
|
||||
Ipv4AddressHelper legacy;
|
||||
Ipv4InterfaceContainer islLegacy = legacy.Assign (islNet);
|
||||
Ipv4InterfaceContainer gwLegacy = legacy.Assign (gwNet);
|
||||
Ipv4InterfaceContainer utLegacy = legacy.Assign (utNet);
|
||||
|
||||
ArpCacheHelper arpCache;
|
||||
arpCache.Install (islNet, islLegacy);
|
||||
arpCache.Install (gwNet, gwLegacy);
|
||||
arpCache.Install (utNet, utLegacy);
|
||||
|
||||
// Add to resulting container of net devices
|
||||
container.Add (islNet);
|
||||
container.Add (gwNet);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue