Added Hikvision support

This commit is contained in:
Neil Lathwood
2015-01-05 21:06:49 +00:00
parent e0b4562b51
commit 8deae3ff79
5 changed files with 22 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -938,6 +938,11 @@ $config['os'][$os]['group'] = "unix";
$config['os'][$os]['type'] = "storage";
$config['os'][$os]['icon'] = "synology";
$os = "hikvision";
$config['os'][$os]['text'] = "Hikvision";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "hikvision";
foreach ($config['os'] as $this_os => $blah)
{
if (isset($config['os'][$this_os]['group']))

View File

@@ -0,0 +1,9 @@
<?php
if (!$os)
{
if (preg_match("/Hikvision/", snmp_get($device, ".1.3.6.1.4.1.39165.1.6.0", "-Oqv", ""))) {
$os = "hikvision";
}
}

View File

@@ -451,6 +451,10 @@ function isSNMPable($device)
global $config;
$pos = snmp_get($device, "sysObjectID.0", "-Oqv", "SNMPv2-MIB");
if(empty($pos)) {
// Support for Hikvision
$pos = snmp_get($device, "SNMPv2-SMI::enterprises.39165.1.1.0", "-Oqv", "SNMPv2-MIB");
}
if ($pos === '' || $pos === false)
{
return false;

View File

@@ -0,0 +1,4 @@
<?php
$version = trim(snmp_get($device, ".1.3.6.1.4.1.39165.1.3.0", "-OQv", "", ""),'"');
$hardware = trim(snmp_get($device, ".1.3.6.1.4.1.39165.1.1.0", "-OQv", "", ""),'"');