A helper to make it easier to create a dumbbell topology with p2p links. More...
#include "point-to-point-dumbbell.h"
A helper to make it easier to create a dumbbell topology with p2p links.
Definition at line 30 of file point-to-point-dumbbell.h.
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.
nLeftLeaf | number of left side leaf nodes in the dumbbell |
leftHelper | PointToPointHelper used to install the links between the left leaf nodes and the left-most router |
nRightLeaf | number of right side leaf nodes in the dumbbell |
rightHelper | PointToPointHelper used to install the links between the right leaf nodes and the right-most router |
bottleneckHelper | PointToPointHelper used to install the link between the inner-routers, usually known as the bottleneck link |
Definition at line 27 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.
ns3::PointToPointDumbbellHelper::~PointToPointDumbbellHelper | ( | ) |
Definition at line 57 of file point-to-point-dumbbell.cc.
void ns3::PointToPointDumbbellHelper::AssignIpv4Addresses | ( | Ipv4AddressHelper | leftIp, |
Ipv4AddressHelper | rightIp, | ||
Ipv4AddressHelper | routerIp ) |
leftIp | Ipv4AddressHelper to assign Ipv4 addresses to the interfaces on the left side of the dumbbell |
rightIp | Ipv4AddressHelper to assign Ipv4 addresses to the interfaces on the right side of the dumbbell |
routerIp | Ipv4AddressHelper to assign Ipv4 addresses to the interfaces on the bottleneck link |
Definition at line 130 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().
void ns3::PointToPointDumbbellHelper::AssignIpv6Addresses | ( | Ipv6Address | network, |
Ipv6Prefix | prefix ) |
network | an IPv6 address representing the network portion of the IPv6 Address |
prefix | the prefix length |
Definition at line 161 of file point-to-point-dumbbell.cc.
References ns3::Ipv6InterfaceContainer::Add(), ns3::NetDeviceContainer::Add(), ns3::Ipv6AddressHelper::Assign(), ns3::Ipv6InterfaceContainer::Begin(), ns3::NetDeviceContainer::Get(), ns3::Ipv6AddressGenerator::GetNetwork(), ns3::Ipv6AddressGenerator::Init(), LeftCount(), m_leftLeafDevices, m_leftLeafInterfaces6, m_leftRouterDevices, m_leftRouterInterfaces6, m_rightLeafDevices, m_rightLeafInterfaces6, m_rightRouterDevices, m_rightRouterInterfaces6, m_routerDevices, m_routerInterfaces6, ns3::Ipv6AddressGenerator::NextNetwork(), RightCount(), and ns3::Ipv6AddressHelper::SetBase().
void ns3::PointToPointDumbbellHelper::BoundingBox | ( | double | ulx, |
double | uly, | ||
double | lrx, | ||
double | lry ) const |
Sets up the node canvas locations for every node in the dumbbell.
This is needed for use with the animation interface
ulx | upper left x value |
uly | upper left y value |
lrx | lower right x value |
lry | lower right y value |
Definition at line 208 of file point-to-point-dumbbell.cc.
References ns3::CreateObject().
Definition at line 62 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_routers.
i | node number |
Definition at line 68 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_leftLeaf.
Ipv4Address ns3::PointToPointDumbbellHelper::GetLeftIpv4Address | ( | uint32_t | i | ) | const |
i | node number |
Definition at line 86 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::GetAddress(), and m_leftLeafInterfaces.
Ipv6Address ns3::PointToPointDumbbellHelper::GetLeftIpv6Address | ( | uint32_t | i | ) | const |
i | node number |
Definition at line 98 of file point-to-point-dumbbell.cc.
References ns3::Ipv6InterfaceContainer::GetAddress(), and m_leftLeafInterfaces6.
Definition at line 74 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_routers.
i | node number |
Definition at line 80 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_rightLeaf.
Ipv4Address ns3::PointToPointDumbbellHelper::GetRightIpv4Address | ( | uint32_t | i | ) | const |
i | node number |
Definition at line 92 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::GetAddress(), and m_rightLeafInterfaces.
Ipv6Address ns3::PointToPointDumbbellHelper::GetRightIpv6Address | ( | uint32_t | i | ) | const |
i | node number |
Definition at line 104 of file point-to-point-dumbbell.cc.
References ns3::Ipv6InterfaceContainer::GetAddress(), and m_rightLeafInterfaces6.
void ns3::PointToPointDumbbellHelper::InstallStack | ( | InternetStackHelper | stack | ) |
stack | an InternetStackHelper which is used to install on every node in the dumbbell |
Definition at line 122 of file point-to-point-dumbbell.cc.
References m_leftLeaf, m_rightLeaf, and m_routers.
uint32_t ns3::PointToPointDumbbellHelper::LeftCount | ( | ) | const |
Definition at line 110 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::GetN(), and m_leftLeaf.
Referenced by AssignIpv4Addresses(), and AssignIpv6Addresses().
uint32_t ns3::PointToPointDumbbellHelper::RightCount | ( | ) | const |
Definition at line 116 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::GetN(), and m_rightLeaf.
Referenced by AssignIpv4Addresses(), and AssignIpv6Addresses().
|
private |
Left Leaf nodes.
Definition at line 159 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), GetLeft(), InstallStack(), and LeftCount().
|
private |
Left Leaf NetDevices.
Definition at line 160 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().
|
private |
Left Leaf interfaces (IPv4)
Definition at line 167 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), and GetLeftIpv4Address().
|
private |
Left Leaf interfaces (IPv6)
Definition at line 172 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses(), and GetLeftIpv6Address().
|
private |
Left router NetDevices.
Definition at line 165 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().
|
private |
Left router interfaces (IPv4)
Definition at line 168 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses().
|
private |
Left router interfaces (IPv6)
Definition at line 173 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses().
|
private |
Right Leaf nodes.
Definition at line 161 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), GetRight(), InstallStack(), and RightCount().
|
private |
Right Leaf NetDevices.
Definition at line 162 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().
|
private |
Right Leaf interfaces (IPv4)
Definition at line 169 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), and GetRightIpv4Address().
|
private |
Right Leaf interfaces (IPv6)
Definition at line 174 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses(), and GetRightIpv6Address().
|
private |
Right router NetDevices.
Definition at line 166 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().
|
private |
Right router interfaces (IPv4)
Definition at line 170 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses().
|
private |
Right router interfaces (IPv6)
Definition at line 175 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses().
|
private |
Routers NetDevices.
Definition at line 164 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), AssignIpv4Addresses(), and AssignIpv6Addresses().
|
private |
Router interfaces (IPv4)
Definition at line 171 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses().
|
private |
Router interfaces (IPv6)
Definition at line 176 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses().
|
private |
Routers.
Definition at line 163 of file point-to-point-dumbbell.h.
Referenced by PointToPointDumbbellHelper(), GetLeft(), GetRight(), and InstallStack().