From d8a39fe57ded9045e9227105e8105a78b4c55d1f Mon Sep 17 00:00:00 2001 From: slerena <slerena@gmail.com> Date: Mon, 27 Dec 2010 10:43:32 +0000 Subject: [PATCH] 2010-12-27 Sancho Lerena <slerena@artica.es> * include/functions.php: get_snmpwalk() now accepts a specific part of the SNMP MIB, that allow to do not search the full mib on user selection. (Used on the enterprise massive SNMP module adition). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3709 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions.php | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b10c963f48..d0aeb67ae7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-12-27 Sancho Lerena <slerena@artica.es> + + * include/functions.php: get_snmpwalk() now accepts a specific part of + the SNMP MIB, that allow to do not search the full mib on user selection. + (Used on the enterprise massive SNMP module adition). + 2010-12-23 Miguel de Dios <miguel.dedios@artica.es> * DEBIAN/control: added php5-curl dependency. diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 7a73c9a295..b1c717e5f3 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1108,7 +1108,7 @@ function array_key_to_offset($array, $key) { */ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_auth_user = '', $snmp3_security_level = '', $snmp3_auth_method = '', $snmp3_auth_pass = '', - $snmp3_privacy_method = '', $snmp3_privacy_pass = '', $quick_print = 0) { + $snmp3_privacy_method = '', $snmp3_privacy_pass = '', $quick_print = 0, $base_oid = NULL) { snmp_set_quick_print ($quick_print); @@ -1116,15 +1116,15 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_au case '3': $snmpwalk = @snmp3_real_walk ($ip_target, $snmp3_auth_user, $snmp3_security_level, $snmp3_auth_method, $snmp3_auth_pass, - $snmp3_privacy_method, $snmp3_privacy_pass, null); + $snmp3_privacy_method, $snmp3_privacy_pass, $base_oid); break; case '2': case '2c': - $snmpwalk = @snmp2_real_walk ($ip_target, $snmp_community, NULL); + $snmpwalk = @snmp2_real_walk ($ip_target, $snmp_community, $base_oid); break; case '1': default: - $snmpwalk = @snmprealwalk($ip_target, $snmp_community, null); + $snmpwalk = @snmprealwalk($ip_target, $snmp_community, $base_oid); break; }