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) | |
void | AssignIpv4Addresses (Ipv4AddressHelper leftIp, Ipv4AddressHelper rightIp, Ipv4AddressHelper routerIp) |
void | AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix) |
void | BoundingBox (double ulx, double uly, double lrx, double lry) |
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 |
Private Attributes | |
NodeContainer | m_leftLeaf |
NetDeviceContainer | m_leftLeafDevices |
Ipv4InterfaceContainer | m_leftLeafInterfaces |
Ipv6InterfaceContainer | m_leftLeafInterfaces6 |
NetDeviceContainer | m_leftRouterDevices |
Ipv4InterfaceContainer | m_leftRouterInterfaces |
Ipv6InterfaceContainer | m_leftRouterInterfaces6 |
NodeContainer | m_rightLeaf |
NetDeviceContainer | m_rightLeafDevices |
Ipv4InterfaceContainer | m_rightLeafInterfaces |
Ipv6InterfaceContainer | m_rightLeafInterfaces6 |
NetDeviceContainer | m_rightRouterDevices |
Ipv4InterfaceContainer | m_rightRouterInterfaces |
Ipv6InterfaceContainer | m_rightRouterInterfaces6 |
NetDeviceContainer | m_routerDevices |
Ipv4InterfaceContainer | m_routerInterfaces |
Ipv6InterfaceContainer | m_routerInterfaces6 |
NodeContainer | m_routers |
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(), and ns3::PointToPointHelper::Install().
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::Ipv4InterfaceContainer::Get(), ns3::NetDeviceContainer::Get(), LeftCount(), 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 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(), 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.
Definition at line 75 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get().
Referenced by BoundingBox().
Definition at line 80 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get().
Ipv4Address ns3::PointToPointDumbbellHelper::GetLeftIpv4Address | ( | uint32_t | i | ) | const |
Definition at line 95 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::GetAddress().
Ipv6Address ns3::PointToPointDumbbellHelper::GetLeftIpv6Address | ( | uint32_t | i | ) | const |
Definition at line 105 of file point-to-point-dumbbell.cc.
References ns3::Ipv6InterfaceContainer::GetAddress().
Definition at line 85 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get().
Referenced by BoundingBox().
Definition at line 90 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::Get().
Ipv4Address ns3::PointToPointDumbbellHelper::GetRightIpv4Address | ( | uint32_t | i | ) | const |
Definition at line 100 of file point-to-point-dumbbell.cc.
References ns3::Ipv4InterfaceContainer::GetAddress().
Ipv6Address ns3::PointToPointDumbbellHelper::GetRightIpv6Address | ( | uint32_t | i | ) | const |
Definition at line 110 of file point-to-point-dumbbell.cc.
References ns3::Ipv6InterfaceContainer::GetAddress().
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().
uint32_t ns3::PointToPointDumbbellHelper::LeftCount | ( | ) | const |
Definition at line 115 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::GetN().
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and BoundingBox().
uint32_t ns3::PointToPointDumbbellHelper::RightCount | ( | ) | const |
Definition at line 120 of file point-to-point-dumbbell.cc.
References ns3::NodeContainer::GetN().
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), and BoundingBox().