root/trunk/web/conf/prefv4.php @ 140

Revision 122, 1.7 KB (checked in by andreu, 13 years ago)

Update of web site and change in aggregation calculation mode in dataFlowSet.c

Line 
1<?php
2
3$CONFfinputSUB = fopen($subnet_list_file,'r');
4
5print "<div id=\"contenu\">\n";
6
7print "<p> Below, the list of subnets defined in your configuration file: </p>\n";
8print "<p>$subnet_list_file</p>\n";
9
10$PREFIXV4_TABLE_INBUILT = "";
11$nb_prefv4 = 0;
12$PREFIXV4_TABLE_INBUILT .= "<table class=\"fields\">\n";
13$PREFIXV4_TABLE_INBUILT .= "<tr> <th>Subnet</th> <th>Mask</th> <th>Sampling Value</th><th> IDR </th> </tr>\n";
14while (!feof ($CONFfinputSUB)) {
15  $CONFline = fgets($CONFfinputSUB, 512);
16  $CONFline_split = split("\t",$CONFline);
17  $CONFline_split2 = split("-",$CONFline_split[0]);
18  if ($CONFline_split2[1] != NULL) {
19    $CONFline_split3 = split("/",$CONFline_split2[0]);
20    $CONFsubnet $CONFline_split3[0];
21    $CONFmask $CONFline_split3[1];
22    $CONFIDR = $CONFline_split2[1];
23    $CONFsamp $CONFline_split[1];
24    if ($CONFsubnet) {
25      $nb_prefv4 += 1;
26      $PREFIXV4_TABLE_INBUILT .= "<tr>\n";
27      $PREFIXV4_TABLE_INBUILT .= "<td>$CONFsubnet</td><td>$CONFmask</td><td>$CONFsamp</td><td>$CONFIDR</td>\n";
28      $PREFIXV4_TABLE_INBUILT .= "</tr>\n";
29    }
30  }else{
31    $CONFsubnet $CONFline_split[0];
32    $CONFmask $CONFline_split[1];
33    $CONFsamp $CONFline_split[2];
34    if ($CONFsubnet) {
35      $nb_prefv4 += 1;
36      $PREFIXV4_TABLE_INBUILT .= "<tr>\n";
37      $PREFIXV4_TABLE_INBUILT .= "<td>$CONFsubnet</td><td>$CONFmask</td><td>$CONFsamp</td><td> UN </td>\n";
38      $PREFIXV4_TABLE_INBUILT .= "</tr>\n";
39    }
40  }
41 }
42$PREFIXV4_TABLE_INBUILT .= "</table>";
43
44fclose($CONFfinputSUB);
45
46$nb_prefv4_defined = $CONF_MAX_IPV4_PREFIX + $CONF_MAX_IPV4_SUBNET;
47print "PREFIX number <br> defined: $CONF_MAX_IPV4_PREFIX ($CONF_MAX_IPV4_SUBNET subnet in), <br> read: $nb_prefv4<br>\n";
48print "$PREFIXV4_TABLE_INBUILT";
49print "</div>\n";
50
51
52
53?>
Note: See TracBrowser for help on using the browser.