A Discrete-Event Network Simulator
API
ns3::PointToPointDumbbellHelper Class Reference

A helper to make it easier to create a dumbbell topology with p2p links. More...

#include "point-to-point-dumbbell.h"

+ Collaboration diagram for ns3::PointToPointDumbbellHelper:

Public Member Functions

 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. More...
 
 ~PointToPointDumbbellHelper ()
 
void AssignIpv4Addresses (Ipv4AddressHelper leftIp, Ipv4AddressHelper rightIp, Ipv4AddressHelper routerIp)
 
void AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix)
 
void BoundingBox (double ulx, double uly, double lrx, double lry)
 Sets up the node canvas locations for every node in the dumbbell. More...
 
Ptr< NodeGetLeft () const
 
Ptr< NodeGetLeft (uint32_t i) const
 
Ipv4Address GetLeftIpv4Address (uint32_t i) const
 
Ipv6Address GetLeftIpv6Address (uint32_t i) const
 
Ptr< NodeGetRight () const
 
Ptr< NodeGetRight (uint32_t i) const
 
Ipv4Address GetRightIpv4Address (uint32_t i) const
 
Ipv6Address GetRightIpv6Address (uint32_t i) const
 
void InstallStack (InternetStackHelper stack)
 
uint32_t LeftCount () const
 
uint32_t RightCount () const
 

Private Attributes

NodeContainer m_leftLeaf
 Left Leaf nodes. More...
 
NetDeviceContainer m_leftLeafDevices
 Left Leaf NetDevices. More...
 
Ipv4InterfaceContainer m_leftLeafInterfaces
 Left Leaf interfaces (IPv4) More...
 
Ipv6InterfaceContainer m_leftLeafInterfaces6
 Left Leaf interfaces (IPv6) More...
 
NetDeviceContainer m_leftRouterDevices
 Left router NetDevices. More...
 
Ipv4InterfaceContainer m_leftRouterInterfaces
 Left router interfaces (IPv4) More...
 
Ipv6InterfaceContainer m_leftRouterInterfaces6
 Left router interfaces (IPv6) More...
 
NodeContainer m_rightLeaf
 Right Leaf nodes. More...
 
NetDeviceContainer m_rightLeafDevices
 Right Leaf NetDevices. More...
 
Ipv4InterfaceContainer m_rightLeafInterfaces
 Right Leaf interfaces (IPv4) More...
 
Ipv6InterfaceContainer m_rightLeafInterfaces6
 Right Leaf interfaces (IPv6) More...
 
NetDeviceContainer m_rightRouterDevices
 Right router NetDevices. More...
 
Ipv4InterfaceContainer m_rightRouterInterfaces
 Right router interfaces (IPv4) More...
 
Ipv6InterfaceContainer m_rightRouterInterfaces6
 Right router interfaces (IPv6) More...
 
NetDeviceContainer m_routerDevices
 Routers NetDevices. More...
 
Ipv4InterfaceContainer m_routerInterfaces
 Router interfaces (IPv4) More...
 
Ipv6InterfaceContainer m_routerInterfaces6
 Router interfaces (IPv6) More...
 
NodeContainer m_routers
 Routers. More...
 

Detailed Description

A helper to make it easier to create a dumbbell topology with p2p links.

Definition at line 41 of file point-to-point-dumbbell.h.

Constructor & Destructor Documentation

◆ PointToPointDumbbellHelper()

ns3::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.

Parameters
nLeftLeafnumber of left side leaf nodes in the dumbbell
leftHelperPointToPointHelper used to install the links between the left leaf nodes and the left-most router
nRightLeafnumber of right side leaf nodes in the dumbbell
rightHelperPointToPointHelper used to install the links between the right leaf nodes and the right-most router
bottleneckHelperPointToPointHelper used to install the link between the inner-routers, usually known as the bottleneck link

Definition at line 39 of file point-to-point-dumbbell.cc.

