Lines Matching refs:instance
45 static s16_t snmp_scalar_array_get_value(struct snmp_node_instance *instance, void *value);
46 static snmp_err_t snmp_scalar_array_set_test(struct snmp_node_instance *instance, u16_t value_len,…
47 static snmp_err_t snmp_scalar_array_set_value(struct snmp_node_instance *instance, u16_t value_len…
50 …_scalar_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) in snmp_scalar_get_instance() argument
52 …ruct snmp_scalar_node *scalar_node = (const struct snmp_scalar_node *)(const void *)instance->node; in snmp_scalar_get_instance()
58 if ((instance->instance_oid.len != 1) || (instance->instance_oid.id[0] != 0)) { in snmp_scalar_get_instance()
62 instance->access = scalar_node->access; in snmp_scalar_get_instance()
63 instance->asn1_type = scalar_node->asn1_type; in snmp_scalar_get_instance()
64 instance->get_value = scalar_node->get_value; in snmp_scalar_get_instance()
65 instance->set_test = scalar_node->set_test; in snmp_scalar_get_instance()
66 instance->set_value = scalar_node->set_value; in snmp_scalar_get_instance()
71 …ar_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) in snmp_scalar_get_next_instance() argument
74 if (instance->instance_oid.len == 0) { in snmp_scalar_get_next_instance()
75 instance->instance_oid.len = 1; in snmp_scalar_get_next_instance()
76 instance->instance_oid.id[0] = 0; in snmp_scalar_get_next_instance()
78 return snmp_scalar_get_instance(root_oid, root_oid_len, instance); in snmp_scalar_get_next_instance()
86 …r_array_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) in snmp_scalar_array_get_instance() argument
91 if ((instance->instance_oid.len == 2) && (instance->instance_oid.id[1] == 0)) { in snmp_scalar_array_get_instance()
92 …calar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; in snmp_scalar_array_get_instance()
97 if (array_node_def->oid == instance->instance_oid.id[0]) { in snmp_scalar_array_get_instance()
106 instance->access = array_node_def->access; in snmp_scalar_array_get_instance()
107 instance->asn1_type = array_node_def->asn1_type; in snmp_scalar_array_get_instance()
108 instance->get_value = snmp_scalar_array_get_value; in snmp_scalar_array_get_instance()
109 instance->set_test = snmp_scalar_array_set_test; in snmp_scalar_array_get_instance()
110 instance->set_value = snmp_scalar_array_set_value; in snmp_scalar_array_get_instance()
111 instance->reference.const_ptr = array_node_def; in snmp_scalar_array_get_instance()
121 …ay_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance *instance) in snmp_scalar_array_get_next_instance() argument
123 …calar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; in snmp_scalar_array_get_next_instance()
130 if ((instance->instance_oid.len == 0) && (array_node->array_node_count > 0)) { in snmp_scalar_array_get_next_instance()
143 } else if (instance->instance_oid.len >= 1) { in snmp_scalar_array_get_next_instance()
144 if (instance->instance_oid.len == 1) { in snmp_scalar_array_get_next_instance()
148 if (array_node_def->oid == instance->instance_oid.id[0]) { in snmp_scalar_array_get_next_instance()
162 if ((array_node_def->oid > instance->instance_oid.id[0]) && in snmp_scalar_array_get_next_instance()
163 ((u32_t)(array_node_def->oid - instance->instance_oid.id[0]) < oid_dist)) { in snmp_scalar_array_get_next_instance()
165 oid_dist = array_node_def->oid - instance->instance_oid.id[0]; in snmp_scalar_array_get_next_instance()
179 instance->instance_oid.len = 2; in snmp_scalar_array_get_next_instance()
180 instance->instance_oid.id[0] = result->oid; in snmp_scalar_array_get_next_instance()
181 instance->instance_oid.id[1] = 0; in snmp_scalar_array_get_next_instance()
183 instance->access = result->access; in snmp_scalar_array_get_next_instance()
184 instance->asn1_type = result->asn1_type; in snmp_scalar_array_get_next_instance()
185 instance->get_value = snmp_scalar_array_get_value; in snmp_scalar_array_get_next_instance()
186 instance->set_test = snmp_scalar_array_set_test; in snmp_scalar_array_get_next_instance()
187 instance->set_value = snmp_scalar_array_set_value; in snmp_scalar_array_get_next_instance()
188 instance->reference.const_ptr = result; in snmp_scalar_array_get_next_instance()
194 snmp_scalar_array_get_value(struct snmp_node_instance *instance, void *value) in snmp_scalar_array_get_value() argument
197 …calar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; in snmp_scalar_array_get_value()
198 …y_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_… in snmp_scalar_array_get_value()
207 snmp_scalar_array_set_test(struct snmp_node_instance *instance, u16_t value_len, void *value) in snmp_scalar_array_set_test() argument
210 …calar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; in snmp_scalar_array_set_test()
211 …y_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_… in snmp_scalar_array_set_test()
220 snmp_scalar_array_set_value(struct snmp_node_instance *instance, u16_t value_len, void *value) in snmp_scalar_array_set_value() argument
223 …calar_array_node *array_node = (const struct snmp_scalar_array_node *)(const void *)instance->node; in snmp_scalar_array_set_value()
224 …y_node_def *array_node_def = (const struct snmp_scalar_array_node_def *)instance->reference.const_… in snmp_scalar_array_set_value()