A helper to make it easier to create a dumbbell topology with p2p links. More...
#include <point-to-point-dumbbell.h>
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< Node > | GetLeft () const |
Ptr< Node > | GetLeft (uint32_t i) const |
Ipv4Address | GetLeftIpv4Address (uint32_t i) const |
Ipv6Address | GetLeftIpv6Address (uint32_t i) const |
Ptr< Node > | GetRight () const |
Ptr< Node > | GetRight (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 |
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.
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 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.
ns3::PointToPointDumbbellHelper::~PointToPointDumbbellHelper | ( | ) |
Definition at line 71 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 132 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::Add(), ns3::NetDeviceContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::NetDeviceContainer::Get(), ns3::Ipv4InterfaceContainer::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().
Referenced by main().
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 162 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 | ||
) |
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 209 of file point-to-point-dumbbell.cc.
References ns3::Object::AggregateObject(), GetLeft(), ns3::Object::GetObject(), GetRight(), LeftCount(), RightCount(), ns3::Vector3D::x, and ns3::Vector3D::y.
Referenced by main().
Definition at line 75 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_routers.
Referenced by BoundingBox(), and main().
Definition at line 80 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_leftLeaf.
Ipv4Address ns3::PointToPointDumbbellHelper::GetLeftIpv4Address | ( | uint32_t | i | ) | const |
Definition at line 95 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::GetAddress(), and m_leftLeafInterfaces.
Referenced by main().
Ipv6Address ns3::PointToPointDumbbellHelper::GetLeftIpv6Address | ( | uint32_t | i | ) | const |
Definition at line 105 of file point-to-point-dumbbell.cc.
References ns3::Ipv6InterfaceContainer::GetAddress(), and m_leftLeafInterfaces6.
Definition at line 85 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_routers.
Referenced by BoundingBox(), and main().
Definition at line 90 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get(), and m_rightLeaf.
Ipv4Address ns3::PointToPointDumbbellHelper::GetRightIpv4Address | ( | uint32_t | i | ) | const |
Definition at line 100 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::GetAddress(), and m_rightLeafInterfaces.
Ipv6Address ns3::PointToPointDumbbellHelper::GetRightIpv6Address | ( | uint32_t | i | ) | const |
Definition at line 110 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 125 of file point-to-point-dumbbell.cc.
References ns3::InternetStackHelper::Install(), m_leftLeaf, m_rightLeaf, and m_routers.
Referenced by main().
uint32_t ns3::PointToPointDumbbellHelper::LeftCount | ( | ) | const |
Definition at line 115 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::GetN(), and m_leftLeaf.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), BoundingBox(), and main().
uint32_t ns3::PointToPointDumbbellHelper::RightCount | ( | ) | const |
Definition at line 120 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::GetN(), and m_rightLeaf.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), BoundingBox(), and main().
|
private |
Definition at line 164 of file point-to-point-dumbbell.h.
Referenced by GetLeft(), InstallStack(), LeftCount(), and PointToPointDumbbellHelper().
|
private |
Definition at line 165 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and PointToPointDumbbellHelper().
|
private |
Definition at line 172 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), and GetLeftIpv4Address().
|
private |
Definition at line 177 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses(), and GetLeftIpv6Address().
|
private |
Definition at line 170 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and PointToPointDumbbellHelper().
|
private |
Definition at line 173 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses().
|
private |
Definition at line 178 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses().
|
private |
Definition at line 166 of file point-to-point-dumbbell.h.
Referenced by GetRight(), InstallStack(), PointToPointDumbbellHelper(), and RightCount().
|
private |
Definition at line 167 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and PointToPointDumbbellHelper().
|
private |
Definition at line 174 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), and GetRightIpv4Address().
|
private |
Definition at line 179 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses(), and GetRightIpv6Address().
|
private |
Definition at line 171 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and PointToPointDumbbellHelper().
|
private |
Definition at line 175 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses().
|
private |
Definition at line 180 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses().
|
private |
Definition at line 169 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and PointToPointDumbbellHelper().
|
private |
Definition at line 176 of file point-to-point-dumbbell.h.
Referenced by AssignIpv4Addresses().
|
private |
Definition at line 181 of file point-to-point-dumbbell.h.
Referenced by AssignIpv6Addresses().
|
private |
Definition at line 168 of file point-to-point-dumbbell.h.
Referenced by GetLeft(), GetRight(), InstallStack(), and PointToPointDumbbellHelper().