First and Last
scorpion7-7 opened this issue · comments
Given a network in CIDR notation (v4 and v6), is there a means to return certain artifacts without generating the entire array? (For large networks - especially IPv6, this could be a memory consumption event.)
An IPv4 Example (for simplicity):
Given a network of 192.168.10.0/24
$IP->network() = 192.168.10.0
$IP->first() = 192.168.10.1
$IP->nth(100) = 192.168.10.100
$IP->last() = 192.168.10.254
$IP->broadcast() = 192.168.10.255
The ability to obtain those values without having to create a massive array would be extremely helpful. (Not sure if there's a way to do so without creating the array)
Thanks!