xref: /titanic_44/usr/src/lib/libstmf/common/libstmf.h (revision 5c8cac22647b12e79982cf052e5df46dc7402bd5)
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)
91*5c8cac22Stim 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,
1328fe96085Stim szeto 	STMF_LU_PROP_NEW,
1338fe96085Stim szeto 	STMF_LU_PROP_SIZE,
1348fe96085Stim szeto 	STMF_LU_PROP_WRITE_PROTECT,
1358fe96085Stim szeto 	STMF_LU_PROP_WRITE_CACHE_DISABLE,
1368fe96085Stim szeto 	STMF_LU_PROP_VID,
1378fe96085Stim szeto 	STMF_LU_PROP_PID,
1388fe96085Stim szeto 	STMF_LU_PROP_SERIAL_NUM
1398fe96085Stim szeto };
1408fe96085Stim szeto 
141fcf3ce44SJohn Forte 
142fcf3ce44SJohn Forte /* devid code set and name types */
143fcf3ce44SJohn Forte #define	EUI_64_TYPE	2
144fcf3ce44SJohn Forte #define	NAA_TYPE	3
145fcf3ce44SJohn Forte #define	SCSI_NAME_TYPE	8
146fcf3ce44SJohn Forte 
147fcf3ce44SJohn Forte #define	BINARY_CODE_SET	1
148fcf3ce44SJohn Forte #define	ASCII_CODE_SET	2
149fcf3ce44SJohn Forte #define	UTF_8_CODE_SET	3
150fcf3ce44SJohn Forte 
151fcf3ce44SJohn Forte typedef enum _stmfProtocol
152fcf3ce44SJohn Forte {
153fcf3ce44SJohn Forte 	STMF_PROTOCOL_FIBRE_CHANNEL =	0,
154fcf3ce44SJohn Forte 	STMF_PROTOCOL_ISCSI =		1,
155fcf3ce44SJohn Forte 	STMF_PROTOCOL_SAS =		2
156fcf3ce44SJohn Forte } stmfProtocol;
157fcf3ce44SJohn Forte 
158fcf3ce44SJohn Forte 
159fcf3ce44SJohn Forte typedef struct _stmfGuid
160fcf3ce44SJohn Forte {
161fcf3ce44SJohn Forte 	uchar_t	guid[16];
162fcf3ce44SJohn Forte } stmfGuid;
163fcf3ce44SJohn Forte 
164fcf3ce44SJohn Forte typedef struct _stmfGuidList
165fcf3ce44SJohn Forte {
166fcf3ce44SJohn Forte 	uint32_t cnt;
167fcf3ce44SJohn Forte 	stmfGuid guid[1];
168fcf3ce44SJohn Forte } stmfGuidList;
169fcf3ce44SJohn Forte 
170fcf3ce44SJohn Forte typedef struct _stmfState
171fcf3ce44SJohn Forte {
172fcf3ce44SJohn Forte 	int operationalState;
173fcf3ce44SJohn Forte 	int configState;
174fcf3ce44SJohn Forte } stmfState;
175fcf3ce44SJohn Forte 
176fcf3ce44SJohn Forte typedef struct _stmfDevid
177fcf3ce44SJohn Forte {
178fcf3ce44SJohn Forte 	uint8_t identLength;	/* length of ident */
179fcf3ce44SJohn Forte 	uint8_t	ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */
180fcf3ce44SJohn Forte } stmfDevid;
181fcf3ce44SJohn Forte 
182fcf3ce44SJohn Forte typedef struct _stmfDevidList
183fcf3ce44SJohn Forte {
184fcf3ce44SJohn Forte 	uint32_t cnt;
185fcf3ce44SJohn Forte 	stmfDevid devid[1];
186fcf3ce44SJohn Forte } stmfDevidList;
187fcf3ce44SJohn Forte 
188fcf3ce44SJohn Forte typedef char stmfGroupName[256];
189fcf3ce44SJohn Forte typedef char stmfProviderName[256];
190fcf3ce44SJohn Forte 
191fcf3ce44SJohn Forte typedef struct _stmfGroupList
192fcf3ce44SJohn Forte {
193fcf3ce44SJohn Forte 	uint32_t cnt;
194fcf3ce44SJohn Forte 	stmfGroupName name[1];
195fcf3ce44SJohn Forte } stmfGroupList;
196fcf3ce44SJohn Forte 
197fcf3ce44SJohn Forte typedef struct _stmfProvider
198fcf3ce44SJohn Forte {
199fcf3ce44SJohn Forte 	int providerType;
200fcf3ce44SJohn Forte 	stmfProviderName name;
201fcf3ce44SJohn Forte } stmfProvider;
202fcf3ce44SJohn Forte 
203fcf3ce44SJohn Forte typedef struct _stmfProviderList
204fcf3ce44SJohn Forte {
205fcf3ce44SJohn Forte 	uint32_t cnt;
206fcf3ce44SJohn Forte 	stmfProvider provider[1];
207fcf3ce44SJohn Forte } stmfProviderList;
208fcf3ce44SJohn Forte 
209fcf3ce44SJohn Forte typedef struct _stmfSession
210fcf3ce44SJohn Forte {
211fcf3ce44SJohn Forte 	stmfDevid initiator;
212fcf3ce44SJohn Forte 	char alias[256];
213fcf3ce44SJohn Forte 	time_t creationTime;
214fcf3ce44SJohn Forte } stmfSession;
215fcf3ce44SJohn Forte 
216fcf3ce44SJohn Forte typedef struct _stmfSessionList
217fcf3ce44SJohn Forte {
218fcf3ce44SJohn Forte 	uint32_t cnt;
219fcf3ce44SJohn Forte 	stmfSession session[1];
220fcf3ce44SJohn Forte } stmfSessionList;
221fcf3ce44SJohn Forte 
222fcf3ce44SJohn Forte 
223fcf3ce44SJohn Forte typedef struct _stmfViewEntry
224fcf3ce44SJohn Forte {
225fcf3ce44SJohn Forte 	boolean_t	veIndexValid;	/* if B_TRUE, veIndex is valid value */
226fcf3ce44SJohn Forte 	uint32_t	veIndex;	/* View Entry index */
227fcf3ce44SJohn Forte 	boolean_t	allHosts;	/* all initiator ports */
228fcf3ce44SJohn Forte 	stmfGroupName   hostGroup;	/* Host Group Name */
229fcf3ce44SJohn Forte 	boolean_t	allTargets;	/* B_TRUE = targetGroup is invalid */
230fcf3ce44SJohn Forte 	stmfGroupName	targetGroup;	/* Target Group Name */
231fcf3ce44SJohn Forte 	boolean_t	luNbrValid;	/* if B_TRUE, luNbr is a valid value */
232fcf3ce44SJohn Forte 	uchar_t		luNbr[8];	/* LU number for this view entry */
233fcf3ce44SJohn Forte } stmfViewEntry;
234fcf3ce44SJohn Forte 
235fcf3ce44SJohn Forte typedef struct _stmfViewEntryList
236fcf3ce44SJohn Forte {
237fcf3ce44SJohn Forte 	uint32_t cnt;
238fcf3ce44SJohn Forte 	stmfViewEntry ve[1];
239fcf3ce44SJohn Forte } stmfViewEntryList;
240fcf3ce44SJohn Forte 
241fcf3ce44SJohn Forte typedef struct _stmfViewEntryProperties
242fcf3ce44SJohn Forte {
243fcf3ce44SJohn Forte 	stmfGuid	associatedLogicalUnitGuid;
244fcf3ce44SJohn Forte 	stmfViewEntry	viewEntry;
245fcf3ce44SJohn Forte } stmfViewEntryProperties;
246fcf3ce44SJohn Forte 
247fcf3ce44SJohn Forte typedef struct _stmfGroupProperties
248fcf3ce44SJohn Forte {
249fcf3ce44SJohn Forte 	uint32_t	cnt;
250fcf3ce44SJohn Forte 	stmfDevid	name[1];
251fcf3ce44SJohn Forte } stmfGroupProperties;
252fcf3ce44SJohn Forte 
253fcf3ce44SJohn Forte typedef struct _stmfTargetProperties
254fcf3ce44SJohn Forte {
255fcf3ce44SJohn Forte 	stmfProviderName providerName;
256fcf3ce44SJohn Forte 	char		 alias[256];
257fcf3ce44SJohn Forte 	uint16_t	 status;
258fcf3ce44SJohn Forte 	stmfProtocol	 protocol;
259fcf3ce44SJohn Forte 	stmfDevid	 devid;
260fcf3ce44SJohn Forte } stmfTargetProperties;
261fcf3ce44SJohn Forte 
262fcf3ce44SJohn Forte typedef struct _stmfLogicalUnitProperties
263fcf3ce44SJohn Forte {
264fcf3ce44SJohn Forte 	char	    alias[256];
265fcf3ce44SJohn Forte 	uchar_t	    vendor[8];
266fcf3ce44SJohn Forte 	uchar_t	    product[16];
267fcf3ce44SJohn Forte 	uchar_t	    revision[4];
268fcf3ce44SJohn Forte 	uint32_t    status;
269fcf3ce44SJohn Forte 	char	    providerName[256];
270fcf3ce44SJohn Forte 	stmfGuid    luid;
271fcf3ce44SJohn Forte } stmfLogicalUnitProperties;
272fcf3ce44SJohn Forte 
2738fe96085Stim szeto typedef void * luResource;
2748fe96085Stim szeto 
275fcf3ce44SJohn Forte typedef struct _stmfLogicalUnitProviderProperties
276fcf3ce44SJohn Forte {
277fcf3ce44SJohn Forte 	char	    providerName[MAXPATHLEN];
278fcf3ce44SJohn Forte 	uint32_t    instance;
279fcf3ce44SJohn Forte 	uint32_t    status;
280fcf3ce44SJohn Forte 	uchar_t	    rsvd[64];
281fcf3ce44SJohn Forte } stmfLogicalUnitProviderProperties;
282fcf3ce44SJohn Forte 
283fcf3ce44SJohn Forte typedef struct _stmfLocalPortProviderProperties
284fcf3ce44SJohn Forte {
285fcf3ce44SJohn Forte 	char	    providerName[MAXPATHLEN];
286fcf3ce44SJohn Forte 	uint32_t    instance;
287fcf3ce44SJohn Forte 	uint32_t    status;
288fcf3ce44SJohn Forte 	uchar_t	    rsvd[64];
289fcf3ce44SJohn Forte } stmfLocalPortProviderProperties;
290fcf3ce44SJohn Forte 
291fcf3ce44SJohn Forte 
292fcf3ce44SJohn Forte /* API prototypes */
293fcf3ce44SJohn Forte int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name);
294fcf3ce44SJohn Forte int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName);
295fcf3ce44SJohn Forte int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry);
296fcf3ce44SJohn Forte int stmfClearProviderData(char *providerName, int providerType);
297fcf3ce44SJohn Forte int stmfCreateHostGroup(stmfGroupName *hostGroupName);
2988fe96085Stim szeto int stmfCreateLu(luResource hdl, stmfGuid *luGuid);
2998fe96085Stim szeto int stmfCreateLuResource(uint16_t dType, luResource *hdl);
300fcf3ce44SJohn Forte int stmfCreateTargetGroup(stmfGroupName *targetGroupName);
301fcf3ce44SJohn Forte int stmfDeleteHostGroup(stmfGroupName *hostGroupName);
3028fe96085Stim szeto int stmfDeleteLu(stmfGuid *luGuid);
303fcf3ce44SJohn Forte int stmfDeleteTargetGroup(stmfGroupName *targetGroupName);
304fcf3ce44SJohn Forte int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid);
305fcf3ce44SJohn Forte int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid);
3068fe96085Stim szeto int stmfFreeLuResource(luResource hdl);
307fcf3ce44SJohn Forte void stmfFreeMemory(void *);
308fcf3ce44SJohn Forte int stmfGetHostGroupList(stmfGroupList **initiatorGroupList);
309fcf3ce44SJohn Forte int stmfGetHostGroupMembers(stmfGroupName *hostGroupName,
310fcf3ce44SJohn Forte     stmfGroupProperties **groupProperties);
311fcf3ce44SJohn Forte int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList);
312fcf3ce44SJohn Forte int stmfGetLocalPortProviderProperties(stmfProviderName *providerName,
313fcf3ce44SJohn Forte     stmfLocalPortProviderProperties *providerProperties);
314fcf3ce44SJohn Forte int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList);
315fcf3ce44SJohn Forte int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit,
316fcf3ce44SJohn Forte     stmfLogicalUnitProperties *logicalUnitProps);
317fcf3ce44SJohn Forte int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList);
318fcf3ce44SJohn Forte int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName,
319fcf3ce44SJohn Forte     stmfLogicalUnitProviderProperties *providerProperties);
3208fe96085Stim szeto int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop,
3218fe96085Stim szeto     size_t *propLen);
3228fe96085Stim szeto int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl);
3238fe96085Stim szeto int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState);
324fcf3ce44SJohn Forte int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType);
325fcf3ce44SJohn Forte int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl,
326fcf3ce44SJohn Forte     int providerType, uint64_t *setToken);
327fcf3ce44SJohn Forte int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList);
328fcf3ce44SJohn Forte int stmfGetState(stmfState *);
329fcf3ce44SJohn Forte int stmfGetTargetGroupList(stmfGroupList **targetGroupList);
330fcf3ce44SJohn Forte int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName,
331fcf3ce44SJohn Forte     stmfGroupProperties **groupProperties);
332fcf3ce44SJohn Forte int stmfGetTargetList(stmfDevidList **targetList);
333fcf3ce44SJohn Forte int stmfGetTargetProperties(stmfDevid *target,
334fcf3ce44SJohn Forte     stmfTargetProperties *targetProps);
335fcf3ce44SJohn Forte int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList);
3368fe96085Stim szeto int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid);
337fcf3ce44SJohn Forte int stmfLoadConfig(void);
3388fe96085Stim szeto int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal);
3398fe96085Stim szeto int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop,
3408fe96085Stim szeto     const char *propVal);
341fcf3ce44SJohn Forte int stmfOffline(void);
342fcf3ce44SJohn Forte int stmfOfflineTarget(stmfDevid *devid);
343fcf3ce44SJohn Forte int stmfOfflineLogicalUnit(stmfGuid *logicalUnit);
344fcf3ce44SJohn Forte int stmfOnline(void);
345fcf3ce44SJohn Forte int stmfOnlineTarget(stmfDevid *devid);
346fcf3ce44SJohn Forte int stmfOnlineLogicalUnit(stmfGuid *logicalUnit);
347fcf3ce44SJohn Forte int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName,
348fcf3ce44SJohn Forte     stmfDevid *initiatorName);
349fcf3ce44SJohn Forte int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName,
350fcf3ce44SJohn Forte     stmfDevid *targetName);
351fcf3ce44SJohn Forte int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex);
3528fe96085Stim szeto int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal);
3538fe96085Stim szeto int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet);
354fcf3ce44SJohn Forte int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType);
355fcf3ce44SJohn Forte int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl,
356fcf3ce44SJohn Forte     int providerType, uint64_t *setToken);
357fcf3ce44SJohn Forte 
358fcf3ce44SJohn Forte #ifdef	__cplusplus
359fcf3ce44SJohn Forte }
360fcf3ce44SJohn Forte #endif
361fcf3ce44SJohn Forte 
362fcf3ce44SJohn Forte #endif	/* _LIBSTMF_H */
363