Skip to content

Splitting doesn't show split subnets in CIDR #4

@tecknicaltom

Description

@tecknicaltom

When using sipcalc to split a network, the output does not show any of the resulting subnets in CIDR format. Instead, the section headers confusingly prints out the CIDR provided on the cmdline. For example:

$ sipcalc -s /17 -u 192.168.0.0/16  | grep /
-[ipv4 : 192.168.0.0/16] - 0
-[ipv4 : 192.168.0.0/16] - 0
-[ipv4 : 192.168.0.0/16] - 0

I see two potential ways to fix this:

  1. Add CIDR notation as an output line to print_cidr_info_v4
  2. Change the section header to reflect the subnet being printed. (e.g. with the above cmdline you'd see section headers:
    -[ipv4 : 192.168.0.0/17] - 0
    -[ipv4 : 192.168.0.128/17] - 0
    

I can supply a PR with either or both of these changes if you can share which you'd prefer.

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