References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Create(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::PointToPointHelper::Install(), m_leftLeaf, m_leftLeafDevices, m_leftRouterDevices, m_rightLeaf, m_rightLeafDevices, m_rightRouterDevices, m_routerDevices, and m_routers.

+ Here is the call graph for this function:

◆ ~PointToPointDumbbellHelper()

ns3::PointToPointDumbbellHelper::~PointToPointDumbbellHelper ( )

Definition at line 71 of file point-to-point-dumbbell.cc.

Member Function Documentation

◆ AssignIpv4Addresses()

void ns3::PointToPointDumbbellHelper::AssignIpv4Addresses ( Ipv4AddressHelper  leftIp,
Ipv4AddressHelper  rightIp,
Ipv4AddressHelper  routerIp 
)
Parameters
leftIpIpv4AddressHelper to assign Ipv4 addresses to the interfaces on the left side of the dumbbell
rightIpIpv4AddressHelper to assign Ipv4 addresses to the interfaces on the right side of the dumbbell
routerIpIpv4AddressHelper to assign Ipv4 addresses to the interfaces on the bottleneck link

Definition at line 132 of file point-to-point-dumbbell.cc.

References ns3::Ipv4InterfaceContainer::Add(), ns3::NetDeviceContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::Ipv4InterfaceContainer::Get(), ns3::NetDeviceContainer::Get(), LeftCount(), m_leftLeafDevices, m_leftLeafInterfaces, m_leftRouterDevices, m_leftRouterInterfaces, m_rightLeafDevices, m_rightLeafInterfaces, m_rightRouterDevices, m_rightRouterInterfaces, m_routerDevices, m_routerInterfaces, ns3::Ipv4AddressHelper::NewNetwork(), and RightCount().

+ Here is the call graph for this function:

◆ AssignIpv6Addresses()

◆ BoundingBox()

void ns3::PointToPointDumbbellHelper::BoundingBox ( double  ulx,
double  uly,
double  lrx,
double  lry 
)

Sets up the node canvas locations for every node in the dumbbell.

This is needed for use with the animation interface

Parameters
ulxupper left x value
ulyupper left y value
lrxlower right x value
lrylower right y value

Definition at line 209 of file point-to-point-dumbbell.cc.

References ns3::Object::AggregateObject(), GetLeft(), ns3::Object::GetObject(), GetRight(), LeftCount(), and RightCount().

+ Here is the call graph for this function:

◆ GetLeft() [1/2]

Ptr< Node > ns3::PointToPointDumbbellHelper::GetLeft ( ) const
Returns
pointer to the node of the left side bottleneck router

Definition at line 75 of file point-to-point-dumbbell.cc.

References ns3::NodeContainer::Get(), and m_routers.

Referenced by BoundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLeft() [2/2]

Ptr< Node > ns3::PointToPointDumbbellHelper::GetLeft ( uint32_t  i) const
Returns
pointer to the i'th left side leaf node
Parameters
inode number

Definition at line 80 of file point-to-point-dumbbell.cc.

References ns3::NodeContainer::Get(), and m_leftLeaf.

+ Here is the call graph for this function:

◆ GetLeftIpv4Address()

Ipv4Address ns3::PointToPointDumbbellHelper::GetLeftIpv4Address ( uint32_t  i) const
Returns
an Ipv4Address of the i'th left leaf
Parameters
inode number

Definition at line 95 of file point-to-point-dumbbell.cc.

References ns3::Ipv4InterfaceContainer::GetAddress(), and m_leftLeafInterfaces.

+ Here is the call graph for this function:

◆ GetLeftIpv6Address()

Ipv6Address ns3::PointToPointDumbbellHelper::GetLeftIpv6Address ( uint32_t  i) const
Returns
an Ipv6Address of the i'th left leaf
Parameters
inode number

Definition at line 105 of file point-to-point-dumbbell.cc.

References ns3::Ipv6InterfaceContainer::GetAddress(), and m_leftLeafInterfaces6.

+ Here is the call graph for this function:

◆ GetRight() [1/2]

Ptr< Node > ns3::PointToPointDumbbellHelper::GetRight ( ) const
Returns
pointer to the node of the right side bottleneck router

Definition at line 85 of file point-to-point-dumbbell.cc.

References ns3::NodeContainer::Get(), and m_routers.

Referenced by BoundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRight() [2/2]

Ptr< Node > ns3::PointToPointDumbbellHelper::GetRight ( uint32_t  i) const
Returns
pointer to the i'th right side leaf node
Parameters
inode number

Definition at line 90 of file point-to-point-dumbbell.cc.

References ns3::NodeContainer::Get(), and m_rightLeaf.

+ Here is the call graph for this function:

◆ GetRightIpv4Address()

Ipv4Address ns3::PointToPointDumbbellHelper::GetRightIpv4Address ( uint32_t  i) const
Returns
an Ipv4Address of the i'th right leaf
Parameters
inode number

Definition at line 100 of file point-to-point-dumbbell.cc.

References ns3::Ipv4InterfaceContainer::GetAddress(), and m_rightLeafInterfaces.

+ Here is the call graph for this function:

◆ GetRightIpv6Address()

Ipv6Address ns3::PointToPointDumbbellHelper::GetRightIpv6Address ( uint32_t  i) const
Returns
an Ipv6Address of the i'th right leaf
Parameters
inode number

Definition at line 110 of file point-to-point-dumbbell.cc.

References ns3::Ipv6InterfaceContainer::GetAddress(), and m_rightLeafInterfaces6.

+ Here is the call graph for this function:

◆ InstallStack()

void ns3::PointToPointDumbbellHelper::InstallStack ( InternetStackHelper  stack)
Parameters
stackan InternetStackHelper which is used to install on every node in the dumbbell

Definition at line 125 of file point-to-point-dumbbell.cc.

References m_leftLeaf, m_rightLeaf, m_routers, and first::stack.

◆ LeftCount()

uint32_t ns3::PointToPointDumbbellHelper::LeftCount ( ) const
Returns
total number of left side leaf nodes

Definition at line 115 of file point-to-point-dumbbell.cc.

References ns3::NodeContainer::GetN(), and m_leftLeaf.

Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and BoundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RightCount()

uint32_t ns3::PointToPointDumbbellHelper::RightCount ( ) const
Returns
total number of right side leaf nodes

Definition at line 120 of file point-to-point-dumbbell.cc.

References ns3::NodeContainer::GetN(), and m_rightLeaf.

Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and BoundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_leftLeaf

NodeContainer ns3::PointToPointDumbbellHelper::m_leftLeaf
private

Left Leaf nodes.

Definition at line 170 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), GetLeft(), InstallStack(), and LeftCount().

