mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Show the ipsec interface
This commit is contained in:
parent
6ec0830d2b
commit
c1abd446e2
@ -53,7 +53,12 @@
|
||||
$ifinfo['status'] = "up";
|
||||
}
|
||||
|
||||
if (!strstr($ifinfo['if'],'tun')) {
|
||||
if(preg_match("/^enc|^tun/i", $ifinfo['if'])) {
|
||||
$ifinfo['inpkts'] = $linkinfo[3];
|
||||
$ifinfo['inbytes'] = $linkinfo[5];
|
||||
$ifinfo['outpkts'] = $linkinfo[6];
|
||||
$ifinfo['outbytes'] = $linkinfo[8];
|
||||
} else {
|
||||
$ifinfo['macaddr'] = $linkinfo[3];
|
||||
$ifinfo['inpkts'] = $linkinfo[4];
|
||||
$ifinfo['inerrs'] = $linkinfo[5];
|
||||
@ -62,16 +67,10 @@
|
||||
$ifinfo['outerrs'] = $linkinfo[8];
|
||||
$ifinfo['outbytes'] = $linkinfo[9];
|
||||
$ifinfo['collisions'] = $linkinfo[10];
|
||||
} else {
|
||||
$ifinfo['inpkts'] = $linkinfo[3];
|
||||
$ifinfo['inbytes'] = $linkinfo[5];
|
||||
$ifinfo['outpkts'] = $linkinfo[6];
|
||||
$ifinfo['outbytes'] = $linkinfo[8];
|
||||
}
|
||||
|
||||
$temp = gettimeofday();
|
||||
$timing = (double)$temp["sec"] + (double)$temp["usec"] / 1000000.0;
|
||||
|
||||
echo "$timing|" . $ifinfo['inbytes'] . "|" . $ifinfo['outbytes'] . "\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -44,6 +44,9 @@ if ($_POST['height'])
|
||||
else
|
||||
$height = "275";
|
||||
|
||||
/* link the ipsec interface magically */
|
||||
$config['interfaces']['ipsec']['if'] = "enc0";
|
||||
|
||||
if ($_GET['if']) {
|
||||
$curif = $_GET['if'];
|
||||
$ifnum = $config['interfaces'][$curif]['if'];
|
||||
@ -63,9 +66,13 @@ include("head.inc");
|
||||
<?php
|
||||
$ifdescrs = array('wan' => 'WAN', 'lan' => 'LAN');
|
||||
|
||||
for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) {
|
||||
for ($j = 1; isset($config['interfaces']['opt' . $j]['enable']); $j++) {
|
||||
$ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr'];
|
||||
}
|
||||
if((isset($config['ipsec']['enable'])) || (isset($config['ipsec']['mobileclients']['enable']))) {
|
||||
$ifdescrs['ipsec'] = "IPSEC";
|
||||
}
|
||||
|
||||
?>
|
||||
<form name="form1" action="status_graph.php" method="get" style="padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #999999">
|
||||
Interface:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user