A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Dhcp6Helper Class Reference

The helper class used to configure and install DHCPv6 applications on nodes. More...

#include "dhcp6-helper.h"

+ Collaboration diagram for ns3::Dhcp6Helper:

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< ApplicationInstallDhcp6ClientInternal (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.
 

Detailed Description

The helper class used to configure and install DHCPv6 applications on nodes.

Definition at line 32 of file dhcp6-helper.h.

Constructor & Destructor Documentation

◆ Dhcp6Helper()

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().

+ Here is the call graph for this function:

Member Function Documentation

◆ InstallDhcp6Client()

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.

Parameters
clientNodesNodes on which the DHCPv6 client is installed
Returns
The application container with DHCPv6 client 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallDhcp6ClientInternal()

Ptr< Application > ns3::Dhcp6Helper::InstallDhcp6ClientInternal ( Ptr< Node > clientNode) const
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.

Parameters
clientNodeThe node on which the application is to be installed.
Returns
Pointer to the Dhcp6Client application on the node.

Definition at line 99 of file dhcp6-helper.cc.

References ns3::ObjectFactory::Create(), ns3::Dhcp6Client::GetTypeId(), and m_clientFactory.

Referenced by InstallDhcp6Client().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallDhcp6Server()

ApplicationContainer ns3::Dhcp6Helper::InstallDhcp6Server ( NetDeviceContainer netDevices)

Install DHCPv6 server on a node / NetDevice.

Also updates the interface -> server map.

Parameters
netDevicesThe NetDevices on which DHCPv6 server application has to be installed
Returns
The application container with DHCPv6 server 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetClientAttribute()

void ns3::Dhcp6Helper::SetClientAttribute ( std::string name,
const AttributeValue & value )

Set DHCPv6 client attributes.

Parameters
nameName of the attribute
valueValue to be set

Definition at line 32 of file dhcp6-helper.cc.

References m_clientFactory, and ns3::ObjectFactory::Set().

+ Here is the call graph for this function:

◆ SetServerAttribute()

void ns3::Dhcp6Helper::SetServerAttribute ( std::string name,
const AttributeValue & value )

Set DHCPv6 server attributes.

Parameters
nameName of the attribute
valueValue to be set

Definition at line 38 of file dhcp6-helper.cc.

References m_serverFactory, and ns3::ObjectFactory::Set().

Referenced by Dhcp6TestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_clientFactory

ObjectFactory ns3::Dhcp6Helper::m_clientFactory
private

DHCPv6 client factory.

Definition at line 83 of file dhcp6-helper.h.

Referenced by Dhcp6Helper(), InstallDhcp6ClientInternal(), and SetClientAttribute().

◆ m_serverFactory

ObjectFactory ns3::Dhcp6Helper::m_serverFactory
private

DHCPv6 server factory.

Definition at line 84 of file dhcp6-helper.h.

Referenced by Dhcp6Helper(), InstallDhcp6Server(), and SetServerAttribute().


The documentation for this class was generated from the following files: