9#ifndef POINT_TO_POINT_GRID_HELPER_H
10#define POINT_TO_POINT_GRID_HELPER_H
12#include "ns3/internet-stack-helper.h"
13#include "ns3/ipv4-address-helper.h"
14#include "ns3/ipv4-interface-container.h"
15#include "ns3/ipv6-address-helper.h"
16#include "ns3/ipv6-interface-container.h"
17#include "ns3/net-device-container.h"
18#include "ns3/point-to-point-helper.h"
131 void BoundingBox(
double ulx,
double uly,
double lrx,
double lry);
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.
Describes an IPv6 address.
Describes an IPv6 prefix.
A helper to make it easier to create a grid topology with p2p links.
std::vector< Ipv6InterfaceContainer > m_colInterfaces6
IPv6 interfaces in a column.
void InstallStack(InternetStackHelper stack)
void AssignIpv6Addresses(Ipv6Address network, Ipv6Prefix prefix)
Assigns Ipv6 addresses to all the row and column interfaces.
Ipv4Address GetIpv4Address(uint32_t row, uint32_t col)
This returns an Ipv4 address at the node specified by the (row, col) address.
Ptr< Node > GetNode(uint32_t row, uint32_t col)
uint32_t m_ySize
Y size of the grid (number of rows)
~PointToPointGridHelper()
Ipv6Address GetIpv6Address(uint32_t row, uint32_t col)
This returns an Ipv6 address at the node specified by the (row, col) address.
std::vector< NodeContainer > m_nodes
all the nodes in the grid
std::vector< NetDeviceContainer > m_colDevices
NetDevices in a column.
std::vector< NetDeviceContainer > m_rowDevices
NetDevices in a row.
std::vector< Ipv6InterfaceContainer > m_rowInterfaces6
IPv6 interfaces in a row.
void BoundingBox(double ulx, double uly, double lrx, double lry)
Sets up the node canvas locations for every node in the grid.
std::vector< Ipv4InterfaceContainer > m_colInterfaces
IPv4 interfaces in a column.
void AssignIpv4Addresses(Ipv4AddressHelper rowIp, Ipv4AddressHelper colIp)
Assigns Ipv4 addresses to all the row and column interfaces.
uint32_t m_xSize
X size of the grid (number of columns)
PointToPointGridHelper(uint32_t nRows, uint32_t nCols, PointToPointHelper pointToPoint)
Create a PointToPointGridHelper in order to easily create grid topologies using p2p links.
std::vector< Ipv4InterfaceContainer > m_rowInterfaces
IPv4 interfaces in a row.
Build a set of PointToPointNetDevice objects.
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.