diff options
Diffstat (limited to 'ext/snmp/snmp.c')
-rw-r--r-- | ext/snmp/snmp.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index f6a361f982..35155ef851 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -79,6 +79,8 @@ void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st); /* constant - can be shared among threads */ static oid objid_mib[] = {1, 3, 6, 1, 2, 1}; +/* {{{ snmp_functions[] + */ function_entry snmp_functions[] = { PHP_FE(snmpget, NULL) PHP_FE(snmpwalk, NULL) @@ -89,7 +91,10 @@ function_entry snmp_functions[] = { PHP_FE(snmpset, NULL) {NULL,NULL,NULL} }; +/* }}} */ +/* {{{ snmp_module_entry + */ zend_module_entry snmp_module_entry = { "snmp", snmp_functions, @@ -100,6 +105,7 @@ zend_module_entry snmp_module_entry = { PHP_MINFO(snmp), STANDARD_MODULE_PROPERTIES }; +/* }}} */ #ifdef COMPILE_DL_SNMP ZEND_GET_MODULE(snmp) @@ -107,12 +113,17 @@ ZEND_GET_MODULE(snmp) /* THREAD_LS snmp_module php_snmp_module; - may need one of these at some point */ +/* {{{ PHP_MINIT_FUNCTION + */ PHP_MINIT_FUNCTION(snmp) { init_mib(); return SUCCESS; } +/* }}} */ +/* {{{ PHP_MINFO_FUNCTION + */ PHP_MINFO_FUNCTION(snmp) { php_info_print_table_start(); @@ -120,9 +131,10 @@ PHP_MINFO_FUNCTION(snmp) php_info_print_table_row(2, "UCD-SNMP Version", VersionInfo); php_info_print_table_end(); } +/* }}} */ - -/* +/* {{{ php_snmp +* * Generic SNMP object fetcher * * st=1 snmpget() - query an agent and return a single value. @@ -342,6 +354,7 @@ retry: } /* keepwalking */ snmp_close(ss); } +/* }}} */ /* {{{ proto string snmpget(string host, string community, string object_id [, int timeout [, int retries]]) Fetch a SNMP object */ @@ -393,8 +406,9 @@ PHP_FUNCTION(snmpset) { #endif /* -* Local variables: -* tab-width: 4 -* c-basic-offset: 4 -* End: -*/ + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim: sw=4 ts=4 tw=78 fdm=marker + */ |