go to bug id or search bugs for
snmp_set_oid_output_format only allows using the FULL (SNMP_OID_OUTPUT_FULL) or
NUMERIC (SNMP_OID_OUTPUT_NUMERIC) setting types, neither of which is the default.
It also has no corresponding _get_ function call to query/store and return the
setting back to "whatever it was before I touched it"
I've attached a patch which does both (from the 5.3 branch), extends the existing
function to include the available types in UCD Net-SNMP as of 5.4 (not
verified/checked against older ones, have not verified that setting to _NONE will
not cause crashes).
$rvDefault = snmp2_get('127.0.0.1','public','.18.104.22.168.22.214.171.124.0');
$rvFull = snmp2_get('127.0.0.1','public','.126.96.36.199.188.8.131.52.0');
$rvNumeric = snmp2_get('127.0.0.1','public','.184.108.40.206.220.127.116.11.0');
Setting either SNMP_OID_OUTPUT_FULL or SNMP_OID_OUTPUT_NUMERIC would return the
library to it's default. Expect there to be an snmp_get_oid_output_format call as
well to query the current setting.
Neither of the available snmp_set_oid_output_format constants can return the
library to it's default settings. No ability to query the library for the current
Add a Patch
Add a Pull Request
Please try using this snapshot:
Please check OO API from trunk. It has an option to specify session-wise OID output format and more.
Sources in trunk can be compiled against downto php 5.2
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.