2015-04-05 00:27:02 +01:00
|
|
|
<?php
|
2015-07-13 20:10:26 +02:00
|
|
|
$data = snmp_get_multi($device, 'dot11manufacturerProductName.2 dot11manufacturerProductVersion.2', '-OQUs', 'IEEE802dot11-MIB');
|
2015-04-05 00:27:02 +01:00
|
|
|
if (empty($data)) {
|
2015-07-13 20:10:26 +02:00
|
|
|
$data = snmp_get_multi($device, 'dot11manufacturerProductName.3 dot11manufacturerProductVersion.3', '-OQUs', 'IEEE802dot11-MIB');
|
2015-04-05 00:27:02 +01:00
|
|
|
}
|
2015-07-13 20:10:26 +02:00
|
|
|
|
2015-04-05 00:27:02 +01:00
|
|
|
if (empty($data)) {
|
2015-07-13 20:10:26 +02:00
|
|
|
$data = snmp_get_multi($device, 'dot11manufacturerProductName.4 dot11manufacturerProductVersion.4', '-OQUs', 'IEEE802dot11-MIB');
|
2015-04-05 00:27:02 +01:00
|
|
|
}
|
2015-07-13 20:10:26 +02:00
|
|
|
|
2015-04-05 00:27:02 +01:00
|
|
|
if (empty($data)) {
|
2015-07-13 20:10:26 +02:00
|
|
|
$data = snmp_get_multi($device, 'dot11manufacturerProductName.5 dot11manufacturerProductVersion.5', '-OQUs', 'IEEE802dot11-MIB');
|
2015-04-05 00:27:02 +01:00
|
|
|
}
|
2015-07-13 20:10:26 +02:00
|
|
|
|
2015-04-05 00:27:02 +01:00
|
|
|
if (empty($data)) {
|
2015-07-13 20:10:26 +02:00
|
|
|
$data = snmp_get_multi($device, 'dot11manufacturerProductName.6 dot11manufacturerProductVersion.6', '-OQUs', 'IEEE802dot11-MIB');
|
2015-04-05 00:27:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($data as $line) {
|
|
|
|
if (!empty($line['dot11manufacturerProductName'])) {
|
|
|
|
$hardware = $line['dot11manufacturerProductName'];
|
|
|
|
}
|
2015-07-13 20:10:26 +02:00
|
|
|
|
|
|
|
if (preg_match('/(v[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/', $line['dot11manufacturerProductVersion'], $matches)) {
|
2015-04-05 00:27:02 +01:00
|
|
|
$version = $matches[0];
|
|
|
|
}
|
|
|
|
}
|