The helper class used to configure and install DHCPv6 applications on nodes. More...
#include "dhcp6-helper.h"
Public Member Functions | |
Dhcp6Helper () | |
Default constructor. | |
ApplicationContainer | InstallDhcp6Client (NodeContainer clientNodes) const |
Install DHCPv6 client on a set of nodes. | |
ApplicationContainer | InstallDhcp6Server (NetDeviceContainer netDevices) |
Install DHCPv6 server on a node / NetDevice. | |
void | SetClientAttribute (std::string name, const AttributeValue &value) |
Set DHCPv6 client attributes. | |
void | SetServerAttribute (std::string name, const AttributeValue &value) |
Set DHCPv6 server attributes. | |
Private Member Functions | |
Ptr< Application > | InstallDhcp6ClientInternal (Ptr< Node > clientNode) const |
Helper method that iterates through the installed applications on a node to look for a Dhcp6Client application. | |
Private Attributes | |
ObjectFactory | m_clientFactory |
DHCPv6 client factory. | |
ObjectFactory | m_serverFactory |
DHCPv6 server factory. | |
The helper class used to configure and install DHCPv6 applications on nodes.
Definition at line 32 of file dhcp6-helper.h.
ns3::Dhcp6Helper::Dhcp6Helper | ( | ) |
Default constructor.
Definition at line 25 of file dhcp6-helper.cc.
References ns3::Dhcp6Client::GetTypeId(), ns3::Dhcp6Server::GetTypeId(), m_clientFactory, m_serverFactory, and ns3::ObjectFactory::SetTypeId().
ApplicationContainer ns3::Dhcp6Helper::InstallDhcp6Client | ( | NodeContainer | clientNodes | ) | const |
Install DHCPv6 client on a set of nodes.
If there is already a DHCPv6 client on the node, the app is not installed, and the already existing one is returned.
clientNodes | Nodes on which the DHCPv6 client is installed |
Definition at line 44 of file dhcp6-helper.cc.
References ns3::ApplicationContainer::Add(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), and InstallDhcp6ClientInternal().
Referenced by Dhcp6TestCase::DoRun().
|
private |
Helper method that iterates through the installed applications on a node to look for a Dhcp6Client application.
It either installs a new Dhcp6Client or returns an existing one.
clientNode | The node on which the application is to be installed. |
Definition at line 99 of file dhcp6-helper.cc.
References ns3::ObjectFactory::Create(), ns3::Dhcp6Client::GetTypeId(), and m_clientFactory.
Referenced by InstallDhcp6Client().
ApplicationContainer ns3::Dhcp6Helper::InstallDhcp6Server | ( | NetDeviceContainer | netDevices | ) |
Install DHCPv6 server on a node / NetDevice.
Also updates the interface -> server map.
netDevices | The NetDevices on which DHCPv6 server application has to be installed |
Definition at line 57 of file dhcp6-helper.cc.
References ns3::ApplicationContainer::Add(), ns3::NetDeviceContainer::Begin(), ns3::ObjectFactory::Create(), ns3::DynamicCast(), ns3::NetDeviceContainer::End(), m_serverFactory, and NS_ASSERT_MSG.
Referenced by Dhcp6TestCase::DoRun().
void ns3::Dhcp6Helper::SetClientAttribute | ( | std::string | name, |
const AttributeValue & | value ) |
Set DHCPv6 client attributes.
name | Name of the attribute |
value | Value to be set |
Definition at line 32 of file dhcp6-helper.cc.
References m_clientFactory, and ns3::ObjectFactory::Set().
void ns3::Dhcp6Helper::SetServerAttribute | ( | std::string | name, |
const AttributeValue & | value ) |
Set DHCPv6 server attributes.
name | Name of the attribute |
value | Value to be set |
Definition at line 38 of file dhcp6-helper.cc.
References m_serverFactory, and ns3::ObjectFactory::Set().
Referenced by Dhcp6TestCase::DoRun().
|
private |
DHCPv6 client factory.
Definition at line 83 of file dhcp6-helper.h.
Referenced by Dhcp6Helper(), InstallDhcp6ClientInternal(), and SetClientAttribute().
|
private |
DHCPv6 server factory.
Definition at line 84 of file dhcp6-helper.h.
Referenced by Dhcp6Helper(), InstallDhcp6Server(), and SetServerAttribute().