Skip to content

First and Last #30

Description

@scorpion7-7

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions