A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
dhcp6-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 NITK Surathkal
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Kavya Bhat <kavyabhat@gmail.com>
7
*
8
*/
9
10
#ifndef DHCP6_HELPER_H
11
#define DHCP6_HELPER_H
12
13
#include "ns3/application-container.h"
14
#include "ns3/dhcp6-server.h"
15
#include "ns3/ipv6-address.h"
16
#include "ns3/ipv6-interface-container.h"
17
#include "ns3/net-device-container.h"
18
#include "ns3/node-container.h"
19
#include "ns3/object-factory.h"
20
21
#include <stdint.h>
22
23
namespace
ns3
24
{
25
26
/**
27
* @ingroup dhcp6
28
*
29
* @class Dhcp6Helper
30
* @brief The helper class used to configure and install DHCPv6 applications on nodes
31
*/
32
class
Dhcp6Helper
33
{
34
public
:
35
/**
36
* @brief Default constructor.
37
*/
38
Dhcp6Helper
();
39
40
/**
41
* @brief Set DHCPv6 client attributes
42
* @param name Name of the attribute
43
* @param value Value to be set
44
*/
45
void
SetClientAttribute
(std::string name,
const
AttributeValue
& value);
46
47
/**
48
* @brief Set DHCPv6 server attributes
49
* @param name Name of the attribute
50
* @param value Value to be set
51
*/
52
void
SetServerAttribute
(std::string name,
const
AttributeValue
& value);
53
54
/**
55
* @brief Install DHCPv6 client on a set of nodes
56
*
57
* If there is already a DHCPv6 client on the node, the app is not installed,
58
* and the already existing one is returned.
59
*
60
* @param clientNodes Nodes on which the DHCPv6 client is installed
61
* @return The application container with DHCPv6 client installed
62
*/
63
ApplicationContainer
InstallDhcp6Client
(
NodeContainer
clientNodes)
const
;
64
65
/**
66
* @brief Install DHCPv6 server on a node / NetDevice. Also updates the
67
* interface -> server map.
68
* @param netDevices The NetDevices on which DHCPv6 server application has to be installed
69
* @return The application container with DHCPv6 server installed
70
*/
71
ApplicationContainer
InstallDhcp6Server
(
NetDeviceContainer
netDevices);
72
73
private
:
74
/**
75
* @brief Helper method that iterates through the installed applications
76
* on a node to look for a Dhcp6Client application. It either installs a
77
* new Dhcp6Client or returns an existing one.
78
* @param clientNode The node on which the application is to be installed.
79
* @return Pointer to the Dhcp6Client application on the node.
80
*/
81
Ptr<Application>
InstallDhcp6ClientInternal
(
Ptr<Node>
clientNode)
const
;
82
83
ObjectFactory
m_clientFactory
;
//!< DHCPv6 client factory.
84
ObjectFactory
m_serverFactory
;
//!< DHCPv6 server factory.
85
};
86
87
}
// namespace ns3
88
89
#endif
/* DHCP6_HELPER_H */
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition
application-container.h:33
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::Dhcp6Helper
The helper class used to configure and install DHCPv6 applications on nodes.
Definition
dhcp6-helper.h:33
ns3::Dhcp6Helper::SetServerAttribute
void SetServerAttribute(std::string name, const AttributeValue &value)
Set DHCPv6 server attributes.
Definition
dhcp6-helper.cc:38
ns3::Dhcp6Helper::m_serverFactory
ObjectFactory m_serverFactory
DHCPv6 server factory.
Definition
dhcp6-helper.h:84
ns3::Dhcp6Helper::InstallDhcp6ClientInternal
Ptr< Application > InstallDhcp6ClientInternal(Ptr< Node > clientNode) const
Helper method that iterates through the installed applications on a node to look for a Dhcp6Client ap...
Definition
dhcp6-helper.cc:99
ns3::Dhcp6Helper::SetClientAttribute
void SetClientAttribute(std::string name, const AttributeValue &value)
Set DHCPv6 client attributes.
Definition
dhcp6-helper.cc:32
ns3::Dhcp6Helper::m_clientFactory
ObjectFactory m_clientFactory
DHCPv6 client factory.
Definition
dhcp6-helper.h:83
ns3::Dhcp6Helper::Dhcp6Helper
Dhcp6Helper()
Default constructor.
Definition
dhcp6-helper.cc:25
ns3::Dhcp6Helper::InstallDhcp6Client
ApplicationContainer InstallDhcp6Client(NodeContainer clientNodes) const
Install DHCPv6 client on a set of nodes.
Definition
dhcp6-helper.cc:44
ns3::Dhcp6Helper::InstallDhcp6Server
ApplicationContainer InstallDhcp6Server(NetDeviceContainer netDevices)
Install DHCPv6 server on a node / NetDevice.
Definition
dhcp6-helper.cc:57
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition
net-device-container.h:32
ns3::NodeContainer
keep track of a set of node pointers.
Definition
node-container.h:29
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition
object-factory.h:37
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet-apps
helper
dhcp6-helper.h
Generated on Tue Apr 29 2025 18:20:43 for ns-3 by
1.11.0