diff options
author | Harrie Hazewinkel <harrie@php.net> | 2003-07-14 17:11:04 +0000 |
---|---|---|
committer | Harrie Hazewinkel <harrie@php.net> | 2003-07-14 17:11:04 +0000 |
commit | 6dd04c368efd9f9561d160158f64de0f0db4fc65 (patch) | |
tree | 5d889282783e35371d5a1174fc03dfd46c059673 /ext/snmp/php_snmp.h | |
parent | e209272db105f0279fd2ab0645ea90e6ebeac0d6 (diff) | |
download | php-git-6dd04c368efd9f9561d160158f64de0f0db4fc65.tar.gz |
(RE-)Applying the contributed patch of Johan Hanne to the main tree.
The patch enables control on the way the values are returned
into the PHP script, instaed of always strings. Also the
type of the value is now returned when configured to do so.
This enables better management scripts to do more automatic
processing and value calculations.
(By default the values are returned as strings, as was before)
Diffstat (limited to 'ext/snmp/php_snmp.h')
-rw-r--r-- | ext/snmp/php_snmp.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h index 5285a60963..f0cba3fb10 100644 --- a/ext/snmp/php_snmp.h +++ b/ext/snmp/php_snmp.h @@ -16,6 +16,7 @@ | Mike Jackson <mhjack@tscnet.com> | | Steven Lawrance <slawrance@technologist.com> | | Harrie Hazewinkel <harrie@lisanza.net> | + | Johann Hanne <jonny@nurfuerspam.de> | +----------------------------------------------------------------------+ */ @@ -33,6 +34,10 @@ extern zend_module_entry snmp_module_entry; #define snmp_module_ptr &snmp_module_entry +#ifdef ZTS +#include "TSRM.h" +#endif + PHP_MINIT_FUNCTION(snmp); PHP_MINFO_FUNCTION(snmp); @@ -50,6 +55,19 @@ PHP_FUNCTION(snmp3_walk); PHP_FUNCTION(snmp3_real_walk); PHP_FUNCTION(snmp3_set); +PHP_FUNCTION(snmp_set_valueretrieval); +PHP_FUNCTION(snmp_get_valueretrieval); + +ZEND_BEGIN_MODULE_GLOBALS(snmp) + int valueretrieval; +ZEND_END_MODULE_GLOBALS(snmp) + +#ifdef ZTS +#define SNMP_G(v) TSRMG(snmp_globals_id, zend_snmp_globals *, v) +#else +#define SNMP_G(v) (snmp_globals.v) +#endif + #else #define snmp_module_ptr NULL |