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 /* 229585STim.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) 839585STim.Szeto@Sun.COM #define STMF_ERROR_NO_PROP (STMF_STATUS_ERROR | 0x14) 849585STim.Szeto@Sun.COM #define STMF_ERROR_NO_PROP_VAL (STMF_STATUS_ERROR | 0x15) 859585STim.Szeto@Sun.COM #define STMF_ERROR_MISSING_PROP_VAL (STMF_STATUS_ERROR | 0x16) 869585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLOCKSIZE (STMF_STATUS_ERROR | 0x17) 879585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_ALREADY (STMF_STATUS_ERROR | 0x18) 889585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_PROPSIZE (STMF_STATUS_ERROR | 0x19) 899585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_PROP (STMF_STATUS_ERROR | 0x20) 909585STim.Szeto@Sun.COM #define STMF_ERROR_PERSIST_TYPE (STMF_STATUS_ERROR | 0x21) 91*9884STim.Szeto@Sun.COM #define STMF_ERROR_TG_ONLINE (STMF_STATUS_ERROR | 0x22) 929585STim.Szeto@Sun.COM 939585STim.Szeto@Sun.COM /* Failures for stmfCreateLu */ 949585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_IN_USE (STMF_STATUS_ERROR | 0x100) 959585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLKSIZE (STMF_STATUS_ERROR | 0x101) 969585STim.Szeto@Sun.COM #define STMF_ERROR_GUID_IN_USE (STMF_STATUS_ERROR | 0x102) 979585STim.Szeto@Sun.COM #define STMF_ERROR_META_FILE_NAME (STMF_STATUS_ERROR | 0x103) 989585STim.Szeto@Sun.COM #define STMF_ERROR_DATA_FILE_NAME (STMF_STATUS_ERROR | 0x104) 999585STim.Szeto@Sun.COM #define STMF_ERROR_SIZE_OUT_OF_RANGE (STMF_STATUS_ERROR | 0x105) 1009585STim.Szeto@Sun.COM #define STMF_ERROR_LU_BUSY (STMF_STATUS_ERROR | 0x106) 1019585STim.Szeto@Sun.COM #define STMF_ERROR_META_CREATION (STMF_STATUS_ERROR | 0x107) 1029585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_SIZE_INVALID (STMF_STATUS_ERROR | 0x108) 1039585STim.Szeto@Sun.COM #define STMF_ERROR_WRITE_CACHE_SET (STMF_STATUS_ERROR | 0x109) 1047836SJohn.Forte@Sun.COM 1057836SJohn.Forte@Sun.COM /* Initiator Name Types */ 1067836SJohn.Forte@Sun.COM #define STMF_FC_PORT_WWN 1 1077836SJohn.Forte@Sun.COM #define STMF_ISCSI_NAME 2 1087836SJohn.Forte@Sun.COM 1097836SJohn.Forte@Sun.COM 1107836SJohn.Forte@Sun.COM /* provider types */ 1117836SJohn.Forte@Sun.COM #define STMF_LU_PROVIDER_TYPE 1 1127836SJohn.Forte@Sun.COM #define STMF_PORT_PROVIDER_TYPE 2 1137836SJohn.Forte@Sun.COM 1149585STim.Szeto@Sun.COM /* LU Resource types */ 1159585STim.Szeto@Sun.COM #define STMF_DISK 0 1169585STim.Szeto@Sun.COM 1179585STim.Szeto@Sun.COM /* Persistence methods */ 1189585STim.Szeto@Sun.COM #define STMF_PERSIST_SMF 1 1199585STim.Szeto@Sun.COM #define STMF_PERSIST_NONE 2 1209585STim.Szeto@Sun.COM 1219585STim.Szeto@Sun.COM /* 1229585STim.Szeto@Sun.COM * LU Disk Properties 1239585STim.Szeto@Sun.COM */ 1249585STim.Szeto@Sun.COM 1259585STim.Szeto@Sun.COM enum { 1269585STim.Szeto@Sun.COM STMF_LU_PROP_ALIAS = 1, 1279585STim.Szeto@Sun.COM STMF_LU_PROP_BLOCK_SIZE, 1289585STim.Szeto@Sun.COM STMF_LU_PROP_COMPANY_ID, 1299585STim.Szeto@Sun.COM STMF_LU_PROP_FILENAME, 1309585STim.Szeto@Sun.COM STMF_LU_PROP_GUID, 1319585STim.Szeto@Sun.COM STMF_LU_PROP_META_FILENAME, 1329585STim.Szeto@Sun.COM STMF_LU_PROP_NEW, 1339585STim.Szeto@Sun.COM STMF_LU_PROP_SIZE, 1349585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_PROTECT, 1359585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_CACHE_DISABLE, 1369585STim.Szeto@Sun.COM STMF_LU_PROP_VID, 1379585STim.Szeto@Sun.COM STMF_LU_PROP_PID, 1389585STim.Szeto@Sun.COM STMF_LU_PROP_SERIAL_NUM 1399585STim.Szeto@Sun.COM }; 1409585STim.Szeto@Sun.COM 1417836SJohn.Forte@Sun.COM 1427836SJohn.Forte@Sun.COM /* devid code set and name types */ 1437836SJohn.Forte@Sun.COM #define EUI_64_TYPE 2 1447836SJohn.Forte@Sun.COM #define NAA_TYPE 3 1457836SJohn.Forte@Sun.COM #define SCSI_NAME_TYPE 8 1467836SJohn.Forte@Sun.COM 1477836SJohn.Forte@Sun.COM #define BINARY_CODE_SET 1 1487836SJohn.Forte@Sun.COM #define ASCII_CODE_SET 2 1497836SJohn.Forte@Sun.COM #define UTF_8_CODE_SET 3 1507836SJohn.Forte@Sun.COM 1517836SJohn.Forte@Sun.COM typedef enum _stmfProtocol 1527836SJohn.Forte@Sun.COM { 1537836SJohn.Forte@Sun.COM STMF_PROTOCOL_FIBRE_CHANNEL = 0, 1547836SJohn.Forte@Sun.COM STMF_PROTOCOL_ISCSI = 1, 1557836SJohn.Forte@Sun.COM STMF_PROTOCOL_SAS = 2 1567836SJohn.Forte@Sun.COM } stmfProtocol; 1577836SJohn.Forte@Sun.COM 1587836SJohn.Forte@Sun.COM 1597836SJohn.Forte@Sun.COM typedef struct _stmfGuid 1607836SJohn.Forte@Sun.COM { 1617836SJohn.Forte@Sun.COM uchar_t guid[16]; 1627836SJohn.Forte@Sun.COM } stmfGuid; 1637836SJohn.Forte@Sun.COM 1647836SJohn.Forte@Sun.COM typedef struct _stmfGuidList 1657836SJohn.Forte@Sun.COM { 1667836SJohn.Forte@Sun.COM uint32_t cnt; 1677836SJohn.Forte@Sun.COM stmfGuid guid[1]; 1687836SJohn.Forte@Sun.COM } stmfGuidList; 1697836SJohn.Forte@Sun.COM 1707836SJohn.Forte@Sun.COM typedef struct _stmfState 1717836SJohn.Forte@Sun.COM { 1727836SJohn.Forte@Sun.COM int operationalState; 1737836SJohn.Forte@Sun.COM int configState; 1747836SJohn.Forte@Sun.COM } stmfState; 1757836SJohn.Forte@Sun.COM 1767836SJohn.Forte@Sun.COM typedef struct _stmfDevid 1777836SJohn.Forte@Sun.COM { 1787836SJohn.Forte@Sun.COM uint8_t identLength; /* length of ident */ 1797836SJohn.Forte@Sun.COM uint8_t ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */ 1807836SJohn.Forte@Sun.COM } stmfDevid; 1817836SJohn.Forte@Sun.COM 1827836SJohn.Forte@Sun.COM typedef struct _stmfDevidList 1837836SJohn.Forte@Sun.COM { 1847836SJohn.Forte@Sun.COM uint32_t cnt; 1857836SJohn.Forte@Sun.COM stmfDevid devid[1]; 1867836SJohn.Forte@Sun.COM } stmfDevidList; 1877836SJohn.Forte@Sun.COM 1887836SJohn.Forte@Sun.COM typedef char stmfGroupName[256]; 1897836SJohn.Forte@Sun.COM typedef char stmfProviderName[256]; 1907836SJohn.Forte@Sun.COM 1917836SJohn.Forte@Sun.COM typedef struct _stmfGroupList 1927836SJohn.Forte@Sun.COM { 1937836SJohn.Forte@Sun.COM uint32_t cnt; 1947836SJohn.Forte@Sun.COM stmfGroupName name[1]; 1957836SJohn.Forte@Sun.COM } stmfGroupList; 1967836SJohn.Forte@Sun.COM 1977836SJohn.Forte@Sun.COM typedef struct _stmfProvider 1987836SJohn.Forte@Sun.COM { 1997836SJohn.Forte@Sun.COM int providerType; 2007836SJohn.Forte@Sun.COM stmfProviderName name; 2017836SJohn.Forte@Sun.COM } stmfProvider; 2027836SJohn.Forte@Sun.COM 2037836SJohn.Forte@Sun.COM typedef struct _stmfProviderList 2047836SJohn.Forte@Sun.COM { 2057836SJohn.Forte@Sun.COM uint32_t cnt; 2067836SJohn.Forte@Sun.COM stmfProvider provider[1]; 2077836SJohn.Forte@Sun.COM } stmfProviderList; 2087836SJohn.Forte@Sun.COM 2097836SJohn.Forte@Sun.COM typedef struct _stmfSession 2107836SJohn.Forte@Sun.COM { 2117836SJohn.Forte@Sun.COM stmfDevid initiator; 2127836SJohn.Forte@Sun.COM char alias[256]; 2137836SJohn.Forte@Sun.COM time_t creationTime; 2147836SJohn.Forte@Sun.COM } stmfSession; 2157836SJohn.Forte@Sun.COM 2167836SJohn.Forte@Sun.COM typedef struct _stmfSessionList 2177836SJohn.Forte@Sun.COM { 2187836SJohn.Forte@Sun.COM uint32_t cnt; 2197836SJohn.Forte@Sun.COM stmfSession session[1]; 2207836SJohn.Forte@Sun.COM } stmfSessionList; 2217836SJohn.Forte@Sun.COM 2227836SJohn.Forte@Sun.COM 2237836SJohn.Forte@Sun.COM typedef struct _stmfViewEntry 2247836SJohn.Forte@Sun.COM { 2257836SJohn.Forte@Sun.COM boolean_t veIndexValid; /* if B_TRUE, veIndex is valid value */ 2267836SJohn.Forte@Sun.COM uint32_t veIndex; /* View Entry index */ 2277836SJohn.Forte@Sun.COM boolean_t allHosts; /* all initiator ports */ 2287836SJohn.Forte@Sun.COM stmfGroupName hostGroup; /* Host Group Name */ 2297836SJohn.Forte@Sun.COM boolean_t allTargets; /* B_TRUE = targetGroup is invalid */ 2307836SJohn.Forte@Sun.COM stmfGroupName targetGroup; /* Target Group Name */ 2317836SJohn.Forte@Sun.COM boolean_t luNbrValid; /* if B_TRUE, luNbr is a valid value */ 2327836SJohn.Forte@Sun.COM uchar_t luNbr[8]; /* LU number for this view entry */ 2337836SJohn.Forte@Sun.COM } stmfViewEntry; 2347836SJohn.Forte@Sun.COM 2357836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryList 2367836SJohn.Forte@Sun.COM { 2377836SJohn.Forte@Sun.COM uint32_t cnt; 2387836SJohn.Forte@Sun.COM stmfViewEntry ve[1]; 2397836SJohn.Forte@Sun.COM } stmfViewEntryList; 2407836SJohn.Forte@Sun.COM 2417836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryProperties 2427836SJohn.Forte@Sun.COM { 2437836SJohn.Forte@Sun.COM stmfGuid associatedLogicalUnitGuid; 2447836SJohn.Forte@Sun.COM stmfViewEntry viewEntry; 2457836SJohn.Forte@Sun.COM } stmfViewEntryProperties; 2467836SJohn.Forte@Sun.COM 2477836SJohn.Forte@Sun.COM typedef struct _stmfGroupProperties 2487836SJohn.Forte@Sun.COM { 2497836SJohn.Forte@Sun.COM uint32_t cnt; 2507836SJohn.Forte@Sun.COM stmfDevid name[1]; 2517836SJohn.Forte@Sun.COM } stmfGroupProperties; 2527836SJohn.Forte@Sun.COM 2537836SJohn.Forte@Sun.COM typedef struct _stmfTargetProperties 2547836SJohn.Forte@Sun.COM { 2557836SJohn.Forte@Sun.COM stmfProviderName providerName; 2567836SJohn.Forte@Sun.COM char alias[256]; 2577836SJohn.Forte@Sun.COM uint16_t status; 2587836SJohn.Forte@Sun.COM stmfProtocol protocol; 2597836SJohn.Forte@Sun.COM stmfDevid devid; 2607836SJohn.Forte@Sun.COM } stmfTargetProperties; 2617836SJohn.Forte@Sun.COM 2627836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProperties 2637836SJohn.Forte@Sun.COM { 2647836SJohn.Forte@Sun.COM char alias[256]; 2657836SJohn.Forte@Sun.COM uchar_t vendor[8]; 2667836SJohn.Forte@Sun.COM uchar_t product[16]; 2677836SJohn.Forte@Sun.COM uchar_t revision[4]; 2687836SJohn.Forte@Sun.COM uint32_t status; 2697836SJohn.Forte@Sun.COM char providerName[256]; 2707836SJohn.Forte@Sun.COM stmfGuid luid; 2717836SJohn.Forte@Sun.COM } stmfLogicalUnitProperties; 2727836SJohn.Forte@Sun.COM 2739585STim.Szeto@Sun.COM typedef void * luResource; 2749585STim.Szeto@Sun.COM 2757836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProviderProperties 2767836SJohn.Forte@Sun.COM { 2777836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 2787836SJohn.Forte@Sun.COM uint32_t instance; 2797836SJohn.Forte@Sun.COM uint32_t status; 2807836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 2817836SJohn.Forte@Sun.COM } stmfLogicalUnitProviderProperties; 2827836SJohn.Forte@Sun.COM 2837836SJohn.Forte@Sun.COM typedef struct _stmfLocalPortProviderProperties 2847836SJohn.Forte@Sun.COM { 2857836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 2867836SJohn.Forte@Sun.COM uint32_t instance; 2877836SJohn.Forte@Sun.COM uint32_t status; 2887836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 2897836SJohn.Forte@Sun.COM } stmfLocalPortProviderProperties; 2907836SJohn.Forte@Sun.COM 2917836SJohn.Forte@Sun.COM 2927836SJohn.Forte@Sun.COM /* API prototypes */ 2937836SJohn.Forte@Sun.COM int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name); 2947836SJohn.Forte@Sun.COM int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName); 2957836SJohn.Forte@Sun.COM int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 2967836SJohn.Forte@Sun.COM int stmfClearProviderData(char *providerName, int providerType); 2977836SJohn.Forte@Sun.COM int stmfCreateHostGroup(stmfGroupName *hostGroupName); 2989585STim.Szeto@Sun.COM int stmfCreateLu(luResource hdl, stmfGuid *luGuid); 2999585STim.Szeto@Sun.COM int stmfCreateLuResource(uint16_t dType, luResource *hdl); 3007836SJohn.Forte@Sun.COM int stmfCreateTargetGroup(stmfGroupName *targetGroupName); 3017836SJohn.Forte@Sun.COM int stmfDeleteHostGroup(stmfGroupName *hostGroupName); 3029585STim.Szeto@Sun.COM int stmfDeleteLu(stmfGuid *luGuid); 3037836SJohn.Forte@Sun.COM int stmfDeleteTargetGroup(stmfGroupName *targetGroupName); 3047836SJohn.Forte@Sun.COM int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid); 3057836SJohn.Forte@Sun.COM int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid); 3069585STim.Szeto@Sun.COM int stmfFreeLuResource(luResource hdl); 3077836SJohn.Forte@Sun.COM void stmfFreeMemory(void *); 3087836SJohn.Forte@Sun.COM int stmfGetHostGroupList(stmfGroupList **initiatorGroupList); 3097836SJohn.Forte@Sun.COM int stmfGetHostGroupMembers(stmfGroupName *hostGroupName, 3107836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3117836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList); 3127836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderProperties(stmfProviderName *providerName, 3137836SJohn.Forte@Sun.COM stmfLocalPortProviderProperties *providerProperties); 3147836SJohn.Forte@Sun.COM int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList); 3157836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit, 3167836SJohn.Forte@Sun.COM stmfLogicalUnitProperties *logicalUnitProps); 3177836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList); 3187836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName, 3197836SJohn.Forte@Sun.COM stmfLogicalUnitProviderProperties *providerProperties); 3209585STim.Szeto@Sun.COM int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop, 3219585STim.Szeto@Sun.COM size_t *propLen); 3229585STim.Szeto@Sun.COM int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl); 3239585STim.Szeto@Sun.COM int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState); 3247836SJohn.Forte@Sun.COM int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType); 3257836SJohn.Forte@Sun.COM int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl, 3267836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 3277836SJohn.Forte@Sun.COM int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList); 3287836SJohn.Forte@Sun.COM int stmfGetState(stmfState *); 3297836SJohn.Forte@Sun.COM int stmfGetTargetGroupList(stmfGroupList **targetGroupList); 3307836SJohn.Forte@Sun.COM int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName, 3317836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3327836SJohn.Forte@Sun.COM int stmfGetTargetList(stmfDevidList **targetList); 3337836SJohn.Forte@Sun.COM int stmfGetTargetProperties(stmfDevid *target, 3347836SJohn.Forte@Sun.COM stmfTargetProperties *targetProps); 3357836SJohn.Forte@Sun.COM int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 3369585STim.Szeto@Sun.COM int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid); 3377836SJohn.Forte@Sun.COM int stmfLoadConfig(void); 3389585STim.Szeto@Sun.COM int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal); 3399585STim.Szeto@Sun.COM int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop, 3409585STim.Szeto@Sun.COM const char *propVal); 3417836SJohn.Forte@Sun.COM int stmfOffline(void); 3427836SJohn.Forte@Sun.COM int stmfOfflineTarget(stmfDevid *devid); 3437836SJohn.Forte@Sun.COM int stmfOfflineLogicalUnit(stmfGuid *logicalUnit); 3447836SJohn.Forte@Sun.COM int stmfOnline(void); 3457836SJohn.Forte@Sun.COM int stmfOnlineTarget(stmfDevid *devid); 3467836SJohn.Forte@Sun.COM int stmfOnlineLogicalUnit(stmfGuid *logicalUnit); 3477836SJohn.Forte@Sun.COM int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName, 3487836SJohn.Forte@Sun.COM stmfDevid *initiatorName); 3497836SJohn.Forte@Sun.COM int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName, 3507836SJohn.Forte@Sun.COM stmfDevid *targetName); 3517836SJohn.Forte@Sun.COM int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 3529585STim.Szeto@Sun.COM int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal); 3539585STim.Szeto@Sun.COM int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet); 3547836SJohn.Forte@Sun.COM int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType); 3557836SJohn.Forte@Sun.COM int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl, 3567836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 3577836SJohn.Forte@Sun.COM 3587836SJohn.Forte@Sun.COM #ifdef __cplusplus 3597836SJohn.Forte@Sun.COM } 3607836SJohn.Forte@Sun.COM #endif 3617836SJohn.Forte@Sun.COM 3627836SJohn.Forte@Sun.COM #endif /* _LIBSTMF_H */ 363