Generator that enumerates IP addresses in a CIDR range with pagination support.
Constructors
new(cidr :
CIDR, limit :
UInt64 |
Nil = nil, offset :
UInt64 = 0_u64)
Creates a new RangeGenerator for the given cidr with optional limit and offset.
SourceInstance methods
cidr
Returns the underlying CIDR block.
Sourceeach
Iterates over each Address in the CIDR range, applying offset and limit.
Sourcelarge?
Returns true if the CIDR range has more than 65536 addresses (larger than IPv4 /16).
Sourcelimit
Returns the optional limit on number of addresses to emit.
Sourceoffset
Returns the number of initial addresses to skip.
Sourcesize
Returns the total size of the CIDR range.
Source