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
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
point-to-point-dumbbell.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
* Author: George F. Riley<riley@ece.gatech.edu>
17
*/
18
19
// Define an object to create a dumbbell topology.
20
21
#ifndef POINT_TO_POINT_DUMBBELL_HELPER_H
22
#define POINT_TO_POINT_DUMBBELL_HELPER_H
23
24
#include <string>
25
26
#include "
point-to-point-helper.h
"
27
#include "
ipv4-address-helper.h
"
28
#include "
ipv6-address-helper.h
"
29
#include "
internet-stack-helper.h
"
30
#include "
ipv4-interface-container.h
"
31
#include "
ipv6-interface-container.h
"
32
33
namespace
ns3 {
34
41
class
PointToPointDumbbellHelper
42
{
43
public
:
64
PointToPointDumbbellHelper
(uint32_t nLeftLeaf,
65
PointToPointHelper
leftHelper,
66
uint32_t nRightLeaf,
67
PointToPointHelper
rightHelper,
68
PointToPointHelper
bottleneckHelper);
69
70
~PointToPointDumbbellHelper
();
71
72
public
:
77
Ptr<Node>
GetLeft
()
const
;
78
82
Ptr<Node>
GetLeft
(uint32_t i)
const
;
83
88
Ptr<Node>
GetRight
()
const
;
89
93
Ptr<Node>
GetRight
(uint32_t i)
const
;
94
98
Ipv4Address
GetLeftIpv4Address
(uint32_t i )
const
;
// Get left leaf address
99
103
Ipv4Address
GetRightIpv4Address
(uint32_t i)
const
;
// Get right leaf address
104
108
Ipv6Address
GetLeftIpv6Address
(uint32_t i )
const
;
// Get left leaf address
109
113
Ipv6Address
GetRightIpv6Address
(uint32_t i)
const
;
// Get right leaf address
114
118
uint32_t
LeftCount
()
const
;
119
123
uint32_t
RightCount
()
const
;
124
129
void
InstallStack
(
InternetStackHelper
stack);
130
141
void
AssignIpv4Addresses
(
Ipv4AddressHelper
leftIp,
142
Ipv4AddressHelper
rightIp,
143
Ipv4AddressHelper
routerIp);
144
150
void
AssignIpv6Addresses
(
Ipv6Address
network,
Ipv6Prefix
prefix);
151
161
void
BoundingBox
(
double
ulx,
double
uly,
double
lrx,
double
lry);
162
163
private
:
164
NodeContainer
m_leftLeaf
;
165
NetDeviceContainer
m_leftLeafDevices
;
166
NodeContainer
m_rightLeaf
;
167
NetDeviceContainer
m_rightLeafDevices
;
168
NodeContainer
m_routers
;
169
NetDeviceContainer
m_routerDevices
;
// just two connecting the routers
170
NetDeviceContainer
m_leftRouterDevices
;
171
NetDeviceContainer
m_rightRouterDevices
;
172
Ipv4InterfaceContainer
m_leftLeafInterfaces
;
173
Ipv4InterfaceContainer
m_leftRouterInterfaces
;
174
Ipv4InterfaceContainer
m_rightLeafInterfaces
;
175
Ipv4InterfaceContainer
m_rightRouterInterfaces
;
176
Ipv4InterfaceContainer
m_routerInterfaces
;
177
Ipv6InterfaceContainer
m_leftLeafInterfaces6
;
178
Ipv6InterfaceContainer
m_leftRouterInterfaces6
;
179
Ipv6InterfaceContainer
m_rightLeafInterfaces6
;
180
Ipv6InterfaceContainer
m_rightRouterInterfaces6
;
181
Ipv6InterfaceContainer
m_routerInterfaces6
;
182
};
183
184
}
// namespace ns3
185
186
#endif
/* POINT_TO_POINT_DUMBBELL_HELPER_H */
src
point-to-point-layout
model
point-to-point-dumbbell.h
Generated on Tue Oct 9 2012 16:45:45 for ns-3 by
1.8.1.2