Skip to content

RFC: one or more of CIDR/IP address manipulation functions #220

Description

@jay7x

I'd like to propose having extlib::parse_cidr() function which returns a Structure similar to what ipcalc.pl returns (with bit values stripped):

➜  ipcalc 192.168.0.0/24
Address:   192.168.0.0
Netmask:   255.255.255.0
Wildcard:  0.0.0.255
Network:   192.168.0.0/24
HostMin:   192.168.0.1
HostMax:   192.168.0.254
Broadcast: 192.168.0.255
Hosts/Net: 254

My original problem was to get first usable IP in a routable range I have.

Please add your ideas and use-cases in comments below

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions