Lines Matching refs:snmp_object

505 	php_snmp_object *snmp_object = NULL;  in php_snmp_error()  local
508 snmp_object = Z_SNMP_P(object); in php_snmp_error()
510 memset(snmp_object->snmp_errstr, 0, sizeof(snmp_object->snmp_errstr)); in php_snmp_error()
513 vsnprintf(snmp_object->snmp_errstr, sizeof(snmp_object->snmp_errstr) - 1, format, args); in php_snmp_error()
516 snmp_object->snmp_errno = type; in php_snmp_error()
523 if (object && (snmp_object->exceptions_enabled & type)) { in php_snmp_error()
524 zend_throw_exception_ex(php_snmp_exception_ce, type, "%s", snmp_object->snmp_errstr); in php_snmp_error()
1417 php_snmp_object *snmp_object; in php_snmp() local
1503 snmp_object = Z_SNMP_P(object); in php_snmp()
1504 session = snmp_object->session; in php_snmp()
1511 if (snmp_object->max_oids > 0) { in php_snmp()
1512 objid_query.step = snmp_object->max_oids; in php_snmp()
1514 objid_query.max_repetitions = snmp_object->max_oids; in php_snmp()
1517 objid_query.oid_increasing_check = snmp_object->oid_increasing_check; in php_snmp()
1518 objid_query.valueretrieval = snmp_object->valueretrieval; in php_snmp()
1520 …netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM, snmp_object->enum… in php_snmp()
1522 …netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT, snmp_object->quick_print… in php_snmp()
1524 …netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, snmp_object->oid_outpu… in php_snmp()
1791 php_snmp_object *snmp_object; in PHP_METHOD() local
1800 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1817 if (snmp_object->session) { in PHP_METHOD()
1818 netsnmp_session_free(&(snmp_object->session)); in PHP_METHOD()
1821 if (netsnmp_session_init(&(snmp_object->session), version, a1, a2, timeout, retries)) { in PHP_METHOD()
1824 snmp_object->max_oids = 0; in PHP_METHOD()
1825 snmp_object->valueretrieval = SNMP_G(valueretrieval); in PHP_METHOD()
1826snmp_object->enum_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMER… in PHP_METHOD()
1827snmp_object->oid_output_format = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTP… in PHP_METHOD()
1828snmp_object->quick_print = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRIN… in PHP_METHOD()
1829 snmp_object->oid_increasing_check = TRUE; in PHP_METHOD()
1830 snmp_object->exceptions_enabled = 0; in PHP_METHOD()
1838 php_snmp_object *snmp_object; in PHP_METHOD() local
1841 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1847 netsnmp_session_free(&(snmp_object->session)); in PHP_METHOD()
1889 php_snmp_object *snmp_object; in PHP_METHOD() local
1895 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1902 if (netsnmp_session_set_security(snmp_object->session, a1, a2, a3, a4, a5, a6, a7)) { in PHP_METHOD()
1914 php_snmp_object *snmp_object; in PHP_METHOD() local
1917 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1919 RETVAL_LONG(snmp_object->snmp_errno); in PHP_METHOD()
1928 php_snmp_object *snmp_object; in PHP_METHOD() local
1931 snmp_object = Z_SNMP_P(object); in PHP_METHOD()
1933 RETURN_STRING(snmp_object->snmp_errstr); in PHP_METHOD()
2098 static int php_snmp_read_info(php_snmp_object *snmp_object, zval *retval) in php_snmp_read_info() argument
2104 if (snmp_object->session == NULL) { in php_snmp_read_info()
2108 ZVAL_STRINGL(&val, snmp_object->session->peername, strlen(snmp_object->session->peername)); in php_snmp_read_info()
2111 ZVAL_LONG(&val, snmp_object->session->remote_port); in php_snmp_read_info()
2114 ZVAL_LONG(&val, snmp_object->session->timeout); in php_snmp_read_info()
2117 ZVAL_LONG(&val, snmp_object->session->retries); in php_snmp_read_info()
2125 static int php_snmp_read_max_oids(php_snmp_object *snmp_object, zval *retval) in php_snmp_read_max_oids() argument
2127 if (snmp_object->max_oids > 0) { in php_snmp_read_max_oids()
2128 ZVAL_LONG(retval, snmp_object->max_oids); in php_snmp_read_max_oids()
2137 static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval) \
2139 ZVAL_BOOL(retval, snmp_object->name); \
2148 static int php_snmp_read_##name(php_snmp_object *snmp_object, zval *retval) \ in PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION()
2150 ZVAL_LONG(retval, snmp_object->name); \ in PHP_SNMP_BOOL_PROPERTY_READER_FUNCTION()
2159 static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval)
2167 static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_max_oids() argument
2173 snmp_object->max_oids = 0; in php_snmp_write_max_oids()
2185 snmp_object->max_oids = Z_LVAL_P(newval); in php_snmp_write_max_oids()
2199 static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_valueretrieval() argument
2212 snmp_object->valueretrieval = Z_LVAL_P(newval); in php_snmp_write_valueretrieval()
2227 static int php_snmp_write_##name(php_snmp_object *snmp_object, zval *newval) \
2234 snmp_object->name = Z_TYPE_P(newval) == IS_TRUE? 1 : 0; \
2244 static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *newval) in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2261 snmp_object->oid_output_format = Z_LVAL_P(newval); in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2277 static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_exceptions_enabled() argument
2287 snmp_object->exceptions_enabled = Z_LVAL_P(newval); in php_snmp_write_exceptions_enabled()