ID: 37865 Comment by: yanirj at orckit dot com Reported By: lee dot duncan at intel dot com Status: Open Bug Type: Feature/Change Request Operating System: SUSE, Kernel 2.6.8-24.21-smp PHP Version: 5.1.4 New Comment:
Hi, On behalf of Lee Duncan's good will and Murali Sundar's kindess I've uploaded the patch for everyone to download. I truly hope this will get merged into the CVS tree for everyone to enjoy. URL: http://sphinx.not.nu/php_snmp_patch.zip Regards, Yanir. Previous Comments: ------------------------------------------------------------------------ [2009-03-17 11:59:59] yanirj at orckit dot com It would be great if you post the patch. Thanks! ------------------------------------------------------------------------ [2008-05-21 12:21:57] daniel dot buschke at nextiraone dot de Lee, would you please add an attachment with your patch? TIA ------------------------------------------------------------------------ [2007-03-16 15:11:19] eqguy2002 at yahoo dot com Version: 5.2.1 OS: Windows 2003 PHP's snmpset extension does not support setting multiple OIDs at once. Doing so from the command line using snmpset from Net-SNMP works fine. I need to set multiple OIDs at once in order to manage switches ------------------------------------------------------------------------ [2006-06-21 00:09:05] lee dot duncan at intel dot com Description: ------------ In order to add an entry to many SNMP tables, you need to be able to set multiple OIDs (values) at the same time. The net-snmp "snmpset" command allows this, as do the libnetsnmp APIs, but the SNMP extension to PHP does not support this. I added a new function to ext/snmp.c to support setting multiple values at once, and I'd like to see it added to the PHP SNMP extension for all to use. Reproduce code: --------------- Just try to set multiple SNMP OIDs (object IDs) with the current API, which is: proto int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]]) I added: proto int snmp2_set_arr(string host, string community, array oids, array types, array values [, int timeout [, int retries]]) This way, no current programs break and new programs can use this functionality. Expected result: ---------------- I'd like to be able to manage things like Marvell switches, which only allow adding a Table entry (e.g. for a new VLAN) if you can set multiple values (OIDs) at the same time. Actual result: -------------- Right now I can't do this without hacking the PHP SNMP extension. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37865&edit=1