summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Carlos Morales Angeles <carloschilazo@gmail.com>2017-04-23 17:47:27 -0500
committerSergio Carlos Morales Angeles <carloschilazo@gmail.com>2017-04-23 17:47:27 -0500
commitfec2c3b73f05683b674d3b5351529268eadc8dd9 (patch)
tree145d218fb9d545bc470fbf9d556c840a03a8bde1 /src
parentb7d2a3da5a0ef272303c9e5455431267fc0e56ae (diff)
downloadpfsense-fec2c3b73f05683b674d3b5351529268eadc8dd9.zip
pfsense-fec2c3b73f05683b674d3b5351529268eadc8dd9.tar.gz
Add expiration field to NDP listing
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/diag_ndp.php25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/usr/local/www/diag_ndp.php b/src/usr/local/www/diag_ndp.php
index bdc4de2..505d27a 100644
--- a/src/usr/local/www/diag_ndp.php
+++ b/src/usr/local/www/diag_ndp.php
@@ -65,9 +65,15 @@ foreach ($ifdescrs as $key =>$interface) {
$hwif[$config['interfaces'][$key]['if']] = $interface;
}
-/* Array ( [0] => Neighbor [1] => Linklayer [2] => Address
-[3] => Netif [4] => Expire [5] => S
-[6] => Flags ) */
+/*
+ * Key map for each element in $rawdata
+ * 0 => Neighbor IP
+ * 1 => Physical address (MAC)
+ * 2 => Interface
+ * 3 => Expiration
+ * 4 => State
+ * 5 => Flags
+ */
$data = array();
array_shift($rawdata);
foreach ($rawdata as $line) {
@@ -77,6 +83,7 @@ foreach ($rawdata as $line) {
$ndpent['ipv6'] = trim($elements[0]);
$ndpent['mac'] = trim($elements[1]);
$ndpent['interface'] = trim($elements[2]);
+ $ndpent['expiration'] = trim($elements[3]);
$data[] = $ndpent;
}
@@ -128,10 +135,11 @@ if (isset($deleteResultMessage, $deleteResultMessageType)) {
<table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
- <th><?= gettext("IPv6 address"); ?></th>
- <th><?= gettext("MAC address"); ?></th>
- <th><?= gettext("Hostname"); ?></th>
- <th><?= gettext("Interface"); ?></th>
+ <th><?=gettext("IPv6 address")?></th>
+ <th><?=gettext("MAC address")?></th>
+ <th><?=gettext("Hostname")?></th>
+ <th><?=gettext("Interface")?></th>
+ <th><?=gettext("Expiration")?></th>
<th data-sortable="false"><?=gettext("Actions")?></th>
</tr>
</thead>
@@ -164,6 +172,9 @@ if (isset($deleteResultMessage, $deleteResultMessageType)) {
?>
</td>
<td>
+ <?=$entry['expiration']?>
+ </td>
+ <td>
<a class="fa fa-trash" title="<?=gettext('Delete NDP entry')?>" href="diag_ndp.php?deleteentry=<?=$entry['ipv6']?>" usepost></a>
</td>
</tr>
OpenPOWER on IntegriCloud