summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_arp.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-09-28 12:10:39 -0400
committerjim-p <jimp@pfsense.org>2016-09-28 12:10:39 -0400
commit9e3cb876a600087c8fb2fa0af7907b986e304c48 (patch)
tree62f0ba611e9537568ff77a334543ebc4c9610e23 /src/usr/local/www/diag_arp.php
parent632e5f504fed668c328eea3c0af702d1b4998289 (diff)
downloadpfsense-9e3cb876a600087c8fb2fa0af7907b986e304c48.zip
pfsense-9e3cb876a600087c8fb2fa0af7907b986e304c48.tar.gz
Improve the ARP table display. Implements #6822
Shows incomplete ARP entries, which were skipped before (for no reason I could find in the commit history) Shows a status column indicating if an entry is permanent (static), expired, or when it will expire Shows a Link Type column that indicates if an entry is using Ethernet, VLAN, etc.
Diffstat (limited to 'src/usr/local/www/diag_arp.php')
-rw-r--r--src/usr/local/www/diag_arp.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/usr/local/www/diag_arp.php b/src/usr/local/www/diag_arp.php
index 4d13b0d..717e8c1 100644
--- a/src/usr/local/www/diag_arp.php
+++ b/src/usr/local/www/diag_arp.php
@@ -238,15 +238,14 @@ 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]));
- $arpent['mac'] = trim($elements[3]);
- $arpent['interface'] = trim($elements[5]);
- $data[] = $arpent;
- }
+ $elements = explode(' ', $line, 7);
+ $arpent = array();
+ $arpent['ip'] = trim(str_replace(array('(', ')'), '', $elements[1]));
+ $arpent['mac'] = trim($elements[3]);
+ $arpent['interface'] = trim($elements[5]);
+ $arpent['status'] = trim(substr($elements[6], 0, strrpos($elements[6], ' ')));
+ $arpent['linktype'] = trim(str_replace(array('[', ']'), '', strrchr($elements[6], ' ')));
+ $data[] = $arpent;
}
function _getHostName($mac, $ip) {
@@ -334,6 +333,8 @@ $mac_man = load_mac_manufacturer_table();
<th><?= gettext("IP address")?></th>
<th><?= gettext("MAC address")?></th>
<th><?= gettext("Hostname")?></th>
+ <th><?= gettext("Status")?></th>
+ <th><?= gettext("Link Type")?></th>
<th data-sortable="false"><?=gettext("Actions")?></th>
</tr>
</thead>
@@ -356,6 +357,8 @@ $mac_man = load_mac_manufacturer_table();
?>
</td>
<td><?=trim(str_replace("Z_ ", "", $entry['dnsresolve']))?></td>
+ <td><?=ucfirst($entry['status'])?></td>
+ <td><?=$entry['linktype']?></td>
<td>
<a class="fa fa-trash" title="<?=gettext('Delete arp cache entry')?>" href="diag_arp.php?deleteentry=<?=$entry['ip']?>"></a>
</td>
@@ -379,7 +382,10 @@ events.push(function() {
<div class="infoblock blockopen">
<?php
-print_info_box(gettext("Local IPv6 peers use ") . '<a href="diag_ndp.php">' . gettext("NDP") . '</a>' . gettext(" instead of ARP."), 'info', false);
+print_info_box(gettext("Local IPv6 peers use ") . '<a href="diag_ndp.php">' . gettext("NDP") . '</a>' . gettext(" instead of ARP.") . '<br />' .
+ '<br />' . gettext("Permanent ARP entries are shown for local interfaces or static ARP entries.") .
+ '<br />' . gettext("Normal dynamic ARP entries show a countdown timer until they will expire and then be re-checked.") .
+ '<br />' . gettext("Incomplete ARP entries indicate that the target host has not yet replied to an ARP response."), 'info', false);
?>
</div>
OpenPOWER on IntegriCloud