summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorEvgeny <ey@tm-k.com>2010-11-24 01:06:06 -0500
committerBill Marquette <bill.marquette@gmail.com>2011-05-14 11:23:05 -0500
commit57f2840e1faacf50b1a93d7954bb576eca77475b (patch)
tree6a688cb6a2e1ba3552c38c071201b44d59a4cb29 /etc
parent92ca10c1f6657ac1911c5eaa0fea97bdd948466f (diff)
downloadpfsense-57f2840e1faacf50b1a93d7954bb576eca77475b.zip
pfsense-57f2840e1faacf50b1a93d7954bb576eca77475b.tar.gz
MAC prefix to vendor resolution at Status->Interfaces, Status->DHCP leases, Diagnostics->ARP table
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc24
1 files changed, 24 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index be174af..5e676db 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2181,4 +2181,28 @@ function filter_rules_compare($a, $b) {
return compare_interface_friendly_names($a['interface'], $b['interface']);
}
+/****f* pfsense-utils/load_mac_manufacturer_table
+ * NAME
+ * load_mac_manufacturer_table
+ * INPUTS
+ * none
+ * RESULT
+ * returns associative array with MAC-Manufacturer pairs
+ ******/
+function load_mac_manufacturer_table() {
+ /* load MAC-Manufacture data from the file */
+ $macs=file("/usr/local/share/nmap/nmap-mac-prefixes");
+ if ($macs){
+ foreach ($macs as $line){
+ if (preg_match('/([0-9A-Fa-f]{6}) (.*)$/', $line, $matches)){
+ /* store values like this $mac_man['000C29']='VMW=ware' */
+ $mac_man["$matches[1]"]=$matches[2];
+ }
+ }
+ return $mac_man;
+ } else
+ return -1;
+
+}
+
?>
OpenPOWER on IntegriCloud