[CIDR] Added mask_to_prefix() static function