> *) 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. Nope. It will return the value as a plain string, very much like it's done with SNMP_VALUEMETHOD_LIBRARY set. However it will ALWAYS return the virgin plain value. When SNMP_VALUEMETHOD_LIBRARY is set, the net-snmp library function snprint_value() will be used. And this function will very often transform the value: Timeticks (which is an integer value) will be transformed to days.hours:minutes:seconds, OIDs will be shortened, etc. You can turn of much of this behaviour with netsnmp_ds_set_boolean() and netsnmp_ds_set_int(). However you cannot turn off everything, e.g. all string values will be put between quotes, if there is no MIB file which explicitely defines the OID value as a string!
> *) 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?? Yes. I want to know if the value is a string (ASN_OCTET_STR), a counter (ASN_COUNTER) or whatever. As these are netsnmp internal constants, I need to pass them trough to the PHP script to actually use them. Otherwise the type property of the returned objects (when SNMP_VALUEMETHOD_OBJECT is set) makes no sense. If you wish, I will remove the ASN_* constants, but then I probably should remove the SNMP_VALUEMETHOD_OBJECT stuff, too. > *) 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 If you wish I will change the parameter types to strings. But this results in some strcmp() overhead and imho there is no advantage in passing strings ("SNMP_VALUEMETHOD_PLAIN", i.e. quotes) over passing a constant (SNMP_VALUEMETHOD_PLAIN, i.e. no quotes). And even worse, this would be in contrast to some other PHP behaviour. E.g. mysql_fetch_array() accepts a second argument of type integer, which - following the manual - should one of the constants MYSQL_ASSOC, MYSQL_NUM or MYSQL_BOTH. BTW: I'm not sure if the "valuemethod" word in some functions/constants is good English. If somebody has a better idea, please let me know. Cheers, Jonny <[EMAIL PROTECTED]> -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php