◆ m_leftLeafDevices

NetDeviceContainer ns3::PointToPointDumbbellHelper::m_leftLeafDevices
private

Left Leaf NetDevices.

Definition at line 171 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().

◆ m_leftLeafInterfaces

Ipv4InterfaceContainer ns3::PointToPointDumbbellHelper::m_leftLeafInterfaces
private

Left Leaf interfaces (IPv4)

Definition at line 178 of file point-to-point-dumbbell.h.

Referenced by AssignIpv4Addresses(), and GetLeftIpv4Address().

◆ m_leftLeafInterfaces6

Ipv6InterfaceContainer ns3::PointToPointDumbbellHelper::m_leftLeafInterfaces6
private

Left Leaf interfaces (IPv6)

Definition at line 183 of file point-to-point-dumbbell.h.

Referenced by AssignIpv6Addresses(), and GetLeftIpv6Address().

◆ m_leftRouterDevices

NetDeviceContainer ns3::PointToPointDumbbellHelper::m_leftRouterDevices
private

Left router NetDevices.

Definition at line 176 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().

◆ m_leftRouterInterfaces

Ipv4InterfaceContainer ns3::PointToPointDumbbellHelper::m_leftRouterInterfaces
private

Left router interfaces (IPv4)

Definition at line 179 of file point-to-point-dumbbell.h.

Referenced by AssignIpv4Addresses().

◆ m_leftRouterInterfaces6

Ipv6InterfaceContainer ns3::PointToPointDumbbellHelper::m_leftRouterInterfaces6
private

Left router interfaces (IPv6)

Definition at line 184 of file point-to-point-dumbbell.h.

Referenced by AssignIpv6Addresses().

◆ m_rightLeaf

NodeContainer ns3::PointToPointDumbbellHelper::m_rightLeaf
private

Right Leaf nodes.

Definition at line 172 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), GetRight(), InstallStack(), and RightCount().

◆ m_rightLeafDevices

NetDeviceContainer ns3::PointToPointDumbbellHelper::m_rightLeafDevices
private

Right Leaf NetDevices.

Definition at line 173 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().

◆ m_rightLeafInterfaces

Ipv4InterfaceContainer ns3::PointToPointDumbbellHelper::m_rightLeafInterfaces
private

Right Leaf interfaces (IPv4)

Definition at line 180 of file point-to-point-dumbbell.h.

Referenced by AssignIpv4Addresses(), and GetRightIpv4Address().

◆ m_rightLeafInterfaces6

Ipv6InterfaceContainer ns3::PointToPointDumbbellHelper::m_rightLeafInterfaces6
private

Right Leaf interfaces (IPv6)

Definition at line 185 of file point-to-point-dumbbell.h.

Referenced by AssignIpv6Addresses(), and GetRightIpv6Address().

◆ m_rightRouterDevices

NetDeviceContainer ns3::PointToPointDumbbellHelper::m_rightRouterDevices
private

Right router NetDevices.

Definition at line 177 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().

◆ m_rightRouterInterfaces

Ipv4InterfaceContainer ns3::PointToPointDumbbellHelper::m_rightRouterInterfaces
private

Right router interfaces (IPv4)

Definition at line 181 of file point-to-point-dumbbell.h.

Referenced by AssignIpv4Addresses().

◆ m_rightRouterInterfaces6

Ipv6InterfaceContainer ns3::PointToPointDumbbellHelper::m_rightRouterInterfaces6
private

Right router interfaces (IPv6)

Definition at line 186 of file point-to-point-dumbbell.h.

Referenced by AssignIpv6Addresses().

◆ m_routerDevices

NetDeviceContainer ns3::PointToPointDumbbellHelper::m_routerDevices
private

Routers NetDevices.

Definition at line 175 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().

◆ m_routerInterfaces

Ipv4InterfaceContainer ns3::PointToPointDumbbellHelper::m_routerInterfaces
private

Router interfaces (IPv4)

Definition at line 182 of file point-to-point-dumbbell.h.

Referenced by AssignIpv4Addresses().

◆ m_routerInterfaces6

Ipv6InterfaceContainer ns3::PointToPointDumbbellHelper::m_routerInterfaces6
private

Router interfaces (IPv6)

Definition at line 187 of file point-to-point-dumbbell.h.

Referenced by AssignIpv6Addresses().

◆ m_routers

NodeContainer ns3::PointToPointDumbbellHelper::m_routers
private

Routers.

Definition at line 174 of file point-to-point-dumbbell.h.

Referenced by PointToPointDumbbellHelper(), GetLeft(), GetRight(), and InstallStack().


The documentation for this class was generated from the following files: