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()
1700 isns_obj_t *obj = NULL; in obj_calloc() local
1702 obj = (isns_obj_t *)calloc(1, SIZEOF_OBJ[type]); in obj_calloc()
1703 if (obj != NULL) { in obj_calloc()
1704 obj->type = type; in obj_calloc()
1712 return (obj); in obj_calloc()
1731 isns_obj_t *obj = obj_calloc(OBJ_ENTITY); in make_default_entity() local
1733 if (obj != NULL) { in make_default_entity()
1737 free(obj); in make_default_entity()
1740 attr = &obj->attrs[ATTR_INDEX_ENTITY(ISNS_EID_ATTR_ID)]; in make_default_entity()
1748 attr = &obj->attrs[ in make_default_entity()
1758 return (obj); in make_default_entity()
1947 isns_obj_t *obj = NULL; in reg_get_iscsi() local
1960 obj = obj_calloc(OBJ_ISCSI); in reg_get_iscsi()
1961 if (obj != NULL) { in reg_get_iscsi()
1964 attr = &obj->attrs[ in reg_get_iscsi()
1976 *p = obj; in reg_get_iscsi()
2014 isns_obj_t *obj = NULL; in reg_get_portal() local
2037 obj = obj_calloc(OBJ_PORTAL); in reg_get_portal()
2038 if (obj != NULL) { in reg_get_portal()
2040 attr = &obj->attrs[ in reg_get_portal()
2045 attr = &obj->attrs[ in reg_get_portal()
2054 attr = &obj->attrs[ in reg_get_portal()
2069 *p = obj; in reg_get_portal()
2103 isns_obj_t *obj = NULL; in reg_get_pg() local
2109 obj = obj_calloc(OBJ_PG); in reg_get_pg()
2110 if (obj != NULL) { in reg_get_pg()
2113 attr = &obj->attrs[ in reg_get_pg()
2124 *p = obj; in reg_get_pg()
2161 isns_obj_t *obj = NULL; in reg_get_pg1() local
2171 obj = obj_calloc(OBJ_PG); in reg_get_pg1()
2172 if (obj != NULL) { in reg_get_pg1()
2174 attr = &obj->attrs[ in reg_get_pg1()
2179 attr = &obj->attrs[ in reg_get_pg1()
2193 *p = obj; in reg_get_pg1()
2231 isns_obj_t *obj = NULL; in reg_get_pg2() local
2255 obj = obj_calloc(OBJ_PG); in reg_get_pg2()
2256 if (obj != NULL) { in reg_get_pg2()
2258 attr = &obj->attrs[ in reg_get_pg2()
2263 attr = &obj->attrs[ in reg_get_pg2()
2269 attr = &obj->attrs[ in reg_get_pg2()
2282 *p = obj; in reg_get_pg2()
2474 const isns_obj_t *obj in is_obj_online() argument
2479 switch (obj->type) { in is_obj_online()
2481 online = obj->attrs[ATTR_INDEX_ISCSI( in is_obj_online()
2493 isns_obj_t *obj in set_obj_offline() argument
2496 switch (obj->type) { in set_obj_offline()
2498 obj->attrs[ATTR_INDEX_ISCSI( in set_obj_offline()
2534 const isns_obj_t *obj; in assoc_clone() local
2540 obj = (isns_obj_t *)p; in assoc_clone()
2542 if (obj->type != OBJ_ISCSI) { in assoc_clone()
2546 dd_flag = (get_dd_id(get_obj_uid(obj), ISNS_DEFAULT_DD_ID) == 0) ? in assoc_clone()
2548 online = is_obj_online(obj); in assoc_clone()
2578 type = obj->type; in assoc_clone()
2583 src_attr = &(obj->attrs[id]); in assoc_clone()
2594 src_attr = &(obj->attrs[id]); in assoc_clone()
2622 isns_obj_t *obj in free_one_object() argument
2627 if (obj == NULL) { in free_one_object()
2630 for (i = 0; i < NUM_OF_ATTRS[obj->type]; i++) { in free_one_object()
2631 isns_attr_t *attr = &obj->attrs[i]; in free_one_object()
2662 while (i < NUM_OF_CHILD[obj->type]) { in free_one_object()
2663 cuid = get_child_n(obj, i); in free_one_object()
2671 printf("object(%d) deallocated\n", obj->type); in free_one_object()
2674 free(obj); in free_one_object()
2689 isns_obj_t *obj in free_object() argument
2692 free_one_object(obj); in free_object()
2709 isns_obj_t *obj, in set_parent_obj() argument
2713 uint32_t *const p = get_parent_p(obj); in set_parent_obj()
2832 const isns_obj_t *obj in update_ref_obj() argument
2839 t = obj->type; in update_ref_obj()
2842 (void) setup_ref_lcp(&lc, obj, NULL); in update_ref_obj()
2845 lc.data[2].ui = get_obj_uid(obj); in update_ref_obj()
2890 isns_obj_t *obj in update_deref_obj() argument
2901 t = obj->type; in update_deref_obj()
2905 (void) setup_deref_lcp(&lc, obj, rt); in update_deref_obj()
2908 refp = get_ref_p(obj, lc.type); in update_deref_obj()
2938 isns_obj_t *obj, in register_object() argument
2943 return (cache_add(obj, 0, uid_p, update_p)); in register_object()
2962 isns_obj_t *obj, in register_assoc() argument
2966 return (cache_add(obj, 1, uid_p, NULL)); in register_assoc()
3112 isns_obj_t *obj in setup_parent_lcp() argument
3118 puid = get_parent_uid(obj); in setup_parent_lcp()
3120 ptype = TYPE_OF_PARENT[obj->type]; in setup_parent_lcp()
3122 lcp->data[1].ui = obj->type; in setup_parent_lcp()
3123 lcp->data[2].ui = get_obj_uid(obj); in setup_parent_lcp()
3146 isns_obj_t *obj = (isns_obj_t *)p1; in cb_node_child() local
3150 uint32_t *cuid = get_child_t(obj, OBJ_ISCSI); in cb_node_child()
3188 isns_obj_t *obj = (isns_obj_t *)p1; in cb_set_ref() local
3198 refp = get_ref_p(obj, t); in cb_set_ref()
3224 isns_obj_t *obj = (isns_obj_t *)p1; in cb_clear_ref() local
3234 refp = get_ref_p(obj, t); in cb_clear_ref()
3237 while (i < NUM_OF_REF[obj->type]) { in cb_clear_ref()
3238 ref = get_ref_n(obj, i); in cb_clear_ref()
3254 isns_obj_t *obj = (isns_obj_t *)p1; in cb_add_child() local
3272 while (i < NUM_OF_CHILD[obj->type]) { in cb_add_child()
3277 upp = get_child_np(obj, i); in cb_add_child()
3346 isns_obj_t *obj = (isns_obj_t *)p1; in cb_remove_child() local
3354 cuidp = get_child_t(obj, child_type); in cb_remove_child()
3371 while (i < NUM_OF_CHILD[obj->type]) { in cb_remove_child()
3372 cuidp = get_child_n(obj, i); in cb_remove_child()
3517 isns_obj_t *obj = (isns_obj_t *)p1; in cb_ref_new2old() local
3530 ref = get_ref_t(obj, et); in cb_ref_new2old()
3620 isns_obj_t *obj; in new_ref() local
3622 obj = make_ref[p1->type](p1, p2); in new_ref()
3623 if (obj != NULL) { in new_ref()
3624 ec = register_object(obj, NULL, NULL); in new_ref()
3661 isns_obj_t *obj; in do_dereg() local
3668 obj = cache_remove(lcp, 0); in do_dereg()
3670 if (obj == NULL) { in do_dereg()
3676 (void) make_scn(ISNS_OBJECT_REMOVED, obj); in do_dereg()
3682 i < NUM_OF_CHILD[obj->type]) { in do_dereg()
3683 type = TYPE_OF_CHILD[obj->type][i]; in do_dereg()
3684 cuidp = get_child_n(obj, i); in do_dereg()
3705 if (ec == 0 && TYPE_OF_REF[obj->type][0] > 0) { in do_dereg()
3708 (void) setup_ref_lcp(lcp, obj, NULL); in do_dereg()
3710 lcp->data[2].ui = obj->type; in do_dereg()
3723 TYPE_OF_PARENT[obj->type] > 0 && in do_dereg()
3724 (uid = setup_parent_lcp(lcp, obj)) != 0) { in do_dereg()
3737 ec = write_data(DATA_DELETE, obj); in do_dereg()
3741 (void) esi_remove_obj(obj, pending); in do_dereg()
3745 if (TYPE_OF_PARENT[obj->type] != 0) { in do_dereg()
3746 lcp->curr_uid = get_parent_uid(obj); in do_dereg()
3749 lcp->curr_uid = get_obj_uid(obj); in do_dereg()
3755 obj->type == OBJ_PORTAL) { in do_dereg()
3756 (void) remove_scn_portal(get_obj_uid(obj)); in do_dereg()
3760 (void) free_object(obj); in do_dereg()
3781 isns_obj_t *obj; in dereg_assoc() local
3783 obj = cache_remove(lcp, 1); in dereg_assoc()
3786 if (obj != NULL) { in dereg_assoc()
3787 free_object(obj); in dereg_assoc()