ID: 37865
Comment by: daniel dot buschke at nextiraone dot de
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:
Lee, would you please add an attachment with your patch? TIA
Previous Comments:
------------------------------------------------------------------------
[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