Lines Matching refs:obj

360 	isns_obj_t *obj;  in entity_hval()  local
365 obj = (isns_obj_t *)p; in entity_hval()
366 key = obj->attrs[ATTR_INDEX_ENTITY(ISNS_EID_ATTR_ID)]. in entity_hval()
401 isns_obj_t *obj; in iscsi_hval() local
406 obj = (isns_obj_t *)p; in iscsi_hval()
407 key = obj->attrs[ATTR_INDEX_ISCSI(ISNS_ISCSI_NAME_ATTR_ID)]. in iscsi_hval()
443 isns_obj_t *obj; in portal_hval() local
451 obj = (isns_obj_t *)p; in portal_hval()
452 ip = obj->attrs[ATTR_INDEX_PORTAL in portal_hval()
454 port = obj->attrs[ATTR_INDEX_PORTAL in portal_hval()
495 isns_obj_t *obj; in pg_hval() local
503 obj = (isns_obj_t *)p; in pg_hval()
506 key = obj->attrs[ATTR_INDEX_PG in pg_hval()
510 ip = obj->attrs[ATTR_INDEX_PG in pg_hval()
512 port = obj->attrs[ATTR_INDEX_PG in pg_hval()
564 isns_obj_t *obj; in dd_hval() local
569 obj = (isns_obj_t *)p; in dd_hval()
570 key = obj->attrs[ATTR_INDEX_DD(ISNS_DD_NAME_ATTR_ID)]. in dd_hval()
604 isns_obj_t *obj; in dds_hval() local
609 obj = (isns_obj_t *)p; in dds_hval()
610 key = obj->attrs[ATTR_INDEX_DDS(ISNS_DD_SET_NAME_ATTR_ID)]. in dds_hval()
663 isns_obj_t *obj = (isns_obj_t *)p; in get_obj_uid() local
664 isns_attr_t *attr = &obj->attrs[UID_ATTR_INDEX[obj->type]]; in get_obj_uid()
687 isns_obj_t *obj = (isns_obj_t *)p; in set_obj_uid() local
688 isns_attr_t *attr = &obj->attrs[UID_ATTR_INDEX[obj->type]]; in set_obj_uid()
691 attr->tag = UID_TAG[obj->type]; in set_obj_uid()
718 isns_obj_t *obj = (isns_obj_t *)p1; in obj_cmp() local
727 uid = get_obj_uid(obj); in obj_cmp()
737 return (key_cmp(lcp, obj)); in obj_cmp()
850 isns_obj_t *obj = (isns_obj_t *)p; in add_object() local
854 ec = write_data(DATA_ADD, obj); in add_object()
859 (void) make_scn(ISNS_OBJECT_ADDED, obj); in add_object()
975 isns_obj_t *obj, in get_ref_np() argument
980 obj->type == OBJ_PG ? &((isns_pg_t *)obj)->ref[n] : NULL; in get_ref_np()
991 isns_obj_t *obj, in get_ref_n() argument
995 return (*get_ref_np(obj, n)); in get_ref_n()
1000 isns_obj_t *obj, in get_ref_p() argument
1004 isns_type_t t = obj->type; in get_ref_p()
1009 return (get_ref_np(obj, i)); in get_ref_p()
1019 isns_obj_t *obj, in get_ref_t() argument
1023 uint32_t *refp = get_ref_p(obj, type); in get_ref_t()
1048 const isns_obj_t *obj in get_parent_p() argument
1052 switch (obj->type) { in get_parent_p()
1054 pp = &((isns_iscsi_t *)obj)->puid; in get_parent_p()
1057 pp = &((isns_portal_t *)obj)->puid; in get_parent_p()
1060 pp = &((isns_pg_t *)obj)->puid; in get_parent_p()
1063 pp = &((isns_assoc_iscsi_t *)obj)->puid; in get_parent_p()
1066 pp = &((isns_assoc_dd_t *)obj)->puid; in get_parent_p()
1078 const isns_obj_t *obj in get_parent_uid() argument
1081 uint32_t *pp = get_parent_p(obj); in get_parent_uid()
1103 isns_obj_t *obj, in get_child_np() argument
1108 obj->type == OBJ_ENTITY ? &((isns_entity_t *)obj)->cuid[n] : NULL; in get_child_np()
1131 isns_obj_t *obj, in get_child_n() argument
1135 uint32_t **pp = get_child_np(obj, n); in get_child_n()
1218 isns_obj_t *obj in key_cmp() argument
1224 isns_attr_t *attr = &obj->attrs[lcp->id[i]]; in key_cmp()
1268 isns_obj_t *obj in set_lookup_ctrl() argument
1271 isns_type_t type = obj->type; in set_lookup_ctrl()
1282 lcp->data[i].ui = obj->attrs[id].value.ui; in set_lookup_ctrl()
1706 isns_obj_t *obj = NULL; in obj_calloc() local
1708 obj = (isns_obj_t *)calloc(1, SIZEOF_OBJ[type]); in obj_calloc()
1709 if (obj != NULL) { in obj_calloc()
1710 obj->type = type; in obj_calloc()
1718 return (obj); in obj_calloc()
1737 isns_obj_t *obj = obj_calloc(OBJ_ENTITY); in make_default_entity() local
1739 if (obj != NULL) { in make_default_entity()
1743 free(obj); in make_default_entity()
1746 attr = &obj->attrs[ATTR_INDEX_ENTITY(ISNS_EID_ATTR_ID)]; in make_default_entity()
1754 attr = &obj->attrs[ in make_default_entity()
1764 return (obj); in make_default_entity()
1953 isns_obj_t *obj = NULL; in reg_get_iscsi() local
1966 obj = obj_calloc(OBJ_ISCSI); in reg_get_iscsi()
1967 if (obj != NULL) { in reg_get_iscsi()
1970 attr = &obj->attrs[ in reg_get_iscsi()
1982 *p = obj; in reg_get_iscsi()
2020 isns_obj_t *obj = NULL; in reg_get_portal() local
2043 obj = obj_calloc(OBJ_PORTAL); in reg_get_portal()
2044 if (obj != NULL) { in reg_get_portal()
2046 attr = &obj->attrs[ in reg_get_portal()
2051 attr = &obj->attrs[ in reg_get_portal()
2060 attr = &obj->attrs[ in reg_get_portal()
2075 *p = obj; in reg_get_portal()
2109 isns_obj_t *obj = NULL; in reg_get_pg() local
2115 obj = obj_calloc(OBJ_PG); in reg_get_pg()
2116 if (obj != NULL) { in reg_get_pg()
2119 attr = &obj->attrs[ in reg_get_pg()
2130 *p = obj; in reg_get_pg()
2167 isns_obj_t *obj = NULL; in reg_get_pg1() local
2177 obj = obj_calloc(OBJ_PG); in reg_get_pg1()
2178 if (obj != NULL) { in reg_get_pg1()
2180 attr = &obj->attrs[ in reg_get_pg1()
2185 attr = &obj->attrs[ in reg_get_pg1()
2199 *p = obj; in reg_get_pg1()
2237 isns_obj_t *obj = NULL; in reg_get_pg2() local
2261 obj = obj_calloc(OBJ_PG); in reg_get_pg2()
2262 if (obj != NULL) { in reg_get_pg2()
2264 attr = &obj->attrs[ in reg_get_pg2()
2269 attr = &obj->attrs[ in reg_get_pg2()
2275 attr = &obj->attrs[ in reg_get_pg2()
2288 *p = obj; in reg_get_pg2()
2481 const isns_obj_t *obj in is_obj_online() argument
2486 switch (obj->type) { in is_obj_online()
2488 online = obj->attrs[ATTR_INDEX_ISCSI( in is_obj_online()
2500 isns_obj_t *obj in set_obj_offline() argument
2503 switch (obj->type) { in set_obj_offline()
2505 obj->attrs[ATTR_INDEX_ISCSI( in set_obj_offline()
2541 const isns_obj_t *obj; in assoc_clone() local
2547 obj = (isns_obj_t *)p; in assoc_clone()
2549 if (obj->type != OBJ_ISCSI) { in assoc_clone()
2553 dd_flag = (get_dd_id(get_obj_uid(obj), ISNS_DEFAULT_DD_ID) == 0) ? in assoc_clone()
2555 online = is_obj_online(obj); in assoc_clone()
2585 type = obj->type; in assoc_clone()
2590 src_attr = &(obj->attrs[id]); in assoc_clone()
2601 src_attr = &(obj->attrs[id]); in assoc_clone()
2629 isns_obj_t *obj in free_one_object() argument
2634 if (obj == NULL) { in free_one_object()
2637 for (i = 0; i < NUM_OF_ATTRS[obj->type]; i++) { in free_one_object()
2638 isns_attr_t *attr = &obj->attrs[i]; in free_one_object()
2669 while (i < NUM_OF_CHILD[obj->type]) { in free_one_object()
2670 cuid = get_child_n(obj, i); in free_one_object()
2678 printf("object(%d) deallocated\n", obj->type); in free_one_object()
2681 free(obj); in free_one_object()
2696 isns_obj_t *obj in free_object() argument
2699 free_one_object(obj); in free_object()
2716 isns_obj_t *obj, in set_parent_obj() argument
2720 uint32_t *const p = get_parent_p(obj); in set_parent_obj()
2839 const isns_obj_t *obj in update_ref_obj() argument
2846 t = obj->type; in update_ref_obj()
2849 (void) setup_ref_lcp(&lc, obj, NULL); in update_ref_obj()
2852 lc.data[2].ui = get_obj_uid(obj); in update_ref_obj()
2897 isns_obj_t *obj in update_deref_obj() argument
2908 t = obj->type; in update_deref_obj()
2912 (void) setup_deref_lcp(&lc, obj, rt); in update_deref_obj()
2915 refp = get_ref_p(obj, lc.type); in update_deref_obj()
2945 isns_obj_t *obj, in register_object() argument
2950 return (cache_add(obj, 0, uid_p, update_p)); in register_object()
2969 isns_obj_t *obj, in register_assoc() argument
2973 return (cache_add(obj, 1, uid_p, NULL)); in register_assoc()
3119 isns_obj_t *obj in setup_parent_lcp() argument
3125 puid = get_parent_uid(obj); in setup_parent_lcp()
3127 ptype = TYPE_OF_PARENT[obj->type]; in setup_parent_lcp()
3129 lcp->data[1].ui = obj->type; in setup_parent_lcp()
3130 lcp->data[2].ui = get_obj_uid(obj); in setup_parent_lcp()
3153 isns_obj_t *obj = (isns_obj_t *)p1; in cb_node_child() local
3157 uint32_t *cuid = get_child_t(obj, OBJ_ISCSI); in cb_node_child()
3195 isns_obj_t *obj = (isns_obj_t *)p1; in cb_set_ref() local
3205 refp = get_ref_p(obj, t); in cb_set_ref()
3231 isns_obj_t *obj = (isns_obj_t *)p1; in cb_clear_ref() local
3241 refp = get_ref_p(obj, t); in cb_clear_ref()
3244 while (i < NUM_OF_REF[obj->type]) { in cb_clear_ref()
3245 ref = get_ref_n(obj, i); in cb_clear_ref()
3261 isns_obj_t *obj = (isns_obj_t *)p1; in cb_add_child() local
3279 while (i < NUM_OF_CHILD[obj->type]) { in cb_add_child()
3284 upp = get_child_np(obj, i); in cb_add_child()
3353 isns_obj_t *obj = (isns_obj_t *)p1; in cb_remove_child() local
3361 cuidp = get_child_t(obj, child_type); in cb_remove_child()
3378 while (i < NUM_OF_CHILD[obj->type]) { in cb_remove_child()
3379 cuidp = get_child_n(obj, i); in cb_remove_child()
3524 isns_obj_t *obj = (isns_obj_t *)p1; in cb_ref_new2old() local
3537 ref = get_ref_t(obj, et); in cb_ref_new2old()
3627 isns_obj_t *obj; in new_ref() local
3629 obj = make_ref[p1->type](p1, p2); in new_ref()
3630 if (obj != NULL) { in new_ref()
3631 ec = register_object(obj, NULL, NULL); in new_ref()
3668 isns_obj_t *obj; in do_dereg() local
3675 obj = cache_remove(lcp, 0); in do_dereg()
3677 if (obj == NULL) { in do_dereg()
3683 (void) make_scn(ISNS_OBJECT_REMOVED, obj); in do_dereg()
3689 i < NUM_OF_CHILD[obj->type]) { in do_dereg()
3690 type = TYPE_OF_CHILD[obj->type][i]; in do_dereg()
3691 cuidp = get_child_n(obj, i); in do_dereg()
3712 if (ec == 0 && TYPE_OF_REF[obj->type][0] > 0) { in do_dereg()
3715 (void) setup_ref_lcp(lcp, obj, NULL); in do_dereg()
3717 lcp->data[2].ui = obj->type; in do_dereg()
3730 TYPE_OF_PARENT[obj->type] > 0 && in do_dereg()
3731 (uid = setup_parent_lcp(lcp, obj)) != 0) { in do_dereg()
3744 ec = write_data(DATA_DELETE, obj); in do_dereg()
3748 (void) esi_remove_obj(obj, pending); in do_dereg()
3752 if (TYPE_OF_PARENT[obj->type] != 0) { in do_dereg()
3753 lcp->curr_uid = get_parent_uid(obj); in do_dereg()
3756 lcp->curr_uid = get_obj_uid(obj); in do_dereg()
3762 obj->type == OBJ_PORTAL) { in do_dereg()
3763 (void) remove_scn_portal(get_obj_uid(obj)); in do_dereg()
3767 (void) free_object(obj); in do_dereg()
3788 isns_obj_t *obj; in dereg_assoc() local
3790 obj = cache_remove(lcp, 1); in dereg_assoc()
3793 if (obj != NULL) { in dereg_assoc()
3794 free_object(obj); in dereg_assoc()