11#include "ns3/assert.h"
13#include "ns3/radvd-interface.h"
14#include "ns3/radvd-prefix.h"
33 if (prefixLength != 64)
36 "Adding a non-64 prefix is generally a bad idea. Autoconfiguration might not work.");
39 bool prefixFound =
false;
48 for (iter = prefixList.begin(); iter != prefixList.end(); iter++)
50 if ((*iter)->GetNetwork() == prefix)
52 NS_LOG_LOGIC(
"Not adding the same prefix twice, skipping " << prefix <<
" "
53 <<
int(prefixLength));
109 if (!interface->GetPrefixes().empty())
114 node->AddApplication(radvd);
A helper to make it easier to instantiate an application on a set of nodes.
ObjectFactory m_factory
Object factory.
Describes an IPv6 address.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
Smart pointer class similar to boost::intrusive_ptr.
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.
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.
Router advertisement daemon.
void AddConfiguration(Ptr< RadvdInterface > routerInterface)
Add configuration for an interface;.
std::list< Ptr< RadvdPrefix > > RadvdPrefixList
Container: Ptr to RadvdPrefix.
std::list< Ptr< RadvdPrefix > >::const_iterator RadvdPrefixListCI
Container Const Iterator: Ptr to RadvdPrefix.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.