|
@@ -35,14 +35,14 @@
|
|
|
|
|
|
namespace OSS_SNMP;
|
|
namespace OSS_SNMP;
|
|
|
|
|
|
-// Add a trivial auto-loader
|
|
|
|
-spl_autoload_register( function( $class ) {
|
|
|
|
- if( substr( $class, 0, 9 ) == 'OSS_SNMP\\' )
|
|
|
|
- {
|
|
|
|
- $class = str_replace( '\\', '/', $class );
|
|
|
|
- require( dirname( __FILE__ ) . '/../' . $class . '.php' );
|
|
|
|
- }
|
|
|
|
-});
|
|
|
|
|
|
+//// Add a trivial auto-loader
|
|
|
|
+//spl_autoload_register( function( $class ) {
|
|
|
|
+// if( substr( $class, 0, 9 ) == 'OSS_SNMP\\' )
|
|
|
|
+// {
|
|
|
|
+// $class = str_replace( '\\', '/', $class );
|
|
|
|
+// require( dirname( __FILE__ ) . '/../' . $class . '.php' );
|
|
|
|
+// }
|
|
|
|
+//});
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -182,6 +182,7 @@ class SNMP
|
|
if( $this->_lastResult === false )
|
|
if( $this->_lastResult === false )
|
|
throw new Exception( 'Cound not perform walk for OID ' . $oid );
|
|
throw new Exception( 'Cound not perform walk for OID ' . $oid );
|
|
|
|
|
|
|
|
+ var_dump($this->_lastResult);
|
|
return $this->getCache()->save( $oid, $this->parseSnmpValue( $this->_lastResult ) );
|
|
return $this->getCache()->save( $oid, $this->parseSnmpValue( $this->_lastResult ) );
|
|
}
|
|
}
|
|
|
|
|
|
@@ -365,10 +366,12 @@ class SNMP
|
|
break;
|
|
break;
|
|
|
|
|
|
case 'Counter32':
|
|
case 'Counter32':
|
|
|
|
+ case 'Counter64':
|
|
$rtn = (int)$value;
|
|
$rtn = (int)$value;
|
|
break;
|
|
break;
|
|
|
|
|
|
case 'Gauge32':
|
|
case 'Gauge32':
|
|
|
|
+ case 'Gauge64':
|
|
$rtn = (int)$value;
|
|
$rtn = (int)$value;
|
|
break;
|
|
break;
|
|
|
|
|