17836SJohn.Forte@Sun.COM /* 27836SJohn.Forte@Sun.COM * CDDL HEADER START 37836SJohn.Forte@Sun.COM * 47836SJohn.Forte@Sun.COM * The contents of this file are subject to the terms of the 57836SJohn.Forte@Sun.COM * Common Development and Distribution License (the "License"). 67836SJohn.Forte@Sun.COM * You may not use this file except in compliance with the License. 77836SJohn.Forte@Sun.COM * 87836SJohn.Forte@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97836SJohn.Forte@Sun.COM * or http://www.opensolaris.org/os/licensing. 107836SJohn.Forte@Sun.COM * See the License for the specific language governing permissions 117836SJohn.Forte@Sun.COM * and limitations under the License. 127836SJohn.Forte@Sun.COM * 137836SJohn.Forte@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 147836SJohn.Forte@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157836SJohn.Forte@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 167836SJohn.Forte@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 177836SJohn.Forte@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 187836SJohn.Forte@Sun.COM * 197836SJohn.Forte@Sun.COM * CDDL HEADER END 207836SJohn.Forte@Sun.COM */ 217836SJohn.Forte@Sun.COM /* 22*12682SSrivijitha.Dugganapalli@Sun.COM * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 237836SJohn.Forte@Sun.COM */ 247836SJohn.Forte@Sun.COM 257836SJohn.Forte@Sun.COM #ifndef _LIBSTMF_H 267836SJohn.Forte@Sun.COM #define _LIBSTMF_H 277836SJohn.Forte@Sun.COM 287836SJohn.Forte@Sun.COM #include <time.h> 297836SJohn.Forte@Sun.COM #include <sys/param.h> 307836SJohn.Forte@Sun.COM #include <libnvpair.h> 317836SJohn.Forte@Sun.COM 327836SJohn.Forte@Sun.COM #ifdef __cplusplus 337836SJohn.Forte@Sun.COM extern "C" { 347836SJohn.Forte@Sun.COM #endif 357836SJohn.Forte@Sun.COM 367836SJohn.Forte@Sun.COM /* Constants and Types */ 377836SJohn.Forte@Sun.COM 387836SJohn.Forte@Sun.COM /* LU and Local Port states */ 397836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_OFFLINE 0 407836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_OFFLINING 1 417836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_ONLINE 2 427836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_ONLINING 3 437836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_UNREGISTERED 4 447836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_OFFLINE 5 457836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_OFFLINING 6 467836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_ONLINE 7 477836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_ONLINING 8 487836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_ONLINE 9 497836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_OFFLINE 10 507836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_ONLINING 11 517836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_OFFLINING 12 527836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_UNKNOWN 13 537836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_NONE 14 547836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_INIT 15 557836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_INIT_DONE 16 567836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_UNKNOWN 17 57*12682SSrivijitha.Dugganapalli@Sun.COM #define STMF_DEFAULT_LU_STATE 18 58*12682SSrivijitha.Dugganapalli@Sun.COM #define STMF_DEFAULT_TARGET_PORT_STATE 19 597836SJohn.Forte@Sun.COM 607836SJohn.Forte@Sun.COM #define STMF_IDENT_LENGTH 255 617836SJohn.Forte@Sun.COM 627836SJohn.Forte@Sun.COM /* API status return values */ 637836SJohn.Forte@Sun.COM #define STMF_STATUS_SUCCESS 0x0000 647836SJohn.Forte@Sun.COM #define STMF_STATUS_ERROR 0x8000 657836SJohn.Forte@Sun.COM #define STMF_ERROR_BUSY (STMF_STATUS_ERROR | 0x01) 667836SJohn.Forte@Sun.COM #define STMF_ERROR_NOT_FOUND (STMF_STATUS_ERROR | 0x02) 677836SJohn.Forte@Sun.COM #define STMF_ERROR_MEMBER_NOT_FOUND (STMF_STATUS_ERROR | 0x03) 687836SJohn.Forte@Sun.COM #define STMF_ERROR_GROUP_NOT_FOUND (STMF_STATUS_ERROR | 0x04) 697836SJohn.Forte@Sun.COM #define STMF_ERROR_PERM (STMF_STATUS_ERROR | 0x05) 707836SJohn.Forte@Sun.COM #define STMF_ERROR_NOMEM (STMF_STATUS_ERROR | 0x06) 717836SJohn.Forte@Sun.COM #define STMF_ERROR_INVALID_ARG (STMF_STATUS_ERROR | 0x07) 727836SJohn.Forte@Sun.COM #define STMF_ERROR_EXISTS (STMF_STATUS_ERROR | 0x08) 737836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_NOT_FOUND (STMF_STATUS_ERROR | 0x09) 747836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_ONLINE (STMF_STATUS_ERROR | 0x0a) 757836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_OFFLINE (STMF_STATUS_ERROR | 0x0b) 767836SJohn.Forte@Sun.COM #define STMF_ERROR_GROUP_IN_USE (STMF_STATUS_ERROR | 0x0c) 777836SJohn.Forte@Sun.COM #define STMF_ERROR_LUN_IN_USE (STMF_STATUS_ERROR | 0x0d) 787836SJohn.Forte@Sun.COM #define STMF_ERROR_VE_CONFLICT (STMF_STATUS_ERROR | 0x0e) 797836SJohn.Forte@Sun.COM #define STMF_ERROR_CONFIG_NONE (STMF_STATUS_ERROR | 0x0f) 807836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_DATA_VERSION (STMF_STATUS_ERROR | 0x10) 817836SJohn.Forte@Sun.COM #define STMF_ERROR_INVALID_HG (STMF_STATUS_ERROR | 0x11) 827836SJohn.Forte@Sun.COM #define STMF_ERROR_INVALID_TG (STMF_STATUS_ERROR | 0x12) 837836SJohn.Forte@Sun.COM #define STMF_ERROR_PROV_DATA_STALE (STMF_STATUS_ERROR | 0x13) 849585STim.Szeto@Sun.COM #define STMF_ERROR_NO_PROP (STMF_STATUS_ERROR | 0x14) 859585STim.Szeto@Sun.COM #define STMF_ERROR_NO_PROP_VAL (STMF_STATUS_ERROR | 0x15) 869585STim.Szeto@Sun.COM #define STMF_ERROR_MISSING_PROP_VAL (STMF_STATUS_ERROR | 0x16) 879585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLOCKSIZE (STMF_STATUS_ERROR | 0x17) 889585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_ALREADY (STMF_STATUS_ERROR | 0x18) 899585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_PROPSIZE (STMF_STATUS_ERROR | 0x19) 909585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_PROP (STMF_STATUS_ERROR | 0x20) 919585STim.Szeto@Sun.COM #define STMF_ERROR_PERSIST_TYPE (STMF_STATUS_ERROR | 0x21) 929884STim.Szeto@Sun.COM #define STMF_ERROR_TG_ONLINE (STMF_STATUS_ERROR | 0x22) 9310725SJohn.Forte@Sun.COM #define STMF_ERROR_ACCESS_STATE_SET (STMF_STATUS_ERROR | 0x23) 9410725SJohn.Forte@Sun.COM #define STMF_ERROR_NO_PROP_STANDBY (STMF_STATUS_ERROR | 0x24) 9510725SJohn.Forte@Sun.COM #define STMF_ERROR_POST_MSG_FAILED (STMF_STATUS_ERROR | 0x25) 9610725SJohn.Forte@Sun.COM #define STMF_ERROR_DOOR_INSTALLED (STMF_STATUS_ERROR | 0x26) 979585STim.Szeto@Sun.COM 989585STim.Szeto@Sun.COM /* Failures for stmfCreateLu */ 999585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_IN_USE (STMF_STATUS_ERROR | 0x100) 1009585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLKSIZE (STMF_STATUS_ERROR | 0x101) 1019585STim.Szeto@Sun.COM #define STMF_ERROR_GUID_IN_USE (STMF_STATUS_ERROR | 0x102) 1029585STim.Szeto@Sun.COM #define STMF_ERROR_META_FILE_NAME (STMF_STATUS_ERROR | 0x103) 1039585STim.Szeto@Sun.COM #define STMF_ERROR_DATA_FILE_NAME (STMF_STATUS_ERROR | 0x104) 1049585STim.Szeto@Sun.COM #define STMF_ERROR_SIZE_OUT_OF_RANGE (STMF_STATUS_ERROR | 0x105) 1059585STim.Szeto@Sun.COM #define STMF_ERROR_LU_BUSY (STMF_STATUS_ERROR | 0x106) 1069585STim.Szeto@Sun.COM #define STMF_ERROR_META_CREATION (STMF_STATUS_ERROR | 0x107) 1079585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_SIZE_INVALID (STMF_STATUS_ERROR | 0x108) 1089585STim.Szeto@Sun.COM #define STMF_ERROR_WRITE_CACHE_SET (STMF_STATUS_ERROR | 0x109) 1097836SJohn.Forte@Sun.COM 1107836SJohn.Forte@Sun.COM /* Initiator Name Types */ 1117836SJohn.Forte@Sun.COM #define STMF_FC_PORT_WWN 1 1127836SJohn.Forte@Sun.COM #define STMF_ISCSI_NAME 2 1137836SJohn.Forte@Sun.COM 1147836SJohn.Forte@Sun.COM 1157836SJohn.Forte@Sun.COM /* provider types */ 1167836SJohn.Forte@Sun.COM #define STMF_LU_PROVIDER_TYPE 1 1177836SJohn.Forte@Sun.COM #define STMF_PORT_PROVIDER_TYPE 2 1187836SJohn.Forte@Sun.COM 1199585STim.Szeto@Sun.COM /* LU Resource types */ 1209585STim.Szeto@Sun.COM #define STMF_DISK 0 1219585STim.Szeto@Sun.COM 1229585STim.Szeto@Sun.COM /* Persistence methods */ 1239585STim.Szeto@Sun.COM #define STMF_PERSIST_SMF 1 1249585STim.Szeto@Sun.COM #define STMF_PERSIST_NONE 2 1259585STim.Szeto@Sun.COM 12610725SJohn.Forte@Sun.COM /* Logical unit access states */ 12710725SJohn.Forte@Sun.COM #define STMF_ACCESS_ACTIVE "0" 12810725SJohn.Forte@Sun.COM #define STMF_ACCESS_ACTIVE_TO_STANDBY "1" 12910725SJohn.Forte@Sun.COM #define STMF_ACCESS_STANDBY "2" 13010725SJohn.Forte@Sun.COM #define STMF_ACCESS_STANDBY_TO_ACTIVE "3" 13110725SJohn.Forte@Sun.COM 1329585STim.Szeto@Sun.COM /* 1339585STim.Szeto@Sun.COM * LU Disk Properties 1349585STim.Szeto@Sun.COM */ 1359585STim.Szeto@Sun.COM 1369585STim.Szeto@Sun.COM enum { 1379585STim.Szeto@Sun.COM STMF_LU_PROP_ALIAS = 1, 1389585STim.Szeto@Sun.COM STMF_LU_PROP_BLOCK_SIZE, 1399585STim.Szeto@Sun.COM STMF_LU_PROP_COMPANY_ID, 1409585STim.Szeto@Sun.COM STMF_LU_PROP_FILENAME, 1419585STim.Szeto@Sun.COM STMF_LU_PROP_GUID, 1429585STim.Szeto@Sun.COM STMF_LU_PROP_META_FILENAME, 14310113SNattuvetty.Bhavyan@Sun.COM STMF_LU_PROP_MGMT_URL, 1449585STim.Szeto@Sun.COM STMF_LU_PROP_NEW, 1459585STim.Szeto@Sun.COM STMF_LU_PROP_SIZE, 1469585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_PROTECT, 1479585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_CACHE_DISABLE, 1489585STim.Szeto@Sun.COM STMF_LU_PROP_VID, 1499585STim.Szeto@Sun.COM STMF_LU_PROP_PID, 15010725SJohn.Forte@Sun.COM STMF_LU_PROP_SERIAL_NUM, 15110765SJohn.Forte@Sun.COM STMF_LU_PROP_ACCESS_STATE, 15210765SJohn.Forte@Sun.COM STMF_LU_PROP_HOST_ID 1539585STim.Szeto@Sun.COM }; 1549585STim.Szeto@Sun.COM 1557836SJohn.Forte@Sun.COM 1567836SJohn.Forte@Sun.COM /* devid code set and name types */ 1577836SJohn.Forte@Sun.COM #define EUI_64_TYPE 2 1587836SJohn.Forte@Sun.COM #define NAA_TYPE 3 1597836SJohn.Forte@Sun.COM #define SCSI_NAME_TYPE 8 1607836SJohn.Forte@Sun.COM 1617836SJohn.Forte@Sun.COM #define BINARY_CODE_SET 1 1627836SJohn.Forte@Sun.COM #define ASCII_CODE_SET 2 1637836SJohn.Forte@Sun.COM #define UTF_8_CODE_SET 3 1647836SJohn.Forte@Sun.COM 1657836SJohn.Forte@Sun.COM typedef enum _stmfProtocol 1667836SJohn.Forte@Sun.COM { 1677836SJohn.Forte@Sun.COM STMF_PROTOCOL_FIBRE_CHANNEL = 0, 16810725SJohn.Forte@Sun.COM STMF_PROTOCOL_SCSI = 1, 16910725SJohn.Forte@Sun.COM STMF_PROTOCOL_SSA = 2, 17010725SJohn.Forte@Sun.COM STMF_PROTOCOL_IEEE_1394 = 3, 17110725SJohn.Forte@Sun.COM STMF_PROTOCOL_SRP = 4, 17210725SJohn.Forte@Sun.COM STMF_PROTOCOL_ISCSI = 5, 17310725SJohn.Forte@Sun.COM STMF_PROTOCOL_SAS = 6 1747836SJohn.Forte@Sun.COM } stmfProtocol; 1757836SJohn.Forte@Sun.COM 1767836SJohn.Forte@Sun.COM 1777836SJohn.Forte@Sun.COM typedef struct _stmfGuid 1787836SJohn.Forte@Sun.COM { 1797836SJohn.Forte@Sun.COM uchar_t guid[16]; 1807836SJohn.Forte@Sun.COM } stmfGuid; 1817836SJohn.Forte@Sun.COM 1827836SJohn.Forte@Sun.COM typedef struct _stmfGuidList 1837836SJohn.Forte@Sun.COM { 1847836SJohn.Forte@Sun.COM uint32_t cnt; 1857836SJohn.Forte@Sun.COM stmfGuid guid[1]; 1867836SJohn.Forte@Sun.COM } stmfGuidList; 1877836SJohn.Forte@Sun.COM 1887836SJohn.Forte@Sun.COM typedef struct _stmfState 1897836SJohn.Forte@Sun.COM { 1907836SJohn.Forte@Sun.COM int operationalState; 1917836SJohn.Forte@Sun.COM int configState; 1927836SJohn.Forte@Sun.COM } stmfState; 1937836SJohn.Forte@Sun.COM 1947836SJohn.Forte@Sun.COM typedef struct _stmfDevid 1957836SJohn.Forte@Sun.COM { 1967836SJohn.Forte@Sun.COM uint8_t identLength; /* length of ident */ 1977836SJohn.Forte@Sun.COM uint8_t ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */ 1987836SJohn.Forte@Sun.COM } stmfDevid; 1997836SJohn.Forte@Sun.COM 2007836SJohn.Forte@Sun.COM typedef struct _stmfDevidList 2017836SJohn.Forte@Sun.COM { 2027836SJohn.Forte@Sun.COM uint32_t cnt; 2037836SJohn.Forte@Sun.COM stmfDevid devid[1]; 2047836SJohn.Forte@Sun.COM } stmfDevidList; 2057836SJohn.Forte@Sun.COM 2067836SJohn.Forte@Sun.COM typedef char stmfGroupName[256]; 2077836SJohn.Forte@Sun.COM typedef char stmfProviderName[256]; 2087836SJohn.Forte@Sun.COM 2097836SJohn.Forte@Sun.COM typedef struct _stmfGroupList 2107836SJohn.Forte@Sun.COM { 2117836SJohn.Forte@Sun.COM uint32_t cnt; 2127836SJohn.Forte@Sun.COM stmfGroupName name[1]; 2137836SJohn.Forte@Sun.COM } stmfGroupList; 2147836SJohn.Forte@Sun.COM 2157836SJohn.Forte@Sun.COM typedef struct _stmfProvider 2167836SJohn.Forte@Sun.COM { 2177836SJohn.Forte@Sun.COM int providerType; 2187836SJohn.Forte@Sun.COM stmfProviderName name; 2197836SJohn.Forte@Sun.COM } stmfProvider; 2207836SJohn.Forte@Sun.COM 2217836SJohn.Forte@Sun.COM typedef struct _stmfProviderList 2227836SJohn.Forte@Sun.COM { 2237836SJohn.Forte@Sun.COM uint32_t cnt; 2247836SJohn.Forte@Sun.COM stmfProvider provider[1]; 2257836SJohn.Forte@Sun.COM } stmfProviderList; 2267836SJohn.Forte@Sun.COM 2277836SJohn.Forte@Sun.COM typedef struct _stmfSession 2287836SJohn.Forte@Sun.COM { 2297836SJohn.Forte@Sun.COM stmfDevid initiator; 2307836SJohn.Forte@Sun.COM char alias[256]; 2317836SJohn.Forte@Sun.COM time_t creationTime; 2327836SJohn.Forte@Sun.COM } stmfSession; 2337836SJohn.Forte@Sun.COM 2347836SJohn.Forte@Sun.COM typedef struct _stmfSessionList 2357836SJohn.Forte@Sun.COM { 2367836SJohn.Forte@Sun.COM uint32_t cnt; 2377836SJohn.Forte@Sun.COM stmfSession session[1]; 2387836SJohn.Forte@Sun.COM } stmfSessionList; 2397836SJohn.Forte@Sun.COM 2407836SJohn.Forte@Sun.COM 2417836SJohn.Forte@Sun.COM typedef struct _stmfViewEntry 2427836SJohn.Forte@Sun.COM { 2437836SJohn.Forte@Sun.COM boolean_t veIndexValid; /* if B_TRUE, veIndex is valid value */ 2447836SJohn.Forte@Sun.COM uint32_t veIndex; /* View Entry index */ 2457836SJohn.Forte@Sun.COM boolean_t allHosts; /* all initiator ports */ 2467836SJohn.Forte@Sun.COM stmfGroupName hostGroup; /* Host Group Name */ 2477836SJohn.Forte@Sun.COM boolean_t allTargets; /* B_TRUE = targetGroup is invalid */ 2487836SJohn.Forte@Sun.COM stmfGroupName targetGroup; /* Target Group Name */ 2497836SJohn.Forte@Sun.COM boolean_t luNbrValid; /* if B_TRUE, luNbr is a valid value */ 2507836SJohn.Forte@Sun.COM uchar_t luNbr[8]; /* LU number for this view entry */ 2517836SJohn.Forte@Sun.COM } stmfViewEntry; 2527836SJohn.Forte@Sun.COM 2537836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryList 2547836SJohn.Forte@Sun.COM { 2557836SJohn.Forte@Sun.COM uint32_t cnt; 2567836SJohn.Forte@Sun.COM stmfViewEntry ve[1]; 2577836SJohn.Forte@Sun.COM } stmfViewEntryList; 2587836SJohn.Forte@Sun.COM 2597836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryProperties 2607836SJohn.Forte@Sun.COM { 2617836SJohn.Forte@Sun.COM stmfGuid associatedLogicalUnitGuid; 2627836SJohn.Forte@Sun.COM stmfViewEntry viewEntry; 2637836SJohn.Forte@Sun.COM } stmfViewEntryProperties; 2647836SJohn.Forte@Sun.COM 2657836SJohn.Forte@Sun.COM typedef struct _stmfGroupProperties 2667836SJohn.Forte@Sun.COM { 2677836SJohn.Forte@Sun.COM uint32_t cnt; 2687836SJohn.Forte@Sun.COM stmfDevid name[1]; 2697836SJohn.Forte@Sun.COM } stmfGroupProperties; 2707836SJohn.Forte@Sun.COM 2717836SJohn.Forte@Sun.COM typedef struct _stmfTargetProperties 2727836SJohn.Forte@Sun.COM { 2737836SJohn.Forte@Sun.COM stmfProviderName providerName; 2747836SJohn.Forte@Sun.COM char alias[256]; 2757836SJohn.Forte@Sun.COM uint16_t status; 2767836SJohn.Forte@Sun.COM stmfProtocol protocol; 2777836SJohn.Forte@Sun.COM stmfDevid devid; 2787836SJohn.Forte@Sun.COM } stmfTargetProperties; 2797836SJohn.Forte@Sun.COM 2807836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProperties 2817836SJohn.Forte@Sun.COM { 2827836SJohn.Forte@Sun.COM char alias[256]; 2837836SJohn.Forte@Sun.COM uchar_t vendor[8]; 2847836SJohn.Forte@Sun.COM uchar_t product[16]; 2857836SJohn.Forte@Sun.COM uchar_t revision[4]; 2867836SJohn.Forte@Sun.COM uint32_t status; 2877836SJohn.Forte@Sun.COM char providerName[256]; 2887836SJohn.Forte@Sun.COM stmfGuid luid; 2897836SJohn.Forte@Sun.COM } stmfLogicalUnitProperties; 2907836SJohn.Forte@Sun.COM 2919585STim.Szeto@Sun.COM typedef void * luResource; 2929585STim.Szeto@Sun.COM 2937836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProviderProperties 2947836SJohn.Forte@Sun.COM { 2957836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 2967836SJohn.Forte@Sun.COM uint32_t instance; 2977836SJohn.Forte@Sun.COM uint32_t status; 2987836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 2997836SJohn.Forte@Sun.COM } stmfLogicalUnitProviderProperties; 3007836SJohn.Forte@Sun.COM 3017836SJohn.Forte@Sun.COM typedef struct _stmfLocalPortProviderProperties 3027836SJohn.Forte@Sun.COM { 3037836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 3047836SJohn.Forte@Sun.COM uint32_t instance; 3057836SJohn.Forte@Sun.COM uint32_t status; 3067836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 3077836SJohn.Forte@Sun.COM } stmfLocalPortProviderProperties; 3087836SJohn.Forte@Sun.COM 3097836SJohn.Forte@Sun.COM /* API prototypes */ 3107836SJohn.Forte@Sun.COM int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name); 3117836SJohn.Forte@Sun.COM int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName); 3127836SJohn.Forte@Sun.COM int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 3137836SJohn.Forte@Sun.COM int stmfClearProviderData(char *providerName, int providerType); 3147836SJohn.Forte@Sun.COM int stmfCreateHostGroup(stmfGroupName *hostGroupName); 3159585STim.Szeto@Sun.COM int stmfCreateLu(luResource hdl, stmfGuid *luGuid); 3169585STim.Szeto@Sun.COM int stmfCreateLuResource(uint16_t dType, luResource *hdl); 3177836SJohn.Forte@Sun.COM int stmfCreateTargetGroup(stmfGroupName *targetGroupName); 3187836SJohn.Forte@Sun.COM int stmfDeleteHostGroup(stmfGroupName *hostGroupName); 3199585STim.Szeto@Sun.COM int stmfDeleteLu(stmfGuid *luGuid); 3207836SJohn.Forte@Sun.COM int stmfDeleteTargetGroup(stmfGroupName *targetGroupName); 32110725SJohn.Forte@Sun.COM void stmfDestroyProxyDoor(int hdl); 3227836SJohn.Forte@Sun.COM int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid); 3237836SJohn.Forte@Sun.COM int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid); 3249585STim.Szeto@Sun.COM int stmfFreeLuResource(luResource hdl); 3257836SJohn.Forte@Sun.COM void stmfFreeMemory(void *); 32610725SJohn.Forte@Sun.COM int stmfGetAluaState(boolean_t *enabled, uint32_t *node); 32711103SJohn.Forte@Sun.COM int stmfGetGlobalLuProp(uint16_t dType, uint32_t prop, char *propVal, 32811103SJohn.Forte@Sun.COM size_t *propLen); 3297836SJohn.Forte@Sun.COM int stmfGetHostGroupList(stmfGroupList **initiatorGroupList); 3307836SJohn.Forte@Sun.COM int stmfGetHostGroupMembers(stmfGroupName *hostGroupName, 3317836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3327836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList); 3337836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderProperties(stmfProviderName *providerName, 3347836SJohn.Forte@Sun.COM stmfLocalPortProviderProperties *providerProperties); 3357836SJohn.Forte@Sun.COM int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList); 3367836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit, 3377836SJohn.Forte@Sun.COM stmfLogicalUnitProperties *logicalUnitProps); 3387836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList); 3397836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName, 3407836SJohn.Forte@Sun.COM stmfLogicalUnitProviderProperties *providerProperties); 3419585STim.Szeto@Sun.COM int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop, 3429585STim.Szeto@Sun.COM size_t *propLen); 3439585STim.Szeto@Sun.COM int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl); 3449585STim.Szeto@Sun.COM int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState); 3457836SJohn.Forte@Sun.COM int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType); 3467836SJohn.Forte@Sun.COM int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl, 3477836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 3487836SJohn.Forte@Sun.COM int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList); 3497836SJohn.Forte@Sun.COM int stmfGetState(stmfState *); 3507836SJohn.Forte@Sun.COM int stmfGetTargetGroupList(stmfGroupList **targetGroupList); 3517836SJohn.Forte@Sun.COM int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName, 3527836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3537836SJohn.Forte@Sun.COM int stmfGetTargetList(stmfDevidList **targetList); 3547836SJohn.Forte@Sun.COM int stmfGetTargetProperties(stmfDevid *target, 3557836SJohn.Forte@Sun.COM stmfTargetProperties *targetProps); 3567836SJohn.Forte@Sun.COM int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 3579585STim.Szeto@Sun.COM int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid); 35810725SJohn.Forte@Sun.COM int stmfInitProxyDoor(int *hdl, int fd); 3597836SJohn.Forte@Sun.COM int stmfLoadConfig(void); 36010725SJohn.Forte@Sun.COM int stmfLuStandby(stmfGuid *luGuid); 3619585STim.Szeto@Sun.COM int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal); 3629585STim.Szeto@Sun.COM int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop, 3639585STim.Szeto@Sun.COM const char *propVal); 3647836SJohn.Forte@Sun.COM int stmfOffline(void); 3657836SJohn.Forte@Sun.COM int stmfOfflineTarget(stmfDevid *devid); 3667836SJohn.Forte@Sun.COM int stmfOfflineLogicalUnit(stmfGuid *logicalUnit); 3677836SJohn.Forte@Sun.COM int stmfOnline(void); 3687836SJohn.Forte@Sun.COM int stmfOnlineTarget(stmfDevid *devid); 3697836SJohn.Forte@Sun.COM int stmfOnlineLogicalUnit(stmfGuid *logicalUnit); 37010725SJohn.Forte@Sun.COM int stmfPostProxyMsg(int hdl, void *buf, uint32_t buflen); 3717836SJohn.Forte@Sun.COM int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName, 3727836SJohn.Forte@Sun.COM stmfDevid *initiatorName); 3737836SJohn.Forte@Sun.COM int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName, 3747836SJohn.Forte@Sun.COM stmfDevid *targetName); 3757836SJohn.Forte@Sun.COM int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 37610725SJohn.Forte@Sun.COM int stmfSetAluaState(boolean_t enabled, uint32_t node); 37711103SJohn.Forte@Sun.COM int stmfSetGlobalLuProp(uint16_t dType, uint32_t propType, const char *propVal); 3789585STim.Szeto@Sun.COM int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal); 3799585STim.Szeto@Sun.COM int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet); 3807836SJohn.Forte@Sun.COM int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType); 3817836SJohn.Forte@Sun.COM int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl, 3827836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 38310691STim.Szeto@Sun.COM int stmfValidateView(stmfViewEntry *viewEntry); 384*12682SSrivijitha.Dugganapalli@Sun.COM int stmfSetStmfProp(uint8_t propType, char *propVal); 385*12682SSrivijitha.Dugganapalli@Sun.COM int stmfGetStmfProp(uint8_t propType, char *propVal, size_t *propLen); 386*12682SSrivijitha.Dugganapalli@Sun.COM int stmfLoadStmfProps(void); 3877836SJohn.Forte@Sun.COM 3887836SJohn.Forte@Sun.COM #ifdef __cplusplus 3897836SJohn.Forte@Sun.COM } 3907836SJohn.Forte@Sun.COM #endif 3917836SJohn.Forte@Sun.COM 3927836SJohn.Forte@Sun.COM #endif /* _LIBSTMF_H */ 393