A Discrete-Event Network Simulator
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
18namespace ns3
19{
20
21/**
22 * \ingroup radvd
23 * \brief Radvd application helper.
24 */
26{
27 public:
28 /**
29 * \brief Constructor.
30 */
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 */
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 */
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 */
62
63 /**
64 * \brief Clear the stored Prefixes
65 */
66 void ClearPrefixes();
67
68 private:
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 */
A helper to make it easier to instantiate an application on a set of nodes.
Describes an IPv6 address.
Smart pointer class similar to boost::intrusive_ptr.
Radvd application helper.
std::map< uint32_t, Ptr< RadvdInterface > >::iterator RadvdInterfaceMapI
Container Iterator: interface index, RadvdInterface.
void EnableDefaultRouterForInterface(uint32_t interface)
Enable the router as default router for the interface.
void AddAnnouncedPrefix(uint32_t interface, const Ipv6Address &prefix, uint32_t prefixLength)
Add a new prefix to be announced through an interface.
RadvdHelper()
Constructor.
void DisableDefaultRouterForInterface(uint32_t interface)
Disable the router as default router for the interface.
std::map< uint32_t, Ptr< RadvdInterface > > RadvdInterfaceMap
Container: interface index, RadvdInterface.
RadvdInterfaceMap m_radvdInterfaces
RadvdInterface(s)
Ptr< Application > DoInstall(Ptr< Node > node) override
Install an application on the node configured with all the attributes set with SetAttribute.
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
void ClearPrefixes()
Clear the stored Prefixes.
Every class exported by the ns3 library is enclosed in the ns3 namespace.