parse

Parses text as exactly <address>/<prefix>: the address strict dotted-decimal (four parts, no leading zero) or strict IPv6 (no brackets, no zone); the prefix 0..32 or 0..128 in decimal without a sign or a leading zero (except 0). A block with a bit set after the prefix is refused, not masked: 10.0.0.5/8 is a failure.

Return

the block, or a failure holding an IllegalArgumentException with one constant message per kind of problem (shape, address, prefix, host bits); the message never echoes text.

Parameters

text

the block, as an operator wrote it.