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 /* 22*8fe96085Stim 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) 83*8fe96085Stim szeto #define STMF_ERROR_NO_PROP (STMF_STATUS_ERROR | 0x14) 84*8fe96085Stim szeto #define STMF_ERROR_NO_PROP_VAL (STMF_STATUS_ERROR | 0x15) 85*8fe96085Stim szeto #define STMF_ERROR_MISSING_PROP_VAL (STMF_STATUS_ERROR | 0x16) 86*8fe96085Stim szeto #define STMF_ERROR_INVALID_BLOCKSIZE (STMF_STATUS_ERROR | 0x17) 87*8fe96085Stim szeto #define STMF_ERROR_FILE_ALREADY (STMF_STATUS_ERROR | 0x18) 88*8fe96085Stim szeto #define STMF_ERROR_INVALID_PROPSIZE (STMF_STATUS_ERROR | 0x19) 89*8fe96085Stim szeto #define STMF_ERROR_INVALID_PROP (STMF_STATUS_ERROR | 0x20) 90*8fe96085Stim szeto #define STMF_ERROR_PERSIST_TYPE (STMF_STATUS_ERROR | 0x21) 91*8fe96085Stim szeto 92*8fe96085Stim szeto /* Failures for stmfCreateLu */ 93*8fe96085Stim szeto #define STMF_ERROR_FILE_IN_USE (STMF_STATUS_ERROR | 0x100) 94*8fe96085Stim szeto #define STMF_ERROR_INVALID_BLKSIZE (STMF_STATUS_ERROR | 0x101) 95*8fe96085Stim szeto #define STMF_ERROR_GUID_IN_USE (STMF_STATUS_ERROR | 0x102) 96*8fe96085Stim szeto #define STMF_ERROR_META_FILE_NAME (STMF_STATUS_ERROR | 0x103) 97*8fe96085Stim szeto #define STMF_ERROR_DATA_FILE_NAME (STMF_STATUS_ERROR | 0x104) 98*8fe96085Stim szeto #define STMF_ERROR_SIZE_OUT_OF_RANGE (STMF_STATUS_ERROR | 0x105) 99*8fe96085Stim szeto #define STMF_ERROR_LU_BUSY (STMF_STATUS_ERROR | 0x106) 100*8fe96085Stim szeto #define STMF_ERROR_META_CREATION (STMF_STATUS_ERROR | 0x107) 101*8fe96085Stim szeto #define STMF_ERROR_FILE_SIZE_INVALID (STMF_STATUS_ERROR | 0x108) 102*8fe96085Stim szeto #define STMF_ERROR_WRITE_CACHE_SET (STMF_STATUS_ERROR | 0x109) 103fcf3ce44SJohn Forte 104fcf3ce44SJohn Forte /* Initiator Name Types */ 105fcf3ce44SJohn Forte #define STMF_FC_PORT_WWN 1 106fcf3ce44SJohn Forte #define STMF_ISCSI_NAME 2 107fcf3ce44SJohn Forte 108fcf3ce44SJohn Forte 109fcf3ce44SJohn Forte /* provider types */ 110fcf3ce44SJohn Forte #define STMF_LU_PROVIDER_TYPE 1 111fcf3ce44SJohn Forte #define STMF_PORT_PROVIDER_TYPE 2 112fcf3ce44SJohn Forte 113*8fe96085Stim szeto /* LU Resource types */ 114*8fe96085Stim szeto #define STMF_DISK 0 115*8fe96085Stim szeto 116*8fe96085Stim szeto /* Persistence methods */ 117*8fe96085Stim szeto #define STMF_PERSIST_SMF 1 118*8fe96085Stim szeto #define STMF_PERSIST_NONE 2 119*8fe96085Stim szeto 120*8fe96085Stim szeto /* 121*8fe96085Stim szeto * LU Disk Properties 122*8fe96085Stim szeto */ 123*8fe96085Stim szeto 124*8fe96085Stim szeto enum { 125*8fe96085Stim szeto STMF_LU_PROP_ALIAS = 1, 126*8fe96085Stim szeto STMF_LU_PROP_BLOCK_SIZE, 127*8fe96085Stim szeto STMF_LU_PROP_COMPANY_ID, 128*8fe96085Stim szeto STMF_LU_PROP_FILENAME, 129*8fe96085Stim szeto STMF_LU_PROP_GUID, 130*8fe96085Stim szeto STMF_LU_PROP_META_FILENAME, 131*8fe96085Stim szeto STMF_LU_PROP_NEW, 132*8fe96085Stim szeto STMF_LU_PROP_SIZE, 133*8fe96085Stim szeto STMF_LU_PROP_WRITE_PROTECT, 134*8fe96085Stim szeto STMF_LU_PROP_WRITE_CACHE_DISABLE, 135*8fe96085Stim szeto STMF_LU_PROP_VID, 136*8fe96085Stim szeto STMF_LU_PROP_PID, 137*8fe96085Stim szeto STMF_LU_PROP_SERIAL_NUM 138*8fe96085Stim szeto }; 139*8fe96085Stim szeto 140fcf3ce44SJohn Forte 141fcf3ce44SJohn Forte /* devid code set and name types */ 142fcf3ce44SJohn Forte #define EUI_64_TYPE 2 143fcf3ce44SJohn Forte #define NAA_TYPE 3 144fcf3ce44SJohn Forte #define SCSI_NAME_TYPE 8 145fcf3ce44SJohn Forte 146fcf3ce44SJohn Forte #define BINARY_CODE_SET 1 147fcf3ce44SJohn Forte #define ASCII_CODE_SET 2 148fcf3ce44SJohn Forte #define UTF_8_CODE_SET 3 149fcf3ce44SJohn Forte 150fcf3ce44SJohn Forte typedef enum _stmfProtocol 151fcf3ce44SJohn Forte { 152fcf3ce44SJohn Forte STMF_PROTOCOL_FIBRE_CHANNEL = 0, 153fcf3ce44SJohn Forte STMF_PROTOCOL_ISCSI = 1, 154fcf3ce44SJohn Forte STMF_PROTOCOL_SAS = 2 155fcf3ce44SJohn Forte } stmfProtocol; 156fcf3ce44SJohn Forte 157fcf3ce44SJohn Forte 158fcf3ce44SJohn Forte typedef struct _stmfGuid 159fcf3ce44SJohn Forte { 160fcf3ce44SJohn Forte uchar_t guid[16]; 161fcf3ce44SJohn Forte } stmfGuid; 162fcf3ce44SJohn Forte 163fcf3ce44SJohn Forte typedef struct _stmfGuidList 164fcf3ce44SJohn Forte { 165fcf3ce44SJohn Forte uint32_t cnt; 166fcf3ce44SJohn Forte stmfGuid guid[1]; 167fcf3ce44SJohn Forte } stmfGuidList; 168fcf3ce44SJohn Forte 169fcf3ce44SJohn Forte typedef struct _stmfState 170fcf3ce44SJohn Forte { 171fcf3ce44SJohn Forte int operationalState; 172fcf3ce44SJohn Forte int configState; 173fcf3ce44SJohn Forte } stmfState; 174fcf3ce44SJohn Forte 175fcf3ce44SJohn Forte typedef struct _stmfDevid 176fcf3ce44SJohn Forte { 177fcf3ce44SJohn Forte uint8_t identLength; /* length of ident */ 178fcf3ce44SJohn Forte uint8_t ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */ 179fcf3ce44SJohn Forte } stmfDevid; 180fcf3ce44SJohn Forte 181fcf3ce44SJohn Forte typedef struct _stmfDevidList 182fcf3ce44SJohn Forte { 183fcf3ce44SJohn Forte uint32_t cnt; 184fcf3ce44SJohn Forte stmfDevid devid[1]; 185fcf3ce44SJohn Forte } stmfDevidList; 186fcf3ce44SJohn Forte 187fcf3ce44SJohn Forte typedef char stmfGroupName[256]; 188fcf3ce44SJohn Forte typedef char stmfProviderName[256]; 189fcf3ce44SJohn Forte 190fcf3ce44SJohn Forte typedef struct _stmfGroupList 191fcf3ce44SJohn Forte { 192fcf3ce44SJohn Forte uint32_t cnt; 193fcf3ce44SJohn Forte stmfGroupName name[1]; 194fcf3ce44SJohn Forte } stmfGroupList; 195fcf3ce44SJohn Forte 196fcf3ce44SJohn Forte typedef struct _stmfProvider 197fcf3ce44SJohn Forte { 198fcf3ce44SJohn Forte int providerType; 199fcf3ce44SJohn Forte stmfProviderName name; 200fcf3ce44SJohn Forte } stmfProvider; 201fcf3ce44SJohn Forte 202fcf3ce44SJohn Forte typedef struct _stmfProviderList 203fcf3ce44SJohn Forte { 204fcf3ce44SJohn Forte uint32_t cnt; 205fcf3ce44SJohn Forte stmfProvider provider[1]; 206fcf3ce44SJohn Forte } stmfProviderList; 207fcf3ce44SJohn Forte 208fcf3ce44SJohn Forte typedef struct _stmfSession 209fcf3ce44SJohn Forte { 210fcf3ce44SJohn Forte stmfDevid initiator; 211fcf3ce44SJohn Forte char alias[256]; 212fcf3ce44SJohn Forte time_t creationTime; 213fcf3ce44SJohn Forte } stmfSession; 214fcf3ce44SJohn Forte 215fcf3ce44SJohn Forte typedef struct _stmfSessionList 216fcf3ce44SJohn Forte { 217fcf3ce44SJohn Forte uint32_t cnt; 218fcf3ce44SJohn Forte stmfSession session[1]; 219fcf3ce44SJohn Forte } stmfSessionList; 220fcf3ce44SJohn Forte 221fcf3ce44SJohn Forte 222fcf3ce44SJohn Forte typedef struct _stmfViewEntry 223fcf3ce44SJohn Forte { 224fcf3ce44SJohn Forte boolean_t veIndexValid; /* if B_TRUE, veIndex is valid value */ 225fcf3ce44SJohn Forte uint32_t veIndex; /* View Entry index */ 226fcf3ce44SJohn Forte boolean_t allHosts; /* all initiator ports */ 227fcf3ce44SJohn Forte stmfGroupName hostGroup; /* Host Group Name */ 228fcf3ce44SJohn Forte boolean_t allTargets; /* B_TRUE = targetGroup is invalid */ 229fcf3ce44SJohn Forte stmfGroupName targetGroup; /* Target Group Name */ 230fcf3ce44SJohn Forte boolean_t luNbrValid; /* if B_TRUE, luNbr is a valid value */ 231fcf3ce44SJohn Forte uchar_t luNbr[8]; /* LU number for this view entry */ 232fcf3ce44SJohn Forte } stmfViewEntry; 233fcf3ce44SJohn Forte 234fcf3ce44SJohn Forte typedef struct _stmfViewEntryList 235fcf3ce44SJohn Forte { 236fcf3ce44SJohn Forte uint32_t cnt; 237fcf3ce44SJohn Forte stmfViewEntry ve[1]; 238fcf3ce44SJohn Forte } stmfViewEntryList; 239fcf3ce44SJohn Forte 240fcf3ce44SJohn Forte typedef struct _stmfViewEntryProperties 241fcf3ce44SJohn Forte { 242fcf3ce44SJohn Forte stmfGuid associatedLogicalUnitGuid; 243fcf3ce44SJohn Forte stmfViewEntry viewEntry; 244fcf3ce44SJohn Forte } stmfViewEntryProperties; 245fcf3ce44SJohn Forte 246fcf3ce44SJohn Forte typedef struct _stmfGroupProperties 247fcf3ce44SJohn Forte { 248fcf3ce44SJohn Forte uint32_t cnt; 249fcf3ce44SJohn Forte stmfDevid name[1]; 250fcf3ce44SJohn Forte } stmfGroupProperties; 251fcf3ce44SJohn Forte 252fcf3ce44SJohn Forte typedef struct _stmfTargetProperties 253fcf3ce44SJohn Forte { 254fcf3ce44SJohn Forte stmfProviderName providerName; 255fcf3ce44SJohn Forte char alias[256]; 256fcf3ce44SJohn Forte uint16_t status; 257fcf3ce44SJohn Forte stmfProtocol protocol; 258fcf3ce44SJohn Forte stmfDevid devid; 259fcf3ce44SJohn Forte } stmfTargetProperties; 260fcf3ce44SJohn Forte 261fcf3ce44SJohn Forte typedef struct _stmfLogicalUnitProperties 262fcf3ce44SJohn Forte { 263fcf3ce44SJohn Forte char alias[256]; 264fcf3ce44SJohn Forte uchar_t vendor[8]; 265fcf3ce44SJohn Forte uchar_t product[16]; 266fcf3ce44SJohn Forte uchar_t revision[4]; 267fcf3ce44SJohn Forte uint32_t status; 268fcf3ce44SJohn Forte char providerName[256]; 269fcf3ce44SJohn Forte stmfGuid luid; 270fcf3ce44SJohn Forte } stmfLogicalUnitProperties; 271fcf3ce44SJohn Forte 272*8fe96085Stim szeto typedef void * luResource; 273*8fe96085Stim szeto 274fcf3ce44SJohn Forte typedef struct _stmfLogicalUnitProviderProperties 275fcf3ce44SJohn Forte { 276fcf3ce44SJohn Forte char providerName[MAXPATHLEN]; 277fcf3ce44SJohn Forte uint32_t instance; 278fcf3ce44SJohn Forte uint32_t status; 279fcf3ce44SJohn Forte uchar_t rsvd[64]; 280fcf3ce44SJohn Forte } stmfLogicalUnitProviderProperties; 281fcf3ce44SJohn Forte 282fcf3ce44SJohn Forte typedef struct _stmfLocalPortProviderProperties 283fcf3ce44SJohn Forte { 284fcf3ce44SJohn Forte char providerName[MAXPATHLEN]; 285fcf3ce44SJohn Forte uint32_t instance; 286fcf3ce44SJohn Forte uint32_t status; 287fcf3ce44SJohn Forte uchar_t rsvd[64]; 288fcf3ce44SJohn Forte } stmfLocalPortProviderProperties; 289fcf3ce44SJohn Forte 290fcf3ce44SJohn Forte 291fcf3ce44SJohn Forte /* API prototypes */ 292fcf3ce44SJohn Forte int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name); 293fcf3ce44SJohn Forte int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName); 294fcf3ce44SJohn Forte int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 295fcf3ce44SJohn Forte int stmfClearProviderData(char *providerName, int providerType); 296fcf3ce44SJohn Forte int stmfCreateHostGroup(stmfGroupName *hostGroupName); 297*8fe96085Stim szeto int stmfCreateLu(luResource hdl, stmfGuid *luGuid); 298*8fe96085Stim szeto int stmfCreateLuResource(uint16_t dType, luResource *hdl); 299fcf3ce44SJohn Forte int stmfCreateTargetGroup(stmfGroupName *targetGroupName); 300fcf3ce44SJohn Forte int stmfDeleteHostGroup(stmfGroupName *hostGroupName); 301*8fe96085Stim szeto int stmfDeleteLu(stmfGuid *luGuid); 302fcf3ce44SJohn Forte int stmfDeleteTargetGroup(stmfGroupName *targetGroupName); 303fcf3ce44SJohn Forte int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid); 304fcf3ce44SJohn Forte int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid); 305*8fe96085Stim szeto int stmfFreeLuResource(luResource hdl); 306fcf3ce44SJohn Forte void stmfFreeMemory(void *); 307fcf3ce44SJohn Forte int stmfGetHostGroupList(stmfGroupList **initiatorGroupList); 308fcf3ce44SJohn Forte int stmfGetHostGroupMembers(stmfGroupName *hostGroupName, 309fcf3ce44SJohn Forte stmfGroupProperties **groupProperties); 310fcf3ce44SJohn Forte int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList); 311fcf3ce44SJohn Forte int stmfGetLocalPortProviderProperties(stmfProviderName *providerName, 312fcf3ce44SJohn Forte stmfLocalPortProviderProperties *providerProperties); 313fcf3ce44SJohn Forte int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList); 314fcf3ce44SJohn Forte int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit, 315fcf3ce44SJohn Forte stmfLogicalUnitProperties *logicalUnitProps); 316fcf3ce44SJohn Forte int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList); 317fcf3ce44SJohn Forte int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName, 318fcf3ce44SJohn Forte stmfLogicalUnitProviderProperties *providerProperties); 319*8fe96085Stim szeto int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop, 320*8fe96085Stim szeto size_t *propLen); 321*8fe96085Stim szeto int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl); 322*8fe96085Stim szeto int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState); 323fcf3ce44SJohn Forte int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType); 324fcf3ce44SJohn Forte int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl, 325fcf3ce44SJohn Forte int providerType, uint64_t *setToken); 326fcf3ce44SJohn Forte int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList); 327fcf3ce44SJohn Forte int stmfGetState(stmfState *); 328fcf3ce44SJohn Forte int stmfGetTargetGroupList(stmfGroupList **targetGroupList); 329fcf3ce44SJohn Forte int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName, 330fcf3ce44SJohn Forte stmfGroupProperties **groupProperties); 331fcf3ce44SJohn Forte int stmfGetTargetList(stmfDevidList **targetList); 332fcf3ce44SJohn Forte int stmfGetTargetProperties(stmfDevid *target, 333fcf3ce44SJohn Forte stmfTargetProperties *targetProps); 334fcf3ce44SJohn Forte int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 335*8fe96085Stim szeto int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid); 336fcf3ce44SJohn Forte int stmfLoadConfig(void); 337*8fe96085Stim szeto int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal); 338*8fe96085Stim szeto int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop, 339*8fe96085Stim szeto const char *propVal); 340fcf3ce44SJohn Forte int stmfOffline(void); 341fcf3ce44SJohn Forte int stmfOfflineTarget(stmfDevid *devid); 342fcf3ce44SJohn Forte int stmfOfflineLogicalUnit(stmfGuid *logicalUnit); 343fcf3ce44SJohn Forte int stmfOnline(void); 344fcf3ce44SJohn Forte int stmfOnlineTarget(stmfDevid *devid); 345fcf3ce44SJohn Forte int stmfOnlineLogicalUnit(stmfGuid *logicalUnit); 346fcf3ce44SJohn Forte int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName, 347fcf3ce44SJohn Forte stmfDevid *initiatorName); 348fcf3ce44SJohn Forte int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName, 349fcf3ce44SJohn Forte stmfDevid *targetName); 350fcf3ce44SJohn Forte int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 351*8fe96085Stim szeto int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal); 352*8fe96085Stim szeto int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet); 353fcf3ce44SJohn Forte int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType); 354fcf3ce44SJohn Forte int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl, 355fcf3ce44SJohn Forte int providerType, uint64_t *setToken); 356fcf3ce44SJohn Forte 357fcf3ce44SJohn Forte #ifdef __cplusplus 358fcf3ce44SJohn Forte } 359fcf3ce44SJohn Forte #endif 360fcf3ce44SJohn Forte 361fcf3ce44SJohn Forte #endif /* _LIBSTMF_H */ 362