xref: /PHP-8.3/ext/snmp/snmp_arginfo.h (revision 67ab2b7d)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 449ae0af39f24f3e5696b88a30d2a440628c409b */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmpget, 0, 3, IS_MIXED, 0)
5 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
6 	ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0)
7 	ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
8 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
10 ZEND_END_ARG_INFO()
11 
12 #define arginfo_snmpgetnext arginfo_snmpget
13 
14 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmpwalk, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
15 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
16 	ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0)
17 	ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
18 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
19 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
20 ZEND_END_ARG_INFO()
21 
22 #define arginfo_snmprealwalk arginfo_snmpwalk
23 
24 #define arginfo_snmpwalkoid arginfo_snmpwalk
25 
26 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmpset, 0, 5, _IS_BOOL, 0)
27 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
28 	ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0)
29 	ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
30 	ZEND_ARG_TYPE_MASK(0, type, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
31 	ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
32 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
33 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
34 ZEND_END_ARG_INFO()
35 
36 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_get_quick_print, 0, 0, _IS_BOOL, 0)
37 ZEND_END_ARG_INFO()
38 
39 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_set_quick_print, 0, 1, IS_TRUE, 0)
40 	ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0)
41 ZEND_END_ARG_INFO()
42 
43 #define arginfo_snmp_set_enum_print arginfo_snmp_set_quick_print
44 
45 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_set_oid_output_format, 0, 1, IS_TRUE, 0)
46 	ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0)
47 ZEND_END_ARG_INFO()
48 
49 #define arginfo_snmp_set_oid_numeric_print arginfo_snmp_set_oid_output_format
50 
51 #define arginfo_snmp2_get arginfo_snmpget
52 
53 #define arginfo_snmp2_getnext arginfo_snmpget
54 
55 #define arginfo_snmp2_walk arginfo_snmpwalk
56 
57 #define arginfo_snmp2_real_walk arginfo_snmpwalk
58 
59 #define arginfo_snmp2_set arginfo_snmpset
60 
61 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp3_get, 0, 8, IS_MIXED, 0)
62 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
63 	ZEND_ARG_TYPE_INFO(0, security_name, IS_STRING, 0)
64 	ZEND_ARG_TYPE_INFO(0, security_level, IS_STRING, 0)
65 	ZEND_ARG_TYPE_INFO(0, auth_protocol, IS_STRING, 0)
66 	ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0)
67 	ZEND_ARG_TYPE_INFO(0, privacy_protocol, IS_STRING, 0)
68 	ZEND_ARG_TYPE_INFO(0, privacy_passphrase, IS_STRING, 0)
69 	ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
70 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
71 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
72 ZEND_END_ARG_INFO()
73 
74 #define arginfo_snmp3_getnext arginfo_snmp3_get
75 
76 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_snmp3_walk, 0, 8, MAY_BE_ARRAY|MAY_BE_FALSE)
77 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
78 	ZEND_ARG_TYPE_INFO(0, security_name, IS_STRING, 0)
79 	ZEND_ARG_TYPE_INFO(0, security_level, IS_STRING, 0)
80 	ZEND_ARG_TYPE_INFO(0, auth_protocol, IS_STRING, 0)
81 	ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0)
82 	ZEND_ARG_TYPE_INFO(0, privacy_protocol, IS_STRING, 0)
83 	ZEND_ARG_TYPE_INFO(0, privacy_passphrase, IS_STRING, 0)
84 	ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
85 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
86 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
87 ZEND_END_ARG_INFO()
88 
89 #define arginfo_snmp3_real_walk arginfo_snmp3_walk
90 
91 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp3_set, 0, 10, _IS_BOOL, 0)
92 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
93 	ZEND_ARG_TYPE_INFO(0, security_name, IS_STRING, 0)
94 	ZEND_ARG_TYPE_INFO(0, security_level, IS_STRING, 0)
95 	ZEND_ARG_TYPE_INFO(0, auth_protocol, IS_STRING, 0)
96 	ZEND_ARG_TYPE_INFO(0, auth_passphrase, IS_STRING, 0)
97 	ZEND_ARG_TYPE_INFO(0, privacy_protocol, IS_STRING, 0)
98 	ZEND_ARG_TYPE_INFO(0, privacy_passphrase, IS_STRING, 0)
99 	ZEND_ARG_TYPE_MASK(0, object_id, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
100 	ZEND_ARG_TYPE_MASK(0, type, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
101 	ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
102 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
103 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
104 ZEND_END_ARG_INFO()
105 
106 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_set_valueretrieval, 0, 1, IS_TRUE, 0)
107 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
108 ZEND_END_ARG_INFO()
109 
110 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_get_valueretrieval, 0, 0, IS_LONG, 0)
111 ZEND_END_ARG_INFO()
112 
113 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_read_mib, 0, 1, _IS_BOOL, 0)
114 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
115 ZEND_END_ARG_INFO()
116 
117 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SNMP___construct, 0, 0, 3)
118 	ZEND_ARG_TYPE_INFO(0, version, IS_LONG, 0)
119 	ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
120 	ZEND_ARG_TYPE_INFO(0, community, IS_STRING, 0)
121 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timeout, IS_LONG, 0, "-1")
122 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retries, IS_LONG, 0, "-1")
123 ZEND_END_ARG_INFO()
124 
125 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_close, 0, 0, _IS_BOOL, 0)
126 ZEND_END_ARG_INFO()
127 
128 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_setSecurity, 0, 1, _IS_BOOL, 0)
129 	ZEND_ARG_TYPE_INFO(0, securityLevel, IS_STRING, 0)
130 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authProtocol, IS_STRING, 0, "\"\"")
131 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authPassphrase, IS_STRING, 0, "\"\"")
132 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, privacyProtocol, IS_STRING, 0, "\"\"")
133 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, privacyPassphrase, IS_STRING, 0, "\"\"")
134 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, contextName, IS_STRING, 0, "\"\"")
135 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, contextEngineId, IS_STRING, 0, "\"\"")
136 ZEND_END_ARG_INFO()
137 
138 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_get, 0, 1, IS_MIXED, 0)
139 	ZEND_ARG_TYPE_MASK(0, objectId, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
140 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preserveKeys, _IS_BOOL, 0, "false")
141 ZEND_END_ARG_INFO()
142 
143 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_getnext, 0, 1, IS_MIXED, 0)
144 	ZEND_ARG_TYPE_MASK(0, objectId, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
145 ZEND_END_ARG_INFO()
146 
147 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SNMP_walk, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
148 	ZEND_ARG_TYPE_MASK(0, objectId, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
149 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, suffixAsKey, _IS_BOOL, 0, "false")
150 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxRepetitions, IS_LONG, 0, "-1")
151 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nonRepeaters, IS_LONG, 0, "-1")
152 ZEND_END_ARG_INFO()
153 
154 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_set, 0, 3, _IS_BOOL, 0)
155 	ZEND_ARG_TYPE_MASK(0, objectId, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
156 	ZEND_ARG_TYPE_MASK(0, type, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
157 	ZEND_ARG_TYPE_MASK(0, value, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
158 ZEND_END_ARG_INFO()
159 
160 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_getErrno, 0, 0, IS_LONG, 0)
161 ZEND_END_ARG_INFO()
162 
163 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SNMP_getError, 0, 0, IS_STRING, 0)
164 ZEND_END_ARG_INFO()
165 
166 
167 ZEND_FUNCTION(snmpget);
168 ZEND_FUNCTION(snmpgetnext);
169 ZEND_FUNCTION(snmpwalk);
170 ZEND_FUNCTION(snmprealwalk);
171 ZEND_FUNCTION(snmpset);
172 ZEND_FUNCTION(snmp_get_quick_print);
173 ZEND_FUNCTION(snmp_set_quick_print);
174 ZEND_FUNCTION(snmp_set_enum_print);
175 ZEND_FUNCTION(snmp_set_oid_output_format);
176 ZEND_FUNCTION(snmp2_get);
177 ZEND_FUNCTION(snmp2_getnext);
178 ZEND_FUNCTION(snmp2_walk);
179 ZEND_FUNCTION(snmp2_real_walk);
180 ZEND_FUNCTION(snmp2_set);
181 ZEND_FUNCTION(snmp3_get);
182 ZEND_FUNCTION(snmp3_getnext);
183 ZEND_FUNCTION(snmp3_walk);
184 ZEND_FUNCTION(snmp3_real_walk);
185 ZEND_FUNCTION(snmp3_set);
186 ZEND_FUNCTION(snmp_set_valueretrieval);
187 ZEND_FUNCTION(snmp_get_valueretrieval);
188 ZEND_FUNCTION(snmp_read_mib);
189 ZEND_METHOD(SNMP, __construct);
190 ZEND_METHOD(SNMP, close);
191 ZEND_METHOD(SNMP, setSecurity);
192 ZEND_METHOD(SNMP, get);
193 ZEND_METHOD(SNMP, getnext);
194 ZEND_METHOD(SNMP, walk);
195 ZEND_METHOD(SNMP, set);
196 ZEND_METHOD(SNMP, getErrno);
197 ZEND_METHOD(SNMP, getError);
198 
199 
200 static const zend_function_entry ext_functions[] = {
201 	ZEND_FE(snmpget, arginfo_snmpget)
202 	ZEND_FE(snmpgetnext, arginfo_snmpgetnext)
203 	ZEND_FE(snmpwalk, arginfo_snmpwalk)
204 	ZEND_FE(snmprealwalk, arginfo_snmprealwalk)
205 	ZEND_FALIAS(snmpwalkoid, snmprealwalk, arginfo_snmpwalkoid)
206 	ZEND_FE(snmpset, arginfo_snmpset)
207 	ZEND_FE(snmp_get_quick_print, arginfo_snmp_get_quick_print)
208 	ZEND_FE(snmp_set_quick_print, arginfo_snmp_set_quick_print)
209 	ZEND_FE(snmp_set_enum_print, arginfo_snmp_set_enum_print)
210 	ZEND_FE(snmp_set_oid_output_format, arginfo_snmp_set_oid_output_format)
211 	ZEND_FALIAS(snmp_set_oid_numeric_print, snmp_set_oid_output_format, arginfo_snmp_set_oid_numeric_print)
212 	ZEND_FE(snmp2_get, arginfo_snmp2_get)
213 	ZEND_FE(snmp2_getnext, arginfo_snmp2_getnext)
214 	ZEND_FE(snmp2_walk, arginfo_snmp2_walk)
215 	ZEND_FE(snmp2_real_walk, arginfo_snmp2_real_walk)
216 	ZEND_FE(snmp2_set, arginfo_snmp2_set)
217 	ZEND_FE(snmp3_get, arginfo_snmp3_get)
218 	ZEND_FE(snmp3_getnext, arginfo_snmp3_getnext)
219 	ZEND_FE(snmp3_walk, arginfo_snmp3_walk)
220 	ZEND_FE(snmp3_real_walk, arginfo_snmp3_real_walk)
221 	ZEND_FE(snmp3_set, arginfo_snmp3_set)
222 	ZEND_FE(snmp_set_valueretrieval, arginfo_snmp_set_valueretrieval)
223 	ZEND_FE(snmp_get_valueretrieval, arginfo_snmp_get_valueretrieval)
224 	ZEND_FE(snmp_read_mib, arginfo_snmp_read_mib)
225 	ZEND_FE_END
226 };
227 
228 
229 static const zend_function_entry class_SNMP_methods[] = {
230 	ZEND_ME(SNMP, __construct, arginfo_class_SNMP___construct, ZEND_ACC_PUBLIC)
231 	ZEND_ME(SNMP, close, arginfo_class_SNMP_close, ZEND_ACC_PUBLIC)
232 	ZEND_ME(SNMP, setSecurity, arginfo_class_SNMP_setSecurity, ZEND_ACC_PUBLIC)
233 	ZEND_ME(SNMP, get, arginfo_class_SNMP_get, ZEND_ACC_PUBLIC)
234 	ZEND_ME(SNMP, getnext, arginfo_class_SNMP_getnext, ZEND_ACC_PUBLIC)
235 	ZEND_ME(SNMP, walk, arginfo_class_SNMP_walk, ZEND_ACC_PUBLIC)
236 	ZEND_ME(SNMP, set, arginfo_class_SNMP_set, ZEND_ACC_PUBLIC)
237 	ZEND_ME(SNMP, getErrno, arginfo_class_SNMP_getErrno, ZEND_ACC_PUBLIC)
238 	ZEND_ME(SNMP, getError, arginfo_class_SNMP_getError, ZEND_ACC_PUBLIC)
239 	ZEND_FE_END
240 };
241 
242 
243 static const zend_function_entry class_SNMPException_methods[] = {
244 	ZEND_FE_END
245 };
246 
register_snmp_symbols(int module_number)247 static void register_snmp_symbols(int module_number)
248 {
249 	REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_SUFFIX", NETSNMP_OID_OUTPUT_SUFFIX, CONST_PERSISTENT);
250 	REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_MODULE", NETSNMP_OID_OUTPUT_MODULE, CONST_PERSISTENT);
251 	REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_FULL", NETSNMP_OID_OUTPUT_FULL, CONST_PERSISTENT);
252 	REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_NUMERIC", NETSNMP_OID_OUTPUT_NUMERIC, CONST_PERSISTENT);
253 	REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_UCD", NETSNMP_OID_OUTPUT_UCD, CONST_PERSISTENT);
254 	REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_NONE", NETSNMP_OID_OUTPUT_NONE, CONST_PERSISTENT);
255 	REGISTER_LONG_CONSTANT("SNMP_VALUE_LIBRARY", SNMP_VALUE_LIBRARY, CONST_PERSISTENT);
256 	REGISTER_LONG_CONSTANT("SNMP_VALUE_PLAIN", SNMP_VALUE_PLAIN, CONST_PERSISTENT);
257 	REGISTER_LONG_CONSTANT("SNMP_VALUE_OBJECT", SNMP_VALUE_OBJECT, CONST_PERSISTENT);
258 	REGISTER_LONG_CONSTANT("SNMP_BIT_STR", ASN_BIT_STR, CONST_PERSISTENT);
259 	REGISTER_LONG_CONSTANT("SNMP_OCTET_STR", ASN_OCTET_STR, CONST_PERSISTENT);
260 	REGISTER_LONG_CONSTANT("SNMP_OPAQUE", ASN_OPAQUE, CONST_PERSISTENT);
261 	REGISTER_LONG_CONSTANT("SNMP_NULL", ASN_NULL, CONST_PERSISTENT);
262 	REGISTER_LONG_CONSTANT("SNMP_OBJECT_ID", ASN_OBJECT_ID, CONST_PERSISTENT);
263 	REGISTER_LONG_CONSTANT("SNMP_IPADDRESS", ASN_IPADDRESS, CONST_PERSISTENT);
264 	REGISTER_LONG_CONSTANT("SNMP_COUNTER", ASN_GAUGE, CONST_PERSISTENT);
265 	REGISTER_LONG_CONSTANT("SNMP_UNSIGNED", ASN_UNSIGNED, CONST_PERSISTENT);
266 	REGISTER_LONG_CONSTANT("SNMP_TIMETICKS", ASN_TIMETICKS, CONST_PERSISTENT);
267 	REGISTER_LONG_CONSTANT("SNMP_UINTEGER", ASN_UINTEGER, CONST_PERSISTENT);
268 	REGISTER_LONG_CONSTANT("SNMP_INTEGER", ASN_INTEGER, CONST_PERSISTENT);
269 	REGISTER_LONG_CONSTANT("SNMP_COUNTER64", ASN_COUNTER64, CONST_PERSISTENT);
270 }
271 
register_class_SNMP(void)272 static zend_class_entry *register_class_SNMP(void)
273 {
274 	zend_class_entry ce, *class_entry;
275 
276 	INIT_CLASS_ENTRY(ce, "SNMP", class_SNMP_methods);
277 	class_entry = zend_register_internal_class_ex(&ce, NULL);
278 
279 	zval const_VERSION_1_value;
280 	ZVAL_LONG(&const_VERSION_1_value, SNMP_VERSION_1);
281 	zend_string *const_VERSION_1_name = zend_string_init_interned("VERSION_1", sizeof("VERSION_1") - 1, 1);
282 	zend_declare_typed_class_constant(class_entry, const_VERSION_1_name, &const_VERSION_1_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
283 	zend_string_release(const_VERSION_1_name);
284 
285 	zval const_VERSION_2c_value;
286 	ZVAL_LONG(&const_VERSION_2c_value, SNMP_VERSION_2c);
287 	zend_string *const_VERSION_2c_name = zend_string_init_interned("VERSION_2c", sizeof("VERSION_2c") - 1, 1);
288 	zend_declare_typed_class_constant(class_entry, const_VERSION_2c_name, &const_VERSION_2c_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
289 	zend_string_release(const_VERSION_2c_name);
290 
291 	zval const_VERSION_2C_value;
292 	ZVAL_LONG(&const_VERSION_2C_value, SNMP_VERSION_2c);
293 	zend_string *const_VERSION_2C_name = zend_string_init_interned("VERSION_2C", sizeof("VERSION_2C") - 1, 1);
294 	zend_declare_typed_class_constant(class_entry, const_VERSION_2C_name, &const_VERSION_2C_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
295 	zend_string_release(const_VERSION_2C_name);
296 
297 	zval const_VERSION_3_value;
298 	ZVAL_LONG(&const_VERSION_3_value, SNMP_VERSION_3);
299 	zend_string *const_VERSION_3_name = zend_string_init_interned("VERSION_3", sizeof("VERSION_3") - 1, 1);
300 	zend_declare_typed_class_constant(class_entry, const_VERSION_3_name, &const_VERSION_3_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
301 	zend_string_release(const_VERSION_3_name);
302 
303 	zval const_ERRNO_NOERROR_value;
304 	ZVAL_LONG(&const_ERRNO_NOERROR_value, PHP_SNMP_ERRNO_NOERROR);
305 	zend_string *const_ERRNO_NOERROR_name = zend_string_init_interned("ERRNO_NOERROR", sizeof("ERRNO_NOERROR") - 1, 1);
306 	zend_declare_typed_class_constant(class_entry, const_ERRNO_NOERROR_name, &const_ERRNO_NOERROR_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
307 	zend_string_release(const_ERRNO_NOERROR_name);
308 
309 	zval const_ERRNO_ANY_value;
310 	ZVAL_LONG(&const_ERRNO_ANY_value, PHP_SNMP_ERRNO_ANY);
311 	zend_string *const_ERRNO_ANY_name = zend_string_init_interned("ERRNO_ANY", sizeof("ERRNO_ANY") - 1, 1);
312 	zend_declare_typed_class_constant(class_entry, const_ERRNO_ANY_name, &const_ERRNO_ANY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
313 	zend_string_release(const_ERRNO_ANY_name);
314 
315 	zval const_ERRNO_GENERIC_value;
316 	ZVAL_LONG(&const_ERRNO_GENERIC_value, PHP_SNMP_ERRNO_GENERIC);
317 	zend_string *const_ERRNO_GENERIC_name = zend_string_init_interned("ERRNO_GENERIC", sizeof("ERRNO_GENERIC") - 1, 1);
318 	zend_declare_typed_class_constant(class_entry, const_ERRNO_GENERIC_name, &const_ERRNO_GENERIC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
319 	zend_string_release(const_ERRNO_GENERIC_name);
320 
321 	zval const_ERRNO_TIMEOUT_value;
322 	ZVAL_LONG(&const_ERRNO_TIMEOUT_value, PHP_SNMP_ERRNO_TIMEOUT);
323 	zend_string *const_ERRNO_TIMEOUT_name = zend_string_init_interned("ERRNO_TIMEOUT", sizeof("ERRNO_TIMEOUT") - 1, 1);
324 	zend_declare_typed_class_constant(class_entry, const_ERRNO_TIMEOUT_name, &const_ERRNO_TIMEOUT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
325 	zend_string_release(const_ERRNO_TIMEOUT_name);
326 
327 	zval const_ERRNO_ERROR_IN_REPLY_value;
328 	ZVAL_LONG(&const_ERRNO_ERROR_IN_REPLY_value, PHP_SNMP_ERRNO_ERROR_IN_REPLY);
329 	zend_string *const_ERRNO_ERROR_IN_REPLY_name = zend_string_init_interned("ERRNO_ERROR_IN_REPLY", sizeof("ERRNO_ERROR_IN_REPLY") - 1, 1);
330 	zend_declare_typed_class_constant(class_entry, const_ERRNO_ERROR_IN_REPLY_name, &const_ERRNO_ERROR_IN_REPLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
331 	zend_string_release(const_ERRNO_ERROR_IN_REPLY_name);
332 
333 	zval const_ERRNO_OID_NOT_INCREASING_value;
334 	ZVAL_LONG(&const_ERRNO_OID_NOT_INCREASING_value, PHP_SNMP_ERRNO_OID_NOT_INCREASING);
335 	zend_string *const_ERRNO_OID_NOT_INCREASING_name = zend_string_init_interned("ERRNO_OID_NOT_INCREASING", sizeof("ERRNO_OID_NOT_INCREASING") - 1, 1);
336 	zend_declare_typed_class_constant(class_entry, const_ERRNO_OID_NOT_INCREASING_name, &const_ERRNO_OID_NOT_INCREASING_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
337 	zend_string_release(const_ERRNO_OID_NOT_INCREASING_name);
338 
339 	zval const_ERRNO_OID_PARSING_ERROR_value;
340 	ZVAL_LONG(&const_ERRNO_OID_PARSING_ERROR_value, PHP_SNMP_ERRNO_OID_PARSING_ERROR);
341 	zend_string *const_ERRNO_OID_PARSING_ERROR_name = zend_string_init_interned("ERRNO_OID_PARSING_ERROR", sizeof("ERRNO_OID_PARSING_ERROR") - 1, 1);
342 	zend_declare_typed_class_constant(class_entry, const_ERRNO_OID_PARSING_ERROR_name, &const_ERRNO_OID_PARSING_ERROR_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
343 	zend_string_release(const_ERRNO_OID_PARSING_ERROR_name);
344 
345 	zval const_ERRNO_MULTIPLE_SET_QUERIES_value;
346 	ZVAL_LONG(&const_ERRNO_MULTIPLE_SET_QUERIES_value, PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES);
347 	zend_string *const_ERRNO_MULTIPLE_SET_QUERIES_name = zend_string_init_interned("ERRNO_MULTIPLE_SET_QUERIES", sizeof("ERRNO_MULTIPLE_SET_QUERIES") - 1, 1);
348 	zend_declare_typed_class_constant(class_entry, const_ERRNO_MULTIPLE_SET_QUERIES_name, &const_ERRNO_MULTIPLE_SET_QUERIES_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
349 	zend_string_release(const_ERRNO_MULTIPLE_SET_QUERIES_name);
350 
351 	zval property_info_default_value;
352 	ZVAL_UNDEF(&property_info_default_value);
353 	zend_string *property_info_name = zend_string_init("info", sizeof("info") - 1, 1);
354 	zend_declare_typed_property(class_entry, property_info_name, &property_info_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY));
355 	zend_string_release(property_info_name);
356 
357 	zval property_max_oids_default_value;
358 	ZVAL_UNDEF(&property_max_oids_default_value);
359 	zend_string *property_max_oids_name = zend_string_init("max_oids", sizeof("max_oids") - 1, 1);
360 	zend_declare_typed_property(class_entry, property_max_oids_name, &property_max_oids_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_NULL));
361 	zend_string_release(property_max_oids_name);
362 
363 	zval property_valueretrieval_default_value;
364 	ZVAL_UNDEF(&property_valueretrieval_default_value);
365 	zend_string *property_valueretrieval_name = zend_string_init("valueretrieval", sizeof("valueretrieval") - 1, 1);
366 	zend_declare_typed_property(class_entry, property_valueretrieval_name, &property_valueretrieval_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
367 	zend_string_release(property_valueretrieval_name);
368 
369 	zval property_quick_print_default_value;
370 	ZVAL_UNDEF(&property_quick_print_default_value);
371 	zend_string *property_quick_print_name = zend_string_init("quick_print", sizeof("quick_print") - 1, 1);
372 	zend_declare_typed_property(class_entry, property_quick_print_name, &property_quick_print_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_BOOL));
373 	zend_string_release(property_quick_print_name);
374 
375 	zval property_enum_print_default_value;
376 	ZVAL_UNDEF(&property_enum_print_default_value);
377 	zend_string *property_enum_print_name = zend_string_init("enum_print", sizeof("enum_print") - 1, 1);
378 	zend_declare_typed_property(class_entry, property_enum_print_name, &property_enum_print_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_BOOL));
379 	zend_string_release(property_enum_print_name);
380 
381 	zval property_oid_output_format_default_value;
382 	ZVAL_UNDEF(&property_oid_output_format_default_value);
383 	zend_string *property_oid_output_format_name = zend_string_init("oid_output_format", sizeof("oid_output_format") - 1, 1);
384 	zend_declare_typed_property(class_entry, property_oid_output_format_name, &property_oid_output_format_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
385 	zend_string_release(property_oid_output_format_name);
386 
387 	zval property_oid_increasing_check_default_value;
388 	ZVAL_UNDEF(&property_oid_increasing_check_default_value);
389 	zend_string *property_oid_increasing_check_name = zend_string_init("oid_increasing_check", sizeof("oid_increasing_check") - 1, 1);
390 	zend_declare_typed_property(class_entry, property_oid_increasing_check_name, &property_oid_increasing_check_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_BOOL));
391 	zend_string_release(property_oid_increasing_check_name);
392 
393 	zval property_exceptions_enabled_default_value;
394 	ZVAL_UNDEF(&property_exceptions_enabled_default_value);
395 	zend_string *property_exceptions_enabled_name = zend_string_init("exceptions_enabled", sizeof("exceptions_enabled") - 1, 1);
396 	zend_declare_typed_property(class_entry, property_exceptions_enabled_name, &property_exceptions_enabled_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
397 	zend_string_release(property_exceptions_enabled_name);
398 
399 	return class_entry;
400 }
401 
register_class_SNMPException(zend_class_entry * class_entry_RuntimeException)402 static zend_class_entry *register_class_SNMPException(zend_class_entry *class_entry_RuntimeException)
403 {
404 	zend_class_entry ce, *class_entry;
405 
406 	INIT_CLASS_ENTRY(ce, "SNMPException", class_SNMPException_methods);
407 	class_entry = zend_register_internal_class_ex(&ce, class_entry_RuntimeException);
408 
409 	return class_entry;
410 }
411