23 #include "ns3/node-list.h" 
   24 #include "ns3/names.h" 
   27 #include "ns3/ipv6-static-routing-helper.h" 
   61   return ipv6->GetAddress (interface, j).GetAddress ();
 
   66   m_interfaces.push_back (std::make_pair (ipv6, interface));
 
   71   Ptr<Ipv6> ipv6 = Names::Find<Ipv6> (ipv6Name);
 
   72   m_interfaces.push_back (std::make_pair (ipv6, interface));
 
  113   uint32_t routerIndex = 0;
 
  115   for (uint32_t index = 0; index < 
m_interfaces.size (); index++)
 
  121           if (addr == routerAddress)
 
  133   NS_ASSERT_MSG (found != 
true, 
"No such address in the interfaces. Aborting.");
 
  135   for (uint32_t other = 0; other < 
m_interfaces.size (); other++)
 
  137       if (other != routerIndex)
 
  152   NS_ASSERT_MSG (i != router, 
"A node shouldn't set itself as the default router, isn't it? Aborting.");
 
  169   uint32_t routerIndex = 0;
 
  171   for (uint32_t index = 0; index < 
m_interfaces.size (); index++)
 
  177           if (addr == routerAddr)
 
  189   NS_ASSERT_MSG (found != 
true, 
"No such address in the interfaces. Aborting.");
 
  191   NS_ASSERT_MSG (i != routerIndex, 
"A node shouldn't set itself as the default router, isn't it? Aborting.");
 
  209       iAddress = ipv6->GetAddress (
m_interfaces[index].second, i);
 
  225   uint32_t nodeIndex = 0;
 
  227   for (uint32_t index = 0; index < 
m_interfaces.size (); index++)
 
  245   NS_ASSERT_MSG (found != 
true, 
"No such address in the interfaces. Aborting.");
 
  251       iAddress = ipv6->GetAddress (
m_interfaces[nodeIndex].second, i);
 
Smart pointer class similar to boost::intrusive_ptr. 
 
Keep track of a set of IPv6 interfaces. 
 
void SetDefaultRouteInAllNodes(uint32_t router)
Set the default route for all the devices (except the router itself). 
 
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface. 
 
bool IsLinkLocal() const 
If the IPv6 address is a link-local address (fe80::/64). 
 
static Ipv6Address GetAny()
Get the "any" (::) Ipv6Address. 
 
Ptr< Ipv6StaticRouting > GetStaticRouting(Ptr< Ipv6 > ipv6) const 
Get Ipv6StaticRouting pointer from IPv6 stack. 
 
IPv6 address associated with an interface. 
 
Link-local address (fe80::/64) 
 
uint32_t GetN(void) const 
 
Ipv6InterfaceContainer()
Constructor. 
 
void SetForwarding(uint32_t i, bool state)
Set the state of the stack (act as a router or as an host) for the specified index. 
 
std::vector< std::pair< Ptr< Ipv6 >, uint32_t > >::const_iterator Iterator
Container Const Iterator for pairs of Ipv6 smart pointer / Interface Index. 
 
InterfaceVector m_interfaces
List of IPv6 stack and interfaces index. 
 
Ipv6Address GetAddress() const 
Get the IPv6 address. 
 
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. 
 
Ipv6Address GetLinkLocalAddress(uint32_t i)
Get the link-local address for the specified index. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
Helper class that adds ns3::Ipv6StaticRouting objects. 
 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
 
Describes an IPv6 address. 
 
Ipv6InterfaceAddress::Scope_e GetScope() const 
Get address scope. 
 
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.