ipaddress 1.1.0
Loading...
Searching...
No Matches
ip-any-iterator.hpp File Reference

Provides iterator classes for sequential unified traversal of IPv4 and IPv6. More...

Go to the source code of this file.

Classes

class  ip_any_iterator< T, Ipv4Iter, Ipv6Iter >
 An iterator for unified traversal over IPv4 and IPv6 address spaces. More...
 
class  hosts_any_sequence
 A sequence of host IP addresses. More...
 
class  subnets_any_sequence< T >
 A sequence container for subnet ranges within a network. More...
 

Namespaces

namespace  ipaddress
 Namespace dedicated to IP addresses and networks operations.
 

Detailed Description

Provides iterator classes for sequential unified traversal of IPv4 and IPv6.

Author
Vladimir Shaleev

This file defines the ip_any_iterator class template, which facilitates the unified traversal over both IPv4 and IPv6 address spaces. It abstracts the differences between the two IP versions, allowing users to write code that can operate on either IP version without modification. This is particularly useful for applications that need to be agnostic to the type of IP network they are working with, such as network utilities, security scanners, or dual-stack network implementations. The iterator provides random access capabilities, making it suitable for a wide range of algorithms that require iteration over IP addresses.