Lines Matching defs:obj

360 	isns_obj_t *obj;
365 obj = (isns_obj_t *)p;
366 key = obj->attrs[ATTR_INDEX_ENTITY(ISNS_EID_ATTR_ID)].
401 isns_obj_t *obj;
406 obj = (isns_obj_t *)p;
407 key = obj->attrs[ATTR_INDEX_ISCSI(ISNS_ISCSI_NAME_ATTR_ID)].
443 isns_obj_t *obj;
451 obj = (isns_obj_t *)p;
452 ip = obj->attrs[ATTR_INDEX_PORTAL
454 port = obj->attrs[ATTR_INDEX_PORTAL
495 isns_obj_t *obj;
503 obj = (isns_obj_t *)p;
506 key = obj->attrs[ATTR_INDEX_PG
510 ip = obj->attrs[ATTR_INDEX_PG
512 port = obj->attrs[ATTR_INDEX_PG
564 isns_obj_t *obj;
569 obj = (isns_obj_t *)p;
570 key = obj->attrs[ATTR_INDEX_DD(ISNS_DD_NAME_ATTR_ID)].
604 isns_obj_t *obj;
609 obj = (isns_obj_t *)p;
610 key = obj->attrs[ATTR_INDEX_DDS(ISNS_DD_SET_NAME_ATTR_ID)].
663 isns_obj_t *obj = (isns_obj_t *)p;
664 isns_attr_t *attr = &obj->attrs[UID_ATTR_INDEX[obj->type]];
687 isns_obj_t *obj = (isns_obj_t *)p;
688 isns_attr_t *attr = &obj->attrs[UID_ATTR_INDEX[obj->type]];
691 attr->tag = UID_TAG[obj->type];
718 isns_obj_t *obj = (isns_obj_t *)p1;
727 uid = get_obj_uid(obj);
737 return (key_cmp(lcp, obj));
850 isns_obj_t *obj = (isns_obj_t *)p;
854 ec = write_data(DATA_ADD, obj);
859 (void) make_scn(ISNS_OBJECT_ADDED, obj);
968 * obj - portal group object.
975 isns_obj_t *obj,
980 obj->type == OBJ_PG ? &((isns_pg_t *)obj)->ref[n] : NULL;
991 isns_obj_t *obj,
995 return (*get_ref_np(obj, n));
1000 isns_obj_t *obj,
1004 isns_type_t t = obj->type;
1009 return (get_ref_np(obj, i));
1019 isns_obj_t *obj,
1023 uint32_t *refp = get_ref_p(obj, type);
1041 * obj - an object.
1048 const isns_obj_t *obj
1052 switch (obj->type) {
1054 pp = &((isns_iscsi_t *)obj)->puid;
1057 pp = &((isns_portal_t *)obj)->puid;
1060 pp = &((isns_pg_t *)obj)->puid;
1063 pp = &((isns_assoc_iscsi_t *)obj)->puid;
1066 pp = &((isns_assoc_dd_t *)obj)->puid;
1078 const isns_obj_t *obj
1081 uint32_t *pp = get_parent_p(obj);
1095 * obj - an object.
1103 isns_obj_t *obj,
1108 obj->type == OBJ_ENTITY ? &((isns_entity_t *)obj)->cuid[n] : NULL;
1119 * obj - an object.
1131 isns_obj_t *obj,
1135 uint32_t **pp = get_child_np(obj, n);
1210 * obj - an object.
1218 isns_obj_t *obj
1224 isns_attr_t *attr = &obj->attrs[lcp->id[i]];
1260 * obj - an object.
1268 isns_obj_t *obj
1271 isns_type_t type = obj->type;
1282 lcp->data[i].ui = obj->attrs[id].value.ui;
1700 isns_obj_t *obj = NULL;
1702 obj = (isns_obj_t *)calloc(1, SIZEOF_OBJ[type]);
1703 if (obj != NULL) {
1704 obj->type = type;
1712 return (obj);
1731 isns_obj_t *obj = obj_calloc(OBJ_ENTITY);
1733 if (obj != NULL) {
1737 free(obj);
1740 attr = &obj->attrs[ATTR_INDEX_ENTITY(ISNS_EID_ATTR_ID)];
1748 attr = &obj->attrs[
1758 return (obj);
1947 isns_obj_t *obj = NULL;
1960 obj = obj_calloc(OBJ_ISCSI);
1961 if (obj != NULL) {
1964 attr = &obj->attrs[
1976 *p = obj;
2014 isns_obj_t *obj = NULL;
2037 obj = obj_calloc(OBJ_PORTAL);
2038 if (obj != NULL) {
2040 attr = &obj->attrs[
2045 attr = &obj->attrs[
2054 attr = &obj->attrs[
2069 *p = obj;
2103 isns_obj_t *obj = NULL;
2109 obj = obj_calloc(OBJ_PG);
2110 if (obj != NULL) {
2113 attr = &obj->attrs[
2124 *p = obj;
2161 isns_obj_t *obj = NULL;
2171 obj = obj_calloc(OBJ_PG);
2172 if (obj != NULL) {
2174 attr = &obj->attrs[
2179 attr = &obj->attrs[
2193 *p = obj;
2231 isns_obj_t *obj = NULL;
2255 obj = obj_calloc(OBJ_PG);
2256 if (obj != NULL) {
2258 attr = &obj->attrs[
2263 attr = &obj->attrs[
2269 attr = &obj->attrs[
2282 *p = obj;
2467 * obj - the object being checked.
2474 const isns_obj_t *obj
2479 switch (obj->type) {
2481 online = obj->attrs[ATTR_INDEX_ISCSI(
2493 isns_obj_t *obj
2496 switch (obj->type) {
2498 obj->attrs[ATTR_INDEX_ISCSI(
2534 const isns_obj_t *obj;
2540 obj = (isns_obj_t *)p;
2542 if (obj->type != OBJ_ISCSI) {
2546 dd_flag = (get_dd_id(get_obj_uid(obj), ISNS_DEFAULT_DD_ID) == 0) ?
2548 online = is_obj_online(obj);
2578 type = obj->type;
2583 src_attr = &(obj->attrs[id]);
2594 src_attr = &(obj->attrs[id]);
2616 * obj - the object being freed.
2622 isns_obj_t *obj
2627 if (obj == NULL) {
2630 for (i = 0; i < NUM_OF_ATTRS[obj->type]; i++) {
2631 isns_attr_t *attr = &obj->attrs[i];
2662 while (i < NUM_OF_CHILD[obj->type]) {
2663 cuid = get_child_n(obj, i);
2671 printf("object(%d) deallocated\n", obj->type);
2674 free(obj);
2683 * obj - the object being freed.
2689 isns_obj_t *obj
2692 free_one_object(obj);
2701 * obj - the child object.
2709 isns_obj_t *obj,
2713 uint32_t *const p = get_parent_p(obj);
2727 * obj - the parent object.
2832 const isns_obj_t *obj
2839 t = obj->type;
2842 (void) setup_ref_lcp(&lc, obj, NULL);
2845 lc.data[2].ui = get_obj_uid(obj);
2863 * obj - the object being ref'ed.
2890 isns_obj_t *obj
2901 t = obj->type;
2905 (void) setup_deref_lcp(&lc, obj, rt);
2908 refp = get_ref_p(obj, lc.type);
2928 * obj - the object being added.
2938 isns_obj_t *obj,
2943 return (cache_add(obj, 0, uid_p, update_p));
2954 * obj - the association object being added.
2962 isns_obj_t *obj,
2966 return (cache_add(obj, 1, uid_p, NULL));
3104 * obj - the child object.
3112 isns_obj_t *obj
3118 puid = get_parent_uid(obj);
3120 ptype = TYPE_OF_PARENT[obj->type];
3122 lcp->data[1].ui = obj->type;
3123 lcp->data[2].ui = get_obj_uid(obj);
3146 isns_obj_t *obj = (isns_obj_t *)p1;
3150 uint32_t *cuid = get_child_t(obj, OBJ_ISCSI);
3188 isns_obj_t *obj = (isns_obj_t *)p1;
3198 refp = get_ref_p(obj, t);
3224 isns_obj_t *obj = (isns_obj_t *)p1;
3234 refp = get_ref_p(obj, t);
3237 while (i < NUM_OF_REF[obj->type]) {
3238 ref = get_ref_n(obj, i);
3254 isns_obj_t *obj = (isns_obj_t *)p1;
3272 while (i < NUM_OF_CHILD[obj->type]) {
3277 upp = get_child_np(obj, i);
3346 isns_obj_t *obj = (isns_obj_t *)p1;
3354 cuidp = get_child_t(obj, child_type);
3371 while (i < NUM_OF_CHILD[obj->type]) {
3372 cuidp = get_child_n(obj, i);
3517 isns_obj_t *obj = (isns_obj_t *)p1;
3530 ref = get_ref_t(obj, et);
3620 isns_obj_t *obj;
3622 obj = make_ref[p1->type](p1, p2);
3623 if (obj != NULL) {
3624 ec = register_object(obj, NULL, NULL);
3661 isns_obj_t *obj;
3668 obj = cache_remove(lcp, 0);
3670 if (obj == NULL) {
3676 (void) make_scn(ISNS_OBJECT_REMOVED, obj);
3682 i < NUM_OF_CHILD[obj->type]) {
3683 type = TYPE_OF_CHILD[obj->type][i];
3684 cuidp = get_child_n(obj, i);
3705 if (ec == 0 && TYPE_OF_REF[obj->type][0] > 0) {
3708 (void) setup_ref_lcp(lcp, obj, NULL);
3710 lcp->data[2].ui = obj->type;
3723 TYPE_OF_PARENT[obj->type] > 0 &&
3724 (uid = setup_parent_lcp(lcp, obj)) != 0) {
3737 ec = write_data(DATA_DELETE, obj);
3741 (void) esi_remove_obj(obj, pending);
3745 if (TYPE_OF_PARENT[obj->type] != 0) {
3746 lcp->curr_uid = get_parent_uid(obj);
3749 lcp->curr_uid = get_obj_uid(obj);
3755 obj->type == OBJ_PORTAL) {
3756 (void) remove_scn_portal(get_obj_uid(obj));
3760 (void) free_object(obj);
3781 isns_obj_t *obj;
3783 obj = cache_remove(lcp, 1);
3786 if (obj != NULL) {
3787 free_object(obj);