A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
csma-layout
model
csma-star-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*/
16
17
// Define an object to create a star topology.
18
19
#ifndef CSMA_STAR_HELPER_H
20
#define CSMA_STAR_HELPER_H
21
22
#include <string>
23
24
#include "
csma-helper.h
"
25
#include "
ipv4-address-helper.h
"
26
#include "
ipv6-address-helper.h
"
27
#include "
internet-stack-helper.h
"
28
#include "
ipv4-interface-container.h
"
29
#include "
ipv6-interface-container.h
"
30
#include "
ipv6-address-generator.h
"
31
32
namespace
ns3
{
33
45
class
CsmaStarHelper
46
{
47
public
:
59
CsmaStarHelper
(uint32_t numSpokes,
60
CsmaHelper
csmaHelper);
61
62
~CsmaStarHelper
();
63
64
public
:
69
Ptr<Node>
GetHub
()
const
;
70
76
Ptr<Node>
GetSpokeNode
(uint32_t i)
const
;
77
82
NetDeviceContainer
GetHubDevices
()
const
;
83
88
NetDeviceContainer
GetSpokeDevices
()
const
;
89
95
Ipv4Address
GetHubIpv4Address
(uint32_t i)
const
;
96
102
Ipv6Address
GetHubIpv6Address
(uint32_t i)
const
;
103
109
Ipv4Address
GetSpokeIpv4Address
(uint32_t i)
const
;
110
116
Ipv6Address
GetSpokeIpv6Address
(uint32_t i)
const
;
117
121
uint32_t
SpokeCount
()
const
;
122
127
void
InstallStack
(
InternetStackHelper
stack
);
128
134
void
AssignIpv4Addresses
(
Ipv4AddressHelper
address
);
135
141
void
AssignIpv6Addresses
(
Ipv6Address
network,
Ipv6Prefix
prefix);
142
143
private
:
144
NodeContainer
m_hub
;
145
NetDeviceContainer
m_hubDevices
;
146
NodeContainer
m_spokes
;
147
NetDeviceContainer
m_spokeDevices
;
148
Ipv4InterfaceContainer
m_hubInterfaces
;
149
Ipv4InterfaceContainer
m_spokeInterfaces
;
150
Ipv6InterfaceContainer
m_hubInterfaces6
;
151
Ipv6InterfaceContainer
m_spokeInterfaces6
;
152
};
153
154
}
// namespace ns3
155
156
#endif
/* CSMA_STAR_HELPER_H */
ns3::CsmaStarHelper::GetSpokeIpv6Address
Ipv6Address GetSpokeIpv6Address(uint32_t i) const
Definition:
csma-star-helper.cc:93
ns3::CsmaStarHelper::AssignIpv4Addresses
void AssignIpv4Addresses(Ipv4AddressHelper address)
Definition:
csma-star-helper.cc:112
ns3::CsmaStarHelper::InstallStack
void InstallStack(InternetStackHelper stack)
Definition:
csma-star-helper.cc:105
ns3::Ptr< Node >
ns3::Ipv6InterfaceContainer
Keep track of a set of IPv6 interfaces.
Definition:
ipv6-interface-container.h:41
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition:
ipv4-interface-container.h:54
ipv4-address-helper.h
ipv4-interface-container.h
ns3::CsmaStarHelper::GetHubIpv6Address
Ipv6Address GetHubIpv6Address(uint32_t i) const
Definition:
csma-star-helper.cc:87
ns3::CsmaStarHelper::SpokeCount
uint32_t SpokeCount() const
Definition:
csma-star-helper.cc:99
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition:
internet-stack-helper.h:86
ns3::CsmaStarHelper::m_hub
NodeContainer m_hub
NodeContainer for the hub node.
Definition:
csma-star-helper.h:144
ns3::CsmaStarHelper::CsmaStarHelper
CsmaStarHelper(uint32_t numSpokes, CsmaHelper csmaHelper)
Create a CsmaStarHelper in order to easily create star topologies using Csma links.
Definition:
csma-star-helper.cc:31
ipv6-interface-container.h
ns3::CsmaStarHelper::m_spokes
NodeContainer m_spokes
NodeContainer for the spokes nodes.
Definition:
csma-star-helper.h:146
ns3::CsmaStarHelper::GetHub
Ptr< Node > GetHub() const
Definition:
csma-star-helper.cc:51
first.stack
stack
Definition:
first.py:34
ipv6-address-generator.h
ns3::CsmaStarHelper::~CsmaStarHelper
~CsmaStarHelper()
Definition:
csma-star-helper.cc:46
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:41
ns3::CsmaStarHelper::GetHubDevices
NetDeviceContainer GetHubDevices() const
Definition:
csma-star-helper.cc:63
ns3::CsmaStarHelper::m_hubInterfaces
Ipv4InterfaceContainer m_hubInterfaces
Ipv4InterfaceContainer for the hub IPv4 interfaces.
Definition:
csma-star-helper.h:148
internet-stack-helper.h
ns3::CsmaStarHelper::m_spokeDevices
NetDeviceContainer m_spokeDevices
NetDeviceContainer for the spokes nodes NetDevices.
Definition:
csma-star-helper.h:147
ns3::CsmaStarHelper::GetSpokeDevices
NetDeviceContainer GetSpokeDevices() const
Definition:
csma-star-helper.cc:69
ns3::CsmaStarHelper::m_hubDevices
NetDeviceContainer m_hubDevices
NetDeviceContainer for the hub node NetDevices.
Definition:
csma-star-helper.h:145
ns3::CsmaStarHelper::m_spokeInterfaces
Ipv4InterfaceContainer m_spokeInterfaces
Ipv4InterfaceContainer for the spokes IPv4 interfaces.
Definition:
csma-star-helper.h:149
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:38
first.address
address
Definition:
first.py:37
ns3::CsmaStarHelper::AssignIpv6Addresses
void AssignIpv6Addresses(Ipv6Address network, Ipv6Prefix prefix)
Definition:
csma-star-helper.cc:123
ns3::CsmaHelper
build a set of CsmaNetDevice objects
Definition:
csma-helper.h:46
ns3::CsmaStarHelper::GetSpokeNode
Ptr< Node > GetSpokeNode(uint32_t i) const
Definition:
csma-star-helper.cc:57
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:40
ns3::CsmaStarHelper::GetHubIpv4Address
Ipv4Address GetHubIpv4Address(uint32_t i) const
Definition:
csma-star-helper.cc:75
ns3::CsmaStarHelper::m_spokeInterfaces6
Ipv6InterfaceContainer m_spokeInterfaces6
Ipv6InterfaceContainer for the spokes IPv6 interfaces.
Definition:
csma-star-helper.h:151
csma-helper.h
ns3::CsmaStarHelper::GetSpokeIpv4Address
Ipv4Address GetSpokeIpv4Address(uint32_t i) const
Definition:
csma-star-helper.cc:81
ns3::Ipv6Prefix
Describes an IPv6 prefix.
Definition:
ipv6-address.h:428
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition:
ipv4-address-helper.h:47
ipv6-address-helper.h
ns3::CsmaStarHelper
A helper to make it easier to create a star topology with Csma links.
Definition:
csma-star-helper.h:45
ns3::CsmaStarHelper::m_hubInterfaces6
Ipv6InterfaceContainer m_hubInterfaces6
Ipv6InterfaceContainer for the hub IPv6 interfaces.
Definition:
csma-star-helper.h:150
Generated on Wed Nov 7 2018 10:01:51 for ns-3 by
1.8.14