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-typedefs.h>
39 #include <ns3/singleton.h>
41 NS_LOG_COMPONENT_DEFINE(
"SatUserHelper");
46 NS_OBJECT_ENSURE_REGISTERED(SatUserHelper);
52 TypeId(
"ns3::SatUserHelper")
54 .AddConstructor<SatUserHelper>()
55 .AddAttribute(
"BackboneNetworkType",
56 "Network used between GW and Router, and between Router and Users in "
64 .AddAttribute(
"SubscriberNetworkType",
65 "Network used between UTs and Users in subscriber network",
72 .AddAttribute(
"PropagationDelayGetter",
73 "Callback to retrieve propagation delay models from beam IDs",
76 MakeCallbackChecker())
77 .AddTraceSource(
"Creation",
80 "ns3::SatTypedefs::CreationCallback");
91 : m_backboneNetworkType(
SatUserHelper::NETWORK_TYPE_SAT_SIMPLE),
95 NS_LOG_FUNCTION(
this);
100 NS_LOG_FUNCTION(
this);
106 const AttributeValue& value1,
108 const AttributeValue& value2,
110 const AttributeValue& value3,
112 const AttributeValue& value4)
114 NS_LOG_FUNCTION(
this << type);
116 m_csma.SetQueue(type, name1, value1, name2, value2, name3, value3, name4, value4);
122 NS_LOG_FUNCTION(
this);
123 m_csma.SetDeviceAttribute(name, value);
129 NS_LOG_FUNCTION(
this);
130 m_csma.SetChannelAttribute(name, value);
135 const Ipv4Mask& mask,
136 const Ipv4Address address)
138 NS_LOG_FUNCTION(
this);
140 m_ipv4Ut.SetBase(network, mask, address);
145 const Ipv4Mask& mask,
146 const Ipv4Address address)
148 NS_LOG_FUNCTION(
this);
150 m_ipv4Gw.SetBase(network, mask, address);
155 const Ipv4Mask& mask,
156 const Ipv4Address address)
158 NS_LOG_FUNCTION(
this);
166 NS_LOG_FUNCTION(
this << userCount);
168 NodeContainer createdUsers;
171 for (NodeContainer::Iterator i = ut.Begin(); i != ut.End(); i++)
173 createdUsers.Add(
InstallUt(*i, userCount));
182 NS_LOG_FUNCTION(
this << userCount);
186 NS_FATAL_ERROR(
"User count is zero!!!");
189 InternetStackHelper internet;
192 users.Create(userCount);
193 NodeContainer utUsers = NodeContainer(ut, users);
195 internet.Install(users);
198 Ipv4InterfaceContainer addresses =
m_ipv4Ut.Assign(nd);
199 Ipv4StaticRoutingHelper ipv4RoutingHelper;
201 for (NodeContainer::Iterator i = users.Begin(); i != users.End(); i++)
204 std::pair<std::map<Ptr<Node>, Ptr<Node>>::iterator,
bool> ret =
205 m_utMap.insert(std::make_pair(*i, ut));
206 NS_ASSERT(ret.second);
209 NS_ASSERT_MSG((*i)->GetNDevices() == 2,
210 "Failed to get the device to subscriber network in UT user node "
213 Ptr<NetDevice> dev = (*i)->GetDevice(1);
214 Singleton<SatIdMapper>::Get()->AttachMacToUtUserId(dev->GetAddress());
217 Ptr<Ipv4> ipv4 = (*i)->GetObject<Ipv4>();
220 Ptr<Ipv4StaticRouting> routing = ipv4RoutingHelper.GetStaticRouting(ipv4);
221 routing->SetDefaultRoute(addresses.GetAddress(0), 1);
222 NS_LOG_INFO(
"User default route: " << addresses.GetAddress(0));
227 std::pair<UtUsersContainer_t::const_iterator, bool> result =
228 m_utUsers.insert(std::make_pair(ut, users));
230 if (result.second ==
false)
232 NS_FATAL_ERROR(
"UT is already installed.");
243 NS_LOG_FUNCTION(
this << userCount);
245 InternetStackHelper internet;
256 users.Create(userCount);
257 NodeContainer routerUsers = NodeContainer(
m_router, users);
259 internet.Install(users);
262 Ipv4InterfaceContainer addresses =
m_ipv4Gw.Assign(nd);
263 Ipv4StaticRoutingHelper ipv4RoutingHelper;
265 Ptr<Ipv4> ipv4Router =
m_router->GetObject<Ipv4>();
266 uint32_t lastRouterIf = ipv4Router->GetNInterfaces() - 1;
267 Ptr<Ipv4StaticRouting> routingRouter = ipv4RoutingHelper.GetStaticRouting(ipv4Router);
268 routingRouter->SetDefaultRoute(addresses.GetAddress(1), lastRouterIf);
269 NS_LOG_INFO(
"Router default route: " << addresses.GetAddress(1));
271 for (NodeContainer::Iterator i = users.Begin(); i != users.End(); i++)
274 NS_ASSERT_MSG((*i)->GetNDevices() == 2,
275 "Failed to get the device to backbone network in GW user node "
278 Ptr<NetDevice> dev = (*i)->GetDevice(1);
279 Singleton<SatIdMapper>::Get()->AttachMacToGwUserId(dev->GetAddress());
282 Ptr<Ipv4> ipv4 = (*i)->GetObject<Ipv4>();
285 Ptr<Ipv4StaticRouting> routing = ipv4RoutingHelper.GetStaticRouting(ipv4);
286 routing->SetDefaultRoute(addresses.GetAddress(0), 1);
287 NS_LOG_INFO(
"User default route: " << addresses.GetAddress(0));
299 NS_LOG_FUNCTION(
this);
307 NS_LOG_FUNCTION(
this);
309 bool isGwUser =
false;
311 for (NodeContainer::Iterator it =
m_gwUsers.Begin(); ((it !=
m_gwUsers.End()) && !isGwUser);
326 NS_LOG_FUNCTION(
this);
334 NS_LOG_FUNCTION(
this);
336 UtUsersContainer_t::const_iterator it =
m_utUsers.find(ut);
340 NS_FATAL_ERROR(
"UT which users are requested in not installed!!!");
349 NS_LOG_FUNCTION(
this);
357 NS_LOG_FUNCTION(
this);
365 NS_LOG_FUNCTION(
this);
367 UtUsersContainer_t::const_iterator it =
m_utUsers.find(ut);
371 NS_FATAL_ERROR(
"UT which user count is requested in not installed!!!");
374 return it->second.GetN();
380 std::map<Ptr<Node>, Ptr<Node>>::const_iterator it =
m_utMap.find(utUserNode);
398 nodes.Add(nodeInfo.first);
407 NS_LOG_FUNCTION(
this);
409 TraceConnect(
"Creation",
"SatUserHelper", cb);
415 NS_LOG_FUNCTION(
this);
417 for (NodeContainer::Iterator i = gw.Begin(); i != gw.End(); i++)
419 NodeContainer gwRouter = NodeContainer((*i), router);
422 Ipv4InterfaceContainer addresses =
m_ipv4Gw.Assign(nd);
423 Ipv4StaticRoutingHelper ipv4RoutingHelper;
426 Ptr<Ipv4> ipv4Gw = (*i)->GetObject<Ipv4>();
427 uint32_t lastGwIf = ipv4Gw->GetNInterfaces() - 1;
428 Ptr<Ipv4StaticRouting> routingGw = ipv4RoutingHelper.GetStaticRouting(ipv4Gw);
429 routingGw->SetDefaultRoute(addresses.GetAddress(1), lastGwIf);
430 NS_LOG_INFO(
"GW default route: " << addresses.GetAddress(1));
432 for (uint32_t routeIndex = 0; routeIndex < routingGw->GetNRoutes(); routeIndex++)
435 Ptr<Ipv4> ipv4Router = router->GetObject<Ipv4>();
436 uint32_t lastRouterIf = ipv4Router->GetNInterfaces() - 1;
437 Ptr<Ipv4StaticRouting> routingRouter = ipv4RoutingHelper.GetStaticRouting(ipv4Router);
439 Ipv4RoutingTableEntry route = routingGw->GetRoute(routeIndex);
440 uint32_t
interface = route.GetInterface();
443 if ((interface != 0) && (
interface != lastGwIf))
445 routingRouter->AddNetworkRouteTo(route.GetDest(),
446 route.GetDestNetworkMask(),
447 addresses.GetAddress(0),
449 NS_LOG_INFO(
"Router network route:" << route.GetDest() <<
", "
450 << route.GetDestNetworkMask() <<
", "
451 << addresses.GetAddress(0));
462 NS_LOG_FUNCTION(
this);
464 NetDeviceContainer devs;
487 NS_LOG_FUNCTION(
this);
489 NetDeviceContainer devs;
512 NS_LOG_FUNCTION(
this);
514 NetDeviceContainer devs;
515 Ptr<SatSimpleChannel> channel = CreateObject<SatSimpleChannel>();
517 for (NodeContainer::Iterator i = c.Begin(); i != c.End(); i++)
519 Ptr<SatSimpleNetDevice> device = CreateObject<SatSimpleNetDevice>();
520 device->SetAddress(Mac48Address::Allocate());
521 (*i)->AddDevice(device);
522 device->SetChannel(channel);
532 NS_LOG_FUNCTION(
this);
534 std::ostringstream oss;
537 Ptr<Ipv4> ipv4 =
m_router->GetObject<Ipv4>();
539 std::vector<Ipv4Address> IPAddressVector;
540 std::vector<std::string> devNameVector;
541 std::vector<Address> devAddressVector;
543 oss <<
"--- Router info ---" << std::endl << std::endl;
545 for (uint32_t j = 0; j <
m_router->GetNDevices(); j++)
547 Ptr<NetDevice> device =
m_router->GetDevice(j);
549 oss << device->GetInstanceTypeId().GetName() <<
" ";
550 oss << device->GetAddress() <<
" ";
551 oss << ipv4->GetAddress(j, 0).GetLocal() <<
" ";
560 NS_LOG_FUNCTION(
this);
567 NetDeviceContainer utNd,
571 Ipv4InterfaceContainer gwAddress =
m_ipv4Beam.Assign(gwNd);
572 Ipv4Address gwAddr = gwAddress.GetAddress(0);
573 NS_LOG_FUNCTION(
this << gw << gwNd << gwAddr);
575 Ipv4InterfaceContainer utIfs =
m_ipv4Beam.Assign(utNd);
577 Ipv4StaticRoutingHelper ipv4RoutingHelper;
578 Ptr<Ipv4L3Protocol> ipv4Gw = gw->GetObject<Ipv4L3Protocol>();
579 Ptr<Ipv4StaticRouting> srGw = ipv4RoutingHelper.GetStaticRouting(ipv4Gw);
582 m_gwDevices.insert(std::make_pair(gwNd->GetAddress(), gwNd));
585 Address macAddressGw = gwNd->GetAddress();
586 Ptr<SatArpCache> utArpCache = CreateObject<SatArpCache>();
587 utArpCache->Add(gwAddr, macAddressGw);
588 NS_LOG_INFO(
"UT ARP entry: " << gwAddr <<
" - " << macAddressGw);
594 Ptr<SatArpCache> gwArpCache = CreateObject<SatArpCache>();
595 for (uint32_t i = 0; i < utIfs.GetN(); ++i)
597 NS_ASSERT(utIfs.GetN() == utNd.GetN());
598 Ptr<NetDevice> nd = utNd.Get(i);
599 Ipv4Address ipv4Addr = utIfs.GetAddress(i);
600 gwArpCache->Add(ipv4Addr, nd->GetAddress());
601 NS_LOG_INFO(
"GW ARP entry: " << ipv4Addr <<
" - " << nd->GetAddress());
603 m_utDevices.insert(std::make_pair(nd->GetAddress(), nd));
608 ipv4Gw->GetInterface(gwNd->GetIfIndex())->SetArpCache(gwArpCache);
609 NS_LOG_INFO(
"Add ARP cache to GW " << gw->GetId());
611 uint32_t utAddressIndex = 0;
613 for (NodeContainer::Iterator i = ut.Begin(); i != ut.End(); i++)
615 Ptr<Ipv4L3Protocol> ipv4Ut = (*i)->GetObject<Ipv4L3Protocol>();
617 uint32_t count = ipv4Ut->GetNInterfaces();
619 for (uint32_t j = 1; j < count; j++)
621 std::string devName = ipv4Ut->GetNetDevice(j)->GetInstanceTypeId().GetName();
624 if (devName ==
"ns3::SatNetDevice" || devName ==
"ns3::SatLorawanNetDevice")
626 Ptr<Ipv4StaticRouting> srUt = ipv4RoutingHelper.GetStaticRouting(ipv4Ut);
627 srUt->SetDefaultRoute(gwAddr, j);
628 NS_LOG_INFO(
"UT default route: " << gwAddr);
631 ipv4Ut->GetInterface(j)->SetArpCache(utArpCache);
632 NS_LOG_INFO(
"Add the ARP cache to UT " << (*i)->GetId());
636 Ipv4Address address = ipv4Ut->GetAddress(j, 0).GetLocal();
637 Ipv4Mask mask = ipv4Ut->GetAddress(j, 0).GetMask();
639 srGw->AddNetworkRouteTo(address.CombineMask(mask),
641 utIfs.GetAddress(utAddressIndex),
643 NS_LOG_INFO(
"GW Network route: " << address.CombineMask(mask) <<
", " << mask
644 <<
", " << utIfs.GetAddress(utAddressIndex));
657 NS_LOG_FUNCTION(
this << utAddress << gwAddress);
659 std::map<Address, Ptr<NetDevice>>::iterator gwNdIterator =
m_gwDevices.find(gwAddress);
660 NS_ASSERT_MSG(gwNdIterator !=
m_gwDevices.end(),
"Unknown GW with MAC address " << gwAddress);
662 Ptr<SatNetDevice> gwNd = DynamicCast<SatNetDevice>(gwNdIterator->second);
663 NS_ASSERT(gwNd != NULL);
665 gwNd->GetNode()->GetObject<Ipv4L3Protocol>()->GetAddress(gwNd->GetIfIndex(), 0).GetLocal();
667 std::map<Address, Ptr<NetDevice>>::iterator utNdIterator =
m_utDevices.find(utAddress);
668 NS_ASSERT_MSG(utNdIterator !=
m_utDevices.end(),
"Unknown UT with MAC address " << utAddress);
670 std::map<Address, Ptr<SatArpCache>>::iterator arpCacheIterator =
673 "ARP cache not found to gateway " << gwAddress);
675 Ptr<SatNetDevice> utNd = DynamicCast<SatNetDevice>(utNdIterator->second);
676 NS_ASSERT(utNd != NULL);
677 Ptr<Ipv4L3Protocol> protocol = utNd->GetNode()->GetObject<Ipv4L3Protocol>();
678 uint32_t utIfIndex = utNdIterator->second->GetIfIndex();
680 NS_LOG_INFO(
"Changing ARP cache for UT " << utAddress <<
" pointing to " << ip <<
" through "
682 protocol->GetInterface(utIfIndex)->SetArpCache(arpCacheIterator->second);
684 Ipv4StaticRoutingHelper ipv4RoutingHelper;
685 Ptr<Ipv4StaticRouting> routing = ipv4RoutingHelper.GetStaticRouting(protocol);
686 routing->SetDefaultRoute(ip, utIfIndex);
688 uint32_t satId = gwNd->GetMac()->GetSatId();
689 uint32_t beamId = gwNd->GetMac()->GetBeamId();
690 Ptr<PropagationDelayModel> flDelayModel =
692 Ptr<PropagationDelayModel> ulDelayModel =
703 NS_LOG_FUNCTION(
this << ut << oldGateway << newGateway);
705 std::map<Address, Ptr<NetDevice>>::iterator utNdIterator =
m_utDevices.find(ut);
708 NS_FATAL_ERROR(
"Unknown UT with MAC address " << ut);
711 std::map<Address, Ptr<NetDevice>>::iterator oldGwNdIterator =
m_gwDevices.find(oldGateway);
714 NS_FATAL_ERROR(
"Unknown GW with MAC address " << oldGateway);
717 std::map<Address, Ptr<NetDevice>>::iterator newGwNdIterator =
m_gwDevices.find(newGateway);
720 NS_FATAL_ERROR(
"Unknown GW with MAC address " << newGateway);
723 uint32_t utIfIndex = utNdIterator->second->GetIfIndex();
724 Ptr<Ipv4L3Protocol> utProtocol = utNdIterator->second->GetNode()->GetObject<Ipv4L3Protocol>();
725 Ipv4Address utIpAddress = utProtocol->GetAddress(utIfIndex, 0).GetLocal();
727 Ptr<Node> oldGatewayNode = oldGwNdIterator->second->GetNode();
728 uint32_t oldIfIndex = oldGwNdIterator->second->GetIfIndex();
729 Ptr<Node> newGatewayNode = newGwNdIterator->second->GetNode();
730 uint32_t newIfIndex = newGwNdIterator->second->GetIfIndex();
732 Ptr<ArpCache> arpCache;
734 arpCache = oldGatewayNode->GetObject<Ipv4L3Protocol>()->GetInterface(oldIfIndex)->GetArpCache();
735 for (ArpCache::Entry* entry : arpCache->LookupInverse(ut))
737 arpCache->Remove(entry);
740 arpCache = newGatewayNode->GetObject<Ipv4L3Protocol>()->GetInterface(newIfIndex)->GetArpCache();
741 ArpCache::Entry* entry = arpCache->Add(utIpAddress);
742 entry->SetMacAddress(ut);
743 entry->MarkPermanent();
746 Ipv4StaticRoutingHelper ipv4RoutingHelper;
747 if (oldGatewayNode == newGatewayNode)
750 Ptr<Ipv4StaticRouting> routing =
751 ipv4RoutingHelper.GetStaticRouting(oldGatewayNode->GetObject<Ipv4L3Protocol>());
754 for (uint32_t routeIndex = routing->GetNRoutes(); routeIndex > 0; --routeIndex)
757 if (routing->GetRoute(routeIndex - 1).GetGateway() == utIpAddress)
759 routing->RemoveRoute(routeIndex - 1);
764 for (uint32_t ifIndex = 1; ifIndex < utProtocol->GetNInterfaces(); ++ifIndex)
766 Ipv4Address address = utProtocol->GetAddress(ifIndex, 0).GetLocal();
767 Ipv4Mask mask = utProtocol->GetAddress(ifIndex, 0).GetMask();
769 if (ifIndex == utIfIndex)
771 mask = Ipv4Mask(
"/32");
774 routing->AddNetworkRouteTo(address.CombineMask(mask), mask, utIpAddress, newIfIndex);
780 Ptr<Ipv4StaticRouting> routing =
781 ipv4RoutingHelper.GetStaticRouting(oldGatewayNode->GetObject<Ipv4L3Protocol>());
782 Ptr<Ipv4StaticRouting> routingRouter =
783 ipv4RoutingHelper.GetStaticRouting(
m_router->GetObject<Ipv4L3Protocol>());
786 for (uint32_t routeIndex = routing->GetNRoutes(); routeIndex > 0; --routeIndex)
789 Ipv4RoutingTableEntry gwRoute = routing->GetRoute(routeIndex - 1);
790 if (gwRoute.GetGateway() == utIpAddress)
792 routing->RemoveRoute(routeIndex - 1);
794 for (uint32_t routerIndex = 0; routerIndex < routingRouter->GetNRoutes();
797 Ipv4RoutingTableEntry route = routingRouter->GetRoute(routerIndex);
798 if (route.GetDestNetwork() == gwRoute.GetDestNetwork() &&
799 route.GetDestNetworkMask() == gwRoute.GetDestNetworkMask())
801 routingRouter->RemoveRoute(routerIndex);
809 Ptr<Ipv4L3Protocol> gwProtocol = newGatewayNode->GetObject<Ipv4L3Protocol>();
812 Ipv4Address gwAddress;
813 for (uint32_t ifIndex = 1; ifIndex < gwProtocol->GetNInterfaces(); ++ifIndex)
815 Ptr<NetDevice> gwNd = gwProtocol->GetNetDevice(ifIndex);
816 if (gwNd->GetInstanceTypeId().GetName() !=
"ns3::SatNetDevice" &&
817 gwNd->GetInstanceTypeId().GetName() !=
"ns3::SatLorawanNetDevice")
819 gwAddress = gwProtocol->GetAddress(ifIndex, 0).GetLocal();
825 uint32_t routingIfIndex = routingRouter->GetNRoutes();
826 for (uint32_t routeIndex = 0; routeIndex < routingRouter->GetNRoutes(); ++routeIndex)
828 Ipv4RoutingTableEntry route = routingRouter->GetRoute(routeIndex);
829 if (route.GetGateway() == gwAddress)
831 routingIfIndex = route.GetInterface();
836 NS_ASSERT_MSG(routingIfIndex != routingRouter->GetNRoutes(),
837 "Couldn't find interface on the terrestrial router to the new gateway.");
840 routing = ipv4RoutingHelper.GetStaticRouting(gwProtocol);
841 for (uint32_t ifIndex = 1; ifIndex < utProtocol->GetNInterfaces(); ++ifIndex)
843 Ipv4Address address = utProtocol->GetAddress(ifIndex, 0).GetLocal();
844 Ipv4Mask mask = utProtocol->GetAddress(ifIndex, 0).GetMask();
846 if (ifIndex == utIfIndex)
848 mask = Ipv4Mask(
"/32");
851 routing->AddNetworkRouteTo(address.CombineMask(mask), mask, utIpAddress, newIfIndex);
852 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
NodeContainer GetUtNodes() const
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...
uint32_t GetGwUserCount() const
NodeContainer GetGwUsers() const
void SetBeamBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
NodeContainer GetUtUsers() const
NetDeviceContainer InstallSatSimpleNetwork(const NodeContainer &c) const
Install satellite simple network.
static TypeId GetTypeId(void)
Derived from Object.
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.
Ptr< Node > GetUtNode(Ptr< Node > utUserNode) const
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 InstallRouter(NodeContainer gw, Ptr< Node > router)
Install IP router to to Gateways.
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
NodeContainer InstallGw(NodeContainer gw, uint32_t users)
NetDeviceContainer InstallBackboneNetwork(const NodeContainer &c) const
Install network between GW and Router (or users) or Router and its users.
UtUsersContainer_t m_utUsers
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
uint32_t GetUtUserCount() 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.
NodeContainer m_allUtUsers
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.