21 #include "ns3/node-list.h"
22 #include "ns3/names.h"
24 #include "ipv6-interface-container.h"
25 #include "ns3/ipv6-static-routing-helper.h"
34 Ipv6InterfaceContainer::Iterator
40 Ipv6InterfaceContainer::Iterator
60 return ipv6->GetAddress (interface, j).GetAddress ();
65 m_interfaces.push_back (std::make_pair (ipv6, interface));
70 Ptr<Ipv6> ipv6 = Names::Find<Ipv6> (ipv6Name);
71 m_interfaces.push_back (std::make_pair (ipv6, interface));
102 routing->SetDefaultRoute (routerAddress,
m_interfaces[other].second);
117 routing->SetDefaultRoute (routerAddress,
m_interfaces[i].second);
smart pointer class similar to boost::intrusive_ptr
Keep track of a set of IPv6 interfaces.
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
Ptr< Ipv6StaticRouting > GetStaticRouting(Ptr< Ipv6 > ipv6) const
Get Ipv6StaticRouting pointer from IPv6 stack.
uint32_t GetN(void) const
Ipv6InterfaceContainer()
Constructor.
InterfaceVector m_interfaces
List of IPv6 stack and interfaces index.
uint32_t GetInterfaceIndex(uint32_t i) const
Get the interface index for the specified node index.
void SetDefaultRoute(uint32_t i, uint32_t router)
Set the default route for the specified index.
void SetRouter(uint32_t i, bool router)
Set the state of the stack (act as a router or not) for the specified index.
Helper class that adds ns3::Ipv6StaticRouting objects.
Describes an IPv6 address.
Iterator Begin(void) const
Get an iterator which refers to the first pair in the container.
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Ipv6Address GetAddress(uint32_t i, uint32_t j) const
Get the address for the specified index.