Lines Matching refs:snmp_object

496 	php_snmp_object *snmp_object = NULL;  in php_snmp_error()  local
499 snmp_object = Z_SNMP_P(object); in php_snmp_error()
501 memset(snmp_object->snmp_errstr, 0, sizeof(snmp_object->snmp_errstr)); in php_snmp_error()
504 vsnprintf(snmp_object->snmp_errstr, sizeof(snmp_object->snmp_errstr) - 1, format, args); in php_snmp_error()
507 snmp_object->snmp_errno = type; in php_snmp_error()
514 if (object && (snmp_object->exceptions_enabled & type)) { in php_snmp_error()
515 zend_throw_exception_ex(php_snmp_exception_ce, type, "%s", snmp_object->snmp_errstr); in php_snmp_error()
1379 php_snmp_object *snmp_object; in php_snmp() local
1465 snmp_object = Z_SNMP_P(object); in php_snmp()
1466 session = snmp_object->session; in php_snmp()
1473 if (snmp_object->max_oids > 0) { in php_snmp()
1474 objid_query.step = snmp_object->max_oids; in php_snmp()
1476 objid_query.max_repetitions = snmp_object->max_oids; in php_snmp()
1479 objid_query.oid_increasing_check = snmp_object->oid_increasing_check; in php_snmp()
1480 objid_query.valueretrieval = snmp_object->valueretrieval; in php_snmp()
1482 …netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM, snmp_object->enum… in php_snmp()
1484 …netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT, snmp_object->quick_print… in php_snmp()
1486 …netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, snmp_object->oid_outpu… in php_snmp()
1753 php_snmp_object *snmp_object; in PHP_METHOD() local
1762 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1779 if (snmp_object->session) { in PHP_METHOD()
1780 netsnmp_session_free(&(snmp_object->session)); in PHP_METHOD()
1783 if (netsnmp_session_init(&(snmp_object->session), version, a1, a2, timeout, retries)) { in PHP_METHOD()
1786 snmp_object->max_oids = 0; in PHP_METHOD()
1787 snmp_object->valueretrieval = SNMP_G(valueretrieval); in PHP_METHOD()
1788snmp_object->enum_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMER… in PHP_METHOD()
1789snmp_object->oid_output_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTP… in PHP_METHOD()
1790snmp_object->quick_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRIN… in PHP_METHOD()
1791 snmp_object->oid_increasing_check = TRUE; in PHP_METHOD()
1792 snmp_object->exceptions_enabled = 0; in PHP_METHOD()
1800 php_snmp_object *snmp_object; in PHP_METHOD() local
1803 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1809 netsnmp_session_free(&(snmp_object->session)); in PHP_METHOD()
1851 php_snmp_object *snmp_object; in PHP_METHOD() local
1857 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1864 if (netsnmp_session_set_security(snmp_object->session, a1, a2, a3, a4, a5, a6, a7)) { in PHP_METHOD()
1876 php_snmp_object *snmp_object; in PHP_METHOD() local
1879 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1881 RETVAL_LONG(snmp_object->snmp_errno); in PHP_METHOD()
1890 php_snmp_object *snmp_object; in PHP_METHOD() local
1893 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1895 RETURN_STRING(snmp_object->snmp_errstr); in PHP_METHOD()
2058 static int php_snmp_read_info(php_snmp_object *snmp_object, zval *retval) in php_snmp_read_info() argument
2064 if (snmp_object->session == NULL) { in php_snmp_read_info()
2068 ZVAL_STRINGL(&val, snmp_object->session->peername, strlen(snmp_object->session->peername)); in php_snmp_read_info()
2071 ZVAL_LONG(&val, snmp_object->session->remote_port); in php_snmp_read_info()
2074 ZVAL_LONG(&val, snmp_object->session->timeout); in php_snmp_read_info()
2077 ZVAL_LONG(&val, snmp_object->session->retries); in php_snmp_read_info()
2085 static int php_snmp_read_max_oids(php_snmp_object *snmp_object, zval *retval) in php_snmp_read_max_oids() argument
2087 if (snmp_object->max_oids > 0) { in php_snmp_read_max_oids()
2088 ZVAL_LONG(retval, snmp_object->max_oids); in php_snmp_read_max_oids()
2097 static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval) \
2099 ZVAL_BOOL(retval, snmp_object->name); \
2108 static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval) \ in PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION()
2110 ZVAL_LONG(retval, snmp_object->name); \ in PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION()
2119 static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval)
2127 static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_max_oids() argument
2133 snmp_object->max_oids = 0; in php_snmp_write_max_oids()
2140 snmp_object->max_oids = lval; in php_snmp_write_max_oids()
2150 static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_valueretrieval() argument
2156 snmp_object->valueretrieval = lval; in php_snmp_write_valueretrieval()
2167 static int php_snmp_write_##name(php_snmp_object *snmp_object, zval *newval) \
2174 snmp_object->name = Z_TYPE_P(newval) == IS_TRUE? 1 : 0; \
2184 static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *newval) in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2196 snmp_object->oid_output_format = lval; in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2209 static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_exceptions_enabled() argument
2213 snmp_object->exceptions_enabled = zval_get_long(newval); in php_snmp_write_exceptions_enabled()