21 #ifndef IPV4_INTERFACE_CONTAINER_H 
   22 #define IPV4_INTERFACE_CONTAINER_H 
   27 #include "ns3/ipv4-address.h" 
   60   typedef std::vector<std::pair<Ptr<Ipv4>, uint32_t> >::const_iterator 
Iterator;
 
   93   Iterator 
Begin (
void) 
const;
 
  115   Iterator 
End (
void) 
const;
 
  138   uint32_t 
GetN (
void) 
const;
 
  157   void SetMetric (uint32_t i, uint16_t metric);
 
  178   void Add (std::pair<
Ptr<Ipv4>, uint32_t> ipInterfacePair);
 
  190   void Add (std::string ipv4Name, uint32_t interface);
 
  201   std::pair<Ptr<Ipv4>, uint32_t> 
Get (uint32_t i) 
const;
 
Smart pointer class similar to boost::intrusive_ptr. 
std::pair< Ptr< Ipv4 >, uint32_t > Get(uint32_t i) const 
Get the std::pair of an Ptr and interface stored at the location specified by the index...
Ipv4InterfaceContainer()
Create an empty Ipv4InterfaceContainer. 
holds a vector of std::pair of Ptr and interface index. 
void Add(const Ipv4InterfaceContainer &other)
Concatenate the entries in the other container with ours. 
uint32_t GetN(void) const 
Iterator End(void) const 
Get an iterator which indicates past-the-last Node in the container. 
std::vector< std::pair< Ptr< Ipv4 >, uint32_t > > InterfaceVector
Container for pairs of Ipv4 smart pointer / Interface Index. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
std::vector< std::pair< Ptr< Ipv4 >, uint32_t > >::const_iterator Iterator
Container Const Iterator for pairs of Ipv4 smart pointer / Interface Index. 
Ipv4 addresses are stored in host order in this class. 
void SetMetric(uint32_t i, uint16_t metric)
Set a metric for the given interface. 
Iterator Begin(void) const 
Get an iterator which refers to the first pair in the container. 
InterfaceVector m_interfaces
List of IPv4 stack and interfaces index. 
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const