mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Merge branch 'ent-4403-8401-acanovas-ipam-creacion-de-superredes' into 'develop'
added function to convert cidr prefixes to mask See merge request artica/pandorafms!2832
This commit is contained in:
commit
a550f2d9d3
@ -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)
|
function get_help_info($section_name)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user