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) 919884STim.Szeto@Sun.COM #define STMF_ERROR_TG_ONLINE (STMF_STATUS_ERROR | 0x22) 92*10725SJohn.Forte@Sun.COM #define STMF_ERROR_ACCESS_STATE_SET (STMF_STATUS_ERROR | 0x23) 93*10725SJohn.Forte@Sun.COM #define STMF_ERROR_NO_PROP_STANDBY (STMF_STATUS_ERROR | 0x24) 94*10725SJohn.Forte@Sun.COM #define STMF_ERROR_POST_MSG_FAILED (STMF_STATUS_ERROR | 0x25) 95*10725SJohn.Forte@Sun.COM #define STMF_ERROR_DOOR_INSTALLED (STMF_STATUS_ERROR | 0x26) 969585STim.Szeto@Sun.COM 979585STim.Szeto@Sun.COM /* Failures for stmfCreateLu */ 989585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_IN_USE (STMF_STATUS_ERROR | 0x100) 999585STim.Szeto@Sun.COM #define STMF_ERROR_INVALID_BLKSIZE (STMF_STATUS_ERROR | 0x101) 1009585STim.Szeto@Sun.COM #define STMF_ERROR_GUID_IN_USE (STMF_STATUS_ERROR | 0x102) 1019585STim.Szeto@Sun.COM #define STMF_ERROR_META_FILE_NAME (STMF_STATUS_ERROR | 0x103) 1029585STim.Szeto@Sun.COM #define STMF_ERROR_DATA_FILE_NAME (STMF_STATUS_ERROR | 0x104) 1039585STim.Szeto@Sun.COM #define STMF_ERROR_SIZE_OUT_OF_RANGE (STMF_STATUS_ERROR | 0x105) 1049585STim.Szeto@Sun.COM #define STMF_ERROR_LU_BUSY (STMF_STATUS_ERROR | 0x106) 1059585STim.Szeto@Sun.COM #define STMF_ERROR_META_CREATION (STMF_STATUS_ERROR | 0x107) 1069585STim.Szeto@Sun.COM #define STMF_ERROR_FILE_SIZE_INVALID (STMF_STATUS_ERROR | 0x108) 1079585STim.Szeto@Sun.COM #define STMF_ERROR_WRITE_CACHE_SET (STMF_STATUS_ERROR | 0x109) 1087836SJohn.Forte@Sun.COM 1097836SJohn.Forte@Sun.COM /* Initiator Name Types */ 1107836SJohn.Forte@Sun.COM #define STMF_FC_PORT_WWN 1 1117836SJohn.Forte@Sun.COM #define STMF_ISCSI_NAME 2 1127836SJohn.Forte@Sun.COM 1137836SJohn.Forte@Sun.COM 1147836SJohn.Forte@Sun.COM /* provider types */ 1157836SJohn.Forte@Sun.COM #define STMF_LU_PROVIDER_TYPE 1 1167836SJohn.Forte@Sun.COM #define STMF_PORT_PROVIDER_TYPE 2 1177836SJohn.Forte@Sun.COM 1189585STim.Szeto@Sun.COM /* LU Resource types */ 1199585STim.Szeto@Sun.COM #define STMF_DISK 0 1209585STim.Szeto@Sun.COM 1219585STim.Szeto@Sun.COM /* Persistence methods */ 1229585STim.Szeto@Sun.COM #define STMF_PERSIST_SMF 1 1239585STim.Szeto@Sun.COM #define STMF_PERSIST_NONE 2 1249585STim.Szeto@Sun.COM 125*10725SJohn.Forte@Sun.COM /* Logical unit access states */ 126*10725SJohn.Forte@Sun.COM #define STMF_ACCESS_ACTIVE "0" 127*10725SJohn.Forte@Sun.COM #define STMF_ACCESS_ACTIVE_TO_STANDBY "1" 128*10725SJohn.Forte@Sun.COM #define STMF_ACCESS_STANDBY "2" 129*10725SJohn.Forte@Sun.COM #define STMF_ACCESS_STANDBY_TO_ACTIVE "3" 130*10725SJohn.Forte@Sun.COM 1319585STim.Szeto@Sun.COM /* 1329585STim.Szeto@Sun.COM * LU Disk Properties 1339585STim.Szeto@Sun.COM */ 1349585STim.Szeto@Sun.COM 1359585STim.Szeto@Sun.COM enum { 1369585STim.Szeto@Sun.COM STMF_LU_PROP_ALIAS = 1, 1379585STim.Szeto@Sun.COM STMF_LU_PROP_BLOCK_SIZE, 1389585STim.Szeto@Sun.COM STMF_LU_PROP_COMPANY_ID, 1399585STim.Szeto@Sun.COM STMF_LU_PROP_FILENAME, 1409585STim.Szeto@Sun.COM STMF_LU_PROP_GUID, 1419585STim.Szeto@Sun.COM STMF_LU_PROP_META_FILENAME, 14210113SNattuvetty.Bhavyan@Sun.COM STMF_LU_PROP_MGMT_URL, 1439585STim.Szeto@Sun.COM STMF_LU_PROP_NEW, 1449585STim.Szeto@Sun.COM STMF_LU_PROP_SIZE, 1459585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_PROTECT, 1469585STim.Szeto@Sun.COM STMF_LU_PROP_WRITE_CACHE_DISABLE, 1479585STim.Szeto@Sun.COM STMF_LU_PROP_VID, 1489585STim.Szeto@Sun.COM STMF_LU_PROP_PID, 149*10725SJohn.Forte@Sun.COM STMF_LU_PROP_SERIAL_NUM, 150*10725SJohn.Forte@Sun.COM STMF_LU_PROP_ACCESS_STATE 1519585STim.Szeto@Sun.COM }; 1529585STim.Szeto@Sun.COM 1537836SJohn.Forte@Sun.COM 1547836SJohn.Forte@Sun.COM /* devid code set and name types */ 1557836SJohn.Forte@Sun.COM #define EUI_64_TYPE 2 1567836SJohn.Forte@Sun.COM #define NAA_TYPE 3 1577836SJohn.Forte@Sun.COM #define SCSI_NAME_TYPE 8 1587836SJohn.Forte@Sun.COM 1597836SJohn.Forte@Sun.COM #define BINARY_CODE_SET 1 1607836SJohn.Forte@Sun.COM #define ASCII_CODE_SET 2 1617836SJohn.Forte@Sun.COM #define UTF_8_CODE_SET 3 1627836SJohn.Forte@Sun.COM 1637836SJohn.Forte@Sun.COM typedef enum _stmfProtocol 1647836SJohn.Forte@Sun.COM { 1657836SJohn.Forte@Sun.COM STMF_PROTOCOL_FIBRE_CHANNEL = 0, 166*10725SJohn.Forte@Sun.COM STMF_PROTOCOL_SCSI = 1, 167*10725SJohn.Forte@Sun.COM STMF_PROTOCOL_SSA = 2, 168*10725SJohn.Forte@Sun.COM STMF_PROTOCOL_IEEE_1394 = 3, 169*10725SJohn.Forte@Sun.COM STMF_PROTOCOL_SRP = 4, 170*10725SJohn.Forte@Sun.COM STMF_PROTOCOL_ISCSI = 5, 171*10725SJohn.Forte@Sun.COM STMF_PROTOCOL_SAS = 6 1727836SJohn.Forte@Sun.COM } stmfProtocol; 1737836SJohn.Forte@Sun.COM 1747836SJohn.Forte@Sun.COM 1757836SJohn.Forte@Sun.COM typedef struct _stmfGuid 1767836SJohn.Forte@Sun.COM { 1777836SJohn.Forte@Sun.COM uchar_t guid[16]; 1787836SJohn.Forte@Sun.COM } stmfGuid; 1797836SJohn.Forte@Sun.COM 1807836SJohn.Forte@Sun.COM typedef struct _stmfGuidList 1817836SJohn.Forte@Sun.COM { 1827836SJohn.Forte@Sun.COM uint32_t cnt; 1837836SJohn.Forte@Sun.COM stmfGuid guid[1]; 1847836SJohn.Forte@Sun.COM } stmfGuidList; 1857836SJohn.Forte@Sun.COM 1867836SJohn.Forte@Sun.COM typedef struct _stmfState 1877836SJohn.Forte@Sun.COM { 1887836SJohn.Forte@Sun.COM int operationalState; 1897836SJohn.Forte@Sun.COM int configState; 1907836SJohn.Forte@Sun.COM } stmfState; 1917836SJohn.Forte@Sun.COM 1927836SJohn.Forte@Sun.COM typedef struct _stmfDevid 1937836SJohn.Forte@Sun.COM { 1947836SJohn.Forte@Sun.COM uint8_t identLength; /* length of ident */ 1957836SJohn.Forte@Sun.COM uint8_t ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */ 1967836SJohn.Forte@Sun.COM } stmfDevid; 1977836SJohn.Forte@Sun.COM 1987836SJohn.Forte@Sun.COM typedef struct _stmfDevidList 1997836SJohn.Forte@Sun.COM { 2007836SJohn.Forte@Sun.COM uint32_t cnt; 2017836SJohn.Forte@Sun.COM stmfDevid devid[1]; 2027836SJohn.Forte@Sun.COM } stmfDevidList; 2037836SJohn.Forte@Sun.COM 2047836SJohn.Forte@Sun.COM typedef char stmfGroupName[256]; 2057836SJohn.Forte@Sun.COM typedef char stmfProviderName[256]; 2067836SJohn.Forte@Sun.COM 2077836SJohn.Forte@Sun.COM typedef struct _stmfGroupList 2087836SJohn.Forte@Sun.COM { 2097836SJohn.Forte@Sun.COM uint32_t cnt; 2107836SJohn.Forte@Sun.COM stmfGroupName name[1]; 2117836SJohn.Forte@Sun.COM } stmfGroupList; 2127836SJohn.Forte@Sun.COM 2137836SJohn.Forte@Sun.COM typedef struct _stmfProvider 2147836SJohn.Forte@Sun.COM { 2157836SJohn.Forte@Sun.COM int providerType; 2167836SJohn.Forte@Sun.COM stmfProviderName name; 2177836SJohn.Forte@Sun.COM } stmfProvider; 2187836SJohn.Forte@Sun.COM 2197836SJohn.Forte@Sun.COM typedef struct _stmfProviderList 2207836SJohn.Forte@Sun.COM { 2217836SJohn.Forte@Sun.COM uint32_t cnt; 2227836SJohn.Forte@Sun.COM stmfProvider provider[1]; 2237836SJohn.Forte@Sun.COM } stmfProviderList; 2247836SJohn.Forte@Sun.COM 2257836SJohn.Forte@Sun.COM typedef struct _stmfSession 2267836SJohn.Forte@Sun.COM { 2277836SJohn.Forte@Sun.COM stmfDevid initiator; 2287836SJohn.Forte@Sun.COM char alias[256]; 2297836SJohn.Forte@Sun.COM time_t creationTime; 2307836SJohn.Forte@Sun.COM } stmfSession; 2317836SJohn.Forte@Sun.COM 2327836SJohn.Forte@Sun.COM typedef struct _stmfSessionList 2337836SJohn.Forte@Sun.COM { 2347836SJohn.Forte@Sun.COM uint32_t cnt; 2357836SJohn.Forte@Sun.COM stmfSession session[1]; 2367836SJohn.Forte@Sun.COM } stmfSessionList; 2377836SJohn.Forte@Sun.COM 2387836SJohn.Forte@Sun.COM 2397836SJohn.Forte@Sun.COM typedef struct _stmfViewEntry 2407836SJohn.Forte@Sun.COM { 2417836SJohn.Forte@Sun.COM boolean_t veIndexValid; /* if B_TRUE, veIndex is valid value */ 2427836SJohn.Forte@Sun.COM uint32_t veIndex; /* View Entry index */ 2437836SJohn.Forte@Sun.COM boolean_t allHosts; /* all initiator ports */ 2447836SJohn.Forte@Sun.COM stmfGroupName hostGroup; /* Host Group Name */ 2457836SJohn.Forte@Sun.COM boolean_t allTargets; /* B_TRUE = targetGroup is invalid */ 2467836SJohn.Forte@Sun.COM stmfGroupName targetGroup; /* Target Group Name */ 2477836SJohn.Forte@Sun.COM boolean_t luNbrValid; /* if B_TRUE, luNbr is a valid value */ 2487836SJohn.Forte@Sun.COM uchar_t luNbr[8]; /* LU number for this view entry */ 2497836SJohn.Forte@Sun.COM } stmfViewEntry; 2507836SJohn.Forte@Sun.COM 2517836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryList 2527836SJohn.Forte@Sun.COM { 2537836SJohn.Forte@Sun.COM uint32_t cnt; 2547836SJohn.Forte@Sun.COM stmfViewEntry ve[1]; 2557836SJohn.Forte@Sun.COM } stmfViewEntryList; 2567836SJohn.Forte@Sun.COM 2577836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryProperties 2587836SJohn.Forte@Sun.COM { 2597836SJohn.Forte@Sun.COM stmfGuid associatedLogicalUnitGuid; 2607836SJohn.Forte@Sun.COM stmfViewEntry viewEntry; 2617836SJohn.Forte@Sun.COM } stmfViewEntryProperties; 2627836SJohn.Forte@Sun.COM 2637836SJohn.Forte@Sun.COM typedef struct _stmfGroupProperties 2647836SJohn.Forte@Sun.COM { 2657836SJohn.Forte@Sun.COM uint32_t cnt; 2667836SJohn.Forte@Sun.COM stmfDevid name[1]; 2677836SJohn.Forte@Sun.COM } stmfGroupProperties; 2687836SJohn.Forte@Sun.COM 2697836SJohn.Forte@Sun.COM typedef struct _stmfTargetProperties 2707836SJohn.Forte@Sun.COM { 2717836SJohn.Forte@Sun.COM stmfProviderName providerName; 2727836SJohn.Forte@Sun.COM char alias[256]; 2737836SJohn.Forte@Sun.COM uint16_t status; 2747836SJohn.Forte@Sun.COM stmfProtocol protocol; 2757836SJohn.Forte@Sun.COM stmfDevid devid; 2767836SJohn.Forte@Sun.COM } stmfTargetProperties; 2777836SJohn.Forte@Sun.COM 2787836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProperties 2797836SJohn.Forte@Sun.COM { 2807836SJohn.Forte@Sun.COM char alias[256]; 2817836SJohn.Forte@Sun.COM uchar_t vendor[8]; 2827836SJohn.Forte@Sun.COM uchar_t product[16]; 2837836SJohn.Forte@Sun.COM uchar_t revision[4]; 2847836SJohn.Forte@Sun.COM uint32_t status; 2857836SJohn.Forte@Sun.COM char providerName[256]; 2867836SJohn.Forte@Sun.COM stmfGuid luid; 2877836SJohn.Forte@Sun.COM } stmfLogicalUnitProperties; 2887836SJohn.Forte@Sun.COM 2899585STim.Szeto@Sun.COM typedef void * luResource; 2909585STim.Szeto@Sun.COM 2917836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProviderProperties 2927836SJohn.Forte@Sun.COM { 2937836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 2947836SJohn.Forte@Sun.COM uint32_t instance; 2957836SJohn.Forte@Sun.COM uint32_t status; 2967836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 2977836SJohn.Forte@Sun.COM } stmfLogicalUnitProviderProperties; 2987836SJohn.Forte@Sun.COM 2997836SJohn.Forte@Sun.COM typedef struct _stmfLocalPortProviderProperties 3007836SJohn.Forte@Sun.COM { 3017836SJohn.Forte@Sun.COM char providerName[MAXPATHLEN]; 3027836SJohn.Forte@Sun.COM uint32_t instance; 3037836SJohn.Forte@Sun.COM uint32_t status; 3047836SJohn.Forte@Sun.COM uchar_t rsvd[64]; 3057836SJohn.Forte@Sun.COM } stmfLocalPortProviderProperties; 3067836SJohn.Forte@Sun.COM 3077836SJohn.Forte@Sun.COM /* API prototypes */ 3087836SJohn.Forte@Sun.COM int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name); 3097836SJohn.Forte@Sun.COM int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName); 3107836SJohn.Forte@Sun.COM int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 3117836SJohn.Forte@Sun.COM int stmfClearProviderData(char *providerName, int providerType); 3127836SJohn.Forte@Sun.COM int stmfCreateHostGroup(stmfGroupName *hostGroupName); 3139585STim.Szeto@Sun.COM int stmfCreateLu(luResource hdl, stmfGuid *luGuid); 3149585STim.Szeto@Sun.COM int stmfCreateLuResource(uint16_t dType, luResource *hdl); 3157836SJohn.Forte@Sun.COM int stmfCreateTargetGroup(stmfGroupName *targetGroupName); 3167836SJohn.Forte@Sun.COM int stmfDeleteHostGroup(stmfGroupName *hostGroupName); 3179585STim.Szeto@Sun.COM int stmfDeleteLu(stmfGuid *luGuid); 3187836SJohn.Forte@Sun.COM int stmfDeleteTargetGroup(stmfGroupName *targetGroupName); 319*10725SJohn.Forte@Sun.COM void stmfDestroyProxyDoor(int hdl); 3207836SJohn.Forte@Sun.COM int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid); 3217836SJohn.Forte@Sun.COM int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid); 3229585STim.Szeto@Sun.COM int stmfFreeLuResource(luResource hdl); 3237836SJohn.Forte@Sun.COM void stmfFreeMemory(void *); 324*10725SJohn.Forte@Sun.COM int stmfGetAluaState(boolean_t *enabled, uint32_t *node); 3257836SJohn.Forte@Sun.COM int stmfGetHostGroupList(stmfGroupList **initiatorGroupList); 3267836SJohn.Forte@Sun.COM int stmfGetHostGroupMembers(stmfGroupName *hostGroupName, 3277836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3287836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList); 3297836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderProperties(stmfProviderName *providerName, 3307836SJohn.Forte@Sun.COM stmfLocalPortProviderProperties *providerProperties); 3317836SJohn.Forte@Sun.COM int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList); 3327836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit, 3337836SJohn.Forte@Sun.COM stmfLogicalUnitProperties *logicalUnitProps); 3347836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList); 3357836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName, 3367836SJohn.Forte@Sun.COM stmfLogicalUnitProviderProperties *providerProperties); 3379585STim.Szeto@Sun.COM int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop, 3389585STim.Szeto@Sun.COM size_t *propLen); 3399585STim.Szeto@Sun.COM int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl); 3409585STim.Szeto@Sun.COM int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState); 3417836SJohn.Forte@Sun.COM int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType); 3427836SJohn.Forte@Sun.COM int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl, 3437836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 3447836SJohn.Forte@Sun.COM int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList); 3457836SJohn.Forte@Sun.COM int stmfGetState(stmfState *); 3467836SJohn.Forte@Sun.COM int stmfGetTargetGroupList(stmfGroupList **targetGroupList); 3477836SJohn.Forte@Sun.COM int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName, 3487836SJohn.Forte@Sun.COM stmfGroupProperties **groupProperties); 3497836SJohn.Forte@Sun.COM int stmfGetTargetList(stmfDevidList **targetList); 3507836SJohn.Forte@Sun.COM int stmfGetTargetProperties(stmfDevid *target, 3517836SJohn.Forte@Sun.COM stmfTargetProperties *targetProps); 3527836SJohn.Forte@Sun.COM int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 3539585STim.Szeto@Sun.COM int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid); 354*10725SJohn.Forte@Sun.COM int stmfInitProxyDoor(int *hdl, int fd); 3557836SJohn.Forte@Sun.COM int stmfLoadConfig(void); 356*10725SJohn.Forte@Sun.COM int stmfLuStandby(stmfGuid *luGuid); 3579585STim.Szeto@Sun.COM int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal); 3589585STim.Szeto@Sun.COM int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop, 3599585STim.Szeto@Sun.COM const char *propVal); 3607836SJohn.Forte@Sun.COM int stmfOffline(void); 3617836SJohn.Forte@Sun.COM int stmfOfflineTarget(stmfDevid *devid); 3627836SJohn.Forte@Sun.COM int stmfOfflineLogicalUnit(stmfGuid *logicalUnit); 3637836SJohn.Forte@Sun.COM int stmfOnline(void); 3647836SJohn.Forte@Sun.COM int stmfOnlineTarget(stmfDevid *devid); 3657836SJohn.Forte@Sun.COM int stmfOnlineLogicalUnit(stmfGuid *logicalUnit); 366*10725SJohn.Forte@Sun.COM int stmfPostProxyMsg(int hdl, void *buf, uint32_t buflen); 3677836SJohn.Forte@Sun.COM int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName, 3687836SJohn.Forte@Sun.COM stmfDevid *initiatorName); 3697836SJohn.Forte@Sun.COM int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName, 3707836SJohn.Forte@Sun.COM stmfDevid *targetName); 3717836SJohn.Forte@Sun.COM int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 372*10725SJohn.Forte@Sun.COM int stmfSetAluaState(boolean_t enabled, uint32_t node); 3739585STim.Szeto@Sun.COM int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal); 3749585STim.Szeto@Sun.COM int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet); 3757836SJohn.Forte@Sun.COM int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType); 3767836SJohn.Forte@Sun.COM int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl, 3777836SJohn.Forte@Sun.COM int providerType, uint64_t *setToken); 37810691STim.Szeto@Sun.COM int stmfValidateView(stmfViewEntry *viewEntry); 3797836SJohn.Forte@Sun.COM 3807836SJohn.Forte@Sun.COM #ifdef __cplusplus 3817836SJohn.Forte@Sun.COM } 3827836SJohn.Forte@Sun.COM #endif 3837836SJohn.Forte@Sun.COM 3847836SJohn.Forte@Sun.COM #endif /* _LIBSTMF_H */ 385