A Discrete-Event Network Simulator
API
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"
32 
33 namespace ns3 {
34 
42 {
43 public:
64  PointToPointDumbbellHelper (uint32_t nLeftLeaf,
65  PointToPointHelper leftHelper,
66  uint32_t nRightLeaf,
67  PointToPointHelper rightHelper,
68  PointToPointHelper bottleneckHelper);
69 
71 
72 public:
77  Ptr<Node> GetLeft () const;
78 
83  Ptr<Node> GetLeft (uint32_t i) const;
84 
89  Ptr<Node> GetRight () const;
90 
95  Ptr<Node> GetRight (uint32_t i) const;
96 
101  Ipv4Address GetLeftIpv4Address (uint32_t i ) const; // Get left leaf address
102 
107  Ipv4Address GetRightIpv4Address (uint32_t i) const; // Get right leaf address
108 
113  Ipv6Address GetLeftIpv6Address (uint32_t i ) const; // Get left leaf address
114 
119  Ipv6Address GetRightIpv6Address (uint32_t i) const; // Get right leaf address
120 
124  uint32_t LeftCount () const;
125 
129  uint32_t RightCount () const;
130 
136 
148  Ipv4AddressHelper rightIp,
149  Ipv4AddressHelper routerIp);
150 
156  void AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix);
157 
167  void BoundingBox (double ulx, double uly, double lrx, double lry);
168 
169 private:
188 };
189 
190 } // namespace ns3
191 
192 #endif /* POINT_TO_POINT_DUMBBELL_HELPER_H */
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
ns3::PointToPointDumbbellHelper::AssignIpv4Addresses
void AssignIpv4Addresses(Ipv4AddressHelper leftIp, Ipv4AddressHelper rightIp, Ipv4AddressHelper routerIp)
Definition: point-to-point-dumbbell.cc:132
ns3::PointToPointDumbbellHelper::~PointToPointDumbbellHelper
~PointToPointDumbbellHelper()
Definition: point-to-point-dumbbell.cc:71
ns3::PointToPointDumbbellHelper::m_rightRouterDevices
NetDeviceContainer m_rightRouterDevices
Right router NetDevices.
Definition: point-to-point-dumbbell.h:177
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::PointToPointDumbbellHelper::GetLeftIpv6Address
Ipv6Address GetLeftIpv6Address(uint32_t i) const
Definition: point-to-point-dumbbell.cc:105
ns3::PointToPointDumbbellHelper::m_rightLeafDevices
NetDeviceContainer m_rightLeafDevices
Right Leaf NetDevices.
Definition: point-to-point-dumbbell.h:173
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition: ipv4-address-helper.h:48
ipv6-address-helper.h
ns3::PointToPointDumbbellHelper::m_leftLeafInterfaces
Ipv4InterfaceContainer m_leftLeafInterfaces
Left Leaf interfaces (IPv4)
Definition: point-to-point-dumbbell.h:178
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::PointToPointDumbbellHelper::m_routerDevices
NetDeviceContainer m_routerDevices
Routers NetDevices.
Definition: point-to-point-dumbbell.h:175
ns3::Ipv6Address
Describes an IPv6 address.
Definition: ipv6-address.h:50
ns3::PointToPointDumbbellHelper::m_rightLeafInterfaces6
Ipv6InterfaceContainer m_rightLeafInterfaces6
Right Leaf interfaces (IPv6)
Definition: point-to-point-dumbbell.h:185
internet-stack-helper.h
ns3::PointToPointDumbbellHelper::m_leftRouterInterfaces
Ipv4InterfaceContainer m_leftRouterInterfaces
Left router interfaces (IPv4)
Definition: point-to-point-dumbbell.h:179
ns3::PointToPointDumbbellHelper::GetRightIpv4Address
Ipv4Address GetRightIpv4Address(uint32_t i) const
Definition: point-to-point-dumbbell.cc:100
ns3::PointToPointDumbbellHelper::m_rightRouterInterfaces
Ipv4InterfaceContainer m_rightRouterInterfaces
Right router interfaces (IPv4)
Definition: point-to-point-dumbbell.h:181
ns3::PointToPointDumbbellHelper::m_leftLeaf
NodeContainer m_leftLeaf
Left Leaf nodes.
Definition: point-to-point-dumbbell.h:170
ns3::Ptr< Node >
ns3::PointToPointDumbbellHelper::m_rightLeafInterfaces
Ipv4InterfaceContainer m_rightLeafInterfaces
Right Leaf interfaces (IPv4)
Definition: point-to-point-dumbbell.h:180
ns3::PointToPointDumbbellHelper::GetRight
Ptr< Node > GetRight() const
Definition: point-to-point-dumbbell.cc:85
first.stack
stack
Definition: first.py:41
ns3::PointToPointDumbbellHelper::m_routerInterfaces
Ipv4InterfaceContainer m_routerInterfaces
Router interfaces (IPv4)
Definition: point-to-point-dumbbell.h:182
ns3::PointToPointDumbbellHelper::BoundingBox
void BoundingBox(double ulx, double uly, double lrx, double lry)
Sets up the node canvas locations for every node in the dumbbell.
Definition: point-to-point-dumbbell.cc:209
ipv4-address-helper.h
ns3::PointToPointDumbbellHelper::m_leftLeafDevices
NetDeviceContainer m_leftLeafDevices
Left Leaf NetDevices.
Definition: point-to-point-dumbbell.h:171
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition: ipv4-interface-container.h:55
ns3::Ipv6InterfaceContainer
Keep track of a set of IPv6 interfaces.
Definition: ipv6-interface-container.h:42
ipv4-interface-container.h
ns3::PointToPointDumbbellHelper::m_routers
NodeContainer m_routers
Routers.
Definition: point-to-point-dumbbell.h:174
ns3::PointToPointDumbbellHelper::m_routerInterfaces6
Ipv6InterfaceContainer m_routerInterfaces6
Router interfaces (IPv6)
Definition: point-to-point-dumbbell.h:187
ns3::PointToPointDumbbellHelper::m_leftRouterDevices
NetDeviceContainer m_leftRouterDevices
Left router NetDevices.
Definition: point-to-point-dumbbell.h:176
ns3::PointToPointDumbbellHelper::PointToPointDumbbellHelper
PointToPointDumbbellHelper(uint32_t nLeftLeaf, PointToPointHelper leftHelper, uint32_t nRightLeaf, PointToPointHelper rightHelper, PointToPointHelper bottleneckHelper)
Create a PointToPointDumbbellHelper in order to easily create dumbbell topologies using p2p links.
Definition: point-to-point-dumbbell.cc:39
ns3::PointToPointDumbbellHelper
A helper to make it easier to create a dumbbell topology with p2p links.
Definition: point-to-point-dumbbell.h:42
ipv6-interface-container.h
ns3::PointToPointDumbbellHelper::m_rightRouterInterfaces6
Ipv6InterfaceContainer m_rightRouterInterfaces6
Right router interfaces (IPv6)
Definition: point-to-point-dumbbell.h:186
ns3::PointToPointDumbbellHelper::GetLeft
Ptr< Node > GetLeft() const
Definition: point-to-point-dumbbell.cc:75
ns3::PointToPointDumbbellHelper::InstallStack
void InstallStack(InternetStackHelper stack)
Definition: point-to-point-dumbbell.cc:125
ns3::PointToPointDumbbellHelper::m_leftRouterInterfaces6
Ipv6InterfaceContainer m_leftRouterInterfaces6
Left router interfaces (IPv6)
Definition: point-to-point-dumbbell.h:184
ns3::PointToPointDumbbellHelper::GetLeftIpv4Address
Ipv4Address GetLeftIpv4Address(uint32_t i) const
Definition: point-to-point-dumbbell.cc:95
ns3::PointToPointHelper
Build a set of PointToPointNetDevice objects.
Definition: point-to-point-helper.h:45
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
ns3::PointToPointDumbbellHelper::GetRightIpv6Address
Ipv6Address GetRightIpv6Address(uint32_t i) const
Definition: point-to-point-dumbbell.cc:110
ns3::PointToPointDumbbellHelper::m_rightLeaf
NodeContainer m_rightLeaf
Right Leaf nodes.
Definition: point-to-point-dumbbell.h:172
ns3::Ipv6Prefix
Describes an IPv6 prefix.
Definition: ipv6-address.h:456
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition: internet-stack-helper.h:88
ns3::PointToPointDumbbellHelper::m_leftLeafInterfaces6
Ipv6InterfaceContainer m_leftLeafInterfaces6
Left Leaf interfaces (IPv6)
Definition: point-to-point-dumbbell.h:183
ns3::PointToPointDumbbellHelper::RightCount
uint32_t RightCount() const
Definition: point-to-point-dumbbell.cc:120
point-to-point-helper.h
ns3::PointToPointDumbbellHelper::LeftCount
uint32_t LeftCount() const
Definition: point-to-point-dumbbell.cc:115
ns3::PointToPointDumbbellHelper::AssignIpv6Addresses
void AssignIpv6Addresses(Ipv6Address network, Ipv6Prefix prefix)
Definition: point-to-point-dumbbell.cc:162