22 #include "ns3/assert.h"
24 #include "ns3/radvd-interface.h"
25 #include "ns3/radvd-prefix.h"
26 #include "ns3/radvd.h"
42 if (prefixLength != 64)
45 "Adding a non-64 prefix is generally a bad idea. Autoconfiguration might not work.");
48 bool prefixFound =
false;
57 for (iter = prefixList.begin(); iter != prefixList.end(); iter++)
59 if ((*iter)->GetNetwork() == prefix)
61 NS_LOG_LOGIC(
"Not adding the same prefix twice, skipping " << prefix <<
" "
62 <<
int(prefixLength));
82 uint32_t maxRtrAdvInterval =
m_radvdInterfaces[interface]->GetMaxRtrAdvInterval();
125 if (!iter->second->GetPrefixes().empty())
127 radvd->AddConfiguration(iter->second);
holds a vector of ns3::Application pointers.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
Hold a value for an Attribute.
Describes an IPv6 address.
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
void EnableDefaultRouterForInterface(uint32_t interface)
Enable the router as default router for the interface.
ObjectFactory m_factory
An object factory.
void AddAnnouncedPrefix(uint32_t interface, Ipv6Address prefix, uint32_t prefixLength)
Add a new prefix to be announced through an interface.
void SetAttribute(std::string name, const AttributeValue &value)
Set some attributes.
RadvdHelper()
Constructor.
void DisableDefaultRouterForInterface(uint32_t interface)
Disable the router as default router for the interface.
RadvdInterfaceMap m_radvdInterfaces
RadvdInterface(s)
ApplicationContainer Install(Ptr< Node > node)
Install the application in a Node.
Ptr< RadvdInterface > GetRadvdInterface(uint32_t interface)
Get the low-level RadvdInterface specification for an interface.
void ClearPrefixes()
Clear the stored Prefixes.
Router advertisement daemon.
static TypeId GetTypeId()
Get the type ID.
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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.