Project

General

Profile

Actions

Feature #12029

closed

Please add MAC OUI lookup results (e.g. DHCP Leases table) to the ARP table

Added by Adam Thompson over 3 years ago. Updated over 3 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Diagnostics
Target version:
-
Start date:
06/11/2021
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default

Description

In the DHCP Leases table, we see the assigned manufacturer displayed beside each MAC address.
This would be extremely useful information to have on the ARP Table display also.

Here's a diff that implements it. I haven't been a PHP programmer for 20 years, I don't claim this is production-quality.

--- diag_arp-orig.php   2021-06-11 15:31:39.918428000 -0500
+++ diag_arp.php        2021-06-11 15:39:44.624554000 -0500
@@ -38,6 +38,9 @@
 require_once("guiconfig.inc");
 require_once("diag_arp.inc");

+// Load MAC-Manufacturer table
+$mac_man = load_mac_manufacturer_table();
+
 // delete arp entry
 if (isset($_POST['deleteentry'])) {
        $ip = $_POST['deleteentry'];
@@ -139,7 +142,20 @@
                        <tr>
                                <td><?=$entry['interface']?></td>
                                <td><?=$entry['ip-address']?></td>
-                               <td><?=$entry['mac-address']?></td>
+                               <td><?=$entry['mac-address']?>
+                               <?php
+                                       $mac_hi = strtoupper($entry['mac-address'][0] . $entry['mac-address'][1] . $entry['mac-address'][3] . $entry['mac-address'][4] . $entry['mac-address'][6] . $entry['mac-address'][7]);
+                                       if (isset($mac_man[$mac_hi])):
+                               ?>
+                                               (<?=htmlspecialchars($mac_man[$mac_hi])?>)
+                               <?php 
+                                       else:
+                               ?>
+                                       (unknown vendor)
+                               <?php
+                                       endif;
+                               ?>
+                               </td>
                                <td><?=$entry['dnsresolve']?></td>
                                <td><?=$entry['expires']?></td>
                                <td><?=$entry['type']?></td>
Actions

Also available in: Atom PDF