summaryrefslogtreecommitdiff
path: root/ext/snmp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/snmp')
-rw-r--r--ext/snmp/php_snmp.h4
-rw-r--r--ext/snmp/snmp.c178
2 files changed, 91 insertions, 91 deletions
diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h
index a3293e370f..6e170ffe71 100644
--- a/ext/snmp/php_snmp.h
+++ b/ext/snmp/php_snmp.h
@@ -132,8 +132,8 @@ ZEND_END_MODULE_GLOBALS(snmp)
#define SNMP_G(v) (snmp_globals.v)
#endif
-#define REGISTER_SNMP_CLASS_CONST_INT(const_name, value) \
- zend_declare_class_constant_int(php_snmp_ce, const_name, sizeof(const_name)-1, (php_int_t)value TSRMLS_CC);
+#define REGISTER_SNMP_CLASS_CONST_LONG(const_name, value) \
+ zend_declare_class_constant_long(php_snmp_ce, const_name, sizeof(const_name)-1, (zend_long)value TSRMLS_CC);
#else
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 2d6afc43d4..bfd77d5b29 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -376,8 +376,8 @@ struct objid_query {
int count;
int offset;
int step;
- php_int_t non_repeaters;
- php_int_t max_repetitions;
+ zend_long non_repeaters;
+ zend_long max_repetitions;
int valueretrieval;
int array_output;
int oid_increasing_check;
@@ -680,7 +680,7 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval TSRMLS_D
if (valueretrieval & SNMP_VALUE_OBJECT) {
object_init(snmpval);
- add_property_int(snmpval, "type", vars->type);
+ add_property_long(snmpval, "type", vars->type);
add_property_zval(snmpval, "value", &val);
} else {
ZVAL_COPY(snmpval, &val);
@@ -1014,8 +1014,8 @@ static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_qu
objid_query->vars[objid_query->count].oid = Z_STRVAL_P(oid);
if (st & SNMP_CMD_SET) {
if (Z_TYPE_P(type) == IS_STRING && Z_TYPE_P(value) == IS_STRING) {
- if (Z_STRSIZE_P(type) != 1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bogus type '%s', should be single char, got %u", Z_STRVAL_P(type), Z_STRSIZE_P(type));
+ if (Z_STRLEN_P(type) != 1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bogus type '%s', should be single char, got %u", Z_STRVAL_P(type), Z_STRLEN_P(type));
efree(objid_query->vars);
return FALSE;
}
@@ -1054,8 +1054,8 @@ static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_qu
} else if (Z_TYPE_P(type) == IS_ARRAY) {
if ((tmp_type = zend_hash_get_current_data_ex(Z_ARRVAL_P(type), &pos_type)) != NULL) {
convert_to_string_ex(tmp_type);
- if (Z_STRSIZE_P(tmp_type) != 1) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s': bogus type '%s', should be single char, got %u", Z_STRVAL_P(tmp_oid), Z_STRVAL_P(tmp_type), Z_STRSIZE_P(tmp_type));
+ if (Z_STRLEN_P(tmp_type) != 1) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%s': bogus type '%s', should be single char, got %u", Z_STRVAL_P(tmp_oid), Z_STRVAL_P(tmp_type), Z_STRLEN_P(tmp_type));
efree(objid_query->vars);
return FALSE;
}
@@ -1429,8 +1429,8 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
char *a1, *a2, *a3, *a4, *a5, *a6, *a7;
int a1_len, a2_len, a3_len, a4_len, a5_len, a6_len, a7_len;
zend_bool use_orignames = 0, suffix_keys = 0;
- php_int_t timeout = SNMP_DEFAULT_TIMEOUT;
- php_int_t retries = SNMP_DEFAULT_RETRIES;
+ zend_long timeout = SNMP_DEFAULT_TIMEOUT;
+ zend_long retries = SNMP_DEFAULT_RETRIES;
int argc = ZEND_NUM_ARGS();
struct objid_query objid_query;
php_snmp_session *session;
@@ -1446,7 +1446,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
if (session_less_mode) {
if (version == SNMP_VERSION_3) {
if (st & SNMP_CMD_SET) {
- if (zend_parse_parameters(argc TSRMLS_CC, "ssssssszzz|ii", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
+ if (zend_parse_parameters(argc TSRMLS_CC, "ssssssszzz|ll", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
RETURN_FALSE;
}
@@ -1455,14 +1455,14 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
* SNMP_CMD_GETNEXT
* SNMP_CMD_WALK
*/
- if (zend_parse_parameters(argc TSRMLS_CC, "sssssssz|ii", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
+ if (zend_parse_parameters(argc TSRMLS_CC, "sssssssz|ll", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len, &oid, &timeout, &retries) == FAILURE) {
RETURN_FALSE;
}
}
} else {
if (st & SNMP_CMD_SET) {
- if (zend_parse_parameters(argc TSRMLS_CC, "sszzz|ii", &a1, &a1_len, &a2, &a2_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "sszzz|ll", &a1, &a1_len, &a2, &a2_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
RETURN_FALSE;
}
} else {
@@ -1470,7 +1470,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
* SNMP_CMD_GETNEXT
* SNMP_CMD_WALK
*/
- if (zend_parse_parameters(argc TSRMLS_CC, "ssz|ii", &a1, &a1_len, &a2, &a2_len, &oid, &timeout, &retries) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "ssz|ll", &a1, &a1_len, &a2, &a2_len, &oid, &timeout, &retries) == FAILURE) {
RETURN_FALSE;
}
}
@@ -1481,7 +1481,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
RETURN_FALSE;
}
} else if (st & SNMP_CMD_WALK) {
- if (zend_parse_parameters(argc TSRMLS_CC, "z|bii", &oid, &suffix_keys, &(objid_query.max_repetitions), &(objid_query.non_repeaters)) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "z|bll", &oid, &suffix_keys, &(objid_query.max_repetitions), &(objid_query.non_repeaters)) == FAILURE) {
RETURN_FALSE;
}
if (suffix_keys) {
@@ -1619,9 +1619,9 @@ PHP_FUNCTION(snmp_get_quick_print)
Return all objects including their respective object id withing the specified one */
PHP_FUNCTION(snmp_set_quick_print)
{
- php_int_t a1;
+ zend_long a1;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &a1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &a1) == FAILURE) {
RETURN_FALSE;
}
@@ -1634,9 +1634,9 @@ PHP_FUNCTION(snmp_set_quick_print)
Return all values that are enums with their enum value instead of the raw integer */
PHP_FUNCTION(snmp_set_enum_print)
{
- php_int_t a1;
+ zend_long a1;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &a1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &a1) == FAILURE) {
RETURN_FALSE;
}
@@ -1649,9 +1649,9 @@ PHP_FUNCTION(snmp_set_enum_print)
Set the OID output format. */
PHP_FUNCTION(snmp_set_oid_output_format)
{
- php_int_t a1;
+ zend_long a1;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &a1) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &a1) == FAILURE) {
RETURN_FALSE;
}
@@ -1757,9 +1757,9 @@ PHP_FUNCTION(snmp3_set)
Specify the method how the SNMP values will be returned */
PHP_FUNCTION(snmp_set_valueretrieval)
{
- php_int_t method;
+ zend_long method;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &method) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method) == FAILURE) {
RETURN_FALSE;
}
@@ -1781,7 +1781,7 @@ PHP_FUNCTION(snmp_get_valueretrieval)
RETURN_FALSE;
}
- RETURN_INT(SNMP_G(valueretrieval));
+ RETURN_LONG(SNMP_G(valueretrieval));
}
/* }}} */
@@ -1813,16 +1813,16 @@ PHP_METHOD(snmp, __construct)
zval *object = getThis();
char *a1, *a2;
int a1_len, a2_len;
- php_int_t timeout = SNMP_DEFAULT_TIMEOUT;
- php_int_t retries = SNMP_DEFAULT_RETRIES;
- php_int_t version = SNMP_DEFAULT_VERSION;
+ zend_long timeout = SNMP_DEFAULT_TIMEOUT;
+ zend_long retries = SNMP_DEFAULT_RETRIES;
+ zend_long version = SNMP_DEFAULT_VERSION;
int argc = ZEND_NUM_ARGS();
zend_error_handling error_handling;
snmp_object = Z_SNMP_P(object);
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
- if (zend_parse_parameters(argc TSRMLS_CC, "iss|ii", &version, &a1, &a1_len, &a2, &a2_len, &timeout, &retries) == FAILURE) {
+ if (zend_parse_parameters(argc TSRMLS_CC, "lss|ll", &version, &a1, &a1_len, &a2, &a2_len, &timeout, &retries) == FAILURE) {
zend_restore_error_handling(&error_handling TSRMLS_CC);
return;
}
@@ -1942,7 +1942,7 @@ PHP_METHOD(snmp, getErrno)
snmp_object = Z_SNMP_P(object);
- RETVAL_INT(snmp_object->snmp_errno);
+ RETVAL_LONG(snmp_object->snmp_errno);
return;
}
/* }}} */
@@ -2097,7 +2097,7 @@ static HashTable *php_snmp_get_properties(zval *object TSRMLS_DC)
HashTable *props;
zval rv;
zend_string *key;
- php_uint_t num_key;
+ zend_ulong num_key;
obj = Z_SNMP_P(object);
props = zend_std_get_properties(object TSRMLS_CC);
@@ -2127,13 +2127,13 @@ static int php_snmp_read_info(php_snmp_object *snmp_object, zval *retval TSRMLS_
ZVAL_STRINGL(&val, snmp_object->session->peername, strlen(snmp_object->session->peername));
add_assoc_zval(retval, "hostname", &val);
- ZVAL_INT(&val, snmp_object->session->remote_port);
+ ZVAL_LONG(&val, snmp_object->session->remote_port);
add_assoc_zval(retval, "port", &val);
- ZVAL_INT(&val, snmp_object->session->timeout);
+ ZVAL_LONG(&val, snmp_object->session->timeout);
add_assoc_zval(retval, "timeout", &val);
- ZVAL_INT(&val, snmp_object->session->retries);
+ ZVAL_LONG(&val, snmp_object->session->retries);
add_assoc_zval(retval, "retries", &val);
return SUCCESS;
@@ -2144,7 +2144,7 @@ static int php_snmp_read_info(php_snmp_object *snmp_object, zval *retval TSRMLS_
static int php_snmp_read_max_oids(php_snmp_object *snmp_object, zval *retval TSRMLS_DC)
{
if (snmp_object->max_oids > 0) {
- ZVAL_INT(retval, snmp_object->max_oids);
+ ZVAL_LONG(retval, snmp_object->max_oids);
} else {
ZVAL_NULL(retval);
}
@@ -2163,16 +2163,16 @@ PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION(oid_increasing_check)
PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION(quick_print)
PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION(enum_print)
-#define PHP_SNMP_INT_PROPERTY_READER_FUNCTION(name) \
+#define PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(name) \
static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval TSRMLS_DC) \
{ \
- ZVAL_INT(retval, snmp_object->name); \
+ ZVAL_LONG(retval, snmp_object->name); \
return SUCCESS; \
}
-PHP_SNMP_INT_PROPERTY_READER_FUNCTION(valueretrieval)
-PHP_SNMP_INT_PROPERTY_READER_FUNCTION(oid_output_format)
-PHP_SNMP_INT_PROPERTY_READER_FUNCTION(exceptions_enabled)
+PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(valueretrieval)
+PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(oid_output_format)
+PHP_SNMP_LONG_PROPERTY_READER_FUNCTION(exceptions_enabled)
/* {{{ */
static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval TSRMLS_DC)
@@ -2193,17 +2193,17 @@ static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval TS
return ret;
}
- if (Z_TYPE_P(newval) != IS_INT) {
+ if (Z_TYPE_P(newval) != IS_LONG) {
ztmp = *newval;
zval_copy_ctor(&ztmp);
convert_to_int(&ztmp);
newval = &ztmp;
}
- if (Z_IVAL_P(newval) > 0) {
- snmp_object->max_oids = Z_IVAL_P(newval);
+ if (Z_LVAL_P(newval) > 0) {
+ snmp_object->max_oids = Z_LVAL_P(newval);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "max_oids should be positive integer or NULL, got %pd", Z_IVAL_P(newval));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "max_oids should be positive integer or NULL, got %pd", Z_LVAL_P(newval));
}
if (newval == &ztmp) {
@@ -2220,17 +2220,17 @@ static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *new
zval ztmp;
int ret = SUCCESS;
- if (Z_TYPE_P(newval) != IS_INT) {
+ if (Z_TYPE_P(newval) != IS_LONG) {
ztmp = *newval;
zval_copy_ctor(&ztmp);
convert_to_int(&ztmp);
newval = &ztmp;
}
- if (Z_IVAL_P(newval) >= 0 && Z_IVAL_P(newval) <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT)) {
- snmp_object->valueretrieval = Z_IVAL_P(newval);
+ if (Z_LVAL_P(newval) >= 0 && Z_LVAL_P(newval) <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT)) {
+ snmp_object->valueretrieval = Z_LVAL_P(newval);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown SNMP value retrieval method '%pd'", Z_IVAL_P(newval));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown SNMP value retrieval method '%pd'", Z_LVAL_P(newval));
ret = FAILURE;
}
@@ -2264,23 +2264,23 @@ static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *
{
zval ztmp;
int ret = SUCCESS;
- if (Z_TYPE_P(newval) != IS_INT) {
+ if (Z_TYPE_P(newval) != IS_LONG) {
ZVAL_COPY(&ztmp, newval);
convert_to_int(&ztmp);
newval = &ztmp;
}
- switch(Z_IVAL_P(newval)) {
+ switch(Z_LVAL_P(newval)) {
case NETSNMP_OID_OUTPUT_SUFFIX:
case NETSNMP_OID_OUTPUT_MODULE:
case NETSNMP_OID_OUTPUT_FULL:
case NETSNMP_OID_OUTPUT_NUMERIC:
case NETSNMP_OID_OUTPUT_UCD:
case NETSNMP_OID_OUTPUT_NONE:
- snmp_object->oid_output_format = Z_IVAL_P(newval);
+ snmp_object->oid_output_format = Z_LVAL_P(newval);
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown SNMP output print format '%pd'", Z_IVAL_P(newval));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown SNMP output print format '%pd'", Z_LVAL_P(newval));
ret = FAILURE;
break;
}
@@ -2297,13 +2297,13 @@ static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval
{
zval ztmp;
int ret = SUCCESS;
- if (Z_TYPE_P(newval) != IS_INT) {
+ if (Z_TYPE_P(newval) != IS_LONG) {
ZVAL_COPY(&ztmp, newval);
convert_to_int(&ztmp);
newval = &ztmp;
}
- snmp_object->exceptions_enabled = Z_IVAL_P(newval);
+ snmp_object->exceptions_enabled = Z_LVAL_P(newval);
if (newval == &ztmp) {
zval_ptr_dtor(newval);
@@ -2391,43 +2391,43 @@ PHP_MINIT_FUNCTION(snmp)
zend_hash_init(&php_snmp_properties, 0, NULL, free_php_snmp_properties, 1);
PHP_SNMP_ADD_PROPERTIES(&php_snmp_properties, php_snmp_property_entries);
- REGISTER_INT_CONSTANT("SNMP_OID_OUTPUT_SUFFIX", NETSNMP_OID_OUTPUT_SUFFIX, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OID_OUTPUT_MODULE", NETSNMP_OID_OUTPUT_MODULE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OID_OUTPUT_FULL", NETSNMP_OID_OUTPUT_FULL, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OID_OUTPUT_NUMERIC", NETSNMP_OID_OUTPUT_NUMERIC, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OID_OUTPUT_UCD", NETSNMP_OID_OUTPUT_UCD, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OID_OUTPUT_NONE", NETSNMP_OID_OUTPUT_NONE, CONST_CS | CONST_PERSISTENT);
-
- REGISTER_INT_CONSTANT("SNMP_VALUE_LIBRARY", SNMP_VALUE_LIBRARY, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_VALUE_PLAIN", SNMP_VALUE_PLAIN, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_VALUE_OBJECT", SNMP_VALUE_OBJECT, CONST_CS | CONST_PERSISTENT);
-
- REGISTER_INT_CONSTANT("SNMP_BIT_STR", ASN_BIT_STR, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OCTET_STR", ASN_OCTET_STR, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OPAQUE", ASN_OPAQUE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_NULL", ASN_NULL, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_OBJECT_ID", ASN_OBJECT_ID, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_IPADDRESS", ASN_IPADDRESS, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_COUNTER", ASN_GAUGE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_UNSIGNED", ASN_UNSIGNED, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_TIMETICKS", ASN_TIMETICKS, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_UINTEGER", ASN_UINTEGER, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_INTEGER", ASN_INTEGER, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SNMP_COUNTER64", ASN_COUNTER64, CONST_CS | CONST_PERSISTENT);
-
- REGISTER_SNMP_CLASS_CONST_INT("VERSION_1", SNMP_VERSION_1);
- REGISTER_SNMP_CLASS_CONST_INT("VERSION_2c", SNMP_VERSION_2c);
- REGISTER_SNMP_CLASS_CONST_INT("VERSION_2C", SNMP_VERSION_2c);
- REGISTER_SNMP_CLASS_CONST_INT("VERSION_3", SNMP_VERSION_3);
-
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_NOERROR", PHP_SNMP_ERRNO_NOERROR);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_ANY", PHP_SNMP_ERRNO_ANY);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_GENERIC", PHP_SNMP_ERRNO_GENERIC);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_TIMEOUT", PHP_SNMP_ERRNO_TIMEOUT);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_ERROR_IN_REPLY", PHP_SNMP_ERRNO_ERROR_IN_REPLY);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_OID_NOT_INCREASING", PHP_SNMP_ERRNO_OID_NOT_INCREASING);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_OID_PARSING_ERROR", PHP_SNMP_ERRNO_OID_PARSING_ERROR);
- REGISTER_SNMP_CLASS_CONST_INT("ERRNO_MULTIPLE_SET_QUERIES", PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES);
+ REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_SUFFIX", NETSNMP_OID_OUTPUT_SUFFIX, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_MODULE", NETSNMP_OID_OUTPUT_MODULE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_FULL", NETSNMP_OID_OUTPUT_FULL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_NUMERIC", NETSNMP_OID_OUTPUT_NUMERIC, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_UCD", NETSNMP_OID_OUTPUT_UCD, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OID_OUTPUT_NONE", NETSNMP_OID_OUTPUT_NONE, CONST_CS | CONST_PERSISTENT);
+
+ REGISTER_LONG_CONSTANT("SNMP_VALUE_LIBRARY", SNMP_VALUE_LIBRARY, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_VALUE_PLAIN", SNMP_VALUE_PLAIN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_VALUE_OBJECT", SNMP_VALUE_OBJECT, CONST_CS | CONST_PERSISTENT);
+
+ REGISTER_LONG_CONSTANT("SNMP_BIT_STR", ASN_BIT_STR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OCTET_STR", ASN_OCTET_STR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OPAQUE", ASN_OPAQUE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_NULL", ASN_NULL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_OBJECT_ID", ASN_OBJECT_ID, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_IPADDRESS", ASN_IPADDRESS, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_COUNTER", ASN_GAUGE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_UNSIGNED", ASN_UNSIGNED, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_TIMETICKS", ASN_TIMETICKS, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_UINTEGER", ASN_UINTEGER, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_INTEGER", ASN_INTEGER, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SNMP_COUNTER64", ASN_COUNTER64, CONST_CS | CONST_PERSISTENT);
+
+ REGISTER_SNMP_CLASS_CONST_LONG("VERSION_1", SNMP_VERSION_1);
+ REGISTER_SNMP_CLASS_CONST_LONG("VERSION_2c", SNMP_VERSION_2c);
+ REGISTER_SNMP_CLASS_CONST_LONG("VERSION_2C", SNMP_VERSION_2c);
+ REGISTER_SNMP_CLASS_CONST_LONG("VERSION_3", SNMP_VERSION_3);
+
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_NOERROR", PHP_SNMP_ERRNO_NOERROR);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_ANY", PHP_SNMP_ERRNO_ANY);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_GENERIC", PHP_SNMP_ERRNO_GENERIC);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_TIMEOUT", PHP_SNMP_ERRNO_TIMEOUT);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_ERROR_IN_REPLY", PHP_SNMP_ERRNO_ERROR_IN_REPLY);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_OID_NOT_INCREASING", PHP_SNMP_ERRNO_OID_NOT_INCREASING);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_OID_PARSING_ERROR", PHP_SNMP_ERRNO_OID_PARSING_ERROR);
+ REGISTER_SNMP_CLASS_CONST_LONG("ERRNO_MULTIPLE_SET_QUERIES", PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES);
/* Register SNMPException class */
INIT_CLASS_ENTRY(cex, "SNMPException", NULL);