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*9585STim.Szeto@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237836SJohn.Forte@Sun.COM * Use is subject to license terms. 247836SJohn.Forte@Sun.COM */ 257836SJohn.Forte@Sun.COM 267836SJohn.Forte@Sun.COM #ifndef _LIBSTMF_H 277836SJohn.Forte@Sun.COM #define _LIBSTMF_H 287836SJohn.Forte@Sun.COM 297836SJohn.Forte@Sun.COM #include <time.h> 307836SJohn.Forte@Sun.COM #include <sys/param.h> 317836SJohn.Forte@Sun.COM #include <libnvpair.h> 327836SJohn.Forte@Sun.COM 337836SJohn.Forte@Sun.COM #ifdef __cplusplus 347836SJohn.Forte@Sun.COM extern "C" { 357836SJohn.Forte@Sun.COM #endif 367836SJohn.Forte@Sun.COM 377836SJohn.Forte@Sun.COM /* Constants and Types */ 387836SJohn.Forte@Sun.COM 397836SJohn.Forte@Sun.COM /* LU and Local Port states */ 407836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_OFFLINE 0 417836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_OFFLINING 1 427836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_ONLINE 2 437836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_ONLINING 3 447836SJohn.Forte@Sun.COM #define STMF_LOGICAL_UNIT_UNREGISTERED 4 457836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_OFFLINE 5 467836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_OFFLINING 6 477836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_ONLINE 7 487836SJohn.Forte@Sun.COM #define STMF_TARGET_PORT_ONLINING 8 497836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_ONLINE 9 507836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_OFFLINE 10 517836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_ONLINING 11 527836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_OFFLINING 12 537836SJohn.Forte@Sun.COM #define STMF_SERVICE_STATE_UNKNOWN 13 547836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_NONE 14 557836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_INIT 15 567836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_INIT_DONE 16 577836SJohn.Forte@Sun.COM #define STMF_CONFIG_STATE_UNKNOWN 17 587836SJohn.Forte@Sun.COM 597836SJohn.Forte@Sun.COM #define STMF_IDENT_LENGTH 255 607836SJohn.Forte@Sun.COM 617836SJohn.Forte@Sun.COM /* API status return values */ 627836SJohn.Forte@Sun.COM #define STMF_STATUS_SUCCESS 0x0000 637836SJohn.Forte@Sun.COM #define STMF_STATUS_ERROR 0x8000 647836SJohn.Forte@Sun.COM #define STMF_ERROR_BUSY (STMF_STATUS_ERROR | 0x01) 657836SJohn.Forte@Sun.COM #define STMF_ERROR_NOT_FOUND (STMF_STATUS_ERROR | 0x02) 667836SJohn.Forte@Sun.COM #define STMF_ERROR_MEMBER_NOT_FOUND (STMF_STATUS_ERROR | 0x03) 677836SJohn.Forte@Sun.COM #define STMF_ERROR_GROUP_NOT_FOUND (STMF_STATUS_ERROR | 0x04) 687836SJohn.Forte@Sun.COM #define STMF_ERROR_PERM (STMF_STATUS_ERROR | 0x05) 697836SJohn.Forte@Sun.COM #define STMF_ERROR_NOMEM (STMF_STATUS_ERROR | 0x06) 707836SJohn.Forte@Sun.COM #define STMF_ERROR_INVALID_ARG (STMF_STATUS_ERROR | 0x07) 717836SJohn.Forte@Sun.COM #define STMF_ERROR_EXISTS (STMF_STATUS_ERROR | 0x08) 727836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_NOT_FOUND (STMF_STATUS_ERROR | 0x09) 737836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_ONLINE (STMF_STATUS_ERROR | 0x0a) 747836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_OFFLINE (STMF_STATUS_ERROR | 0x0b) 757836SJohn.Forte@Sun.COM #define STMF_ERROR_GROUP_IN_USE (STMF_STATUS_ERROR | 0x0c) 767836SJohn.Forte@Sun.COM #define STMF_ERROR_LUN_IN_USE (STMF_STATUS_ERROR | 0x0d) 777836SJohn.Forte@Sun.COM #define STMF_ERROR_VE_CONFLICT (STMF_STATUS_ERROR | 0x0e) 787836SJohn.Forte@Sun.COM #define STMF_ERROR_CONFIG_NONE (STMF_STATUS_ERROR | 0x0f) 797836SJohn.Forte@Sun.COM #define STMF_ERROR_SERVICE_DATA_VERSION (STMF_STATUS_ERROR | 0x10) 807836SJohn.Forte@Sun.COM #define STMF_ERROR_INVALID_HG (STMF_STATUS_ERROR | 0x11) 817836SJohn.Forte@Sun.COM #define STMF_ERROR_INVALID_TG (STMF_STATUS_ERROR | 0x12) 827836SJohn.Forte@Sun.COM #define STMF_ERROR_PROV_DATA_STALE (STMF_STATUS_ERROR | 0x13) 83*9585STim.Szeto@Sun.COM #define STMF_ERROR_NO_PROP (STMF_STATUS_ERROR | 0x14) 84*9585STim.Szeto@Sun.COM #define STMF_ERROR_NO_PROP_VAL (STMF_STATUS_ERROR | 0x15) 85*9585STim.Szeto@Sun.COM #define STMF_ERROR_MISSING_PROP_VAL (STMF_STATUS_ERROR | 0x16) 86*9585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLOCKSIZE (STMF_STATUS_ERROR | 0x17) 87*9585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_ALREADY (STMF_STATUS_ERROR | 0x18) 88*9585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_PROPSIZE (STMF_STATUS_ERROR | 0x19) 89*9585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_PROP (STMF_STATUS_ERROR | 0x20) 90*9585STim.Szeto@Sun.COM #define STMF_ERROR_PERSIST_TYPE (STMF_STATUS_ERROR | 0x21) 91*9585STim.Szeto@Sun.COM 92*9585STim.Szeto@Sun.COM /* Failures for stmfCreateLu */ 93*9585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_IN_USE (STMF_STATUS_ERROR | 0x100) 94*9585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLKSIZE (STMF_STATUS_ERROR | 0x101) 95*9585STim.Szeto@Sun.COM #define STMF_ERROR_GUID_IN_USE (STMF_STATUS_ERROR | 0x102) 96*9585STim.Szeto@Sun.COM #define STMF_ERROR_META_FILE_NAME (STMF_STATUS_ERROR | 0x103) 97*9585STim.Szeto@Sun.COM #define STMF_ERROR_DATA_FILE_NAME (STMF_STATUS_ERROR | 0x104) 98*9585STim.Szeto@Sun.COM #define STMF_ERROR_SIZE_OUT_OF_RANGE (STMF_STATUS_ERROR | 0x105) 99*9585STim.Szeto@Sun.COM #define STMF_ERROR_LU_BUSY (STMF_STATUS_ERROR | 0x106) 100*9585STim.Szeto@Sun.COM #define STMF_ERROR_META_CREATION (STMF_STATUS_ERROR | 0x107) 101*9585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_SIZE_INVALID (STMF_STATUS_ERROR | 0x108) 102*9585STim.Szeto@Sun.COM #define STMF_ERROR_WRITE_CACHE_SET (STMF_STATUS_ERROR | 0x109) 1037836SJohn.Forte@Sun.COM 1047836SJohn.Forte@Sun.COM /* Initiator Name Types */ 1057836SJohn.Forte@Sun.COM #define STMF_FC_PORT_WWN 1 1067836SJohn.Forte@Sun.COM #define STMF_ISCSI_NAME 2 1077836SJohn.Forte@Sun.COM 1087836SJohn.Forte@Sun.COM 1097836SJohn.Forte@Sun.COM /* provider types */ 1107836SJohn.Forte@Sun.COM #define STMF_LU_PROVIDER_TYPE 1 1117836SJohn.Forte@Sun.COM #define STMF_PORT_PROVIDER_TYPE 2 1127836SJohn.Forte@Sun.COM 113*9585STim.Szeto@Sun.COM /* LU Resource types */ 114*9585STim.Szeto@Sun.COM #define STMF_DISK 0 115*9585STim.Szeto@Sun.COM 116*9585STim.Szeto@Sun.COM /* Persistence methods */ 117*9585STim.Szeto@Sun.COM #define STMF_PERSIST_SMF 1 118*9585STim.Szeto@Sun.COM #define STMF_PERSIST_NONE 2 119*9585STim.Szeto@Sun.COM 120*9585STim.Szeto@Sun.COM /* 121*9585STim.Szeto@Sun.COM * LU Disk Properties 122*9585STim.Szeto@Sun.COM */ 123*9585STim.Szeto@Sun.COM 124*9585STim.Szeto@Sun.COM enum { 125*9585STim.Szeto@Sun.COM STMF_LU_PROP_ALIAS = 1, 126*9585STim.Szeto@Sun.COM STMF_LU_PROP_BLOCK_SIZE, 127*9585STim.Szeto@Sun.COM STMF_LU_PROP_COMPANY_ID, 128*9585STim.Szeto@Sun.COM STMF_LU_PROP_FILENAME, 129*9585STim.Szeto@Sun.COM STMF_LU_PROP_GUID, 130*9585STim.Szeto@Sun.COM STMF_LU_PROP_META_FILENAME, 131*9585STim.Szeto@Sun.COM STMF_LU_PROP_NEW, 132*9585STim.Szeto@Sun.COM STMF_LU_PROP_SIZE, 133*9585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_PROTECT, 134*9585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_CACHE_DISABLE, 135*9585STim.Szeto@Sun.COM STMF_LU_PROP_VID, 136*9585STim.Szeto@Sun.COM STMF_LU_PROP_PID, 137*9585STim.Szeto@Sun.COM STMF_LU_PROP_SERIAL_NUM 138*9585STim.Szeto@Sun.COM }; 139*9585STim.Szeto@Sun.COM 1407836SJohn.Forte@Sun.COM 1417836SJohn.Forte@Sun.COM /* devid code set and name types */ 1427836SJohn.Forte@Sun.COM #define EUI_64_TYPE 2 1437836SJohn.Forte@Sun.COM #define NAA_TYPE 3 1447836SJohn.Forte@Sun.COM #define SCSI_NAME_TYPE 8 1457836SJohn.Forte@Sun.COM 1467836SJohn.Forte@Sun.COM #define BINARY_CODE_SET 1 1477836SJohn.Forte@Sun.COM #define ASCII_CODE_SET 2 1487836SJohn.Forte@Sun.COM #define UTF_8_CODE_SET 3 1497836SJohn.Forte@Sun.COM 1507836SJohn.Forte@Sun.COM typedef enum _stmfProtocol 1517836SJohn.Forte@Sun.COM { 1527836SJohn.Forte@Sun.COM STMF_PROTOCOL_FIBRE_CHANNEL = 0, 1537836SJohn.Forte@Sun.COM STMF_PROTOCOL_ISCSI = 1, 1547836SJohn.Forte@Sun.COM STMF_PROTOCOL_SAS = 2 1557836SJohn.Forte@Sun.COM } stmfProtocol; 1567836SJohn.Forte@Sun.COM 1577836SJohn.Forte@Sun.COM 1587836SJohn.Forte@Sun.COM typedef struct _stmfGuid 1597836SJohn.Forte@Sun.COM { 1607836SJohn.Forte@Sun.COM uchar_t guid[16]; 1617836SJohn.Forte@Sun.COM } stmfGuid; 1627836SJohn.Forte@Sun.COM 1637836SJohn.Forte@Sun.COM typedef struct _stmfGuidList 1647836SJohn.Forte@Sun.COM { 1657836SJohn.Forte@Sun.COM uint32_t cnt; 1667836SJohn.Forte@Sun.COM stmfGuid guid[1]; 1677836SJohn.Forte@Sun.COM } stmfGuidList; 1687836SJohn.Forte@Sun.COM 1697836SJohn.Forte@Sun.COM typedef struct _stmfState 1707836SJohn.Forte@Sun.COM { 1717836SJohn.Forte@Sun.COM int operationalState; 1727836SJohn.Forte@Sun.COM int configState; 1737836SJohn.Forte@Sun.COM } stmfState; 1747836SJohn.Forte@Sun.COM 1757836SJohn.Forte@Sun.COM typedef struct _stmfDevid 1767836SJohn.Forte@Sun.COM { 1777836SJohn.Forte@Sun.COM uint8_t identLength; /* length of ident */ 1787836SJohn.Forte@Sun.COM uint8_t ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */ 1797836SJohn.Forte@Sun.COM } stmfDevid; 1807836SJohn.Forte@Sun.COM 1817836SJohn.Forte@Sun.COM typedef struct _stmfDevidList 1827836SJohn.Forte@Sun.COM { 1837836SJohn.Forte@Sun.COM uint32_t cnt; 1847836SJohn.Forte@Sun.COM stmfDevid devid[1]; 1857836SJohn.Forte@Sun.COM } stmfDevidList; 1867836SJohn.Forte@Sun.COM 1877836SJohn.Forte@Sun.COM typedef char stmfGroupName[256]; 1887836SJohn.Forte@Sun.COM typedef char stmfProviderName[256]; 1897836SJohn.Forte@Sun.COM 1907836SJohn.Forte@Sun.COM typedef struct _stmfGroupList 1917836SJohn.Forte@Sun.COM { 1927836SJohn.Forte@Sun.COM uint32_t cnt; 1937836SJohn.Forte@Sun.COM stmfGroupName name[1]; 1947836SJohn.Forte@Sun.COM } stmfGroupList; 1957836SJohn.Forte@Sun.COM 1967836SJohn.Forte@Sun.COM typedef struct _stmfProvider 1977836SJohn.Forte@Sun.COM { 1987836SJohn.Forte@Sun.COM int providerType; 1997836SJohn.Forte@Sun.COM stmfProviderName name; 2007836SJohn.Forte@Sun.COM } stmfProvider; 2017836SJohn.Forte@Sun.COM 2027836SJohn.Forte@Sun.COM typedef struct _stmfProviderList 2037836SJohn.Forte@Sun.COM { 2047836SJohn.Forte@Sun.COM uint32_t cnt; 2057836SJohn.Forte@Sun.COM stmfProvider provider[1]; 2067836SJohn.Forte@Sun.COM } stmfProviderList; 2077836SJohn.Forte@Sun.COM 2087836SJohn.Forte@Sun.COM typedef struct _stmfSession 2097836SJohn.Forte@Sun.COM { 2107836SJohn.Forte@Sun.COM stmfDevid initiator; 2117836SJohn.Forte@Sun.COM char alias[256]; 2127836SJohn.Forte@Sun.COM time_t creationTime; 2137836SJohn.Forte@Sun.COM } stmfSession; 2147836SJohn.Forte@Sun.COM 2157836SJohn.Forte@Sun.COM typedef struct _stmfSessionList 2167836SJohn.Forte@Sun.COM { 2177836SJohn.Forte@Sun.COM uint32_t cnt; 2187836SJohn.Forte@Sun.COM stmfSession session[1]; 2197836SJohn.Forte@Sun.COM } stmfSessionList; 2207836SJohn.Forte@Sun.COM 2217836SJohn.Forte@Sun.COM 2227836SJohn.Forte@Sun.COM typedef struct _stmfViewEntry 2237836SJohn.Forte@Sun.COM { 2247836SJohn.Forte@Sun.COM boolean_t veIndexValid; /* if B_TRUE, veIndex is valid value */ 2257836SJohn.Forte@Sun.COM uint32_t veIndex; /* View Entry index */ 2267836SJohn.Forte@Sun.COM boolean_t allHosts; /* all initiator ports */ 2277836SJohn.Forte@Sun.COM stmfGroupName hostGroup; /* Host Group Name */ 2287836SJohn.Forte@Sun.COM boolean_t allTargets; /* B_TRUE = targetGroup is invalid */ 2297836SJohn.Forte@Sun.COM stmfGroupName targetGroup; /* Target Group Name */ 2307836SJohn.Forte@Sun.COM boolean_t luNbrValid; /* if B_TRUE, luNbr is a valid value */ 2317836SJohn.Forte@Sun.COM uchar_t luNbr[8]; /* LU number for this view entry */ 2327836SJohn.Forte@Sun.COM } stmfViewEntry; 2337836SJohn.Forte@Sun.COM 2347836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryList 2357836SJohn.Forte@Sun.COM { 2367836SJohn.Forte@Sun.COM uint32_t cnt; 2377836SJohn.Forte@Sun.COM stmfViewEntry ve[1]; 2387836SJohn.Forte@Sun.COM } stmfViewEntryList; 2397836SJohn.Forte@Sun.COM 2407836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryProperties 2417836SJohn.Forte@Sun.COM { 2427836SJohn.Forte@Sun.COM stmfGuid associatedLogicalUnitGuid; 2437836SJohn.Forte@Sun.COM stmfViewEntry viewEntry; 2447836SJohn.Forte@Sun.COM } stmfViewEntryProperties; 2457836SJohn.Forte@Sun.COM 2467836SJohn.Forte@Sun.COM typedef struct _stmfGroupProperties 2477836SJohn.Forte@Sun.COM { 2487836SJohn.Forte@Sun.COM uint32_t cnt; 2497836SJohn.Forte@Sun.COM stmfDevid name[1]; 2507836SJohn.Forte@Sun.COM } stmfGroupProperties; 2517836SJohn.Forte@Sun.COM 2527836SJohn.Forte@Sun.COM typedef struct _stmfTargetProperties 2537836SJohn.Forte@Sun.COM { 2547836SJohn.Forte@Sun.COM stmfProviderName providerName; 2557836SJohn.Forte@Sun.COM char alias[256]; 2567836SJohn.Forte@Sun.COM uint16_t status; 2577836SJohn.Forte@Sun.COM stmfProtocol protocol; 2587836SJohn.Forte@Sun.COM stmfDevid devid; 2597836SJohn.Forte@Sun.COM } stmfTargetProperties; 2607836SJohn.Forte@Sun.COM 2617836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProperties 2627836SJohn.Forte@Sun.COM { 2637836SJohn.Forte@Sun.COM char alias[256]; 2647836SJohn.Forte@Sun.COM uchar_t vendor[8]; 2657836SJohn.Forte@Sun.COM uchar_t product[16]; 2667836SJohn.Forte@Sun.COM uchar_t revision[4]; 2677836SJohn.Forte@Sun.COM uint32_t status; 2687836SJohn.Forte@Sun.COM char providerName[256]; 2697836SJohn.Forte@Sun.COM stmfGuid luid; 2707836SJohn.Forte@Sun.COM } stmfLogicalUnitProperties; 2717836SJohn.Forte@Sun.COM 272*9585STim.Szeto@Sun.COM typedef void * luResource; 273*9585STim.Szeto@Sun.COM 2747836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProviderProperties 2757836SJohn.Forte@Sun.COM { 2767836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 2777836SJohn.Forte@Sun.COM uint32_t instance; 2787836SJohn.Forte@Sun.COM uint32_t status; 2797836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 2807836SJohn.Forte@Sun.COM } stmfLogicalUnitProviderProperties; 2817836SJohn.Forte@Sun.COM 2827836SJohn.Forte@Sun.COM typedef struct _stmfLocalPortProviderProperties 2837836SJohn.Forte@Sun.COM { 2847836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 2857836SJohn.Forte@Sun.COM uint32_t instance; 2867836SJohn.Forte@Sun.COM uint32_t status; 2877836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 2887836SJohn.Forte@Sun.COM } stmfLocalPortProviderProperties; 2897836SJohn.Forte@Sun.COM 2907836SJohn.Forte@Sun.COM 2917836SJohn.Forte@Sun.COM /* API prototypes */ 2927836SJohn.Forte@Sun.COM int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name); 2937836SJohn.Forte@Sun.COM int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName); 2947836SJohn.Forte@Sun.COM int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 2957836SJohn.Forte@Sun.COM int stmfClearProviderData(char *providerName, int providerType); 2967836SJohn.Forte@Sun.COM int stmfCreateHostGroup(stmfGroupName *hostGroupName); 297*9585STim.Szeto@Sun.COM int stmfCreateLu(luResource hdl, stmfGuid *luGuid); 298*9585STim.Szeto@Sun.COM int stmfCreateLuResource(uint16_t dType, luResource *hdl); 2997836SJohn.Forte@Sun.COM int stmfCreateTargetGroup(stmfGroupName *targetGroupName); 3007836SJohn.Forte@Sun.COM int stmfDeleteHostGroup(stmfGroupName *hostGroupName); 301*9585STim.Szeto@Sun.COM int stmfDeleteLu(stmfGuid *luGuid); 3027836SJohn.Forte@Sun.COM int stmfDeleteTargetGroup(stmfGroupName *targetGroupName); 3037836SJohn.Forte@Sun.COM int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid); 3047836SJohn.Forte@Sun.COM int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid); 305*9585STim.Szeto@Sun.COM int stmfFreeLuResource(luResource hdl); 3067836SJohn.Forte@Sun.COM void stmfFreeMemory(void *); 3077836SJohn.Forte@Sun.COM int stmfGetHostGroupList(stmfGroupList **initiatorGroupList); 3087836SJohn.Forte@Sun.COM int stmfGetHostGroupMembers(stmfGroupName *hostGroupName, 3097836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3107836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList); 3117836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderProperties(stmfProviderName *providerName, 3127836SJohn.Forte@Sun.COM stmfLocalPortProviderProperties *providerProperties); 3137836SJohn.Forte@Sun.COM int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList); 3147836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit, 3157836SJohn.Forte@Sun.COM stmfLogicalUnitProperties *logicalUnitProps); 3167836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList); 3177836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName, 3187836SJohn.Forte@Sun.COM stmfLogicalUnitProviderProperties *providerProperties); 319*9585STim.Szeto@Sun.COM int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop, 320*9585STim.Szeto@Sun.COM size_t *propLen); 321*9585STim.Szeto@Sun.COM int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl); 322*9585STim.Szeto@Sun.COM int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState); 3237836SJohn.Forte@Sun.COM int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType); 3247836SJohn.Forte@Sun.COM int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl, 3257836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 3267836SJohn.Forte@Sun.COM int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList); 3277836SJohn.Forte@Sun.COM int stmfGetState(stmfState *); 3287836SJohn.Forte@Sun.COM int stmfGetTargetGroupList(stmfGroupList **targetGroupList); 3297836SJohn.Forte@Sun.COM int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName, 3307836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3317836SJohn.Forte@Sun.COM int stmfGetTargetList(stmfDevidList **targetList); 3327836SJohn.Forte@Sun.COM int stmfGetTargetProperties(stmfDevid *target, 3337836SJohn.Forte@Sun.COM stmfTargetProperties *targetProps); 3347836SJohn.Forte@Sun.COM int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 335*9585STim.Szeto@Sun.COM int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid); 3367836SJohn.Forte@Sun.COM int stmfLoadConfig(void); 337*9585STim.Szeto@Sun.COM int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal); 338*9585STim.Szeto@Sun.COM int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop, 339*9585STim.Szeto@Sun.COM const char *propVal); 3407836SJohn.Forte@Sun.COM int stmfOffline(void); 3417836SJohn.Forte@Sun.COM int stmfOfflineTarget(stmfDevid *devid); 3427836SJohn.Forte@Sun.COM int stmfOfflineLogicalUnit(stmfGuid *logicalUnit); 3437836SJohn.Forte@Sun.COM int stmfOnline(void); 3447836SJohn.Forte@Sun.COM int stmfOnlineTarget(stmfDevid *devid); 3457836SJohn.Forte@Sun.COM int stmfOnlineLogicalUnit(stmfGuid *logicalUnit); 3467836SJohn.Forte@Sun.COM int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName, 3477836SJohn.Forte@Sun.COM stmfDevid *initiatorName); 3487836SJohn.Forte@Sun.COM int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName, 3497836SJohn.Forte@Sun.COM stmfDevid *targetName); 3507836SJohn.Forte@Sun.COM int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 351*9585STim.Szeto@Sun.COM int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal); 352*9585STim.Szeto@Sun.COM int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet); 3537836SJohn.Forte@Sun.COM int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType); 3547836SJohn.Forte@Sun.COM int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl, 3557836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 3567836SJohn.Forte@Sun.COM 3577836SJohn.Forte@Sun.COM #ifdef __cplusplus 3587836SJohn.Forte@Sun.COM } 3597836SJohn.Forte@Sun.COM #endif 3607836SJohn.Forte@Sun.COM 3617836SJohn.Forte@Sun.COM #endif /* _LIBSTMF_H */ 362