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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
18
*/
19
20
#ifndef RADVD_HELPER_H
21
#define RADVD_HELPER_H
22
23
#include "ns3/radvd-interface.h"
24
#include <ns3/application-helper.h>
25
26
#include <map>
27
#include <stdint.h>
28
29
namespace
ns3
30
{
31
32
/**
33
* \ingroup radvd
34
* \brief Radvd application helper.
35
*/
36
class
RadvdHelper
:
public
ApplicationHelper
37
{
38
public
:
39
/**
40
* \brief Constructor.
41
*/
42
RadvdHelper
();
43
44
/**
45
* \brief Add a new prefix to be announced through an interface.
46
* \param interface outgoing interface
47
* \param prefix announced IPv6 prefix
48
* \param prefixLength announced IPv6 prefix length
49
*/
50
void
AddAnnouncedPrefix
(
uint32_t
interface,
const
Ipv6Address
& prefix,
uint32_t
prefixLength);
51
52
/**
53
* \brief Enable the router as default router for the interface.
54
* The effect is to set the Router Lifetime to the default value (30 minutes)
55
* \param interface outgoing interface
56
*/
57
void
EnableDefaultRouterForInterface
(
uint32_t
interface);
58
59
/**
60
* \brief Disable the router as default router for the interface.
61
* The effect is to set the Router Lifetime to zero
62
* \param interface outgoing interface
63
*/
64
void
DisableDefaultRouterForInterface
(
uint32_t
interface);
65
66
/**
67
* \brief Get the low-level RadvdInterface specification for an interface.
68
* This method is provided to enable fine-grain parameter setup.
69
* \param interface outgoing interface
70
* \returns the RadvdInterface
71
*/
72
Ptr<RadvdInterface>
GetRadvdInterface
(
uint32_t
interface);
73
74
/**
75
* \brief Clear the stored Prefixes
76
*/
77
void
ClearPrefixes
();
78
79
private
:
80
Ptr<Application>
DoInstall
(
Ptr<Node>
node)
override
;
81
82
/// Container: interface index, RadvdInterface
83
typedef
std::map<uint32_t, Ptr<RadvdInterface>>
RadvdInterfaceMap
;
84
/// Container Iterator: interface index, RadvdInterface
85
typedef
std::map<uint32_t, Ptr<RadvdInterface>>::iterator
RadvdInterfaceMapI
;
86
87
RadvdInterfaceMap
m_radvdInterfaces
;
//!< RadvdInterface(s)
88
};
89
90
}
/* namespace ns3 */
91
92
#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:39
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::RadvdHelper
Radvd application helper.
Definition:
radvd-helper.h:37
ns3::RadvdHelper::RadvdInterfaceMapI
std::map< uint32_t, Ptr< RadvdInterface > >::iterator RadvdInterfaceMapI
Container Iterator: interface index, RadvdInterface.
Definition:
radvd-helper.h:85
ns3::RadvdHelper::EnableDefaultRouterForInterface
void EnableDefaultRouterForInterface(uint32_t interface)
Enable the router as default router for the interface.
Definition:
radvd-helper.cc:78
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:39
ns3::RadvdHelper::RadvdHelper
RadvdHelper()
Constructor.
Definition:
radvd-helper.cc:33
ns3::RadvdHelper::DisableDefaultRouterForInterface
void DisableDefaultRouterForInterface(uint32_t interface)
Disable the router as default router for the interface.
Definition:
radvd-helper.cc:89
ns3::RadvdHelper::RadvdInterfaceMap
std::map< uint32_t, Ptr< RadvdInterface > > RadvdInterfaceMap
Container: interface index, RadvdInterface.
Definition:
radvd-helper.h:83
ns3::RadvdHelper::m_radvdInterfaces
RadvdInterfaceMap m_radvdInterfaces
RadvdInterface(s)
Definition:
radvd-helper.h:87
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:115
ns3::RadvdHelper::GetRadvdInterface
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
Definition:
radvd-helper.cc:99
ns3::RadvdHelper::ClearPrefixes
void ClearPrefixes()
Clear the stored Prefixes.
Definition:
radvd-helper.cc:109
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 May 28 2024 23:35:29 for ns-3 by
1.9.6