nl::Inet::InterfaceIterator

#include <src/inet/InetInterface.h>

Iterator for the list of system network interfaces.

Summary

Use objects of this class to iterate the list of system network interfaces.

On LwIP systems, it is recommended that the LwIP stack lock be acquired and not released over the entire lifetime of an object of this class.

On some platforms, network interfaces without any IP addresses attached are not iterated.

Inheritance

Inherits from: nl::Inet::InterfaceIteratorBasis

Constructors and Destructors

InterfaceIterator(void)
Conventional default constructor.
~InterfaceIterator(void)
Non-virtual destructor.

Public functions

Next(void)
bool
Advance the cursor to the next network interface.

Public functions

InterfaceIterator

 InterfaceIterator(
  void
)

Conventional default constructor.

Starts the cursor at the first network interface. On some platforms, this constructor may allocate resources recycled by the destructor.

On LwIP, this constructor must be called with the LwIP stack lock acquired.

Next

bool Next(
  void
)

Advance the cursor to the next network interface.

Advances the internal cursor either to the next network interface or to the distinguished position corresponding to no further interfaces.

Details
Returns
false if advanced beyond the end, else true.

On LwIP, this method must be called with the LwIP stack lock acquired.

~InterfaceIterator

 ~InterfaceIterator(
  void
)

Non-virtual destructor.

Recycles any resources allocated by the constructor.

On LwIP, this destructor must be called with the LwIP stack lock acquired.