A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
point-to-point-star.h
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 dumbbell topology.
18
19
#ifndef POINT_TO_POINT_STAR_HELPER_H
20
#define POINT_TO_POINT_STAR_HELPER_H
21
22
#include <string>
23
24
#include "point-to-point-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
31
namespace
ns3 {
32
44
class
PointToPointStarHelper
45
{
46
public
:
58
PointToPointStarHelper
(uint32_t numSpokes,
59
PointToPointHelper
p2pHelper);
60
61
~
PointToPointStarHelper
();
62
63
public
:
68
Ptr<Node>
GetHub
()
const
;
69
75
Ptr<Node>
GetSpokeNode
(uint32_t i)
const
;
76
82
Ipv4Address
GetHubIpv4Address
(uint32_t i)
const
;
83
89
Ipv4Address
GetSpokeIpv4Address
(uint32_t i)
const
;
90
96
Ipv6Address
GetHubIpv6Address
(uint32_t i)
const
;
97
103
Ipv6Address
GetSpokeIpv6Address
(uint32_t i)
const
;
104
108
uint32_t
SpokeCount
()
const
;
109
114
void
InstallStack
(
InternetStackHelper
stack);
115
121
void
AssignIpv4Addresses
(
Ipv4AddressHelper
address);
122
128
void
AssignIpv6Addresses
(
Ipv6Address
network,
Ipv6Prefix
prefix);
129
139
void
BoundingBox
(
double
ulx,
double
uly,
double
lrx,
double
lry);
140
141
private
:
142
NodeContainer
m_hub;
143
NetDeviceContainer
m_hubDevices;
144
NodeContainer
m_spokes;
145
NetDeviceContainer
m_spokeDevices;
146
Ipv4InterfaceContainer
m_hubInterfaces;
147
Ipv4InterfaceContainer
m_spokeInterfaces;
148
Ipv6InterfaceContainer
m_hubInterfaces6;
149
Ipv6InterfaceContainer
m_spokeInterfaces6;
150
};
151
152
}
// namespace ns3
153
154
#endif
/* POINT_TO_POINT_STAR_HELPER_H */
ns3::PointToPointStarHelper::AssignIpv4Addresses
void AssignIpv4Addresses(Ipv4AddressHelper address)
Definition:
point-to-point-star.cc:103
ns3::Ptr< Node >
ns3::Ipv6InterfaceContainer
Keep track of a set of IPv6 interfaces.
Definition:
ipv6-interface-container.h:38
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition:
ipv4-interface-container.h:32
ns3::PointToPointStarHelper::AssignIpv6Addresses
void AssignIpv6Addresses(Ipv6Address network, Ipv6Prefix prefix)
Definition:
point-to-point-star.cc:114
ns3::PointToPointStarHelper
A helper to make it easier to create a star topology with PointToPoint links.
Definition:
point-to-point-star.h:44
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition:
internet-stack-helper.h:66
ns3::PointToPointHelper
Build a set of PointToPointNetDevice objects.
Definition:
point-to-point-helper.h:45
ns3::PointToPointStarHelper::PointToPointStarHelper
PointToPointStarHelper(uint32_t numSpokes, PointToPointHelper p2pHelper)
Definition:
point-to-point-star.cc:35
ns3::PointToPointStarHelper::GetHubIpv6Address
Ipv6Address GetHubIpv6Address(uint32_t i) const
Definition:
point-to-point-star.cc:78
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:41
ns3::PointToPointStarHelper::GetSpokeNode
Ptr< Node > GetSpokeNode(uint32_t i) const
Definition:
point-to-point-star.cc:60
ns3::PointToPointStarHelper::GetSpokeIpv6Address
Ipv6Address GetSpokeIpv6Address(uint32_t i) const
Definition:
point-to-point-star.cc:84
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:38
ns3::PointToPointStarHelper::GetHub
Ptr< Node > GetHub() const
Definition:
point-to-point-star.cc:54
ns3::PointToPointStarHelper::SpokeCount
uint32_t SpokeCount() const
Definition:
point-to-point-star.cc:90
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:44
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:38
ns3::PointToPointStarHelper::GetSpokeIpv4Address
Ipv4Address GetSpokeIpv4Address(uint32_t i) const
Definition:
point-to-point-star.cc:72
ns3::Ipv6Prefix
Describes an IPv6 prefix. It is just a bitmask like Ipv4Mask.
Definition:
ipv6-address.h:326
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition:
ipv4-address-helper.h:45
ns3::PointToPointStarHelper::BoundingBox
void BoundingBox(double ulx, double uly, double lrx, double lry)
Definition:
point-to-point-star.cc:135
ns3::PointToPointStarHelper::InstallStack
void InstallStack(InternetStackHelper stack)
Definition:
point-to-point-star.cc:96
ns3::PointToPointStarHelper::GetHubIpv4Address
Ipv4Address GetHubIpv4Address(uint32_t i) const
Definition:
point-to-point-star.cc:66
src
point-to-point-layout
model
point-to-point-star.h
Generated on Sun Mar 16 2014 11:25:10 for ns-3 by
1.8.6