Re: Patch for ext/snmp to support net-snmp-5.0.x
| From: | Harrie Hazewinkel | Date: | Tue, 15 Oct 2002 08:26:25 +0000 |
| Subject: | Re: Patch for ext/snmp to support net-snmp-5.0.x | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89477@lists.php.net to get a copy of this message | ||
--On Tuesday, October 15, 2002 3:43 AM +0300 Jani Taskinen <sniper@iki.fi> wrote:
On Mon, 14 Oct 2002, Harrie Hazewinkel wrote:Thanks for applying this patch. Having tried it now, it does not not work for me. See below.OK, if you want apply your patch to the core of PHP.I will, don't worry.
I don't see a reason why I need to try your patch. IMHO, it did not solve the include files properly (as earlier indicated). Neither did it solve the version fino string properly.
Again, I was not an issue that your patch would not work. Although, it does not!! It only makes PHP just compile with NET-SNMP 5.0.x. What I believe is wrong with this patch: 1) The configure script tests for the availability of a script called $PHP_SNMP/bin/net-snmp-config. It should test here for the include file net-snmp-config.h which must be inside an include directory. 2) The include files are not really nice placed from under there directory prefix net-snmp/ that is done in order to avoid include file name collisions. Yes, that is very possible, since the filename asn.h is used in some other popular package. 3) The mapping of the version info is not good. It is remapped from another define. The netsnmp_get_version() function should be used. When one has the NET-SNMP library as a shared object the version info does not change with the NET-SNMP library if that one is upgraded. What I believe is even broken with this patch: 1) The function snprint_value() is used incorrect. The second variable indicates the size of the buffer in which one can write. The current situation uses a strlen(buf) where the content of buf is not even initialized. Harrie Internet Management ConsultingYes it did. You just didn't try it.
mailto: harrie@lisanza.net http://www.lisanza.net/-------------------------------------------------------------------- Author of MOD-SNMP, enabling SNMP management the Apache HTTP server