summaryrefslogtreecommitdiff
path: root/ext/snmp/php_snmp.h
diff options
context:
space:
mode:
authorHarrie Hazewinkel <harrie@php.net>2003-06-21 21:50:01 +0000
committerHarrie Hazewinkel <harrie@php.net>2003-06-21 21:50:01 +0000
commitab2ea18cb54afc4be18c4966f64ef211eb6ddeee (patch)
tree3706c5c2d6dbed9c3842dfeb7fb3343236351297 /ext/snmp/php_snmp.h
parentea33b2824e1f6c0af6626bf43ab1b2147fb23180 (diff)
downloadphp-git-ab2ea18cb54afc4be18c4966f64ef211eb6ddeee.tar.gz
Applying the contributed patch of Johan hanne.
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.
Diffstat (limited to 'ext/snmp/php_snmp.h')
-rw-r--r--ext/snmp/php_snmp.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h
index d2e52da884..cf572ec681 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