added function to convert cidr prefixes to mask
This commit is contained in:
parent
2884226e56
commit
a06f56a413
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue