1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27#ifndef DEF_XML_ROOT 28#define DEF_XML_ROOT(ISNS_DATA, VENDOR, SMI, VERSION, ONE_DOT_O) 29#endif 30 31#ifndef DEF_XML_DATA 32#define DEF_XML_DATA(TAG, TYPE, ARG1, ARG2) 33#endif 34 35#ifndef DEF_XML_PROP 36#define DEF_XML_PROP(INDEX, TYPE, NAME, TAG, ID) 37#endif 38 39/* 40 * The root element. 41 */ 42DEF_XML_ROOT("isns_data", 43 "vendor", "Sun Microsystems, Inc.", 44 "version", "1.0") 45 46/* 47 * iSNS objects. 48 */ 49DEF_XML_DATA("pg", "oabcd", OBJ_PG, 'a') 50DEF_XML_DATA("portal", "oefg", OBJ_PORTAL, 'e') 51DEF_XML_DATA("iscsi", "ohi", OBJ_ISCSI, 'h') 52DEF_XML_DATA("entity", "ojk", OBJ_ENTITY, 'j') 53DEF_XML_DATA("dd", "olm", OBJ_DD, 'l') 54DEF_XML_DATA("dds", "ono", OBJ_DDS, 'n') 55DEF_XML_DATA("assoc_iscsi", "opq", OBJ_ASSOC_ISCSI, 'p') 56DEF_XML_DATA("assoc_dd", "or", OBJ_ASSOC_DD, 'r') 57 58/* 59 * UID attributes and key attributes of iSNS objects. 60 */ 61DEF_XML_PROP('a', 'u', "uid", ISNS_PG_INDEX_ATTR_ID, 62 ATTR_INDEX_PG(ISNS_PG_INDEX_ATTR_ID)) 63DEF_XML_PROP('b', 's', "pg_iscsi", ISNS_PG_ISCSI_NAME_ATTR_ID, 64 ATTR_INDEX_PG(ISNS_PG_ISCSI_NAME_ATTR_ID)) 65DEF_XML_PROP('c', 'p', "pg_ip", ISNS_PG_PORTAL_IP_ADDR_ATTR_ID, 66 ATTR_INDEX_PG(ISNS_PG_PORTAL_IP_ADDR_ATTR_ID)) 67DEF_XML_PROP('d', 'u', "pg_port", ISNS_PG_PORTAL_PORT_ATTR_ID, 68 ATTR_INDEX_PG(ISNS_PG_PORTAL_PORT_ATTR_ID)) 69DEF_XML_PROP('e', 'u', "uid", ISNS_PORTAL_INDEX_ATTR_ID, 70 ATTR_INDEX_PORTAL(ISNS_PORTAL_INDEX_ATTR_ID)) 71DEF_XML_PROP('f', 'p', "ip", ISNS_PORTAL_IP_ADDR_ATTR_ID, 72 ATTR_INDEX_PORTAL(ISNS_PORTAL_IP_ADDR_ATTR_ID)) 73DEF_XML_PROP('g', 'u', "port", ISNS_PORTAL_PORT_ATTR_ID, 74 ATTR_INDEX_PORTAL(ISNS_PORTAL_PORT_ATTR_ID)) 75DEF_XML_PROP('h', 'u', "uid", ISNS_ISCSI_NODE_INDEX_ATTR_ID, 76 ATTR_INDEX_ISCSI(ISNS_ISCSI_NODE_INDEX_ATTR_ID)) 77DEF_XML_PROP('i', 's', "name", ISNS_ISCSI_NAME_ATTR_ID, 78 ATTR_INDEX_ISCSI(ISNS_ISCSI_NAME_ATTR_ID)) 79DEF_XML_PROP('j', 'u', "uid", ISNS_ENTITY_INDEX_ATTR_ID, 80 ATTR_INDEX_ENTITY(ISNS_ENTITY_INDEX_ATTR_ID)) 81DEF_XML_PROP('k', 's', "eid", ISNS_EID_ATTR_ID, 82 ATTR_INDEX_ENTITY(ISNS_EID_ATTR_ID)) 83DEF_XML_PROP('l', 'u', "uid", ISNS_DD_ID_ATTR_ID, 84 ATTR_INDEX_DD(ISNS_DD_ID_ATTR_ID)) 85DEF_XML_PROP('m', 's', "name", ISNS_DD_NAME_ATTR_ID, 86 ATTR_INDEX_DD(ISNS_DD_NAME_ATTR_ID)) 87DEF_XML_PROP('n', 'u', "uid", ISNS_DD_SET_ID_ATTR_ID, 88 ATTR_INDEX_DDS(ISNS_DD_SET_ID_ATTR_ID)) 89DEF_XML_PROP('o', 's', "name", ISNS_DD_SET_NAME_ATTR_ID, 90 ATTR_INDEX_DDS(ISNS_DD_SET_NAME_ATTR_ID)) 91DEF_XML_PROP('p', 'u', "iscsi_uid", ISNS_DD_ISCSI_INDEX_ATTR_ID, 92 ATTR_INDEX_ASSOC_ISCSI(ISNS_DD_ISCSI_INDEX_ATTR_ID)) 93DEF_XML_PROP('q', 's', "iscsi_name", ISNS_DD_ISCSI_NAME_ATTR_ID, 94 ATTR_INDEX_ASSOC_ISCSI(ISNS_DD_ISCSI_NAME_ATTR_ID)) 95DEF_XML_PROP('r', 'u', "dd_uid", ISNS_DD_ID_ATTR_ID, 96 ATTR_INDEX_ASSOC_DD(ISNS_DD_ID_ATTR_ID)) 97 98/* 99 * Attributes for Portal Group object. 100 */ 101DEF_XML_DATA("pgt", "u", ISNS_PG_TAG_ATTR_ID, 102 ATTR_INDEX_PG(ISNS_PG_TAG_ATTR_ID)) 103 104/* 105 * Attributes for Portal object. 106 */ 107DEF_XML_DATA("name", "s", ISNS_PORTAL_NAME_ATTR_ID, 108 ATTR_INDEX_PORTAL(ISNS_PORTAL_NAME_ATTR_ID)) 109DEF_XML_DATA("esi_int", "u", ISNS_ESI_INTERVAL_ATTR_ID, 110 ATTR_INDEX_PORTAL(ISNS_ESI_INTERVAL_ATTR_ID)) 111DEF_XML_DATA("esi", "u", ISNS_ESI_PORT_ATTR_ID, 112 ATTR_INDEX_PORTAL(ISNS_ESI_PORT_ATTR_ID)) 113DEF_XML_DATA("scn", "u", ISNS_SCN_PORT_ATTR_ID, 114 ATTR_INDEX_PORTAL(ISNS_SCN_PORT_ATTR_ID)) 115 116/* 117 * Attributes for Storage Node object. 118 */ 119DEF_XML_DATA("type", "u", ISNS_ISCSI_NODE_TYPE_ATTR_ID, 120 ATTR_INDEX_ISCSI(ISNS_ISCSI_NODE_TYPE_ATTR_ID)) 121DEF_XML_DATA("alias", "s", ISNS_ISCSI_ALIAS_ATTR_ID, 122 ATTR_INDEX_ISCSI(ISNS_ISCSI_ALIAS_ATTR_ID)) 123DEF_XML_DATA("scn_bmp", "u", ISNS_ISCSI_SCN_BITMAP_ATTR_ID, 124 ATTR_INDEX_ISCSI(ISNS_ISCSI_SCN_BITMAP_ATTR_ID)) 125DEF_XML_DATA("auth", "s", ISNS_ISCSI_AUTH_METHOD_ATTR_ID, 126 ATTR_INDEX_ISCSI(ISNS_ISCSI_AUTH_METHOD_ATTR_ID)) 127 128/* 129 * Attributes for Network Entity object. 130 */ 131DEF_XML_DATA("protocol", "u", ISNS_ENTITY_PROTOCOL_ATTR_ID, 132 ATTR_INDEX_ENTITY(ISNS_ENTITY_PROTOCOL_ATTR_ID)) 133DEF_XML_DATA("period", "u", ISNS_ENTITY_REG_PERIOD_ATTR_ID, 134 ATTR_INDEX_ENTITY(ISNS_ENTITY_REG_PERIOD_ATTR_ID)) 135 136/* 137 * Attributes for Discovery Domain object. 138 */ 139 140/* 141 * Attributes for Discovery Domain Set object. 142 */ 143DEF_XML_DATA("status", "u", ISNS_DD_SET_STATUS_ATTR_ID, 144 ATTR_INDEX_DDS(ISNS_DD_SET_STATUS_ATTR_ID)) 145 146#undef DEF_XML_ROOT 147#undef DEF_XML_DATA 148#undef DEF_XML_PROP 149