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/radvd-interface.h"
13
#include <ns3/application-helper.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
*/
39
void
AddAnnouncedPrefix
(
uint32_t
interface,
const
Ipv6Address
& prefix,
uint32_t
prefixLength);
40
41
/**
42
* \brief Enable the router as default router for the interface.
43
* The effect is to set the Router Lifetime to the default value (30 minutes)
44
* \param interface outgoing interface
45
*/
46
void
EnableDefaultRouterForInterface
(
uint32_t
interface);
47
48
/**
49
* \brief Disable the router as default router for the interface.
50
* The effect is to set the Router Lifetime to zero
51
* \param interface outgoing interface
52
*/
53
void
DisableDefaultRouterForInterface
(
uint32_t
interface);
54
55
/**
56
* \brief Get the low-level RadvdInterface specification for an interface.
57
* This method is provided to enable fine-grain parameter setup.
58
* \param interface outgoing interface
59
* \returns the RadvdInterface
60
*/
61
Ptr<RadvdInterface>
GetRadvdInterface
(
uint32_t
interface);
62
63
/**
64
* \brief Clear the stored Prefixes
65
*/
66
void
ClearPrefixes
();
67
68
private
:
69
Ptr<Application>
DoInstall
(
Ptr<Node>
node)
override
;
70
71
/// Container: interface index, RadvdInterface
72
typedef
std::map<uint32_t, Ptr<RadvdInterface>>
RadvdInterfaceMap
;
73
/// Container Iterator: interface index, RadvdInterface
74
typedef
std::map<uint32_t, Ptr<RadvdInterface>>::iterator
RadvdInterfaceMapI
;
75
76
RadvdInterfaceMap
m_radvdInterfaces
;
//!< RadvdInterface(s)
77
};
78
79
}
/* namespace ns3 */
80
81
#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:74
ns3::RadvdHelper::EnableDefaultRouterForInterface
void EnableDefaultRouterForInterface(uint32_t interface)
Enable the router as default router for the interface.
Definition
radvd-helper.cc:67
ns3::RadvdHelper::AddAnnouncedPrefix
void AddAnnouncedPrefix(uint32_t interface, const Ipv6Address &prefix, uint32_t prefixLength)
Add a new prefix to be announced through an interface.
Definition
radvd-helper.cc:28
ns3::RadvdHelper::RadvdHelper
RadvdHelper()
Constructor.
Definition
radvd-helper.cc:22
ns3::RadvdHelper::DisableDefaultRouterForInterface
void DisableDefaultRouterForInterface(uint32_t interface)
Disable the router as default router for the interface.
Definition
radvd-helper.cc:78
ns3::RadvdHelper::RadvdInterfaceMap
std::map< uint32_t, Ptr< RadvdInterface > > RadvdInterfaceMap
Container: interface index, RadvdInterface.
Definition
radvd-helper.h:72
ns3::RadvdHelper::m_radvdInterfaces
RadvdInterfaceMap m_radvdInterfaces
RadvdInterface(s)
Definition
radvd-helper.h:76
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:104
ns3::RadvdHelper::GetRadvdInterface
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
Definition
radvd-helper.cc:88
ns3::RadvdHelper::ClearPrefixes
void ClearPrefixes()
Clear the stored Prefixes.
Definition
radvd-helper.cc:98
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 Fri Nov 8 2024 13:59:00 for ns-3 by
1.11.0