A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
point-to-point-dumbbell.h
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation;
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14 *
15 * Author: George F. Riley<riley@ece.gatech.edu>
16 */
17
18// Define an object to create a dumbbell topology.
19
20#ifndef POINT_TO_POINT_DUMBBELL_HELPER_H
21#define POINT_TO_POINT_DUMBBELL_HELPER_H
22
23#include "ns3/internet-stack-helper.h"
24#include "ns3/ipv4-address-helper.h"
25#include "ns3/ipv4-interface-container.h"
26#include "ns3/ipv6-address-helper.h"
27#include "ns3/ipv6-interface-container.h"
28#include "ns3/point-to-point-helper.h"
29
30#include <string>
31
32namespace ns3
33{
34
42{
43 public:
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
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) const;
168
169 private:
188};
189
190} // namespace ns3
191
192#endif /* POINT_TO_POINT_DUMBBELL_HELPER_H */
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Describes an IPv6 address.
Definition: ipv6-address.h:49
Keep track of a set of IPv6 interfaces.
Describes an IPv6 prefix.
Definition: ipv6-address.h:455
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
A helper to make it easier to create a dumbbell topology with p2p links.
Ipv6InterfaceContainer m_leftLeafInterfaces6
Left Leaf interfaces (IPv6)
Ipv6InterfaceContainer m_rightLeafInterfaces6
Right Leaf interfaces (IPv6)
Ipv4InterfaceContainer m_rightRouterInterfaces
Right router interfaces (IPv4)
NetDeviceContainer m_leftRouterDevices
Left router NetDevices.
Ipv6InterfaceContainer m_rightRouterInterfaces6
Right router interfaces (IPv6)
Ipv4InterfaceContainer m_routerInterfaces
Router interfaces (IPv4)
void AssignIpv4Addresses(Ipv4AddressHelper leftIp, Ipv4AddressHelper rightIp, Ipv4AddressHelper routerIp)
NetDeviceContainer m_routerDevices
Routers NetDevices.
NetDeviceContainer m_rightRouterDevices
Right router NetDevices.
NodeContainer m_rightLeaf
Right Leaf nodes.
Ipv4InterfaceContainer m_leftRouterInterfaces
Left router interfaces (IPv4)
Ipv4Address GetRightIpv4Address(uint32_t i) const
Ipv6Address GetLeftIpv6Address(uint32_t i) const
Ipv4Address GetLeftIpv4Address(uint32_t i) const
void InstallStack(InternetStackHelper stack)
Ipv6InterfaceContainer m_leftRouterInterfaces6
Left router interfaces (IPv6)
NetDeviceContainer m_leftLeafDevices
Left Leaf NetDevices.
Ipv6Address GetRightIpv6Address(uint32_t i) const
Ipv6InterfaceContainer m_routerInterfaces6
Router interfaces (IPv6)
Ipv4InterfaceContainer m_rightLeafInterfaces
Right Leaf interfaces (IPv4)
void AssignIpv6Addresses(Ipv6Address network, Ipv6Prefix prefix)
NodeContainer m_leftLeaf
Left Leaf nodes.
NetDeviceContainer m_rightLeafDevices
Right Leaf NetDevices.
void BoundingBox(double ulx, double uly, double lrx, double lry) const
Sets up the node canvas locations for every node in the dumbbell.
Ipv4InterfaceContainer m_leftLeafInterfaces
Left Leaf interfaces (IPv4)
Build a set of PointToPointNetDevice objects.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Every class exported by the ns3 library is enclosed in the ns3 namespace.