r2921 - netmaskbylen is now a global array, so not only renderIPv4Network() can...
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 2 Jul 2009 13:57:48 +0000 (13:57 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 2 Jul 2009 13:57:48 +0000 (13:57 +0000)
 - wildcardbylen: idem

inc/functions.php
inc/interface.php

index d2381011870fa205a4771c042c753133b84e90c1..9f19925e53df6a58f3d8eb1497d8bad734f97f89 100644 (file)
@@ -44,6 +44,78 @@ $rtwidth = array
        2 => 9
 );
 
+$netmaskbylen = array
+(
+       32 => '255.255.255.255',
+       31 => '255.255.255.254',
+       30 => '255.255.255.252',
+       29 => '255.255.255.248',
+       28 => '255.255.255.240',
+       27 => '255.255.255.224',
+       26 => '255.255.255.192',
+       25 => '255.255.255.128',
+       24 => '255.255.255.0',
+       23 => '255.255.254.0',
+       22 => '255.255.252.0',
+       21 => '255.255.248.0',
+       20 => '255.255.240.0',
+       19 => '255.255.224.0',
+       18 => '255.255.192.0',
+       17 => '255.255.128.0',
+       16 => '255.255.0.0',
+       15 => '255.254.0.0',
+       14 => '255.252.0.0',
+       13 => '255.248.0.0',
+       12 => '255.240.0.0',
+       11 => '255.224.0.0',
+       10 => '255.192.0.0',
+       9 => '255.128.0.0',
+       8 => '255.0.0.0',
+       7 => '254.0.0.0',
+       6 => '252.0.0.0',
+       5 => '248.0.0.0',
+       4 => '240.0.0.0',
+       3 => '224.0.0.0',
+       2 => '192.0.0.0',
+       1 => '128.0.0.0'
+);
+
+$wildcardbylen = array
+(
+       32 => '0.0.0.0',
+       31 => '0.0.0.1',
+       30 => '0.0.0.3',
+       29 => '0.0.0.7',
+       28 => '0.0.0.15',
+       27 => '0.0.0.31',
+       26 => '0.0.0.63',
+       25 => '0.0.0.127',
+       24 => '0.0.0.255',
+       23 => '0.0.1.255',
+       22 => '0.0.3.255',
+       21 => '0.0.7.255',
+       20 => '0.0.15.255',
+       19 => '0.0.31.255',
+       18 => '0.0.63.255',
+       17 => '0.0.127.255',
+       16 => '0.0.255.25',
+       15 => '0.1.255.255',
+       14 => '0.3.255.255',
+       13 => '0.7.255.255',
+       12 => '0.15.255.255',
+       11 => '0.31.255.255',
+       10 => '0.63.255.255',
+       9 => '0.127.255.255',
+       8 => '0.255.255.255',
+       7 => '1.255.255.255',
+       6 => '3.255.255.255',
+       5 => '7.255.255.255',
+       4 => '15.255.255.255',
+       3 => '31.255.255.255',
+       2 => '63.255.255.255',
+       1 => '127.255.255.255'
+);
+
 // This function assures that specified argument was passed
 // and is a number greater than zero.
 function assertUIntArg ($argname, $caller = 'N/A', $allow_zero = FALSE)
index 120a4e5610087c4783ad244c719d94d1f3bad9c4..5968ad458ed6ac43d76388874b46fdbc08672763 100644 (file)
@@ -2130,77 +2130,7 @@ function renderIPv4SpaceEditor ()
 
 function renderIPv4Network ($id)
 {
-       global $pageno, $tabno, $aac2;
-       $netmaskbylen = array
-       (
-               32 => '255.255.255.255',
-               31 => '255.255.255.254',
-               30 => '255.255.255.252',
-               29 => '255.255.255.248',
-               28 => '255.255.255.240',
-               27 => '255.255.255.224',
-               26 => '255.255.255.192',
-               25 => '255.255.255.128',
-               24 => '255.255.255.0',
-               23 => '255.255.254.0',
-               22 => '255.255.252.0',
-               21 => '255.255.248.0',
-               20 => '255.255.240.0',
-               19 => '255.255.224.0',
-               18 => '255.255.192.0',
-               17 => '255.255.128.0',
-               16 => '255.255.0.0',
-               15 => '255.254.0.0',
-               14 => '255.252.0.0',
-               13 => '255.248.0.0',
-               12 => '255.240.0.0',
-               11 => '255.224.0.0',
-               10 => '255.192.0.0',
-               9 => '255.128.0.0',
-               8 => '255.0.0.0',
-               7 => '254.0.0.0',
-               6 => '252.0.0.0',
-               5 => '248.0.0.0',
-               4 => '240.0.0.0',
-               3 => '224.0.0.0',
-               2 => '192.0.0.0',
-               1 => '128.0.0.0'
-       );
-       $wildcardbylen = array
-       (
-               32 => '0.0.0.0',
-               31 => '0.0.0.1',
-               30 => '0.0.0.3',
-               29 => '0.0.0.7',
-               28 => '0.0.0.15',
-               27 => '0.0.0.31',
-               26 => '0.0.0.63',
-               25 => '0.0.0.127',
-               24 => '0.0.0.255',
-               23 => '0.0.1.255',
-               22 => '0.0.3.255',
-               21 => '0.0.7.255',
-               20 => '0.0.15.255',
-               19 => '0.0.31.255',
-               18 => '0.0.63.255',
-               17 => '0.0.127.255',
-               16 => '0.0.255.25',
-               15 => '0.1.255.255',
-               14 => '0.3.255.255',
-               13 => '0.7.255.255',
-               12 => '0.15.255.255',
-               11 => '0.31.255.255',
-               10 => '0.63.255.255',
-               9 => '0.127.255.255',
-               8 => '0.255.255.255',
-               7 => '1.255.255.255',
-               6 => '3.255.255.255',
-               5 => '7.255.255.255',
-               4 => '15.255.255.255',
-               3 => '31.255.255.255',
-               2 => '63.255.255.255',
-               1 => '127.255.255.255'
-       );
+       global $pageno, $tabno, $aac2, $netmaskbylen, $wildcardbylen;
        $maxperpage = getConfigVar ('IPV4_ADDRS_PER_PAGE');
        if (isset($_REQUEST['pg']))
                $page = $_REQUEST['pg'];