Lines Matching refs:objid_query

357 struct objid_query {  struct
675 struct objid_query *objid_query) in php_snmp_internal() argument
697 …memmove((char *)root, (char *)(objid_query->vars[0].name), (objid_query->vars[0].name_length) * si… in php_snmp_internal()
698 rootlen = objid_query->vars[0].name_length; in php_snmp_internal()
699 objid_query->offset = objid_query->count; in php_snmp_internal()
710 if ((st & SNMP_CMD_SET) && objid_query->count > objid_query->step) { in php_snmp_internal()
721 pdu->non_repeaters = objid_query->non_repeaters; in php_snmp_internal()
722 pdu->max_repetitions = objid_query->max_repetitions; in php_snmp_internal()
724 snmp_add_null_var(pdu, objid_query->vars[0].name, objid_query->vars[0].name_length); in php_snmp_internal()
738 …for (count = 0; objid_query->offset < objid_query->count && count < objid_query->step; objid_query in php_snmp_internal()
740objid_query->vars[objid_query->offset].name, objid_query->vars[objid_query->offset].name_length, o… in php_snmp_internal()
741 …snprint_objid(buf, sizeof(buf), objid_query->vars[objid_query->offset].name, objid_query->vars[obj… in php_snmp_internal()
742 …D='%s' type='%c' value='%s': %s", buf, objid_query->vars[objid_query->offset].type, objid_query->v… in php_snmp_internal()
749 …snmp_add_null_var(pdu, objid_query->vars[objid_query->offset].name, objid_query->vars[objid_query-… in php_snmp_internal()
765 if (objid_query->offset < objid_query->count) { /* we have unprocessed OIDs */ in php_snmp_internal()
796 objid_query->offset = 0; in php_snmp_internal()
803 php_snmp_getvalue(vars, &snmpval, objid_query->valueretrieval); in php_snmp_internal()
805 if (objid_query->array_output) { in php_snmp_internal()
813 for (count = 0; count < objid_query->count; count++) { in php_snmp_internal()
814 …if (objid_query->vars[count].name_length == vars->name_length && snmp_oid_compare(objid_query->var… in php_snmp_internal()
816 objid_query->vars[count].name_length = 0; /* mark this name as used */ in php_snmp_internal()
821 add_assoc_zval(return_value, objid_query->vars[count].oid, &snmpval); in php_snmp_internal()
850 …if (objid_query->oid_increasing_check == TRUE && snmp_oid_compare(objid_query->vars[0].name, objid… in php_snmp_internal()
855 … memmove((char *)(objid_query->vars[0].name), (char *)vars->name, vars->name_length * sizeof(oid)); in php_snmp_internal()
856 objid_query->vars[0].name_length = vars->name_length; in php_snmp_internal()
861 if (objid_query->offset < objid_query->count) { /* we have unprocessed OIDs */ in php_snmp_internal()
865 …if (st & SNMP_CMD_WALK && response->errstat == SNMP_ERR_TOOBIG && objid_query->max_repetitions > 1… in php_snmp_internal()
866 objid_query->max_repetitions /= 2; in php_snmp_internal()
876 …CMD_GET | SNMP_CMD_GETNEXT) && response->errstat == SNMP_ERR_TOOBIG && objid_query->step > 1) { /*… in php_snmp_internal()
877objid_query->offset = ((objid_query->offset > objid_query->step) ? (objid_query->offset - objid_qu… in php_snmp_internal()
878 objid_query->step /= 2; in php_snmp_internal()
897 if (objid_query->array_output) { in php_snmp_internal()
906 if (objid_query->array_output) { in php_snmp_internal()
916 if (objid_query->array_output) { in php_snmp_internal()
936 static int php_snmp_parse_oid(zval *object, int st, struct objid_query *objid_query, zval *oid, zva… in php_snmp_parse_oid() argument
956 objid_query->count = 0; in php_snmp_parse_oid()
957 objid_query->array_output = ((st & SNMP_CMD_WALK) ? TRUE : FALSE); in php_snmp_parse_oid()
959 objid_query->vars = (snmpobjarg *)emalloc(sizeof(snmpobjarg)); in php_snmp_parse_oid()
960 objid_query->vars[objid_query->count].oid = Z_STRVAL_P(oid); in php_snmp_parse_oid()
965 efree(objid_query->vars); in php_snmp_parse_oid()
969 objid_query->vars[objid_query->count].type = *pptr; in php_snmp_parse_oid()
970 objid_query->vars[objid_query->count].value = Z_STRVAL_P(value); in php_snmp_parse_oid()
973 efree(objid_query->vars); in php_snmp_parse_oid()
977 objid_query->count++; in php_snmp_parse_oid()
983objid_query->vars = (snmpobjarg *)safe_emalloc(sizeof(snmpobjarg), zend_hash_num_elements(Z_ARRVAL… in php_snmp_parse_oid()
984 objid_query->array_output = ( (st & SNMP_CMD_SET) ? FALSE : TRUE ); in php_snmp_parse_oid()
987 objid_query->vars[objid_query->count].oid = Z_STRVAL_P(tmp_oid); in php_snmp_parse_oid()
991 objid_query->vars[objid_query->count].type = *pptr; in php_snmp_parse_oid()
1004 efree(objid_query->vars); in php_snmp_parse_oid()
1008 objid_query->vars[objid_query->count].type = *pptr; in php_snmp_parse_oid()
1012 efree(objid_query->vars); in php_snmp_parse_oid()
1018 objid_query->vars[objid_query->count].value = Z_STRVAL_P(value); in php_snmp_parse_oid()
1029 objid_query->vars[objid_query->count].value = Z_STRVAL_P(tmp_value); in php_snmp_parse_oid()
1033 efree(objid_query->vars); in php_snmp_parse_oid()
1038 objid_query->count++; in php_snmp_parse_oid()
1044 if (objid_query->count > 1) { in php_snmp_parse_oid()
1046 efree(objid_query->vars); in php_snmp_parse_oid()
1049 objid_query->vars[0].name_length = MAX_NAME_LEN; in php_snmp_parse_oid()
1050 …if (strlen(objid_query->vars[0].oid)) { /* on a walk, an empty string means top of tree - no error… in php_snmp_parse_oid()
1051 …if (!snmp_parse_oid(objid_query->vars[0].oid, objid_query->vars[0].name, &(objid_query->vars[0].na… in php_snmp_parse_oid()
1052 …NULL, PHP_SNMP_ERRNO_OID_PARSING_ERROR, "Invalid object identifier: %s", objid_query->vars[0].oid); in php_snmp_parse_oid()
1053 efree(objid_query->vars); in php_snmp_parse_oid()
1057 memmove((char *)objid_query->vars[0].name, (char *)objid_mib, sizeof(objid_mib)); in php_snmp_parse_oid()
1058 objid_query->vars[0].name_length = sizeof(objid_mib) / sizeof(oid); in php_snmp_parse_oid()
1061 for (objid_query->offset = 0; objid_query->offset < objid_query->count; objid_query->offset++) { in php_snmp_parse_oid()
1062 objid_query->vars[objid_query->offset].name_length = MAX_OID_LEN; in php_snmp_parse_oid()
1063 …!snmp_parse_oid(objid_query->vars[objid_query->offset].oid, objid_query->vars[objid_query->offset]… in php_snmp_parse_oid()
1064 …NMP_ERRNO_OID_PARSING_ERROR, "Invalid object identifier: %s", objid_query->vars[objid_query->offse… in php_snmp_parse_oid()
1065 efree(objid_query->vars); in php_snmp_parse_oid()
1070 objid_query->offset = 0; in php_snmp_parse_oid()
1071 objid_query->step = objid_query->count; in php_snmp_parse_oid()
1072 return (objid_query->count > 0); in php_snmp_parse_oid()
1375 struct objid_query objid_query; in php_snmp() local
1381 objid_query.max_repetitions = -1; in php_snmp()
1382 objid_query.non_repeaters = 0; in php_snmp()
1383 objid_query.valueretrieval = SNMP_G(valueretrieval); in php_snmp()
1384 objid_query.oid_increasing_check = TRUE; in php_snmp()
1424 …_parse_parameters(argc, "z|bll", &oid, &suffix_keys, &(objid_query.max_repetitions), &(objid_query in php_snmp()
1446 if (!php_snmp_parse_oid(getThis(), st, &objid_query, oid, type, value)) { in php_snmp()
1452 efree(objid_query.vars); in php_snmp()
1457 efree(objid_query.vars); in php_snmp()
1468 efree(objid_query.vars); in php_snmp()
1473 objid_query.step = snmp_object->max_oids; in php_snmp()
1474 if (objid_query.max_repetitions < 0) { /* unspecified in function call, use session-wise */ in php_snmp()
1475 objid_query.max_repetitions = snmp_object->max_oids; in php_snmp()
1478 objid_query.oid_increasing_check = snmp_object->oid_increasing_check; in php_snmp()
1479 objid_query.valueretrieval = snmp_object->valueretrieval; in php_snmp()
1488 if (objid_query.max_repetitions < 0) { in php_snmp()
1489 objid_query.max_repetitions = 20; /* provide correct default value */ in php_snmp()
1492 php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, session, &objid_query); in php_snmp()
1494 efree(objid_query.vars); in php_snmp()