Subnet mask to CIDR

Validate a dotted subnet mask and convert it into a prefix length and wildcard mask.