25 #include <ns3/csma-helper.h>
27 #include <ns3/internet-stack-helper.h>
28 #include <ns3/ipv4-interface.h>
29 #include <ns3/ipv4-routing-table-entry.h>
30 #include <ns3/ipv4-static-routing-helper.h>
32 #include <ns3/satellite-arp-cache.h>
33 #include <ns3/satellite-id-mapper.h>
34 #include <ns3/satellite-mac.h>
35 #include <ns3/satellite-mobility-observer.h>
36 #include <ns3/satellite-net-device.h>
37 #include <ns3/satellite-simple-net-device.h>
38 #include <ns3/satellite-topology.h>
39 #include <ns3/satellite-typedefs.h>
40 #include <ns3/singleton.h>
49 NS_LOG_COMPONENT_DEFINE(
"SatUserHelper");
54 NS_OBJECT_ENSURE_REGISTERED(SatUserHelper);
60 TypeId(
"ns3::SatUserHelper")
62 .AddConstructor<SatUserHelper>()
64 "BackboneNetworkType",
65 "Network used between GW and Router, and between Router and Users in "
73 .AddAttribute(
"SubscriberNetworkType",
74 "Network used between UTs and Users in subscriber network",
76 MakeEnumAccessor<SatUserHelper::NetworkType>(
82 .AddAttribute(
"PropagationDelayGetter",
83 "Callback to retrieve propagation delay models from beam IDs",
86 MakeCallbackChecker())
87 .AddTraceSource(
"Creation",
90 "ns3::SatTypedefs::CreationCallback");
101 : m_backboneNetworkType(
SatUserHelper::NETWORK_TYPE_SAT_SIMPLE),
105 NS_LOG_FUNCTION(
this);
110 NS_LOG_FUNCTION(
this);
116 const AttributeValue& value1,
118 const AttributeValue& value2,
120 const AttributeValue& value3,
122 const AttributeValue& value4)
124 NS_LOG_FUNCTION(
this << type);
126 m_csma.SetQueue(type, name1, value1, name2, value2, name3, value3, name4, value4);
132 NS_LOG_FUNCTION(
this);
133 m_csma.SetDeviceAttribute(name, value);
139 NS_LOG_FUNCTION(
this);
140 m_csma.SetChannelAttribute(name, value);
145 const Ipv4Mask& mask,
146 const Ipv4Address address)
148 NS_LOG_FUNCTION(
this);
150 m_ipv4Ut.SetBase(network, mask, address);
155 const Ipv4Mask& mask,
156 const Ipv4Address address)
158 NS_LOG_FUNCTION(
this);
160 m_ipv4Gw.SetBase(network, mask, address);
165 const Ipv4Mask& mask,
166 const Ipv4Address address)
168 NS_LOG_FUNCTION(
this);
176 NS_LOG_FUNCTION(
this << userCount);
178 NodeContainer createdUsers;
181 for (NodeContainer::Iterator i = ut.Begin(); i != ut.End(); i++)
183 createdUsers.Add(
InstallUt(*i, userCount));
192 NS_LOG_FUNCTION(
this << userCount);
196 NS_FATAL_ERROR(
"User count is zero!!!");
199 InternetStackHelper internet;
202 users.Create(userCount);
203 NodeContainer utUsers = NodeContainer(ut, users);
205 internet.Install(users);
208 Ipv4InterfaceContainer addresses =
m_ipv4Ut.Assign(nd);
209 Ipv4StaticRoutingHelper ipv4RoutingHelper;
211 for (NodeContainer::Iterator i = users.Begin(); i != users.End(); i++)
214 std::pair<std::map<Ptr<Node>, Ptr<Node>>::iterator,
bool> ret =
215 m_utMap.insert(std::make_pair(*i, ut));
216 NS_ASSERT(ret.second);
219 NS_ASSERT_MSG((*i)->GetNDevices() == 2,
220 "Failed to get the device to subscriber network in UT user node "
223 Ptr<NetDevice> dev = (*i)->GetDevice(1);
224 Singleton<SatIdMapper>::Get()->AttachMacToUtUserId(dev->GetAddress());
227 Ptr<Ipv4> ipv4 = (*i)->GetObject<Ipv4>();
230 Ptr<Ipv4StaticRouting> routing = ipv4RoutingHelper.GetStaticRouting(ipv4);
231 routing->SetDefaultRoute(addresses.GetAddress(0), 1);
232 NS_LOG_INFO(
"User default route: " << addresses.GetAddress(0));
237 for (NodeContainer::Iterator it = users.Begin(); it != users.End(); it++)
239 Singleton<SatTopology>::Get()->AddUtUserNode(*it, ut);
248 NS_LOG_FUNCTION(
this << userCount);
250 InternetStackHelper internet;
261 users.Create(userCount);
262 NodeContainer routerUsers = NodeContainer(
m_router, users);
264 internet.Install(users);
267 Ipv4InterfaceContainer addresses =
m_ipv4Gw.Assign(nd);
268 Ipv4StaticRoutingHelper ipv4RoutingHelper;
270 Ptr<Ipv4> ipv4Router =
m_router->GetObject<Ipv4>();
271 uint32_t lastRouterIf = ipv4Router->GetNInterfaces() - 1;
272 Ptr<Ipv4StaticRouting> routingRouter = ipv4RoutingHelper.GetStaticRouting(ipv4Router);
273 routingRouter->SetDefaultRoute(addresses.GetAddress(1), lastRouterIf);
274 NS_LOG_INFO(
"Router default route: " << addresses.GetAddress(1));
276 for (NodeContainer::Iterator i = users.Begin(); i != users.End(); i++)
279 NS_ASSERT_MSG((*i)->GetNDevices() == 2,
280 "Failed to get the device to backbone network in GW user node "
283 Ptr<NetDevice> dev = (*i)->GetDevice(1);
284 Singleton<SatIdMapper>::Get()->AttachMacToGwUserId(dev->GetAddress());
287 Ptr<Ipv4> ipv4 = (*i)->GetObject<Ipv4>();
290 Ptr<Ipv4StaticRouting> routing = ipv4RoutingHelper.GetStaticRouting(ipv4);
291 routing->SetDefaultRoute(addresses.GetAddress(0), 1);
292 NS_LOG_INFO(
"User default route: " << addresses.GetAddress(0));
294 Singleton<SatTopology>::Get()->AddGwUserNode(*i);
303 NS_LOG_FUNCTION(
this);
305 bool isGwUser =
false;
307 NodeContainer gwUsers = Singleton<SatTopology>::Get()->GetGwUserNodes();
309 for (NodeContainer::Iterator it = gwUsers.Begin(); ((it != gwUsers.End()) && !isGwUser); it++)
323 NS_LOG_FUNCTION(
this);
325 TraceConnect(
"Creation",
"SatUserHelper", cb);
331 NS_LOG_FUNCTION(
this);
333 NodeContainer gwNodes = Singleton<SatTopology>::Get()->GetGwNodes();
335 for (NodeContainer::Iterator i = gwNodes.Begin(); i != gwNodes.End(); i++)
337 NodeContainer gwRouter = NodeContainer((*i), router);
340 Ipv4InterfaceContainer addresses =
m_ipv4Gw.Assign(nd);
341 Ipv4StaticRoutingHelper ipv4RoutingHelper;
344 Ptr<Ipv4> ipv4Gw = (*i)->GetObject<Ipv4>();
345 uint32_t lastGwIf = ipv4Gw->GetNInterfaces() - 1;
346 Ptr<Ipv4StaticRouting> routingGw = ipv4RoutingHelper.GetStaticRouting(ipv4Gw);
347 routingGw->SetDefaultRoute(addresses.GetAddress(1), lastGwIf);
348 NS_LOG_INFO(
"GW default route: " << addresses.GetAddress(1));
350 for (uint32_t routeIndex = 0; routeIndex < routingGw->GetNRoutes(); routeIndex++)
353 Ptr<Ipv4> ipv4Router = router->GetObject<Ipv4>();
354 uint32_t lastRouterIf = ipv4Router->GetNInterfaces() - 1;
355 Ptr<Ipv4StaticRouting> routingRouter = ipv4RoutingHelper.GetStaticRouting(ipv4Router);
357 Ipv4RoutingTableEntry route = routingGw->GetRoute(routeIndex);
358 uint32_t
interface = route.GetInterface();
361 if ((interface != 0) && (
interface != lastGwIf))
363 routingRouter->AddNetworkRouteTo(route.GetDest(),
364 route.GetDestNetworkMask(),
365 addresses.GetAddress(0),
367 NS_LOG_INFO(
"Router network route:" << route.GetDest() <<
", "
368 << route.GetDestNetworkMask() <<
", "
369 << addresses.GetAddress(0));
380 NS_LOG_FUNCTION(
this);
382 NetDeviceContainer devs;
405 NS_LOG_FUNCTION(
this);
407 NetDeviceContainer devs;
430 NS_LOG_FUNCTION(
this);
432 NetDeviceContainer devs;
433 Ptr<SatSimpleChannel> channel = CreateObject<SatSimpleChannel>();
435 for (NodeContainer::Iterator i = c.Begin(); i != c.End(); i++)
437 Ptr<SatSimpleNetDevice> device = CreateObject<SatSimpleNetDevice>();
438 device->SetAddress(Mac48Address::Allocate());
439 (*i)->AddDevice(device);
440 device->SetChannel(channel);
450 NS_LOG_FUNCTION(
this);
452 std::ostringstream oss;
455 Ptr<Ipv4> ipv4 =
m_router->GetObject<Ipv4>();
457 std::vector<Ipv4Address> IPAddressVector;
458 std::vector<std::string> devNameVector;
459 std::vector<Address> devAddressVector;
461 oss <<
"--- Router info ---" << std::endl << std::endl;
463 for (uint32_t j = 0; j <
m_router->GetNDevices(); j++)
465 Ptr<NetDevice> device =
m_router->GetDevice(j);
467 oss << device->GetInstanceTypeId().GetName() <<
" ";
468 oss << device->GetAddress() <<
" ";
469 oss << ipv4->GetAddress(j, 0).GetLocal() <<
" ";
478 NS_LOG_FUNCTION(
this);
485 NetDeviceContainer utNd,
489 Ipv4InterfaceContainer gwAddress =
m_ipv4Beam.Assign(gwNd);
490 Ipv4Address gwAddr = gwAddress.GetAddress(0);
491 NS_LOG_FUNCTION(
this << gw << gwNd << gwAddr);
493 Ipv4InterfaceContainer utIfs =
m_ipv4Beam.Assign(utNd);
495 Ipv4StaticRoutingHelper ipv4RoutingHelper;
496 Ptr<Ipv4L3Protocol> ipv4Gw = gw->GetObject<Ipv4L3Protocol>();
497 Ptr<Ipv4StaticRouting> srGw = ipv4RoutingHelper.GetStaticRouting(ipv4Gw);
500 m_gwDevices.insert(std::make_pair(gwNd->GetAddress(), gwNd));
503 Address macAddressGw = gwNd->GetAddress();
504 Ptr<SatArpCache> utArpCache = CreateObject<SatArpCache>();
505 utArpCache->Add(gwAddr, macAddressGw);
506 NS_LOG_INFO(
"UT ARP entry: " << gwAddr <<
" - " << macAddressGw);
512 Ptr<SatArpCache> gwArpCache = CreateObject<SatArpCache>();
513 for (uint32_t i = 0; i < utIfs.GetN(); ++i)
515 NS_ASSERT(utIfs.GetN() == utNd.GetN());
516 Ptr<NetDevice> nd = utNd.Get(i);
517 Ipv4Address ipv4Addr = utIfs.GetAddress(i);
518 gwArpCache->Add(ipv4Addr, nd->GetAddress());
519 NS_LOG_INFO(
"GW ARP entry: " << ipv4Addr <<
" - " << nd->GetAddress());
521 m_utDevices.insert(std::make_pair(nd->GetAddress(), nd));
526 ipv4Gw->GetInterface(gwNd->GetIfIndex())->SetArpCache(gwArpCache);
527 NS_LOG_INFO(
"Add ARP cache to GW " << gw->GetId());
529 uint32_t utAddressIndex = 0;
531 for (NodeContainer::Iterator i = ut.Begin(); i != ut.End(); i++)
533 Ptr<Ipv4L3Protocol> ipv4Ut = (*i)->GetObject<Ipv4L3Protocol>();
535 uint32_t count = ipv4Ut->GetNInterfaces();
537 for (uint32_t j = 1; j < count; j++)
539 std::string devName = ipv4Ut->GetNetDevice(j)->GetInstanceTypeId().GetName();
542 if (devName ==
"ns3::SatNetDevice" || devName ==
"ns3::SatLorawanNetDevice")
544 Ptr<Ipv4StaticRouting> srUt = ipv4RoutingHelper.GetStaticRouting(ipv4Ut);
545 srUt->SetDefaultRoute(gwAddr, j);
546 NS_LOG_INFO(
"UT default route: " << gwAddr);
549 ipv4Ut->GetInterface(j)->SetArpCache(utArpCache);
550 NS_LOG_INFO(
"Add the ARP cache to UT " << (*i)->GetId());
554 Ipv4Address address = ipv4Ut->GetAddress(j, 0).GetLocal();
555 Ipv4Mask mask = ipv4Ut->GetAddress(j, 0).GetMask();
557 srGw->AddNetworkRouteTo(address.CombineMask(mask),
559 utIfs.GetAddress(utAddressIndex),
561 NS_LOG_INFO(
"GW Network route: " << address.CombineMask(mask) <<
", " << mask
562 <<
", " << utIfs.GetAddress(utAddressIndex));
575 NS_LOG_FUNCTION(
this << utAddress << gwAddress);
577 std::map<Address, Ptr<NetDevice>>::iterator gwNdIterator =
m_gwDevices.find(gwAddress);
578 NS_ASSERT_MSG(gwNdIterator !=
m_gwDevices.end(),
"Unknown GW with MAC address " << gwAddress);
580 Ptr<SatNetDevice> gwNd = DynamicCast<SatNetDevice>(gwNdIterator->second);
581 NS_ASSERT(gwNd !=
nullptr);
583 gwNd->GetNode()->GetObject<Ipv4L3Protocol>()->GetAddress(gwNd->GetIfIndex(), 0).GetLocal();
585 std::map<Address, Ptr<NetDevice>>::iterator utNdIterator =
m_utDevices.find(utAddress);
586 NS_ASSERT_MSG(utNdIterator !=
m_utDevices.end(),
"Unknown UT with MAC address " << utAddress);
588 std::map<Address, Ptr<SatArpCache>>::iterator arpCacheIterator =
591 "ARP cache not found to gateway " << gwAddress);
593 Ptr<SatNetDevice> utNd = DynamicCast<SatNetDevice>(utNdIterator->second);
594 NS_ASSERT(utNd !=
nullptr);
595 Ptr<Ipv4L3Protocol> protocol = utNd->GetNode()->GetObject<Ipv4L3Protocol>();
596 uint32_t utIfIndex = utNdIterator->second->GetIfIndex();
598 NS_LOG_INFO(
"Changing ARP cache for UT " << utAddress <<
" pointing to " << ip <<
" through "
600 protocol->GetInterface(utIfIndex)->SetArpCache(arpCacheIterator->second);
602 Ipv4StaticRoutingHelper ipv4RoutingHelper;
603 Ptr<Ipv4StaticRouting> routing = ipv4RoutingHelper.GetStaticRouting(protocol);
604 routing->RemoveRoute(routing->GetNRoutes() - 1);
605 routing->SetDefaultRoute(ip, utIfIndex);
607 NS_LOG_INFO(
"Set default route on UT to " << ip);
609 uint32_t satId = gwNd->GetMac()->GetSatId();
610 uint32_t beamId = gwNd->GetMac()->GetBeamId();
611 Ptr<PropagationDelayModel> flDelayModel =
613 Ptr<PropagationDelayModel> ulDelayModel =
624 NS_LOG_FUNCTION(
this << ut << oldGateway << newGateway);
626 std::map<Address, Ptr<NetDevice>>::iterator utNdIterator =
m_utDevices.find(ut);
629 NS_FATAL_ERROR(
"Unknown UT with MAC address " << ut);
632 std::map<Address, Ptr<NetDevice>>::iterator oldGwNdIterator =
m_gwDevices.find(oldGateway);
635 NS_FATAL_ERROR(
"Unknown GW with MAC address " << oldGateway);
638 std::map<Address, Ptr<NetDevice>>::iterator newGwNdIterator =
m_gwDevices.find(newGateway);
641 NS_FATAL_ERROR(
"Unknown GW with MAC address " << newGateway);
644 uint32_t utIfIndex = utNdIterator->second->GetIfIndex();
645 Ptr<Ipv4L3Protocol> utProtocol = utNdIterator->second->GetNode()->GetObject<Ipv4L3Protocol>();
646 Ipv4Address utIpAddress = utProtocol->GetAddress(utIfIndex, 0).GetLocal();
648 Ptr<Node> oldGatewayNode = oldGwNdIterator->second->GetNode();
649 uint32_t oldIfIndex = oldGwNdIterator->second->GetIfIndex();
650 Ptr<Node> newGatewayNode = newGwNdIterator->second->GetNode();
651 uint32_t newIfIndex = newGwNdIterator->second->GetIfIndex();
653 Ptr<ArpCache> arpCache;
655 arpCache = oldGatewayNode->GetObject<Ipv4L3Protocol>()->GetInterface(oldIfIndex)->GetArpCache();
656 for (ArpCache::Entry* entry : arpCache->LookupInverse(ut))
658 arpCache->Remove(entry);
661 arpCache = newGatewayNode->GetObject<Ipv4L3Protocol>()->GetInterface(newIfIndex)->GetArpCache();
662 ArpCache::Entry* entry = arpCache->Add(utIpAddress);
663 entry->SetMacAddress(ut);
664 entry->MarkPermanent();
667 Ipv4StaticRoutingHelper ipv4RoutingHelper;
668 if (oldGatewayNode == newGatewayNode)
671 Ptr<Ipv4StaticRouting> routing =
672 ipv4RoutingHelper.GetStaticRouting(oldGatewayNode->GetObject<Ipv4L3Protocol>());
675 for (uint32_t routeIndex = routing->GetNRoutes(); routeIndex > 0; --routeIndex)
678 if (routing->GetRoute(routeIndex - 1).GetGateway() == utIpAddress)
680 routing->RemoveRoute(routeIndex - 1);
685 for (uint32_t ifIndex = 1; ifIndex < utProtocol->GetNInterfaces(); ++ifIndex)
687 Ipv4Address address = utProtocol->GetAddress(ifIndex, 0).GetLocal();
688 Ipv4Mask mask = utProtocol->GetAddress(ifIndex, 0).GetMask();
690 if (ifIndex == utIfIndex)
692 mask = Ipv4Mask(
"/32");
695 routing->AddNetworkRouteTo(address.CombineMask(mask), mask, utIpAddress, newIfIndex);
701 Ptr<Ipv4StaticRouting> routing =
702 ipv4RoutingHelper.GetStaticRouting(oldGatewayNode->GetObject<Ipv4L3Protocol>());
703 Ptr<Ipv4StaticRouting> routingRouter =
704 ipv4RoutingHelper.GetStaticRouting(
m_router->GetObject<Ipv4L3Protocol>());
707 for (uint32_t routeIndex = routing->GetNRoutes(); routeIndex > 0; --routeIndex)
710 Ipv4RoutingTableEntry gwRoute = routing->GetRoute(routeIndex - 1);
711 if (gwRoute.GetGateway() == utIpAddress)
713 routing->RemoveRoute(routeIndex - 1);
715 for (uint32_t routerIndex = 0; routerIndex < routingRouter->GetNRoutes();
718 Ipv4RoutingTableEntry route = routingRouter->GetRoute(routerIndex);
719 if (route.GetDestNetwork() == gwRoute.GetDestNetwork() &&
720 route.GetDestNetworkMask() == gwRoute.GetDestNetworkMask())
722 routingRouter->RemoveRoute(routerIndex);
730 Ptr<Ipv4L3Protocol> gwProtocol = newGatewayNode->GetObject<Ipv4L3Protocol>();
733 Ipv4Address gwAddress;
734 for (uint32_t ifIndex = 1; ifIndex < gwProtocol->GetNInterfaces(); ++ifIndex)
736 Ptr<NetDevice> gwNd = gwProtocol->GetNetDevice(ifIndex);
737 if (gwNd->GetInstanceTypeId().GetName() !=
"ns3::SatNetDevice" &&
738 gwNd->GetInstanceTypeId().GetName() !=
"ns3::SatLorawanNetDevice")
740 gwAddress = gwProtocol->GetAddress(ifIndex, 0).GetLocal();
746 uint32_t routingIfIndex = routingRouter->GetNRoutes();
747 for (uint32_t routeIndex = 0; routeIndex < routingRouter->GetNRoutes(); ++routeIndex)
749 Ipv4RoutingTableEntry route = routingRouter->GetRoute(routeIndex);
750 if (route.GetGateway() == gwAddress)
752 routingIfIndex = route.GetInterface();
757 NS_ASSERT_MSG(routingIfIndex != routingRouter->GetNRoutes(),
758 "Couldn't find interface on the terrestrial router to the new gateway.");
761 routing = ipv4RoutingHelper.GetStaticRouting(gwProtocol);
762 for (uint32_t ifIndex = 1; ifIndex < utProtocol->GetNInterfaces(); ++ifIndex)
764 Ipv4Address address = utProtocol->GetAddress(ifIndex, 0).GetLocal();
765 Ipv4Mask mask = utProtocol->GetAddress(ifIndex, 0).GetMask();
767 if (ifIndex == utIfIndex)
769 mask = Ipv4Mask(
"/32");
772 routing->AddNetworkRouteTo(address.CombineMask(mask), mask, utIpAddress, newIfIndex);
773 routingRouter->AddNetworkRouteTo(address.CombineMask(mask),
Keep track of the current position and velocity of an object in satellite network.
Observes given mobilities and keeps track of certain wanted properties.
void ObserveTimingAdvance(Ptr< PropagationDelayModel > ownDelayModel, Ptr< PropagationDelayModel > anotherDelayModel, Ptr< SatMobilityModel > anotherMobility)
Enable observing of the timing advance.
Build a set of user nodes and links channels between user nodes and satellite nodes.
Ipv4AddressHelper m_ipv4Gw
void InstallGw(uint32_t users)
void SetCsmaDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each CsmaNetDevice object created by the helper.
NetworkType m_subscriberNetworkType
std::map< Address, Ptr< NetDevice > > m_utDevices
Container of UT SatNetDevice accessible by MAC address.
void UpdateGwRoutes(Address ut, Address oldGateway, Address newGateway)
Update ARP cache and default route on the terrestrial network so packets are properly routed to the U...
void SetBeamBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
NetDeviceContainer InstallSatSimpleNetwork(const NodeContainer &c) const
Install satellite simple network.
static TypeId GetTypeId(void)
Derived from Object.
void InstallRouter(Ptr< Node > router)
Install IP router to to Gateways.
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
std::map< Ptr< Node >, Ptr< Node > > m_utMap
Container of UT users and their corresponding UT.
void SetCsmaQueue(std::string type, std::string name1="", const AttributeValue &value1=EmptyAttributeValue(), std::string name2="", const AttributeValue &value2=EmptyAttributeValue(), std::string name3="", const AttributeValue &value3=EmptyAttributeValue(), std::string name4="", const AttributeValue &value4=EmptyAttributeValue())
Set the type and the attribute values to be associated with each Queue object in each CsmaNetDevice c...
std::map< Address, Ptr< SatArpCache > > m_arpCachesToGateway
Container of ARP tables to reach a gateway accessible by MAC address.
void SetCsmaChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each CsmaChannel object created by the helper.
std::string GetRouterInfo() const
Get router information.
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
NetDeviceContainer InstallBackboneNetwork(const NodeContainer &c) const
Install network between GW and Router (or users) or Router and its users.
void SetGwBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
Ipv4AddressHelper m_ipv4Beam
std::map< Address, Ptr< NetDevice > > m_gwDevices
Container of GW SatNetDevice accessible by MAC address.
Ptr< Node > GetRouter() const
@ NETWORK_TYPE_SAT_SIMPLE
void PopulateBeamRoutings(NodeContainer ut, NetDeviceContainer utNd, Ptr< Node > gw, Ptr< NetDevice > gwNd)
Set needed routings of satellite network and fill ARP cache for the network.
NetworkType m_backboneNetworkType
SatUserHelper::PropagationDelayCallback m_propagationDelayCallback
bool IsGwUser(Ptr< Node > node) const
Check if node is GW user or not.
TypeId GetInstanceTypeId(void) const
Derived from Object.
NodeContainer InstallUt(NodeContainer ut, uint32_t users)
void UpdateUtRoutes(Address ut, Address newGateway)
Update ARP cache and default route on an UT so packets are properly routed to the new GW as their nex...
SatUserHelper()
Create a SatUserHelper to make life easier when creating Users and their connections to satellite net...
Ipv4AddressHelper m_ipv4Ut
NetDeviceContainer InstallSubscriberNetwork(const NodeContainer &c) const
Install network between UT and its users.
void SetUtBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.