summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_arp.php
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-07-16 14:35:45 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-07-16 14:35:45 -0300
commitf8ec8de4f36c2403739acf90f32d7862e17fde6b (patch)
tree4631599235fb60f1ea3a77eb45c3968bb2692ec2 /usr/local/www/diag_arp.php
parentb2bffb702414260f1e154f73d4c2b7c70816cc94 (diff)
downloadpfsense-f8ec8de4f36c2403739acf90f32d7862e17fde6b.zip
pfsense-f8ec8de4f36c2403739acf90f32d7862e17fde6b.tar.gz
Sync with mainline, diag_* files were missing
Diffstat (limited to 'usr/local/www/diag_arp.php')
-rwxr-xr-xusr/local/www/diag_arp.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php
index 4a6e92c..3aff783 100755
--- a/usr/local/www/diag_arp.php
+++ b/usr/local/www/diag_arp.php
@@ -205,15 +205,15 @@ if(count($pools) > 0) {
// Put this in an easy to use form
$dhcpmac = array();
$dhcpip = array();
-
+
foreach ($leases as $value) {
- $dhcpmac[$value['mac']] = $value['hostname'];
- $dhcpip[$value['ip']] = $value['hostname'];
+ $dhcpmac[$value['mac']] = $value['hostname'];
+ $dhcpip[$value['ip']] = $value['hostname'];
}
exec("/usr/sbin/arp -an",$rawdata);
-$i = 0;
+$i = 0;
/* if list */
$ifdescrs = get_configured_interface_with_descr();
@@ -225,7 +225,7 @@ foreach ($ifdescrs as $key =>$interface) {
$data = array();
foreach ($rawdata as $line) {
$elements = explode(' ',$line);
-
+
if ($elements[3] != "(incomplete)") {
$arpent = array();
$arpent['ip'] = trim(str_replace(array('(',')'),'',$elements[1]));
@@ -238,28 +238,28 @@ foreach ($rawdata as $line) {
function getHostName($mac,$ip)
{
global $dhcpmac, $dhcpip;
-
+
if ($dhcpmac[$mac])
return $dhcpmac[$mac];
else if ($dhcpip[$ip])
return $dhcpip[$ip];
else if(gethostbyaddr($ip) <> "" and gethostbyaddr($ip) <> $ip)
return gethostbyaddr($ip);
- else
- return "";
+ else
+ return "";
}
-$pgtitle = array("Diagnostics","ARP Table");
+$pgtitle = array(gettext("Diagnostics"),gettext("ARP Table"));
include("head.inc");
?>
<body link="#000000" vlink="#000000" alink="#000000">
-
+
<?php include("fbegin.inc"); ?>
<div id="loading">
- <img src="/themes/{$g['theme']}/images/misc/loader.gif"> Loading, please wait...
+ <img src="/themes/{$g['theme']}/images/misc/loader.gif"><?= gettext("Loading, please wait..."); ?>
<p/>&nbsp;
</div>
@@ -276,7 +276,7 @@ foreach ($data as &$entry) {
$dns = trim(getHostName($entry['mac'], $entry['ip']));
if(trim($dns))
$entry['dnsresolve'] = "$dns";
- else
+ else
$entry['dnsresolve'] = "Z_ ";
}
@@ -289,10 +289,10 @@ $data = msort($data, "dnsresolve");
<td>
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr">IP address</td>
- <td class="listhdrr">MAC address</td>
- <td class="listhdrr">Hostname</td>
- <td class="listhdr">Interface</td>
+ <td class="listhdrr"><?= gettext("IP address"); ?></td>
+ <td class="listhdrr"><?= gettext("MAC address"); ?></td>
+ <td class="listhdrr"><?= gettext("Hostname"); ?></td>
+ <td class="listhdr"><?= gettext("Interface"); ?></td>
<td class="list"></td>
</tr>
<?php foreach ($data as $entry): ?>
OpenPOWER on IntegriCloud