added function to convert cidr prefixes to mask

This commit is contained in:
alejandro-campos 2019-10-23 17:22:18 +02:00
parent 2884226e56
commit a06f56a413
1 changed files with 12 additions and 0 deletions

View File

@ -4092,6 +4092,18 @@ function mask2cidr($mask)
}
/**
* convert the cidr prefix to subnet mask
*
* @param int cidr prefix
* @return string subnet mask
*/
function cidr2mask($int)
{
return long2ip(-1 << (32 - (int) $int));
}
function get_help_info($section_name)
{
global $config;