|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #include "ns3/csma-star-helper.h"
22 #include "ns3/node-list.h"
23 #include "ns3/point-to-point-net-device.h"
24 #include "ns3/vector.h"
132 addressHelper.
SetBase (v6network, prefix);
holds a vector of ns3::NetDevice pointers
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
static Ipv6Address GetNetwork(const Ipv6Prefix prefix)
Get the current network of the given Ipv6Prefix.
Ptr< Node > GetSpokeNode(uint32_t i) const
Ipv6InterfaceContainer m_hubInterfaces6
Ipv6InterfaceContainer for the hub IPv6 interfaces.
void InstallStack(InternetStackHelper stack)
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
void SetBase(Ipv6Address network, Ipv6Prefix prefix, Ipv6Address base=Ipv6Address("::1"))
Set the base network number, network prefix, and base interface ID.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::CsmaChannel with the attributes configured by CsmaHelper::SetChannelAttri...
Helper class to auto-assign global IPv6 unicast addresses.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
build a set of CsmaNetDevice objects
NodeContainer m_spokes
NodeContainer for the spokes nodes.
Ipv6InterfaceContainer Assign(const NetDeviceContainer &c)
Allocate an Ipv6InterfaceContainer with auto-assigned addresses.
static Ipv6Address NextNetwork(const Ipv6Prefix prefix)
Get the next network according to the given Ipv6Prefix.
Ipv6Address GetHubIpv6Address(uint32_t i) const
Ipv6Address GetAddress(uint32_t i, uint32_t j) const
Get the address for the specified index.
Keep track of a set of IPv6 interfaces.
Ipv4InterfaceContainer m_hubInterfaces
Ipv4InterfaceContainer for the hub IPv4 interfaces.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
NetDeviceContainer GetHubDevices() const
Ipv6Address GetSpokeIpv6Address(uint32_t i) const
Ipv4InterfaceContainer m_spokeInterfaces
Ipv4InterfaceContainer for the spokes IPv4 interfaces.
Ptr< Node > GetHub() const
NetDeviceContainer m_spokeDevices
NetDeviceContainer for the spokes nodes NetDevices.
Ipv6InterfaceContainer m_spokeInterfaces6
Ipv6InterfaceContainer for the spokes IPv6 interfaces.
uint32_t SpokeCount() const
void Add(const Ipv4InterfaceContainer &other)
Concatenate the entries in the other container with ours.
Ipv4Address GetHubIpv4Address(uint32_t i) const
keep track of a set of node pointers.
Ipv4Address GetSpokeIpv4Address(uint32_t i) const
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
CsmaStarHelper(uint32_t numSpokes, CsmaHelper csmaHelper)
Create a CsmaStarHelper in order to easily create star topologies using Csma links.
void AssignIpv4Addresses(Ipv4AddressHelper address)
NetDeviceContainer GetSpokeDevices() const
void AssignIpv6Addresses(Ipv6Address network, Ipv6Prefix prefix)
static void Init(const Ipv6Address net, const Ipv6Prefix prefix, const Ipv6Address interfaceId="::1")
Initialise the base network and interfaceId for the generator.
NetDeviceContainer m_hubDevices
NetDeviceContainer for the hub node NetDevices.
Describes an IPv6 prefix.
aggregate IP/TCP/UDP functionality to existing Nodes.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
NodeContainer m_hub
NodeContainer for the hub node.