Re: [PHP-DEV] [PATCH] SNMP value retrieval
HI, I have reviewed your patch and some comments I have are below, in perticular I was wondering what would be best to do so. *) I am not completely understanding what you want with the SNMP_VALUE_METHODPLAIN. Is this the BER encoded value?? If so that is a not wanted feature, IMHO. *) The object idea I like. *) I am not completely sure why or what you want to achieve by the 'REGISTER_LONG_CONSTANTS' where all the names have an 'ASN_' prefix?? The prefix does not make sense to a PHP-programmer, he should not need to know that level, I believe. OK, he must know whether it is a counter63, integer32 or integer32, that is different. Do I understand it correctly, that you want to be able to use the constant 'ASN_COUNTER' in the PHP langaue, for instance?? *) The value for the snmp_[get|set]_value_method I would think of a string. I beleive this is more user/PHP programmer friendly. I understand that the other that are boolean accept also an int, but those are boolean regards, Harrie -- Author of MOD-SNMP, enabling SNMP management of Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] SNMP value retrieval
HI, Just a notice that I am not ignoring it. I am looking into it and try to understand it. On Tuesday, January 14, 2003, at 08:19 PM, Johann Hanne wrote: Hi, The patch makes it much easier to parse the returned SNMP values, as they are no longer pre-parsed by the net-snmp library after you have set SNMP_VALUEMETHOD_PLAIN. That is a good feature, since using the string is somehow cumbersome if you do want to process the values. I've attached a simple PHP script which should make the new functionality even clearer. Just to help me, what do you mean by pre-parsed?? The name translation from a type and value to string expression the type and value?? Harrie -- Author of MOD-SNMP, enabling SNMP management of Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Maintainer of SNMP module?
HI, This is the same as you have send to the net-snmp-users mailinglist, right?? If not let me know. Harrie On Thursday, December 26, 2002, at 09:06 PM, Johann Hanne wrote: Hi, is somebody actually maintaining the SNMP module? I'm currently using PHP 4.2.3 and I have two major problems which make the SNMP functions unusable for me: - When using snmpwalkoid() the array keys are the OIDs. But if the OID is lying under certain subtrees (e.g. mib-2, experimental, private), all the OID bits leading to that path are dropped (i.e. the OID is shortened). Furthermore known OID numbers are replaced with their textual representation, which makes the array keys dependent on the locally existing MIBs. All this makes it impossible to reliably parse the returned OIDs! A PHP function which calls ds_toggle_boolean(DS_LIBRARY_ID, DS_LIB_PRINT_NUMERIC_OIDS); and ds_toggle_boolean(DS_LIBRARY_ID, DS_LIB_PRINT_FULL_OID); to turn these features off is required. And IMHO this should be the default behaviour. - Returned OID values are read via the sprint_value() SNMP API function. This preparses the values and results in strings like Timeticks: ..., Hex: It is extremely hard (read: impossible) to reliably parse these values for further processing. This behaviour could also be turned off with ds_toggle_boolean() calls, but it's even better to do the parsing in a special function. This way, even the type of the value could be returned optionally. Two other things in the related PHP source code might be regarded as... ermmm... questionable: - sprint_value() and sprint_objid() are used. It seems to me that these functions don't do any overflow checking? And they are not documented, thus probably obsolete (sprint_variable() is documented as obsolete in the mib_api man page). - Is it really wise to use ONE function for ALL SNMP operations (get, set, walk)? The code is hard to read and confusing. IMHO the function should at least be splitted up into a single-OID-function (set, get) and a multiple-OIDs-function (walk). Comments? Cheers, Jonny [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] New SNMP function names
On Thursday, December 5, 2002, at 12:17 PM, Derick Rethans wrote: On Thu, 5 Dec 2002, Harrie Hazewinkel wrote: On Wednesday, December 4, 2002, at 02:49 PM, Derick Rethans wrote: Hello, while browsing the CVS I found that the following functions were added to the CVS recently: + PHP_FE(snmpv3get, NULL) + PHP_FE(snmpv3walk, NULL) + PHP_FE(snmpv3realwalk, NULL) + PHP_FALIAS(snmpv3walkoid, snmpv3realwalk, NULL) + PHP_FE(snmpv3set, NULL) But those functionnames don't adhere to our nameing guidelines. Naming guidelines?? Which I look the last time at some pointers given for this, but I could not find naming guidelines. It would help if you can point me to the precise part defining this. I quote: (from php4/CODING_STANDARDS) [1] Function names for user-level functions should be enclosed with in the PHP_FUNCTION() macro. They should be in lowercase, with words underscore delimited, with care taken to minimize the letter count. OK, I will admit the '_' is then OK, but I rather do not use it in this case, since I would like to use that for a more session oriented functions. As an example: $sess_v1 = snmp_session(1, localhost:161, public); $sess_v3 = snmp_session(3, otherhost:161, username, seclevel, auth_protocol, auth_passphrase, priv_protocol, priv_passphrase); $vara = snmp_get($sess_v1, sysUpTime.0); $varb = snmp_get($sess_v3, sysUpTime.0); Abbreviations should not be used when they greatly decrease the readability of the function name itself. Good: 'mcrypt_enc_self_test' 'mysql_list_fields' ... [2] If they are part of a parent set of functions, that parent should be included in the user function name, and should be clearly related to the parent program or function family. This should be in the form of parent_*. A family of 'foo' functions, for example: Good: 'foo_select_bar' 'foo_insert_baz' 'foo_delete_baz' ... [5] Variable names should be in lowercase. Use underscores to separate between words. more of all, it's common practise with all extensions. If you find some which do not adhere to this standard, then there was taken into account a BC problem. For that alias could have been made to assist people in a migration phase. This is not the case with new functions, like you added, and thus they should stick to the guide lines. I do not see any problem with the usage of 'v3'. As those are new functions I propose to change them to the following, to be more consistent with all other functions: snmpv3get - snmp3_get snmpv3walk - snmp3_walk snmpv3realwalk - snmp3_real_walk (or snmp3_walk_oid) snmpv3set - snmp3_get I have mentioned this some time ago already on the list. (See archive) I believe it is way easier for people to recognise the SNMPv3 version by people with the current naming. On top of that I can understand all of your concerns, but it is my opinion we have to think what is the easiest for the users/programmers of PHP. the proposed names are much more readable, and they follow the oci8_ convention of only using the verison number, the 'v' in your names don't add anything useful. I think it will create confusion when I am done with the new more session oriented approach. That I believe is neither something needed if can be avoided. IMHO, the current naming refers quite clearly to SNMP version 3 or SNMPv3. Many people know this version of the protocol as SNMPv3. I beleive that the original functions did neither have an '_' character. Why is that required suddenly?? Backward compatibility for those. Maybe you noticed that we added some aliases to other extensions because of this, but the snmp extension was left alone in that. AFAIK, changing or aliasing names is on the PHP 5 todo. So, are you saying you should have renamed them all and keeping an alias for the BC?? (This states more or less the same opinion as expressed last time) I also would like to mention that I am looking into the usage of an SNMP-session creation and then use a single variable to provide all SNMP-session info in a single variable for the 'data retrieval' functions. Therefore, I would like to reserve the use of the underscore and then without a version number. As long as you don't break BC it's fine with me. That is why I would like to keep it as is and how I propose it. It would be less confusing for PHP-coders. But I know this is a personal opinion. also, there is no need to introduce an alias for a newly created function so I guess we just should drop it. I have created a similar set of functions as exist for SNMPv1. That includes the alias. That makes it easier for existing scripts to be updated with the new security featres of SNMPv3. We only add aliases if it is absolutely necesary, which is really not the case here. I'd like to make those proposed changes ASAP as they are also added
Re: [PHP-DEV] PHP 4 Bug Summary Report
HI, Just a question. I saw some SNMP related items. Mainly asking to make sure I follow procedure. On Saturday, November 30, 2002, at 04:00 PM, [EMAIL PROTECTED] wrote: PHP 4 Bug Database summary - http://bugs.php.net 6584 Open SNMP get-next function is missing 17405 Open Support netsnmp (http://www.netsnmp.org/), Previously known as ucd-snmp Can I just close this one for instance. The support is there. 18152 Open Feature Request SNMP V3 Can I just close this one for instance. The support is there. ===[SNMP related]= 20494 Feedback Empty response gives wrong answer Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ -- Author of MOD-SNMP, enabling SNMP management of Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] problem with GPL code in PHP4
On Monday, November 18, 2002, at 04:35 PM, Derick Rethans wrote: On Mon, 18 Nov 2002, Henri Gomez wrote: Hi to all, I take a look at PHP4 license information, I see that PHP4 is licensed under an Apache Style license. I see at least 2 files, rand.c and image.c which are under GPL licence, and sus break the ASF like licence of PHP4. image.c only uses very little original code, so I think we can just IMHO, little is already to much. remove that GPL thing, and rand.c is not GPL afaics. Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/snmp CREDITS php_snmp.hsnmp.c
--On Monday, November 11, 2002 11:20 PM +0200 Andi Gutmans [EMAIL PROTECTED] wrote: At 10:22 PM 11/11/2002 +0100, Derick Rethans wrote: On Mon, 11 Nov 2002, Harrie Hazewinkel wrote: harrieMon Nov 11 16:09:19 2002 EDT Modified files: /php4/ext/snmpCREDITS php_snmp.h snmp.c Log: Adding SNMPv3 support. @@ -113,6 +121,11 @@ PHP_FE(snmp_get_quick_print, NULL) PHP_FE(snmp_set_quick_print, NULL) PHP_FE(snmpset, NULL) + PHP_FE(snmpv3get, NULL) + PHP_FE(snmpv3walk, NULL) + PHP_FE(snmpv3realwalk, NULL) + PHP_FALIAS(snmpv3walkoid, snmpv3realwalk, NULL) + PHP_FE(snmpv3set, NULL) {NULL,NULL,NULL} These function names don't follow the PHP standards, I think we should definitely come up with better names. I agree. what's wrong with snmp_get, snmp_walk, and so on? I believe it is neccessary to have the 'v3' in the name. It makes very clear to people that it is for snmpv3 and not any opther snmp version. SNMPv3 is the protocol version that has security support and is known as under SNMPv3 by many people. Anyway, where would be the function name guide lines on the website. I cannot find it and a pointer would be appreciated. Cheers, Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/snmp CREDITS php_snmp.hsnmp.c
--On Tuesday, November 12, 2002 10:42 PM +0100 Derick Rethans [EMAIL PROTECTED] wrote: On Tue, 12 Nov 2002, Harrie Hazewinkel wrote: These function names don't follow the PHP standards, I think we should definitely come up with better names. I agree. what's wrong with snmp_get, snmp_walk, and so on? I believe it is neccessary to have the 'v3' in the name. It makes very clear to people that it is for snmpv3 and not any opther snmp version. SNMPv3 is the protocol version that has security support and is known as under SNMPv3 by many people. But what use does it have in it's name? We don't have PGsqlV6 and pgsqlv7_, or mysqlv3_ and mysqlv4_ (or take the gd functions). Again I believe there is a difference between a package version number and this protocol. I do not believe that snmp_get is an improvement over snmpv3get for instance. Although, I admit I have been thinking of using the used example snmp_get, but then I need to add a version number as parameter. This would allow as well the existing snmpget (for SNMPv1) to be combined with snmpv3get (for SNMPv3). However, I have kept it simple for the moment and attempted to make it as easy as possible to upgrade scripts to SNMPv3. And on top of it, also providing a quick and well understood recognition of it. Also SNMPv3 is a full standard and that version number is not likely (and hopefully) about to change. Anyway, where would be the function name guide lines on the website. I cannot find it and a pointer would be appreciated. See the CODING_STANDARDS file in the root of the php4/ CVS module. THanks, I will check it out. Derick -- - -- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/snmp CREDITS php_snmp.hsnmp.c
--On Wednesday, November 13, 2002 2:33 AM +0200 Jani Taskinen [EMAIL PROTECTED] wrote: Maybe it would be good idea to do something like LDAP extension does? ie. have something similar to ldap_set_option() to set the protocol version to be used? And have same functions and thus not pollute the function namespace anymore? This is an option, but then you put a bigger burden on the script developer. It is very likely possible that SNMPv1 and SNMPv3 calls are done in various orders in a script. Mainly because not all devices support SNMPv3 yet. So from not polluting the C-code portion and the function names used you go and pollute the scripts. IMHO, that is not a good idea either and that for just a version number. We as PHP developers of the C-part should not forget we make this for others and we better make it as easy as possible for them. Not for us or that things just look better. An idea could be that a the complete 'session' is create and that is then given to the data retrieval functions like snmpget. A create_session would provide all parameters and the combined arguments go into the data retrieval part by menas of the C-struct 'struct snmp_session' that is used. iirc, the snmp command line tools have an option to select which protocol version to use? That is correct. However, I tried to avoid that. The parameters betwen SNMPv1 and SNMPv3 are completely different. Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Cleaning up the ext/snmp/snmp.c
HI all, I was wondering what the support would be to delete the following from the 'ext/snmp/snmp.c' file. This is for old versions of UCD in the 3.x.x range where they currently have versions in the 4.x.x range. portion of code /* For really old ucd-snmp versions.. */ #ifndef HAVE_SNMP_PARSE_OID #define snmp_parse_oid read_objid #endif /* ucd-snmp 3.3.1 changed the name of a few #defines... They've been changed back to the original ones in 3.5.3! */ #ifndef SNMP_MSG_GET #define SNMP_MSG_GET GET_REQ_MSG #define SNMP_MSG_GETNEXT GETNEXT_REQ_MSG #endif - Let me know what the group believes is best with respect to support and I will delete it. Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: harrie
Development of the SNMP extension (second try, network problem at PHPCON) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [PATCH] SNMPv3 support
HI, I have updated the patch send earlier to this list that adds authentication and privacy (SNMPv3) functionality to the SNMP module. The patch is at URL: http://www.lisanza.net/php-snmp/php-netsnmp.patch.txt I would appreciate if the patch will be applied. Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] cvs account
HI, Can I have one to in order to get SNMPv3 support into PHP and make it work with NET-SNMP 5.0.x?? Just asking, since I have seen various poeple over the last weeks asking for a CVS account and I am not sure whether just asking is the way to get CVS commit access. regards, Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [PATCH] fixing snmp support after last commit
HI, I have made a patch in order to get SNMP support in PHP working again. The last patch committed was broken. The patch to fix this can be found at: http://www.lisanza.net/php-snmp/php-snmp-fixing.patch.txt Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for ext/snmp to support net-snmp-5.0.x
--On Tuesday, October 15, 2002 3:43 AM +0300 Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 14 Oct 2002, Harrie Hazewinkel wrote: OK, if you want apply your patch to the core of PHP. I will, don't worry. Thanks for applying this patch. Having tried it now, it does not not work for me. See below. 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. Yes it did. You just didn't try it. 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 Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Changes to SNMP support in PHP
HI, Since the last commit in the SNMP module for PHP my previous posted patch to add SNMPv3 support is obviously going to break. Although, I have noticed various download of that patch, has this group any interest in committing it into CVS?? Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [4.3] Current critical bugs
HI, If 4.3 is released from CVS HEAD there is also a bug in the SNMP module. The commit made by Jani Taskinen [EMAIL PROTECTED] made only with NET-SNMP unfortenately it did not made it work. The patch to fix this can be found at: http://www.lisanza.net/php-snmp/php-snmp-fixing.patch.txt Note that this is not in bugs.php.net, but that is since I did not insert it due to it is not released as such yet. Harrie --On Tuesday, October 15, 2002 10:26 AM -0400 Andrei Zmievski [EMAIL PROTECTED] wrote: Hi, We have 10 critical bugs in the list currently. If you could please see about fixing at least one of them, we'd be that much closer to a release candidate. Summary: need to use -taso with Netscape LDAP libs URL: http://bugs.php.net/bug.php?id=1298 Summary: Copy of array is affected by reference URL: http://bugs.php.net/bug.php?id=15025 Summary: Under Apache, register_shutdown_function() broke between 4.0.x to 4.1.x URL: http://bugs.php.net/bug.php?id=15209 Summary: max_execution_time affects large uploads URL: http://bugs.php.net/bug.php?id=16880 Summary: random error: open_basedir restriction in effect. File is in wrong directory URL: http://bugs.php.net/bug.php?id=19292 Summary: cosmetic problem on line 308 in var_unserializer.c URL: http://bugs.php.net/bug.php?id=19317 Summary: 4.2.3 and higher include operator mistake URL: http://bugs.php.net/bug.php?id=19689 Summary: math.c: In function `_php_math_zvaltobase' [...] `HUGE_VAL' undeclared URL: http://bugs.php.net/bug.php?id=19807 Summary: Wrong $_REQUEST values URL: http://bugs.php.net/bug.php?id=19848 Summary: pear package produces broken .tgz archive URL: http://bugs.php.net/bug.php?id=19906 -Andrei http://www.gravitonic.com/ * Change is the only constant. * -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for ext/snmp to support net-snmp-5.0.x
HI, --On Monday, October 14, 2002 10:17 AM +0300 Jani Taskinen [EMAIL PROTECTED] wrote: On Mon, 14 Oct 2002, Harrie Hazewinkel wrote: --On Monday, October 14, 2002 6:10 AM +0300 Jani Taskinen [EMAIL PROTECTED] wrote: Fixes the configure/compile problems for me..but I'm a bit I have not tried this yet, but I taht you do for some include files Obviously not. Sorry, if you are offended by me not trying. the directory prefix net-snmp where others don't have it. The idea behind the include files in net-snmp is that all go into a net-snmpdirectory and so can be distiguished better from others. Huh? Maybe you missed the #ifdef HAVE_NET_SNMP part there? Those without the prefix are for ucd-snmp.. But still, for the new net-snmp version is is better to have them all in with the directory prefix. Other package don't do this sometimes and there are sometimes include files with equal names. I have also made some patch available a time ago in which from the configure you could select either the old ucd-snmp or the new net-snmp libraries. As you propably didn't use the obvious net-snmp-config script which is good enough indication that we're dealing with net-snmp. Thus there is no need for such hacky options. Please try the patch. OK, if you want apply your patch to the core of PHP. 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. This patch is available at http://www.lisanza.net/php-snmp/php-snmp.patch.txt That file does not exist. Oops, sorry it is http://www.lisanza.net/php-snmp/php-netsnmp.patch.txt The only thing is I would like to know from this group whether it would be OK to patch up the code to use only NET-SNMP now or still both. I'd say dump the ucd-snmp support, but I bet Rasmus won't like that idea. :) I see where this thinking comes from, but Rasmus does not mind I beleive. ;-)) Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [PATCH] NET-SNMP, PHP and SNMPv3
HI all, Sorry for the cross posting, but I have seen comments regarding netsnmp and php on these lists and I am not sure if all are on all mailiglists. Again sorry. At the URL: http://www.lisanza.net/php-snmp/php-netsnmpv3.patch.txt one can find a patch that would add SNMPv3 support to the PHP language and makes it work with NET-SNMP 5.0.x. (It includes the previously announced patch) SNMPv3 adds authentication and privace (security) to SNMP and is advised to be used over SNMPv1 if you SNMP agent supports it. No documentation is yet available, but in short the conversion from SNMPv1 to SNMPv3 is as follows. Change the snmp- prefix in to snmpv3. Rpleace the community string parameter by the following 6 parameters: security name, security level, auth protocol, auth passphrase, privacy protocol and privacy passphrase (for now more information can be found in the net-snmp man page snmpcmd) Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for ext/snmp to support net-snmp-5.0.x
HI --On Monday, October 14, 2002 6:10 AM +0300 Jani Taskinen [EMAIL PROTECTED] wrote: This patch: http://www.kolumbus.fi/jani.taskinen/bugs/php_snmp.patch.gz Fixes the configure/compile problems for me..but I'm a bit unsure whether the functions also work as I don't use SNMP stuff myself. So if someone who's really familiar with that could try this..and maybe also add some tests for it..? :) I have not tried this yet, but I taht you do for some include files the directory prefix net-snmp where others don't have it. The idea behind the include files in net-snmp is that all go into a net-snmpdirectory and so can be distiguished better from others. I have also made some patch available a time ago in which from the configure you could select either the old ucd-snmp or the new net-snmp libraries. This patch is available at http://www.lisanza.net/php-snmp/php-snmp.patch.txt As someone who has used SNMP I think that patch does a better job on some items. The only thing is I would like to know from this group whether it would be OK to patch up the code to use only NET-SNMP now or still both. After that I will also provide a patch that adds SNMPv3 functions to PHP. Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] SNMP extension question
HI, While adding SNMPv3 support I noticed that number 5 to 8 are reserved. These are numbers used to map (for instance) from the PHP_FUNCTION(snmpget) to the internal php_snmp function. (Example code) PHP_FUNCTION(snmpget) { php_snmp(INTERNAL_FUNCTION_PARAMETERS_PASSTHRU, 1); } The number mentioned is this one (above 1) ^^^ Any help would be appreciated, Harrie -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [PATCH] the attached patch makes NET-SNMP 5.0.x working with PHP.
HI, The attached patch adds an extra configure directive to enable compilation of PHP against NET-SNMP 5.0.x versions. The current UCD-SNMP support is still there, since those version are around still. if it can be added to CVS would be grate. regards, Harrie -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] the attached patch makes NET-SNMP 5.0.xworking with PHP.
Hi, I discovered that the attachment as text/plain is also garbled. I have now put the patch on a website: http://digilander.libero.it/harrie/temp/php-netsnmp.patch Harrie --On Tuesday, September 10, 2002 11:55 AM +0200 Harrie Hazewinkel [EMAIL PROTECTED] wrote: HI, The attached patch adds an extra configure directive to enable compilation of PHP against NET-SNMP 5.0.x versions. The current UCD-SNMP support is still there, since those version are around still. if it can be added to CVS would be grate. regards, Harrie Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] net-snmp support (open bug 18728)
HI, I was working on getting PHP with SNMP compiled with the latest NET-SNMP 5.0.4 (was UCD-SNMP). It does not work. I was willing to fix this problem, however, I beleive it could cause backwards compatibility problems if the UCD-SNMP must be kept. the options are (as i recognise), 1) drop UCD-SNMP support since the NET-SNMP is just the name change plus many other good features. 2) Make sure both work with IFDEF's. 3) Add an extra SNMP portion that works with NET-SNMP. Personnally I think 1 would be the best choice, but I have also created once an SNMPv3 extension for PHP with SNMP and therefore 3 could be choosen and have then the new SNMPv3 features. What do others think?? Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] net-snmp support (open bug 18728)
--On Thursday, September 5, 2002 10:52 AM -0700 Rasmus Lerdorf [EMAIL PROTECTED] wrote: We have many examples of configure checks that drive #ifdef'ed code to take care of minor differences between versions of a library. Are the changes really so significant that we can't do this cleanly here? The changes are not extreemly significant. I am working on it to create a diff from the info I got from another. Also within the NET-SNMP package the attempt is started to do better namespace protection. This will cause also various functions have their name changed (currently mainly structure type). However, if SNMPv3 support is added the functions of the PHP language change significant due to many extra options. Currently SNMPv3 is full standard and SNMPv1 is historic within the IETF. This reases the question whether the PHP langauge may be changed?? Or do we need to add the SNMPv3 functionality with an snmpv3 prefix instead of the snmp prefix. -Rasmus On Thu, 5 Sep 2002, Harrie Hazewinkel wrote: HI, I was working on getting PHP with SNMP compiled with the latest NET-SNMP 5.0.4 (was UCD-SNMP). It does not work. I was willing to fix this problem, however, I beleive it could cause backwards compatibility problems if the UCD-SNMP must be kept. the options are (as i recognise), 1) drop UCD-SNMP support since the NET-SNMP is just the name change plus many other good features. 2) Make sure both work with IFDEF's. 3) Add an extra SNMP portion that works with NET-SNMP. Personnally I think 1 would be the best choice, but I have also created once an SNMPv3 extension for PHP with SNMP and therefore 3 could be choosen and have then the new SNMPv3 features. What do others think?? Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php Harrie Internet Management Consulting mailto: [EMAIL PROTECTED] http://www.lisanza.net/ Author of MOD-SNMP, enabling SNMP management the Apache HTTP server -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php