How to convert a valid dotted decimal netmask into the corresponding CIDR prefix length
Posted in english, programming on Jan 17th, 2009
Yesterday I was googling to find the algorithm to covert a netmask (in the dotted decimal format like 255.255.255.0) in corresponding cidr to manage a database migration, but I can't find it. So I wrote it in PHP.
The following function takes a valid netmask in the dotted decimal format as a string in input and [...]

