ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_walk, 0, 0, 4)
ZEND_ARG_INFO(0, object_id)
ZEND_ARG_INFO(0, suffix_keys)
- ZEND_ARG_INFO(0, non_repeaters)
ZEND_ARG_INFO(0, max_repetitions)
+ ZEND_ARG_INFO(0, non_repeaters)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_set, 0, 0, 3)
RETURN_FALSE;
}
} else if (st & SNMP_CMD_WALK) {
- if (zend_parse_parameters(argc TSRMLS_CC, "Z|bll", &oid, &suffix_keys, &(objid_query.non_repeaters), &(objid_query.max_repetitions)) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "Z|bll", &oid, &suffix_keys, &(objid_query.max_repetitions), &(objid_query.non_repeaters)) == FAILURE) {
RETURN_FALSE;
}
if (suffix_keys) {
}
/* }}} */
-/* {{{ proto mixed SNMP::walk(mixed object_id [, bool $suffix_as_key = FALSE [, int $non_repeaters [, int $max_repetitions ]]])
+/* {{{ proto mixed SNMP::walk(mixed object_id [, bool $suffix_as_key = FALSE [, int $max_repetitions [, int $non_repeaters]])
Return all objects including their respective object id withing the specified one as array of oid->value pairs */
PHP_METHOD(snmp, walk)
{
$session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, ''));
-var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, 0, ''));
+var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, 30, ''));
var_dump($session->get());
var_dump($session->getnext());
var_dump($session->set());
var_dump(array_shift($z));
var_dump($session->close());
-echo "WALK multiple on single OID, non_repeaters set to 0\n";
+echo "WALK multiple on single OID, max_repetitions set to 30\n";
$session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
-$z = $session->walk('.1.3.6.1.2.1.1', 0);
+$z = $session->walk('.1.3.6.1.2.1.1', FALSE, 30);
var_dump(gettype($z));
var_dump(count($z));
var_dump(key($z));
var_dump(array_shift($z));
var_dump($session->close());
-echo "WALK multiple on single OID, non_repeaters set to 0, max_repetitions set to 30\n";
+echo "WALK multiple on single OID, max_repetitions set to 30, non_repeaters set to 0\n";
$session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
-$z = $session->walk('.1.3.6.1.2.1.1', 0, 30);
+$z = $session->walk('.1.3.6.1.2.1.1', FALSE, 30, 0);
var_dump(gettype($z));
var_dump(count($z));
var_dump(key($z));
string(%d) "%S"
string(%d) "%S"
bool(true)
-WALK multiple on single OID, non_repeaters set to 0
+WALK multiple on single OID, max_repetitions set to 30
string(5) "array"
int(%d)
string(%d) "%S"
string(%d) "%S"
bool(true)
-WALK multiple on single OID, non_repeaters set to 0, max_repetitions set to 30
+WALK multiple on single OID, max_repetitions set to 30, non_repeaters set to 0
string(5) "array"
int(%d)
string(%d) "%S"