Lines Matching refs:snmp_object
206 php_snmp_object *snmp_object = NULL; in php_snmp_error() local
209 snmp_object = Z_SNMP_P(object); in php_snmp_error()
211 memset(snmp_object->snmp_errstr, 0, sizeof(snmp_object->snmp_errstr)); in php_snmp_error()
214 vsnprintf(snmp_object->snmp_errstr, sizeof(snmp_object->snmp_errstr) - 1, format, args); in php_snmp_error()
217 snmp_object->snmp_errno = type; in php_snmp_error()
224 if (object && (snmp_object->exceptions_enabled & type)) { in php_snmp_error()
225 zend_throw_exception_ex(php_snmp_exception_ce, type, "%s", snmp_object->snmp_errstr); in php_snmp_error()
1139 php_snmp_object *snmp_object; in php_snmp() local
1265 snmp_object = Z_SNMP_P(object); in php_snmp()
1266 session = snmp_object->session; in php_snmp()
1273 if (snmp_object->max_oids > 0) { in php_snmp()
1274 objid_query.step = snmp_object->max_oids; in php_snmp()
1276 objid_query.max_repetitions = snmp_object->max_oids; in php_snmp()
1279 objid_query.oid_increasing_check = snmp_object->oid_increasing_check; in php_snmp()
1280 objid_query.valueretrieval = snmp_object->valueretrieval; in php_snmp()
1282 …netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM, snmp_object->enum… in php_snmp()
1284 …netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT, snmp_object->quick_print… in php_snmp()
1286 …netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, snmp_object->oid_outpu… in php_snmp()
1528 php_snmp_object *snmp_object; in PHP_METHOD() local
1535 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1552 if (snmp_object->session) { in PHP_METHOD()
1553 netsnmp_session_free(&(snmp_object->session)); in PHP_METHOD()
1556 if (!netsnmp_session_init(&(snmp_object->session), version, a1, a2, timeout, retries)) { in PHP_METHOD()
1559 snmp_object->max_oids = 0; in PHP_METHOD()
1560 snmp_object->valueretrieval = SNMP_G(valueretrieval); in PHP_METHOD()
1561 …snmp_object->enum_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMER… in PHP_METHOD()
1562 …snmp_object->oid_output_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTP… in PHP_METHOD()
1563 …snmp_object->quick_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRIN… in PHP_METHOD()
1564 snmp_object->oid_increasing_check = true; in PHP_METHOD()
1565 snmp_object->exceptions_enabled = 0; in PHP_METHOD()
1572 php_snmp_object *snmp_object; in PHP_METHOD() local
1575 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1581 netsnmp_session_free(&(snmp_object->session)); in PHP_METHOD()
1618 php_snmp_object *snmp_object; in PHP_METHOD() local
1622 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1628 if (!netsnmp_session_set_security(snmp_object->session, a1, a2, a3, a4, a5, a6, a7)) { in PHP_METHOD()
1639 php_snmp_object *snmp_object; in PHP_METHOD() local
1642 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1648 RETURN_LONG(snmp_object->snmp_errno); in PHP_METHOD()
1655 php_snmp_object *snmp_object; in PHP_METHOD() local
1658 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1664 RETURN_STRING(snmp_object->snmp_errstr); in PHP_METHOD()
1824 static int php_snmp_read_info(php_snmp_object *snmp_object, zval *retval) in php_snmp_read_info() argument
1830 if (snmp_object->session == NULL) { in php_snmp_read_info()
1834 ZVAL_STRINGL(&val, snmp_object->session->peername, strlen(snmp_object->session->peername)); in php_snmp_read_info()
1837 ZVAL_LONG(&val, snmp_object->session->timeout); in php_snmp_read_info()
1840 ZVAL_LONG(&val, snmp_object->session->retries); in php_snmp_read_info()
1848 static int php_snmp_read_max_oids(php_snmp_object *snmp_object, zval *retval) in php_snmp_read_max_oids() argument
1850 if (snmp_object->max_oids > 0) { in php_snmp_read_max_oids()
1851 ZVAL_LONG(retval, snmp_object->max_oids); in php_snmp_read_max_oids()
1860 static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval) \
1862 ZVAL_BOOL(retval, snmp_object->name); \
1871 static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval) \ in PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION()
1873 ZVAL_LONG(retval, snmp_object->name); \ in PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION()
1882 static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval)
1887 snmp_object->max_oids = 0;
1897 snmp_object->max_oids = lval;
1904 static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_valueretrieval() argument
1909 snmp_object->valueretrieval = lval; in php_snmp_write_valueretrieval()
1920 static int php_snmp_write_##name(php_snmp_object *snmp_object, zval *newval) \
1927 snmp_object->name = Z_TYPE_P(newval) == IS_TRUE? 1 : 0; \
1937 static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *newval) in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
1948 snmp_object->oid_output_format = lval; in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
1958 static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_exceptions_enabled() argument
1962 snmp_object->exceptions_enabled = zval_get_long(newval); in php_snmp_write_exceptions_enabled()