Lines Matching refs:sub

79     uint32_t sub __unused, uint32_t iidx __unused, enum snmp_op op)  in op_usm_stats()
90 switch (val->var.subs[sub - 1]) { in op_usm_stats()
119 uint32_t sub, uint32_t iidx __unused, enum snmp_op op) in op_usm_lock() argument
121 if (val->var.subs[sub - 1] != LEAF_usmUserSpinLock) in op_usm_lock()
147 uint32_t sub, uint32_t iidx __unused, enum snmp_op op) in op_usm_users() argument
156 if ((uuser = usm_get_user(&val->var, sub)) == NULL) in op_usm_users()
161 if ((uuser = usm_get_next_user(&val->var, sub)) == NULL) in op_usm_users()
163 usm_append_userindex(&val->var, sub, uuser); in op_usm_users()
167 if ((uuser = usm_get_user(&val->var, sub)) == NULL && in op_usm_users()
168 val->var.subs[sub - 1] != LEAF_usmUserStatus && in op_usm_users()
169 val->var.subs[sub - 1] != LEAF_usmUserCloneFrom) in op_usm_users()
180 switch (val->var.subs[sub - 1]) { in op_usm_users()
186 sub, eid, &elen, uname) < 0 || in op_usm_users()
189 if ((clone = usm_get_user(&val->v.oid, sub)) == NULL) in op_usm_users()
225 if (val->var.subs[sub - 1] == in op_usm_users()
258 if (val->var.subs[sub - 1] == in op_usm_users()
304 usm_user_index_decode(&val->var, sub, eid, in op_usm_users()
325 switch (val->var.subs[sub - 1]) { in op_usm_users()
339 if ((uuser = usm_get_user(&val->var, sub)) == NULL) in op_usm_users()
349 if ((uuser = usm_get_user(&val->var, sub)) == NULL) in op_usm_users()
351 switch (val->var.subs[sub - 1]) { in op_usm_users()
396 switch (val->var.subs[sub - 1]) { in op_usm_users()
455 usm_user_index_decode(const struct asn_oid *oid, uint sub, uint8_t *engine, in usm_user_index_decode() argument
461 if (oid->subs[sub] > SNMP_ENGINE_ID_SIZ) in usm_user_index_decode()
464 for (i = 0; i < oid->subs[sub]; i++) in usm_user_index_decode()
465 engine[i] = oid->subs[sub + i + 1]; in usm_user_index_decode()
468 uname_off = sub + oid->subs[sub] + 1; in usm_user_index_decode()
480 usm_append_userindex(struct asn_oid *oid, uint sub, in usm_append_userindex() argument
485 oid->len = sub + uuser->user_engine_len + strlen(uuser->suser.sec_name); in usm_append_userindex()
487 oid->subs[sub] = uuser->user_engine_len; in usm_append_userindex()
489 oid->subs[sub + i] = uuser->user_engine_id[i - 1]; in usm_append_userindex()
491 sub += uuser->user_engine_len + 1; in usm_append_userindex()
492 oid->subs[sub] = strlen(uuser->suser.sec_name); in usm_append_userindex()
493 for (i = 1; i <= oid->subs[sub]; i++) in usm_append_userindex()
494 oid->subs[sub + i] = uuser->suser.sec_name[i - 1]; in usm_append_userindex()
498 usm_get_user(const struct asn_oid *oid, uint sub) in usm_get_user() argument
504 if (usm_user_index_decode(oid, sub, engineid, &enginelen, username) < 0) in usm_get_user()
511 usm_get_next_user(const struct asn_oid *oid, uint sub) in usm_get_next_user() argument
518 if (oid->len - sub == 0) in usm_get_next_user()
521 if (usm_user_index_decode(oid, sub, engineid, &enginelen, username) < 0) in usm_get_next_user()