Index: html/includes/print/arptable.inc.php
===================================================================
--- html/includes/print/arptable.inc.php	(revision 6082)
+++ html/includes/print/arptable.inc.php	(working copy)
@@ -119,7 +119,7 @@
     if ($arp_host['port_id'] == $entry['port_id']) { $arp_if = 'Self Port'; }
 
     $string .= '  <tr>' . PHP_EOL;
-    $string .= '    <td style="width: 160px;">' . format_mac($entry['mac_address']) . '</td>' . PHP_EOL;
+    $string .= '    <td style="width: 160px;"><a href="javascript:popUp(\'/netcmd.php?cmd=mac&amp;query=' . format_mac($entry['mac_address']) . '\')">' . format_mac($entry['mac_address']) . '</a></td>' . PHP_EOL;
     $string .= '    <td style="width: 140px;">' . $ip_address . '</td>' . PHP_EOL;
     if ($list['device'])
     {
Index: html/includes/print/fdbtable.inc.php
===================================================================
--- html/includes/print/fdbtable.inc.php	(revision 6082)
+++ html/includes/print/fdbtable.inc.php	(working copy)
@@ -104,7 +104,7 @@
     humanize_port($entry);
 
     $string .= '  <tr>' . PHP_EOL;
-    $string .= '    <td style="width: 160px;">' . format_mac($entry['mac_address']) . '</td>' . PHP_EOL;
+    $string .= '    <td style="width: 160px;"><a href="javascript:popUp(\'/netcmd.php?cmd=mac&amp;query=' . format_mac($entry['mac_address']) . '\')">' . format_mac($entry['mac_address']) . '</a></td>' . PHP_EOL;
     if ($list['device'])
     {
       $dev = device_by_id_cache($entry['device_id']);
Index: html/includes/print/mac_addresses.inc.php
===================================================================
--- html/includes/print/mac_addresses.inc.php	(revision 6082)
+++ html/includes/print/mac_addresses.inc.php	(working copy)
@@ -104,7 +104,7 @@
         $port_error = generate_port_link($entry, '<span class="label label-important">Errors</span>', 'port_errors');
       }
       $string .= '    <td class="entity">' . generate_port_link($entry, short_ifname($entry['label'])) . ' ' . $port_error . '</td>' . PHP_EOL;
-      $string .= '    <td style="width: 160px;">' . $entry['human_mac'] . '</td>' . PHP_EOL;
+      $string .= '    <td style="width: 160px;"><a href="javascript:popUp(\'/netcmd.php?cmd=mac&amp;query='.$entry['human_mac'].'\')">' . $entry['human_mac'] . '</a></td>' . PHP_EOL;
       $string .= '    <td>' . $entry['ifAlias'] . '</td>' . PHP_EOL;
       $string .= '  </tr>' . PHP_EOL;
     }
Index: html/netcmd.php
===================================================================
--- html/netcmd.php	(revision 6082)
+++ html/netcmd.php	(working copy)
@@ -36,6 +36,7 @@
 {
   $host = $_GET['query'];
   $ip = '';
+  $mac = '';
   if (Net_IPv4::validateIP($host))
   {
     $ip = $host;
@@ -46,6 +47,10 @@
     $ip = $host;
     $ip_version = 6;
   }
+  elseif (preg_match('/^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$/', $host)) // FIXME better way?
+  {
+    $mac = $host;
+  }
   else
   {
     $ip = gethostbyname($host);
@@ -60,7 +65,7 @@
       }
     }
   }
-  if ($ip)
+  if ($ip || $mac)
   {
     switch ($_GET['cmd'])
     {
@@ -84,6 +89,19 @@
             $cmd = $config['nmap'] . " $ip";
         }
         break;
+      case 'mac':
+        $url = 'http://api.macvendors.com/' . urlencode($mac);
+        $ch = curl_init();
+        curl_setopt($ch, CURLOPT_URL, $url);
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+        $response = curl_exec($ch);
+        if ($response)
+        {
+          $output =  'Vendor: ' . $response;
+        } else {
+          $output =  'Not Found';
+        }
+        break;
     }
 
     if (!empty($cmd))
@@ -96,4 +114,4 @@
 $output = trim($output);
 echo("<pre>$output</pre>");
 
-?>
+// EOF