xref: /PHP-5.3/ext/snmp/php_snmp.h (revision a2045ff3)
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 5                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2013 The PHP Group                                |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 3.01 of the PHP license,      |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available through the world-wide-web at the following url:           |
10   | http://www.php.net/license/3_01.txt                                  |
11   | If you did not receive a copy of the PHP license and are unable to   |
12   | obtain it through the world-wide-web, please send a note to          |
13   | license@php.net so we can mail you a copy immediately.               |
14   +----------------------------------------------------------------------+
15   | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
16   |          Mike Jackson <mhjack@tscnet.com>                            |
17   |          Steven Lawrance <slawrance@technologist.com>                |
18   |          Harrie Hazewinkel <harrie@lisanza.net>                      |
19   |          Johann Hanne <jonny@nurfuerspam.de>                         |
20   +----------------------------------------------------------------------+
21 */
22 
23 /* $Id$ */
24 
25 #ifndef PHP_SNMP_H
26 #define PHP_SNMP_H
27 
28 #if HAVE_SNMP
29 
30 #ifndef DLEXPORT
31 #define DLEXPORT
32 #endif
33 
34 extern zend_module_entry snmp_module_entry;
35 #define snmp_module_ptr &snmp_module_entry
36 
37 #ifdef ZTS
38 #include "TSRM.h"
39 #endif
40 
41 PHP_MINIT_FUNCTION(snmp);
42 PHP_MSHUTDOWN_FUNCTION(snmp);
43 PHP_MINFO_FUNCTION(snmp);
44 
45 PHP_FUNCTION(snmpget);
46 PHP_FUNCTION(snmpgetnext);
47 PHP_FUNCTION(snmpwalk);
48 PHP_FUNCTION(snmprealwalk);
49 PHP_FUNCTION(snmp_get_quick_print);
50 PHP_FUNCTION(snmp_set_quick_print);
51 PHP_FUNCTION(snmp_set_enum_print);
52 PHP_FUNCTION(snmp_set_oid_output_format);
53 PHP_FUNCTION(snmpset);
54 
55 PHP_FUNCTION(snmp2_get);
56 PHP_FUNCTION(snmp2_getnext);
57 PHP_FUNCTION(snmp2_walk);
58 PHP_FUNCTION(snmp2_real_walk);
59 PHP_FUNCTION(snmp2_set);
60 
61 PHP_FUNCTION(snmp3_get);
62 PHP_FUNCTION(snmp3_getnext);
63 PHP_FUNCTION(snmp3_walk);
64 PHP_FUNCTION(snmp3_real_walk);
65 PHP_FUNCTION(snmp3_set);
66 
67 PHP_FUNCTION(snmp_set_valueretrieval);
68 PHP_FUNCTION(snmp_get_valueretrieval);
69 
70 PHP_FUNCTION(snmp_read_mib);
71 
72 
73 ZEND_BEGIN_MODULE_GLOBALS(snmp)
74       int valueretrieval;
75 ZEND_END_MODULE_GLOBALS(snmp)
76 
77 #ifdef ZTS
78 #define SNMP_G(v) TSRMG(snmp_globals_id, zend_snmp_globals *, v)
79 #else
80 #define SNMP_G(v) (snmp_globals.v)
81 #endif
82 
83 #else
84 
85 #define snmp_module_ptr NULL
86 
87 #endif /* HAVE_SNMP */
88 
89 #define phpext_snmp_ptr snmp_module_ptr
90 
91 #endif  /* PHP_SNMP_H */
92