function __construct($version, $host, $community) { switch ($version) { case '1': case 'v1': $version = parent::VERSION_1; break; case '2': case 'v2C': case 'v2c': $version = parent::VERSION_2c; break; case '3': case 'v3': $version = parent::VERSION_3; break; } parent::__construct($version, $host, $community); //snmp_set_valueretrieval(SNMP_VALUE_LIBRARY); /* Return values without SNMP type hint */ //snmp_set_valueretrieval(SNMP_VALUE_PLAIN); $this->valueretrieval = SNMP_VALUE_PLAIN; /* needs php >= 5.2.0 */ // snmp_set_oid_output_format(SNMP_OID_OUTPUT_FULL); // snmp_set_quick_print(1); }
function __construct($version, $host, $community) { switch ($version) { case '1': case 'v1': $version = parent::VERSION_1; break; case '2': case 'v2C': case 'v2c': $version = parent::VERSION_2c; break; case '3': case 'v3': $version = parent::VERSION_3; break; } parent::__construct($version, $host, $community); /* Return values without SNMP type hint */ $this->valueretrieval = SNMP_VALUE_PLAIN; }
function __construct($version, $host, $community) { parent::__construct($version, $host, $community); //snmp_set_valueretrieval(SNMP_VALUE_LIBRARY); /* Return values without SNMP type hint */ snmp_set_valueretrieval(SNMP_VALUE_PLAIN); /* needs php >= 5.2.0 */ // snmp_set_oid_output_format(SNMP_OID_OUTPUT_FULL); // snmp_set_quick_print(1); }