mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
bye bye ipcalc, + cleanup of cleanup.php
git-svn-id: http://www.observium.org/svn/observer/trunk@1809 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -324,8 +324,8 @@ function scanUDP ($host, $port, $timeout)
|
||||
|
||||
function netmask2cidr($netmask)
|
||||
{
|
||||
list ($network, $cidr) = explode("/", trim(`ipcalc $address/$mask | grep Network | cut -d" " -f 4`));
|
||||
return $cidr;
|
||||
$addr = Net_IPv4::parseAddress("1.2.3.4/$netmask");
|
||||
return $addr->bitmask;
|
||||
}
|
||||
|
||||
function cidr2netmask()
|
||||
|
||||
Reference in New Issue
Block a user