1fcf3ce44SJohn Forte /* 2fcf3ce44SJohn Forte * CDDL HEADER START 3fcf3ce44SJohn Forte * 4fcf3ce44SJohn Forte * The contents of this file are subject to the terms of the 5fcf3ce44SJohn Forte * Common Development and Distribution License (the "License"). 6fcf3ce44SJohn Forte * You may not use this file except in compliance with the License. 7fcf3ce44SJohn Forte * 8fcf3ce44SJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9fcf3ce44SJohn Forte * or http://www.opensolaris.org/os/licensing. 10fcf3ce44SJohn Forte * See the License for the specific language governing permissions 11fcf3ce44SJohn Forte * and limitations under the License. 12fcf3ce44SJohn Forte * 13fcf3ce44SJohn Forte * When distributing Covered Code, include this CDDL HEADER in each 14fcf3ce44SJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15fcf3ce44SJohn Forte * If applicable, add the following below this CDDL HEADER, with the 16fcf3ce44SJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying 17fcf3ce44SJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner] 18fcf3ce44SJohn Forte * 19fcf3ce44SJohn Forte * CDDL HEADER END 20fcf3ce44SJohn Forte */ 21fcf3ce44SJohn Forte /* 228fe96085Stim szeto * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23fcf3ce44SJohn Forte * Use is subject to license terms. 24fcf3ce44SJohn Forte */ 25fcf3ce44SJohn Forte 26fcf3ce44SJohn Forte #ifndef _LIBSTMF_H 27fcf3ce44SJohn Forte #define _LIBSTMF_H 28fcf3ce44SJohn Forte 29fcf3ce44SJohn Forte #include <time.h> 30fcf3ce44SJohn Forte #include <sys/param.h> 31fcf3ce44SJohn Forte #include <libnvpair.h> 32fcf3ce44SJohn Forte 33fcf3ce44SJohn Forte #ifdef __cplusplus 34fcf3ce44SJohn Forte extern "C" { 35fcf3ce44SJohn Forte #endif 36fcf3ce44SJohn Forte 37fcf3ce44SJohn Forte /* Constants and Types */ 38fcf3ce44SJohn Forte 39fcf3ce44SJohn Forte /* LU and Local Port states */ 40fcf3ce44SJohn Forte #define STMF_LOGICAL_UNIT_OFFLINE 0 41fcf3ce44SJohn Forte #define STMF_LOGICAL_UNIT_OFFLINING 1 42fcf3ce44SJohn Forte #define STMF_LOGICAL_UNIT_ONLINE 2 43fcf3ce44SJohn Forte #define STMF_LOGICAL_UNIT_ONLINING 3 44fcf3ce44SJohn Forte #define STMF_LOGICAL_UNIT_UNREGISTERED 4 45fcf3ce44SJohn Forte #define STMF_TARGET_PORT_OFFLINE 5 46fcf3ce44SJohn Forte #define STMF_TARGET_PORT_OFFLINING 6 47fcf3ce44SJohn Forte #define STMF_TARGET_PORT_ONLINE 7 48fcf3ce44SJohn Forte #define STMF_TARGET_PORT_ONLINING 8 49fcf3ce44SJohn Forte #define STMF_SERVICE_STATE_ONLINE 9 50fcf3ce44SJohn Forte #define STMF_SERVICE_STATE_OFFLINE 10 51fcf3ce44SJohn Forte #define STMF_SERVICE_STATE_ONLINING 11 52fcf3ce44SJohn Forte #define STMF_SERVICE_STATE_OFFLINING 12 53fcf3ce44SJohn Forte #define STMF_SERVICE_STATE_UNKNOWN 13 54fcf3ce44SJohn Forte #define STMF_CONFIG_STATE_NONE 14 55fcf3ce44SJohn Forte #define STMF_CONFIG_STATE_INIT 15 56fcf3ce44SJohn Forte #define STMF_CONFIG_STATE_INIT_DONE 16 57fcf3ce44SJohn Forte #define STMF_CONFIG_STATE_UNKNOWN 17 58fcf3ce44SJohn Forte 59fcf3ce44SJohn Forte #define STMF_IDENT_LENGTH 255 60fcf3ce44SJohn Forte 61fcf3ce44SJohn Forte /* API status return values */ 62fcf3ce44SJohn Forte #define STMF_STATUS_SUCCESS 0x0000 63fcf3ce44SJohn Forte #define STMF_STATUS_ERROR 0x8000 64fcf3ce44SJohn Forte #define STMF_ERROR_BUSY (STMF_STATUS_ERROR | 0x01) 65fcf3ce44SJohn Forte #define STMF_ERROR_NOT_FOUND (STMF_STATUS_ERROR | 0x02) 66fcf3ce44SJohn Forte #define STMF_ERROR_MEMBER_NOT_FOUND (STMF_STATUS_ERROR | 0x03) 67fcf3ce44SJohn Forte #define STMF_ERROR_GROUP_NOT_FOUND (STMF_STATUS_ERROR | 0x04) 68fcf3ce44SJohn Forte #define STMF_ERROR_PERM (STMF_STATUS_ERROR | 0x05) 69fcf3ce44SJohn Forte #define STMF_ERROR_NOMEM (STMF_STATUS_ERROR | 0x06) 70fcf3ce44SJohn Forte #define STMF_ERROR_INVALID_ARG (STMF_STATUS_ERROR | 0x07) 71fcf3ce44SJohn Forte #define STMF_ERROR_EXISTS (STMF_STATUS_ERROR | 0x08) 72fcf3ce44SJohn Forte #define STMF_ERROR_SERVICE_NOT_FOUND (STMF_STATUS_ERROR | 0x09) 73fcf3ce44SJohn Forte #define STMF_ERROR_SERVICE_ONLINE (STMF_STATUS_ERROR | 0x0a) 74fcf3ce44SJohn Forte #define STMF_ERROR_SERVICE_OFFLINE (STMF_STATUS_ERROR | 0x0b) 75fcf3ce44SJohn Forte #define STMF_ERROR_GROUP_IN_USE (STMF_STATUS_ERROR | 0x0c) 76fcf3ce44SJohn Forte #define STMF_ERROR_LUN_IN_USE (STMF_STATUS_ERROR | 0x0d) 77fcf3ce44SJohn Forte #define STMF_ERROR_VE_CONFLICT (STMF_STATUS_ERROR | 0x0e) 78fcf3ce44SJohn Forte #define STMF_ERROR_CONFIG_NONE (STMF_STATUS_ERROR | 0x0f) 79fcf3ce44SJohn Forte #define STMF_ERROR_SERVICE_DATA_VERSION (STMF_STATUS_ERROR | 0x10) 80fcf3ce44SJohn Forte #define STMF_ERROR_INVALID_HG (STMF_STATUS_ERROR | 0x11) 81fcf3ce44SJohn Forte #define STMF_ERROR_INVALID_TG (STMF_STATUS_ERROR | 0x12) 82fcf3ce44SJohn Forte #define STMF_ERROR_PROV_DATA_STALE (STMF_STATUS_ERROR | 0x13) 838fe96085Stim szeto #define STMF_ERROR_NO_PROP (STMF_STATUS_ERROR | 0x14) 848fe96085Stim szeto #define STMF_ERROR_NO_PROP_VAL (STMF_STATUS_ERROR | 0x15) 858fe96085Stim szeto #define STMF_ERROR_MISSING_PROP_VAL (STMF_STATUS_ERROR | 0x16) 868fe96085Stim szeto #define STMF_ERROR_INVALID_BLOCKSIZE (STMF_STATUS_ERROR | 0x17) 878fe96085Stim szeto #define STMF_ERROR_FILE_ALREADY (STMF_STATUS_ERROR | 0x18) 888fe96085Stim szeto #define STMF_ERROR_INVALID_PROPSIZE (STMF_STATUS_ERROR | 0x19) 898fe96085Stim szeto #define STMF_ERROR_INVALID_PROP (STMF_STATUS_ERROR | 0x20) 908fe96085Stim szeto #define STMF_ERROR_PERSIST_TYPE (STMF_STATUS_ERROR | 0x21) 915c8cac22Stim szeto #define STMF_ERROR_TG_ONLINE (STMF_STATUS_ERROR | 0x22) 928fe96085Stim szeto 938fe96085Stim szeto /* Failures for stmfCreateLu */ 948fe96085Stim szeto #define STMF_ERROR_FILE_IN_USE (STMF_STATUS_ERROR | 0x100) 958fe96085Stim szeto #define STMF_ERROR_INVALID_BLKSIZE (STMF_STATUS_ERROR | 0x101) 968fe96085Stim szeto #define STMF_ERROR_GUID_IN_USE (STMF_STATUS_ERROR | 0x102) 978fe96085Stim szeto #define STMF_ERROR_META_FILE_NAME (STMF_STATUS_ERROR | 0x103) 988fe96085Stim szeto #define STMF_ERROR_DATA_FILE_NAME (STMF_STATUS_ERROR | 0x104) 998fe96085Stim szeto #define STMF_ERROR_SIZE_OUT_OF_RANGE (STMF_STATUS_ERROR | 0x105) 1008fe96085Stim szeto #define STMF_ERROR_LU_BUSY (STMF_STATUS_ERROR | 0x106) 1018fe96085Stim szeto #define STMF_ERROR_META_CREATION (STMF_STATUS_ERROR | 0x107) 1028fe96085Stim szeto #define STMF_ERROR_FILE_SIZE_INVALID (STMF_STATUS_ERROR | 0x108) 1038fe96085Stim szeto #define STMF_ERROR_WRITE_CACHE_SET (STMF_STATUS_ERROR | 0x109) 104fcf3ce44SJohn Forte 105fcf3ce44SJohn Forte /* Initiator Name Types */ 106fcf3ce44SJohn Forte #define STMF_FC_PORT_WWN 1 107fcf3ce44SJohn Forte #define STMF_ISCSI_NAME 2 108fcf3ce44SJohn Forte 109fcf3ce44SJohn Forte 110fcf3ce44SJohn Forte /* provider types */ 111fcf3ce44SJohn Forte #define STMF_LU_PROVIDER_TYPE 1 112fcf3ce44SJohn Forte #define STMF_PORT_PROVIDER_TYPE 2 113fcf3ce44SJohn Forte 1148fe96085Stim szeto /* LU Resource types */ 1158fe96085Stim szeto #define STMF_DISK 0 1168fe96085Stim szeto 1178fe96085Stim szeto /* Persistence methods */ 1188fe96085Stim szeto #define STMF_PERSIST_SMF 1 1198fe96085Stim szeto #define STMF_PERSIST_NONE 2 1208fe96085Stim szeto 1218fe96085Stim szeto /* 1228fe96085Stim szeto * LU Disk Properties 1238fe96085Stim szeto */ 1248fe96085Stim szeto 1258fe96085Stim szeto enum { 1268fe96085Stim szeto STMF_LU_PROP_ALIAS = 1, 1278fe96085Stim szeto STMF_LU_PROP_BLOCK_SIZE, 1288fe96085Stim szeto STMF_LU_PROP_COMPANY_ID, 1298fe96085Stim szeto STMF_LU_PROP_FILENAME, 1308fe96085Stim szeto STMF_LU_PROP_GUID, 1318fe96085Stim szeto STMF_LU_PROP_META_FILENAME, 132*2f624233SNattuvetty Bhavyan STMF_LU_PROP_MGMT_URL, 1338fe96085Stim szeto STMF_LU_PROP_NEW, 1348fe96085Stim szeto STMF_LU_PROP_SIZE, 1358fe96085Stim szeto STMF_LU_PROP_WRITE_PROTECT, 1368fe96085Stim szeto STMF_LU_PROP_WRITE_CACHE_DISABLE, 1378fe96085Stim szeto STMF_LU_PROP_VID, 1388fe96085Stim szeto STMF_LU_PROP_PID, 1398fe96085Stim szeto STMF_LU_PROP_SERIAL_NUM 1408fe96085Stim szeto }; 1418fe96085Stim szeto 142fcf3ce44SJohn Forte 143fcf3ce44SJohn Forte /* devid code set and name types */ 144fcf3ce44SJohn Forte #define EUI_64_TYPE 2 145fcf3ce44SJohn Forte #define NAA_TYPE 3 146fcf3ce44SJohn Forte #define SCSI_NAME_TYPE 8 147fcf3ce44SJohn Forte 148fcf3ce44SJohn Forte #define BINARY_CODE_SET 1 149fcf3ce44SJohn Forte #define ASCII_CODE_SET 2 150fcf3ce44SJohn Forte #define UTF_8_CODE_SET 3 151fcf3ce44SJohn Forte 152fcf3ce44SJohn Forte typedef enum _stmfProtocol 153fcf3ce44SJohn Forte { 154fcf3ce44SJohn Forte STMF_PROTOCOL_FIBRE_CHANNEL = 0, 155fcf3ce44SJohn Forte STMF_PROTOCOL_ISCSI = 1, 156fcf3ce44SJohn Forte STMF_PROTOCOL_SAS = 2 157fcf3ce44SJohn Forte } stmfProtocol; 158fcf3ce44SJohn Forte 159fcf3ce44SJohn Forte 160fcf3ce44SJohn Forte typedef struct _stmfGuid 161fcf3ce44SJohn Forte { 162fcf3ce44SJohn Forte uchar_t guid[16]; 163fcf3ce44SJohn Forte } stmfGuid; 164fcf3ce44SJohn Forte 165fcf3ce44SJohn Forte typedef struct _stmfGuidList 166fcf3ce44SJohn Forte { 167fcf3ce44SJohn Forte uint32_t cnt; 168fcf3ce44SJohn Forte stmfGuid guid[1]; 169fcf3ce44SJohn Forte } stmfGuidList; 170fcf3ce44SJohn Forte 171fcf3ce44SJohn Forte typedef struct _stmfState 172fcf3ce44SJohn Forte { 173fcf3ce44SJohn Forte int operationalState; 174fcf3ce44SJohn Forte int configState; 175fcf3ce44SJohn Forte } stmfState; 176fcf3ce44SJohn Forte 177fcf3ce44SJohn Forte typedef struct _stmfDevid 178fcf3ce44SJohn Forte { 179fcf3ce44SJohn Forte uint8_t identLength; /* length of ident */ 180fcf3ce44SJohn Forte uint8_t ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */ 181fcf3ce44SJohn Forte } stmfDevid; 182fcf3ce44SJohn Forte 183fcf3ce44SJohn Forte typedef struct _stmfDevidList 184fcf3ce44SJohn Forte { 185fcf3ce44SJohn Forte uint32_t cnt; 186fcf3ce44SJohn Forte stmfDevid devid[1]; 187fcf3ce44SJohn Forte } stmfDevidList; 188fcf3ce44SJohn Forte 189fcf3ce44SJohn Forte typedef char stmfGroupName[256]; 190fcf3ce44SJohn Forte typedef char stmfProviderName[256]; 191fcf3ce44SJohn Forte 192fcf3ce44SJohn Forte typedef struct _stmfGroupList 193fcf3ce44SJohn Forte { 194fcf3ce44SJohn Forte uint32_t cnt; 195fcf3ce44SJohn Forte stmfGroupName name[1]; 196fcf3ce44SJohn Forte } stmfGroupList; 197fcf3ce44SJohn Forte 198fcf3ce44SJohn Forte typedef struct _stmfProvider 199fcf3ce44SJohn Forte { 200fcf3ce44SJohn Forte int providerType; 201fcf3ce44SJohn Forte stmfProviderName name; 202fcf3ce44SJohn Forte } stmfProvider; 203fcf3ce44SJohn Forte 204fcf3ce44SJohn Forte typedef struct _stmfProviderList 205fcf3ce44SJohn Forte { 206fcf3ce44SJohn Forte uint32_t cnt; 207fcf3ce44SJohn Forte stmfProvider provider[1]; 208fcf3ce44SJohn Forte } stmfProviderList; 209fcf3ce44SJohn Forte 210fcf3ce44SJohn Forte typedef struct _stmfSession 211fcf3ce44SJohn Forte { 212fcf3ce44SJohn Forte stmfDevid initiator; 213fcf3ce44SJohn Forte char alias[256]; 214fcf3ce44SJohn Forte time_t creationTime; 215fcf3ce44SJohn Forte } stmfSession; 216fcf3ce44SJohn Forte 217fcf3ce44SJohn Forte typedef struct _stmfSessionList 218fcf3ce44SJohn Forte { 219fcf3ce44SJohn Forte uint32_t cnt; 220fcf3ce44SJohn Forte stmfSession session[1]; 221fcf3ce44SJohn Forte } stmfSessionList; 222fcf3ce44SJohn Forte 223fcf3ce44SJohn Forte 224fcf3ce44SJohn Forte typedef struct _stmfViewEntry 225fcf3ce44SJohn Forte { 226fcf3ce44SJohn Forte boolean_t veIndexValid; /* if B_TRUE, veIndex is valid value */ 227fcf3ce44SJohn Forte uint32_t veIndex; /* View Entry index */ 228fcf3ce44SJohn Forte boolean_t allHosts; /* all initiator ports */ 229fcf3ce44SJohn Forte stmfGroupName hostGroup; /* Host Group Name */ 230fcf3ce44SJohn Forte boolean_t allTargets; /* B_TRUE = targetGroup is invalid */ 231fcf3ce44SJohn Forte stmfGroupName targetGroup; /* Target Group Name */ 232fcf3ce44SJohn Forte boolean_t luNbrValid; /* if B_TRUE, luNbr is a valid value */ 233fcf3ce44SJohn Forte uchar_t luNbr[8]; /* LU number for this view entry */ 234fcf3ce44SJohn Forte } stmfViewEntry; 235fcf3ce44SJohn Forte 236fcf3ce44SJohn Forte typedef struct _stmfViewEntryList 237fcf3ce44SJohn Forte { 238fcf3ce44SJohn Forte uint32_t cnt; 239fcf3ce44SJohn Forte stmfViewEntry ve[1]; 240fcf3ce44SJohn Forte } stmfViewEntryList; 241fcf3ce44SJohn Forte 242fcf3ce44SJohn Forte typedef struct _stmfViewEntryProperties 243fcf3ce44SJohn Forte { 244fcf3ce44SJohn Forte stmfGuid associatedLogicalUnitGuid; 245fcf3ce44SJohn Forte stmfViewEntry viewEntry; 246fcf3ce44SJohn Forte } stmfViewEntryProperties; 247fcf3ce44SJohn Forte 248fcf3ce44SJohn Forte typedef struct _stmfGroupProperties 249fcf3ce44SJohn Forte { 250fcf3ce44SJohn Forte uint32_t cnt; 251fcf3ce44SJohn Forte stmfDevid name[1]; 252fcf3ce44SJohn Forte } stmfGroupProperties; 253fcf3ce44SJohn Forte 254fcf3ce44SJohn Forte typedef struct _stmfTargetProperties 255fcf3ce44SJohn Forte { 256fcf3ce44SJohn Forte stmfProviderName providerName; 257fcf3ce44SJohn Forte char alias[256]; 258fcf3ce44SJohn Forte uint16_t status; 259fcf3ce44SJohn Forte stmfProtocol protocol; 260fcf3ce44SJohn Forte stmfDevid devid; 261fcf3ce44SJohn Forte } stmfTargetProperties; 262fcf3ce44SJohn Forte 263fcf3ce44SJohn Forte typedef struct _stmfLogicalUnitProperties 264fcf3ce44SJohn Forte { 265fcf3ce44SJohn Forte char alias[256]; 266fcf3ce44SJohn Forte uchar_t vendor[8]; 267fcf3ce44SJohn Forte uchar_t product[16]; 268fcf3ce44SJohn Forte uchar_t revision[4]; 269fcf3ce44SJohn Forte uint32_t status; 270fcf3ce44SJohn Forte char providerName[256]; 271fcf3ce44SJohn Forte stmfGuid luid; 272fcf3ce44SJohn Forte } stmfLogicalUnitProperties; 273fcf3ce44SJohn Forte 2748fe96085Stim szeto typedef void * luResource; 2758fe96085Stim szeto 276fcf3ce44SJohn Forte typedef struct _stmfLogicalUnitProviderProperties 277fcf3ce44SJohn Forte { 278fcf3ce44SJohn Forte char providerName[MAXPATHLEN]; 279fcf3ce44SJohn Forte uint32_t instance; 280fcf3ce44SJohn Forte uint32_t status; 281fcf3ce44SJohn Forte uchar_t rsvd[64]; 282fcf3ce44SJohn Forte } stmfLogicalUnitProviderProperties; 283fcf3ce44SJohn Forte 284fcf3ce44SJohn Forte typedef struct _stmfLocalPortProviderProperties 285fcf3ce44SJohn Forte { 286fcf3ce44SJohn Forte char providerName[MAXPATHLEN]; 287fcf3ce44SJohn Forte uint32_t instance; 288fcf3ce44SJohn Forte uint32_t status; 289fcf3ce44SJohn Forte uchar_t rsvd[64]; 290fcf3ce44SJohn Forte } stmfLocalPortProviderProperties; 291fcf3ce44SJohn Forte 292fcf3ce44SJohn Forte 293fcf3ce44SJohn Forte /* API prototypes */ 294fcf3ce44SJohn Forte int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name); 295fcf3ce44SJohn Forte int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName); 296fcf3ce44SJohn Forte int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 297fcf3ce44SJohn Forte int stmfClearProviderData(char *providerName, int providerType); 298fcf3ce44SJohn Forte int stmfCreateHostGroup(stmfGroupName *hostGroupName); 2998fe96085Stim szeto int stmfCreateLu(luResource hdl, stmfGuid *luGuid); 3008fe96085Stim szeto int stmfCreateLuResource(uint16_t dType, luResource *hdl); 301fcf3ce44SJohn Forte int stmfCreateTargetGroup(stmfGroupName *targetGroupName); 302fcf3ce44SJohn Forte int stmfDeleteHostGroup(stmfGroupName *hostGroupName); 3038fe96085Stim szeto int stmfDeleteLu(stmfGuid *luGuid); 304fcf3ce44SJohn Forte int stmfDeleteTargetGroup(stmfGroupName *targetGroupName); 305fcf3ce44SJohn Forte int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid); 306fcf3ce44SJohn Forte int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid); 3078fe96085Stim szeto int stmfFreeLuResource(luResource hdl); 308fcf3ce44SJohn Forte void stmfFreeMemory(void *); 309fcf3ce44SJohn Forte int stmfGetHostGroupList(stmfGroupList **initiatorGroupList); 310fcf3ce44SJohn Forte int stmfGetHostGroupMembers(stmfGroupName *hostGroupName, 311fcf3ce44SJohn Forte stmfGroupProperties **groupProperties); 312fcf3ce44SJohn Forte int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList); 313fcf3ce44SJohn Forte int stmfGetLocalPortProviderProperties(stmfProviderName *providerName, 314fcf3ce44SJohn Forte stmfLocalPortProviderProperties *providerProperties); 315fcf3ce44SJohn Forte int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList); 316fcf3ce44SJohn Forte int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit, 317fcf3ce44SJohn Forte stmfLogicalUnitProperties *logicalUnitProps); 318fcf3ce44SJohn Forte int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList); 319fcf3ce44SJohn Forte int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName, 320fcf3ce44SJohn Forte stmfLogicalUnitProviderProperties *providerProperties); 3218fe96085Stim szeto int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop, 3228fe96085Stim szeto size_t *propLen); 3238fe96085Stim szeto int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl); 3248fe96085Stim szeto int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState); 325fcf3ce44SJohn Forte int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType); 326fcf3ce44SJohn Forte int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl, 327fcf3ce44SJohn Forte int providerType, uint64_t *setToken); 328fcf3ce44SJohn Forte int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList); 329fcf3ce44SJohn Forte int stmfGetState(stmfState *); 330fcf3ce44SJohn Forte int stmfGetTargetGroupList(stmfGroupList **targetGroupList); 331fcf3ce44SJohn Forte int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName, 332fcf3ce44SJohn Forte stmfGroupProperties **groupProperties); 333fcf3ce44SJohn Forte int stmfGetTargetList(stmfDevidList **targetList); 334fcf3ce44SJohn Forte int stmfGetTargetProperties(stmfDevid *target, 335fcf3ce44SJohn Forte stmfTargetProperties *targetProps); 336fcf3ce44SJohn Forte int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 3378fe96085Stim szeto int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid); 338fcf3ce44SJohn Forte int stmfLoadConfig(void); 3398fe96085Stim szeto int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal); 3408fe96085Stim szeto int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop, 3418fe96085Stim szeto const char *propVal); 342fcf3ce44SJohn Forte int stmfOffline(void); 343fcf3ce44SJohn Forte int stmfOfflineTarget(stmfDevid *devid); 344fcf3ce44SJohn Forte int stmfOfflineLogicalUnit(stmfGuid *logicalUnit); 345fcf3ce44SJohn Forte int stmfOnline(void); 346fcf3ce44SJohn Forte int stmfOnlineTarget(stmfDevid *devid); 347fcf3ce44SJohn Forte int stmfOnlineLogicalUnit(stmfGuid *logicalUnit); 348fcf3ce44SJohn Forte int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName, 349fcf3ce44SJohn Forte stmfDevid *initiatorName); 350fcf3ce44SJohn Forte int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName, 351fcf3ce44SJohn Forte stmfDevid *targetName); 352fcf3ce44SJohn Forte int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 3538fe96085Stim szeto int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal); 3548fe96085Stim szeto int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet); 355fcf3ce44SJohn Forte int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType); 356fcf3ce44SJohn Forte int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl, 357fcf3ce44SJohn Forte int providerType, uint64_t *setToken); 358fcf3ce44SJohn Forte 359fcf3ce44SJohn Forte #ifdef __cplusplus 360fcf3ce44SJohn Forte } 361fcf3ce44SJohn Forte #endif 362fcf3ce44SJohn Forte 363fcf3ce44SJohn Forte #endif /* _LIBSTMF_H */ 364