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;
138 uint32_t
GetN (
void)
const;
157 void SetMetric (uint32_t i, uint16_t metric);
174 void Add (std::pair<
Ptr<Ipv4>, uint32_t> ipInterfacePair);
184 void Add (std::string ipv4Name, uint32_t interface);
207 std::pair<Ptr<Ipv4>, uint32_t>
Get (uint32_t i)
const;
Ipv4 addresses are stored in host order in this class.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
std::pair< Ptr< Ipv4 >, uint32_t > Get(uint32_t i) const
Get the std::pair of an Ptr<Ipv4> and interface stored at the location specified by the index.
uint32_t GetN(void) const
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.
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.
std::vector< std::pair< Ptr< Ipv4 >, uint32_t > >::const_iterator Iterator
Container Const Iterator for pairs of Ipv4 smart pointer / Interface Index.
InterfaceVector m_interfaces
List of IPv4 stack and interfaces index.
void Add(const Ipv4InterfaceContainer &other)
Concatenate the entries in the other container with ours.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Ipv4InterfaceContainer()
Create an empty Ipv4InterfaceContainer.
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.