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
radvd-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Universita' di Firenze
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
7
*/
8
9
#ifndef RADVD_HELPER_H
10
#define RADVD_HELPER_H
11
12
#include "ns3/application-helper.h"
13
#include "ns3/radvd-interface.h"
14
15
#include <map>
16
#include <stdint.h>
17
18
namespace
ns3
19
{
20
21
/**
22
* @ingroup radvd
23
* @brief Radvd application helper.
24
*/
25
class
RadvdHelper
:
public
ApplicationHelper
26
{
27
public
:
28
/**
29
* @brief Constructor.
30
*/
31
RadvdHelper
();
32
33
/**
34
* @brief Add a new prefix to be announced through an interface.
35
* @param interface outgoing interface
36
* @param prefix announced IPv6 prefix
37
* @param prefixLength announced IPv6 prefix length
38
* @param slaac available for autoconfiguration
39
*/
40
void
AddAnnouncedPrefix
(
uint32_t
interface,
41
const
Ipv6Address
& prefix,
42
uint32_t
prefixLength,
43
bool
slaac =
true
);
44
45
/**
46
* @brief Enable the router as default router for the interface.
47
* The effect is to set the Router Lifetime to the default value (30 minutes)
48
* @param interface outgoing interface
49
*/
50
void
EnableDefaultRouterForInterface
(
uint32_t
interface);
51
52
/**
53
* @brief Disable the router as default router for the interface.
54
* The effect is to set the Router Lifetime to zero
55
* @param interface outgoing interface
56
*/
57
void
DisableDefaultRouterForInterface
(
uint32_t
interface);
58
59
/**
60
* @brief Get the low-level RadvdInterface specification for an interface.
61
* This method is provided to enable fine-grain parameter setup.
62
* @param interface outgoing interface
63
* @returns the RadvdInterface
64
*/
65
Ptr<RadvdInterface>
GetRadvdInterface
(
uint32_t
interface);
66
67
/**
68
* @brief Clear the stored Prefixes
69
*/
70
void
ClearPrefixes
();
71
72
private
:
73
Ptr<Application>
DoInstall
(
Ptr<Node>
node)
override
;
74
75
/// Container: interface index, RadvdInterface
76
typedef
std::map<uint32_t, Ptr<RadvdInterface>>
RadvdInterfaceMap
;
77
/// Container Iterator: interface index, RadvdInterface
78
typedef
std::map<uint32_t, Ptr<RadvdInterface>>::iterator
RadvdInterfaceMapI
;
79
80
RadvdInterfaceMap
m_radvdInterfaces
;
//!< RadvdInterface(s)
81
};
82
83
}
/* namespace ns3 */
84
85
#endif
/* RADVD_HELPER_H */
ns3::ApplicationHelper
A helper to make it easier to instantiate an application on a set of nodes.
Definition
application-helper.h:28
ns3::Ipv6Address
Describes an IPv6 address.
Definition
ipv6-address.h:38
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::RadvdHelper
Radvd application helper.
Definition
radvd-helper.h:26
ns3::RadvdHelper::RadvdInterfaceMapI
std::map< uint32_t, Ptr< RadvdInterface > >::iterator RadvdInterfaceMapI
Container Iterator: interface index, RadvdInterface.
Definition
radvd-helper.h:78
ns3::RadvdHelper::EnableDefaultRouterForInterface
void EnableDefaultRouterForInterface(uint32_t interface)
Enable the router as default router for the interface.
Definition
radvd-helper.cc:69
ns3::RadvdHelper::RadvdHelper
RadvdHelper()
Constructor.
Definition
radvd-helper.cc:22
ns3::RadvdHelper::AddAnnouncedPrefix
void AddAnnouncedPrefix(uint32_t interface, const Ipv6Address &prefix, uint32_t prefixLength, bool slaac=true)
Add a new prefix to be announced through an interface.
Definition
radvd-helper.cc:28
ns3::RadvdHelper::DisableDefaultRouterForInterface
void DisableDefaultRouterForInterface(uint32_t interface)
Disable the router as default router for the interface.
Definition
radvd-helper.cc:80
ns3::RadvdHelper::RadvdInterfaceMap
std::map< uint32_t, Ptr< RadvdInterface > > RadvdInterfaceMap
Container: interface index, RadvdInterface.
Definition
radvd-helper.h:76
ns3::RadvdHelper::m_radvdInterfaces
RadvdInterfaceMap m_radvdInterfaces
RadvdInterface(s)
Definition
radvd-helper.h:80
ns3::RadvdHelper::DoInstall
Ptr< Application > DoInstall(Ptr< Node > node) override
Install an application on the node configured with all the attributes set with SetAttribute.
Definition
radvd-helper.cc:106
ns3::RadvdHelper::GetRadvdInterface
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
Definition
radvd-helper.cc:90
ns3::RadvdHelper::ClearPrefixes
void ClearPrefixes()
Clear the stored Prefixes.
Definition
radvd-helper.cc:100
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet-apps
helper
radvd-helper.h
Generated on Tue Apr 29 2025 18:20:43 for ns-3 by
1.11.0