--TEST-- Function snmpget --CREDITS-- Olivier Doucet & Boris Lytochkin --SKIPIF-- --FILE-- --EXPECTF-- Checking error handling Warning: snmpget() expects parameter 4 to be long,%s given in %s on line %d bool(false) Warning: snmpget() expects parameter 5 to be long,%s given in %s on line %d bool(false) Checking working Single OID, default timeout and retries %unicode|string%(%d) "%s" Single OID, default retries %unicode|string%(%d) "%s" Single OID %unicode|string%(%d) "%s" Single OID in array array(1) { ["%s"]=> %unicode|string%(%d) "%s" } Multiple OID array(2) { ["%s"]=> %unicode|string%(%d) "%s" ["%s"]=> %unicode|string%(%d) "%d" } More error handling Single OID Warning: snmpget(): Invalid object identifier: .1.3.6.1.2.1..1.1.0 in %s on line %d bool(false) Single OID in array Warning: snmpget(): Invalid object identifier: .1.3.6.1.2.1...1.1.0 in %s on line %d bool(false) Multiple OID Warning: snmpget(): Invalid object identifier: .1.3.6.1.2.1...1.1.0 in %s on line %d bool(false) noSuchName checks Single OID Warning: snmpget(): Error in packet at 'SNMPv2-MIB::sysDescr.110': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) Single OID in array Warning: snmpget(): Error in packet at 'SNMPv2-MIB::sysDescr.110': (noSuchName) There is no such variable name in this MIB. in %s on line %d bool(false) Multiple OID Warning: snmpget(): Error in packet at 'SNMPv2-MIB::sysUpTime.220': (noSuchName) There is no such variable name in this MIB. in %s on line %d array(1) { ["%s"]=> %unicode|string%(%d) "%s" }