cvs: /php4/ext/snmp php_snmp.h snmp.c
| From: | Zeev Suraski | Date: | Sat, 18 Dec 1999 04:08:34 +0000 |
| Subject: | cvs: /php4/ext/snmp php_snmp.h snmp.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8122@lists.php.net to get a copy of this message | ||
zeev Fri Dec 17 23:08:34 1999 EDT
Modified files:
/php4/ext/snmp php_snmp.h snmp.c
Log:
More php3_ cleanup
Index: php4/ext/snmp/php_snmp.h
diff -u php4/ext/snmp/php_snmp.h:1.2 php4/ext/snmp/php_snmp.h:1.3
--- php4/ext/snmp/php_snmp.h:1.2 Fri Dec 17 15:55:20 1999
+++ php4/ext/snmp/php_snmp.h Fri Dec 17 23:08:03 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_snmp.h,v 1.2 1999/12/17 20:55:20 zeev Exp $ */
+/* $Id: php_snmp.h,v 1.3 1999/12/18 04:08:03 zeev Exp $ */
#ifndef _PHP_SNMP_H
#define _PHP_SNMP_H
@@ -34,7 +34,7 @@
extern zend_module_entry snmp_module_entry;
#define snmp_module_ptr &snmp_module_entry
-extern int php3i_snmp_init(INIT_FUNC_ARGS);
+PHP_MINIT_FUNCTION(snmp);
PHP_FUNCTION(snmpget);
PHP_FUNCTION(snmpwalk);
PHP_FUNCTION(snmprealwalk);
@@ -42,7 +42,7 @@
PHP_FUNCTION(snmp_get_quick_print);
PHP_FUNCTION(snmp_set_quick_print);
PHP_FUNCTION(snmpset);
-void php3_info_snmp(ZEND_MODULE_INFO_FUNC_ARGS);
+PHP_MINFO_FUNCTION(snmp);
#else
#define snmp_module_ptr NULL
Index: php4/ext/snmp/snmp.c
diff -u php4/ext/snmp/snmp.c:1.14 php4/ext/snmp/snmp.c:1.15
--- php4/ext/snmp/snmp.c:1.14 Fri Dec 17 15:55:22 1999
+++ php4/ext/snmp/snmp.c Fri Dec 17 23:08:03 1999
@@ -17,7 +17,7 @@
| Steven Lawrance <slawrance@technologist.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.14 1999/12/17 20:55:22 zeev Exp $ */
+/* $Id: snmp.c,v 1.15 1999/12/18 04:08:03 zeev Exp $ */
#include "php.h"
#if defined(COMPILE_DL)
@@ -68,7 +68,7 @@
#define SNMP_MSG_GETNEXT GETNEXT_REQ_MSG
#endif
-void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st);
+void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st);
/* constant - can be shared among threads */
static oid objid_mib[] = {1, 3, 6, 1, 2, 1};
@@ -85,21 +85,23 @@
};
zend_module_entry snmp_module_entry = {
- "SNMP",snmp_functions,php3i_snmp_init,NULL,NULL,NULL,php3_info_snmp,STANDARD_MODULE_PROPERTIES
+ "SNMP",snmp_functions,PHP_MINIT(snmp),NULL,NULL,NULL,PHP_MINFO(snmp),STANDARD_MODULE_PROPERTIES
};
#if COMPILE_DL
DLEXPORT zend_module_entry *get_module() { return &snmp_module_entry; };
#endif
-/* THREAD_LS snmp_module php3_snmp_module; - may need one of these at some point */
+/* THREAD_LS snmp_module php_snmp_module; - may need one of these at some point */
-int php3i_snmp_init(INIT_FUNC_ARGS) {
+PHP_MINIT_FUNCTION(snmp)
+{
init_mib();
return SUCCESS;
}
-void php3_info_snmp(ZEND_MODULE_INFO_FUNC_ARGS) {
+PHP_MINFO_FUNCTION(snmp)
+{
php_printf("ucd-snmp");
}
@@ -119,7 +121,7 @@
* st=11 snmpset() - query an agent and set a single value
*
*/
-void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
+void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
pval *a1, *a2, *a3, *a4, *a5, *a6, *a7;
struct snmp_session session, *ss;
struct snmp_pdu *pdu=NULL, *response;
@@ -318,14 +320,14 @@
/* {{{ proto string snmpget(string host, string community, string object_id [, int timeout [, int
retries]])
Fetch an SNMP object */
PHP_FUNCTION(snmpget) {
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
+ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* }}} */
/* {{{ proto string snmpwalk(string host, string community, string object_id [, int timeout [, int
retries]])
Return all objects under the specified object id */
PHP_FUNCTION(snmpwalk) {
- return _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,2);
+ return php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,2);
}
/* }}} */
@@ -333,7 +335,7 @@
Return all objects including their respective object id withing the specified one */
PHP_FUNCTION(snmprealwalk)
{
- return _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,3);
+ return php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,3);
}
/* }}} */
@@ -341,7 +343,7 @@
Return all objects including their respective object id withing the specified one */
PHP_FUNCTION(snmpwalkoid)
{
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,4);
+ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,4);
}
/* }}} */
@@ -349,7 +351,7 @@
Return the current status of quick_print */
PHP_FUNCTION(snmp_get_quick_print)
{
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,9);
+ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,9);
}
/* }}} */
@@ -357,14 +359,14 @@
Return all objects including their respective object id withing the specified one */
PHP_FUNCTION(snmp_set_quick_print)
{
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,10);
+ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,10);
}
/* }}} */
/* {{{ proto int snmpset(string host, string community, string object_id, string type, mixed value
[, int timeout [, int retries]])
Set the value of a SNMP object */
PHP_FUNCTION(snmpset) {
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,11);
+ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,11);
}
/* }}} */