Lines Matching refs:objid_query

125 struct objid_query {  struct
401 struct objid_query *objid_query) in php_snmp_internal() argument
423 …memmove((char *)root, (char *)(objid_query->vars[0].name), (objid_query->vars[0].name_length) * si… in php_snmp_internal()
424 rootlen = objid_query->vars[0].name_length; in php_snmp_internal()
425 objid_query->offset = objid_query->count; in php_snmp_internal()
436 if ((st & SNMP_CMD_SET) && objid_query->count > objid_query->step) { in php_snmp_internal()
447 pdu->non_repeaters = objid_query->non_repeaters; in php_snmp_internal()
448 pdu->max_repetitions = objid_query->max_repetitions; in php_snmp_internal()
450 snmp_add_null_var(pdu, objid_query->vars[0].name, objid_query->vars[0].name_length); in php_snmp_internal()
464 …for (count = 0; objid_query->offset < objid_query->count && count < objid_query->step; objid_query in php_snmp_internal()
466objid_query->vars[objid_query->offset].name, objid_query->vars[objid_query->offset].name_length, o… in php_snmp_internal()
467 …snprint_objid(buf, sizeof(buf), objid_query->vars[objid_query->offset].name, objid_query->vars[obj… in php_snmp_internal()
468 …D='%s' type='%c' value='%s': %s", buf, objid_query->vars[objid_query->offset].type, objid_query->v… in php_snmp_internal()
475 …snmp_add_null_var(pdu, objid_query->vars[objid_query->offset].name, objid_query->vars[objid_query-… in php_snmp_internal()
491 if (objid_query->offset < objid_query->count) { /* we have unprocessed OIDs */ in php_snmp_internal()
523 objid_query->offset = 0; in php_snmp_internal()
530 php_snmp_getvalue(vars, &snmpval, objid_query->valueretrieval); in php_snmp_internal()
532 if (objid_query->array_output) { in php_snmp_internal()
540 for (count = 0; count < objid_query->count; count++) { in php_snmp_internal()
541 …if (objid_query->vars[count].name_length == vars->name_length && snmp_oid_compare(objid_query->var… in php_snmp_internal()
543 objid_query->vars[count].name_length = 0; /* mark this name as used */ in php_snmp_internal()
548 add_assoc_zval(return_value, objid_query->vars[count].oid, &snmpval); in php_snmp_internal()
577 …if (objid_query->oid_increasing_check == TRUE && snmp_oid_compare(objid_query->vars[0].name, objid… in php_snmp_internal()
582 … memmove((char *)(objid_query->vars[0].name), (char *)vars->name, vars->name_length * sizeof(oid)); in php_snmp_internal()
583 objid_query->vars[0].name_length = vars->name_length; in php_snmp_internal()
588 if (objid_query->offset < objid_query->count) { /* we have unprocessed OIDs */ in php_snmp_internal()
592 …if (st & SNMP_CMD_WALK && response->errstat == SNMP_ERR_TOOBIG && objid_query->max_repetitions > 1… in php_snmp_internal()
593 objid_query->max_repetitions /= 2; in php_snmp_internal()
603 …CMD_GET | SNMP_CMD_GETNEXT) && response->errstat == SNMP_ERR_TOOBIG && objid_query->step > 1) { /*… in php_snmp_internal()
604objid_query->offset = ((objid_query->offset > objid_query->step) ? (objid_query->offset - objid_qu… in php_snmp_internal()
605 objid_query->step /= 2; in php_snmp_internal()
624 if (objid_query->array_output) { in php_snmp_internal()
633 if (objid_query->array_output) { in php_snmp_internal()
643 if (objid_query->array_output) { in php_snmp_internal()
663 zval *object, int st, struct objid_query *objid_query, zend_string *oid_str, HashTable *oid_ht, in php_snmp_parse_oid() argument
670 objid_query->count = 0; in php_snmp_parse_oid()
671 objid_query->array_output = ((st & SNMP_CMD_WALK) ? TRUE : FALSE); in php_snmp_parse_oid()
673 objid_query->vars = (snmpobjarg *)emalloc(sizeof(snmpobjarg)); in php_snmp_parse_oid()
674 objid_query->vars[objid_query->count].oid = ZSTR_VAL(oid_str); in php_snmp_parse_oid()
678 efree(objid_query->vars); in php_snmp_parse_oid()
683 efree(objid_query->vars); in php_snmp_parse_oid()
692 efree(objid_query->vars); in php_snmp_parse_oid()
696 objid_query->vars[objid_query->count].type = *pptr; in php_snmp_parse_oid()
697 objid_query->vars[objid_query->count].value = ZSTR_VAL(value_str); in php_snmp_parse_oid()
699 objid_query->count++; in php_snmp_parse_oid()
705objid_query->vars = (snmpobjarg *)safe_emalloc(sizeof(snmpobjarg), zend_hash_num_elements(oid_ht),… in php_snmp_parse_oid()
706 objid_query->array_output = ( (st & SNMP_CMD_SET) ? FALSE : TRUE ); in php_snmp_parse_oid()
709 objid_query->vars[objid_query->count].oid = Z_STRVAL_P(tmp_oid); in php_snmp_parse_oid()
713 objid_query->vars[objid_query->count].type = *pptr; in php_snmp_parse_oid()
726 efree(objid_query->vars); in php_snmp_parse_oid()
730 objid_query->vars[objid_query->count].type = *pptr; in php_snmp_parse_oid()
734 efree(objid_query->vars); in php_snmp_parse_oid()
740 objid_query->vars[objid_query->count].value = ZSTR_VAL(value_str); in php_snmp_parse_oid()
751 objid_query->vars[objid_query->count].value = Z_STRVAL_P(tmp_value); in php_snmp_parse_oid()
755 efree(objid_query->vars); in php_snmp_parse_oid()
760 objid_query->count++; in php_snmp_parse_oid()
766 if (objid_query->count > 1) { in php_snmp_parse_oid()
768 efree(objid_query->vars); in php_snmp_parse_oid()
771 objid_query->vars[0].name_length = MAX_NAME_LEN; in php_snmp_parse_oid()
772 …if (strlen(objid_query->vars[0].oid)) { /* on a walk, an empty string means top of tree - no error… in php_snmp_parse_oid()
773 …if (!snmp_parse_oid(objid_query->vars[0].oid, objid_query->vars[0].name, &(objid_query->vars[0].na… in php_snmp_parse_oid()
774 …ject, PHP_SNMP_ERRNO_OID_PARSING_ERROR, "Invalid object identifier: %s", objid_query->vars[0].oid); in php_snmp_parse_oid()
775 efree(objid_query->vars); in php_snmp_parse_oid()
779 memmove((char *)objid_query->vars[0].name, (char *)objid_mib, sizeof(objid_mib)); in php_snmp_parse_oid()
780 objid_query->vars[0].name_length = sizeof(objid_mib) / sizeof(oid); in php_snmp_parse_oid()
783 for (objid_query->offset = 0; objid_query->offset < objid_query->count; objid_query->offset++) { in php_snmp_parse_oid()
784 objid_query->vars[objid_query->offset].name_length = MAX_OID_LEN; in php_snmp_parse_oid()
785 …!snmp_parse_oid(objid_query->vars[objid_query->offset].oid, objid_query->vars[objid_query->offset]… in php_snmp_parse_oid()
786 …NMP_ERRNO_OID_PARSING_ERROR, "Invalid object identifier: %s", objid_query->vars[objid_query->offse… in php_snmp_parse_oid()
787 efree(objid_query->vars); in php_snmp_parse_oid()
792 objid_query->offset = 0; in php_snmp_parse_oid()
793 objid_query->step = objid_query->count; in php_snmp_parse_oid()
794 return (objid_query->count > 0); in php_snmp_parse_oid()
1119 struct objid_query objid_query; in php_snmp() local
1125 objid_query.max_repetitions = -1; in php_snmp()
1126 objid_query.non_repeaters = 0; in php_snmp()
1127 objid_query.valueretrieval = SNMP_G(valueretrieval); in php_snmp()
1128 objid_query.oid_increasing_check = TRUE; in php_snmp()
1206 Z_PARAM_LONG(objid_query.max_repetitions) in php_snmp()
1207 Z_PARAM_LONG(objid_query.non_repeaters) in php_snmp()
1230 …if (!php_snmp_parse_oid(getThis(), st, &objid_query, oid_str, oid_ht, type_str, type_ht, value_str… in php_snmp()
1236 efree(objid_query.vars); in php_snmp()
1241 efree(objid_query.vars); in php_snmp()
1252 efree(objid_query.vars); in php_snmp()
1257 objid_query.step = snmp_object->max_oids; in php_snmp()
1258 if (objid_query.max_repetitions < 0) { /* unspecified in function call, use session-wise */ in php_snmp()
1259 objid_query.max_repetitions = snmp_object->max_oids; in php_snmp()
1262 objid_query.oid_increasing_check = snmp_object->oid_increasing_check; in php_snmp()
1263 objid_query.valueretrieval = snmp_object->valueretrieval; in php_snmp()
1272 if (objid_query.max_repetitions < 0) { in php_snmp()
1273 objid_query.max_repetitions = 20; /* provide correct default value */ in php_snmp()
1276 php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, session, &objid_query); in php_snmp()
1278 efree(objid_query.vars); in php_snmp()