ADDED:
* Explicit subnet ordering option for VLSM
This commit is contained in:
brent saner
2025-04-03 18:35:35 -04:00
parent 166fb3be23
commit 0c8577f149
4 changed files with 25 additions and 14 deletions

View File

@@ -88,8 +88,9 @@ type XNetArgs struct {
}
type VLSMArgs struct {
Asc bool `short:"A" long:"ascending" description:"If specified, place smaller networks (larger prefixes) at the beginning. You almost assuredly do not want to do this."`
Sizes []uint8 `short:"s" long:"size" required:"true" description:"Prefix lengths. May be specified multiple times." validate:"required"`
Asc bool `short:"A" long:"ascending" description:"If specified, place smaller networks (larger prefixes) at the beginning. You almost assuredly do not want to do this."`
Explicit bool `short:"O" long:"explicit-order" description:"If specified, ignore -A/--ascending and do no reordering of prefix sizes whatsoever, instead using the order given. This is EXTREMELY suboptimal and can lead to drastic addressing waste."`
Sizes []uint8 `short:"s" long:"size" required:"true" description:"Prefix lengths. May be specified multiple times." validate:"required"`
splitArgs
}

View File

@@ -172,6 +172,7 @@ func main() {
cmnArgs = args.VLSM.common
splitter = &netsplit.VLSMSplitter{
Ascending: args.VLSM.Asc,
Explicit: args.VLSM.Explicit,
PrefixLengths: args.VLSM.Sizes,
BaseSplitter: new(netsplit.BaseSplitter),
}