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)
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,
132*10113SNattuvetty.Bhavyan@Sun.COM 	STMF_LU_PROP_MGMT_URL,
1339585STim.Szeto@Sun.COM 	STMF_LU_PROP_NEW,
1349585STim.Szeto@Sun.COM 	STMF_LU_PROP_SIZE,
1359585STim.Szeto@Sun.COM 	STMF_LU_PROP_WRITE_PROTECT,
1369585STim.Szeto@Sun.COM 	STMF_LU_PROP_WRITE_CACHE_DISABLE,
1379585STim.Szeto@Sun.COM 	STMF_LU_PROP_VID,
1389585STim.Szeto@Sun.COM 	STMF_LU_PROP_PID,
1399585STim.Szeto@Sun.COM 	STMF_LU_PROP_SERIAL_NUM
1409585STim.Szeto@Sun.COM };
1419585STim.Szeto@Sun.COM 
1427836SJohn.Forte@Sun.COM 
1437836SJohn.Forte@Sun.COM /* devid code set and name types */
1447836SJohn.Forte@Sun.COM #define	EUI_64_TYPE	2
1457836SJohn.Forte@Sun.COM #define	NAA_TYPE	3
1467836SJohn.Forte@Sun.COM #define	SCSI_NAME_TYPE	8
1477836SJohn.Forte@Sun.COM 
1487836SJohn.Forte@Sun.COM #define	BINARY_CODE_SET	1
1497836SJohn.Forte@Sun.COM #define	ASCII_CODE_SET	2
1507836SJohn.Forte@Sun.COM #define	UTF_8_CODE_SET	3
1517836SJohn.Forte@Sun.COM 
1527836SJohn.Forte@Sun.COM typedef enum _stmfProtocol
1537836SJohn.Forte@Sun.COM {
1547836SJohn.Forte@Sun.COM 	STMF_PROTOCOL_FIBRE_CHANNEL =	0,
1557836SJohn.Forte@Sun.COM 	STMF_PROTOCOL_ISCSI =		1,
1567836SJohn.Forte@Sun.COM 	STMF_PROTOCOL_SAS =		2
1577836SJohn.Forte@Sun.COM } stmfProtocol;
1587836SJohn.Forte@Sun.COM 
1597836SJohn.Forte@Sun.COM 
1607836SJohn.Forte@Sun.COM typedef struct _stmfGuid
1617836SJohn.Forte@Sun.COM {
1627836SJohn.Forte@Sun.COM 	uchar_t	guid[16];
1637836SJohn.Forte@Sun.COM } stmfGuid;
1647836SJohn.Forte@Sun.COM 
1657836SJohn.Forte@Sun.COM typedef struct _stmfGuidList
1667836SJohn.Forte@Sun.COM {
1677836SJohn.Forte@Sun.COM 	uint32_t cnt;
1687836SJohn.Forte@Sun.COM 	stmfGuid guid[1];
1697836SJohn.Forte@Sun.COM } stmfGuidList;
1707836SJohn.Forte@Sun.COM 
1717836SJohn.Forte@Sun.COM typedef struct _stmfState
1727836SJohn.Forte@Sun.COM {
1737836SJohn.Forte@Sun.COM 	int operationalState;
1747836SJohn.Forte@Sun.COM 	int configState;
1757836SJohn.Forte@Sun.COM } stmfState;
1767836SJohn.Forte@Sun.COM 
1777836SJohn.Forte@Sun.COM typedef struct _stmfDevid
1787836SJohn.Forte@Sun.COM {
1797836SJohn.Forte@Sun.COM 	uint8_t identLength;	/* length of ident */
1807836SJohn.Forte@Sun.COM 	uint8_t	ident[STMF_IDENT_LENGTH]; /* SCSI name string ident */
1817836SJohn.Forte@Sun.COM } stmfDevid;
1827836SJohn.Forte@Sun.COM 
1837836SJohn.Forte@Sun.COM typedef struct _stmfDevidList
1847836SJohn.Forte@Sun.COM {
1857836SJohn.Forte@Sun.COM 	uint32_t cnt;
1867836SJohn.Forte@Sun.COM 	stmfDevid devid[1];
1877836SJohn.Forte@Sun.COM } stmfDevidList;
1887836SJohn.Forte@Sun.COM 
1897836SJohn.Forte@Sun.COM typedef char stmfGroupName[256];
1907836SJohn.Forte@Sun.COM typedef char stmfProviderName[256];
1917836SJohn.Forte@Sun.COM 
1927836SJohn.Forte@Sun.COM typedef struct _stmfGroupList
1937836SJohn.Forte@Sun.COM {
1947836SJohn.Forte@Sun.COM 	uint32_t cnt;
1957836SJohn.Forte@Sun.COM 	stmfGroupName name[1];
1967836SJohn.Forte@Sun.COM } stmfGroupList;
1977836SJohn.Forte@Sun.COM 
1987836SJohn.Forte@Sun.COM typedef struct _stmfProvider
1997836SJohn.Forte@Sun.COM {
2007836SJohn.Forte@Sun.COM 	int providerType;
2017836SJohn.Forte@Sun.COM 	stmfProviderName name;
2027836SJohn.Forte@Sun.COM } stmfProvider;
2037836SJohn.Forte@Sun.COM 
2047836SJohn.Forte@Sun.COM typedef struct _stmfProviderList
2057836SJohn.Forte@Sun.COM {
2067836SJohn.Forte@Sun.COM 	uint32_t cnt;
2077836SJohn.Forte@Sun.COM 	stmfProvider provider[1];
2087836SJohn.Forte@Sun.COM } stmfProviderList;
2097836SJohn.Forte@Sun.COM 
2107836SJohn.Forte@Sun.COM typedef struct _stmfSession
2117836SJohn.Forte@Sun.COM {
2127836SJohn.Forte@Sun.COM 	stmfDevid initiator;
2137836SJohn.Forte@Sun.COM 	char alias[256];
2147836SJohn.Forte@Sun.COM 	time_t creationTime;
2157836SJohn.Forte@Sun.COM } stmfSession;
2167836SJohn.Forte@Sun.COM 
2177836SJohn.Forte@Sun.COM typedef struct _stmfSessionList
2187836SJohn.Forte@Sun.COM {
2197836SJohn.Forte@Sun.COM 	uint32_t cnt;
2207836SJohn.Forte@Sun.COM 	stmfSession session[1];
2217836SJohn.Forte@Sun.COM } stmfSessionList;
2227836SJohn.Forte@Sun.COM 
2237836SJohn.Forte@Sun.COM 
2247836SJohn.Forte@Sun.COM typedef struct _stmfViewEntry
2257836SJohn.Forte@Sun.COM {
2267836SJohn.Forte@Sun.COM 	boolean_t	veIndexValid;	/* if B_TRUE, veIndex is valid value */
2277836SJohn.Forte@Sun.COM 	uint32_t	veIndex;	/* View Entry index */
2287836SJohn.Forte@Sun.COM 	boolean_t	allHosts;	/* all initiator ports */
2297836SJohn.Forte@Sun.COM 	stmfGroupName   hostGroup;	/* Host Group Name */
2307836SJohn.Forte@Sun.COM 	boolean_t	allTargets;	/* B_TRUE = targetGroup is invalid */
2317836SJohn.Forte@Sun.COM 	stmfGroupName	targetGroup;	/* Target Group Name */
2327836SJohn.Forte@Sun.COM 	boolean_t	luNbrValid;	/* if B_TRUE, luNbr is a valid value */
2337836SJohn.Forte@Sun.COM 	uchar_t		luNbr[8];	/* LU number for this view entry */
2347836SJohn.Forte@Sun.COM } stmfViewEntry;
2357836SJohn.Forte@Sun.COM 
2367836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryList
2377836SJohn.Forte@Sun.COM {
2387836SJohn.Forte@Sun.COM 	uint32_t cnt;
2397836SJohn.Forte@Sun.COM 	stmfViewEntry ve[1];
2407836SJohn.Forte@Sun.COM } stmfViewEntryList;
2417836SJohn.Forte@Sun.COM 
2427836SJohn.Forte@Sun.COM typedef struct _stmfViewEntryProperties
2437836SJohn.Forte@Sun.COM {
2447836SJohn.Forte@Sun.COM 	stmfGuid	associatedLogicalUnitGuid;
2457836SJohn.Forte@Sun.COM 	stmfViewEntry	viewEntry;
2467836SJohn.Forte@Sun.COM } stmfViewEntryProperties;
2477836SJohn.Forte@Sun.COM 
2487836SJohn.Forte@Sun.COM typedef struct _stmfGroupProperties
2497836SJohn.Forte@Sun.COM {
2507836SJohn.Forte@Sun.COM 	uint32_t	cnt;
2517836SJohn.Forte@Sun.COM 	stmfDevid	name[1];
2527836SJohn.Forte@Sun.COM } stmfGroupProperties;
2537836SJohn.Forte@Sun.COM 
2547836SJohn.Forte@Sun.COM typedef struct _stmfTargetProperties
2557836SJohn.Forte@Sun.COM {
2567836SJohn.Forte@Sun.COM 	stmfProviderName providerName;
2577836SJohn.Forte@Sun.COM 	char		 alias[256];
2587836SJohn.Forte@Sun.COM 	uint16_t	 status;
2597836SJohn.Forte@Sun.COM 	stmfProtocol	 protocol;
2607836SJohn.Forte@Sun.COM 	stmfDevid	 devid;
2617836SJohn.Forte@Sun.COM } stmfTargetProperties;
2627836SJohn.Forte@Sun.COM 
2637836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProperties
2647836SJohn.Forte@Sun.COM {
2657836SJohn.Forte@Sun.COM 	char	    alias[256];
2667836SJohn.Forte@Sun.COM 	uchar_t	    vendor[8];
2677836SJohn.Forte@Sun.COM 	uchar_t	    product[16];
2687836SJohn.Forte@Sun.COM 	uchar_t	    revision[4];
2697836SJohn.Forte@Sun.COM 	uint32_t    status;
2707836SJohn.Forte@Sun.COM 	char	    providerName[256];
2717836SJohn.Forte@Sun.COM 	stmfGuid    luid;
2727836SJohn.Forte@Sun.COM } stmfLogicalUnitProperties;
2737836SJohn.Forte@Sun.COM 
2749585STim.Szeto@Sun.COM typedef void * luResource;
2759585STim.Szeto@Sun.COM 
2767836SJohn.Forte@Sun.COM typedef struct _stmfLogicalUnitProviderProperties
2777836SJohn.Forte@Sun.COM {
2787836SJohn.Forte@Sun.COM 	char	    providerName[MAXPATHLEN];
2797836SJohn.Forte@Sun.COM 	uint32_t    instance;
2807836SJohn.Forte@Sun.COM 	uint32_t    status;
2817836SJohn.Forte@Sun.COM 	uchar_t	    rsvd[64];
2827836SJohn.Forte@Sun.COM } stmfLogicalUnitProviderProperties;
2837836SJohn.Forte@Sun.COM 
2847836SJohn.Forte@Sun.COM typedef struct _stmfLocalPortProviderProperties
2857836SJohn.Forte@Sun.COM {
2867836SJohn.Forte@Sun.COM 	char	    providerName[MAXPATHLEN];
2877836SJohn.Forte@Sun.COM 	uint32_t    instance;
2887836SJohn.Forte@Sun.COM 	uint32_t    status;
2897836SJohn.Forte@Sun.COM 	uchar_t	    rsvd[64];
2907836SJohn.Forte@Sun.COM } stmfLocalPortProviderProperties;
2917836SJohn.Forte@Sun.COM 
2927836SJohn.Forte@Sun.COM 
2937836SJohn.Forte@Sun.COM /* API prototypes */
2947836SJohn.Forte@Sun.COM int stmfAddToHostGroup(stmfGroupName *hostGroupName, stmfDevid *name);
2957836SJohn.Forte@Sun.COM int stmfAddToTargetGroup(stmfGroupName *targetGroupName, stmfDevid *targetName);
2967836SJohn.Forte@Sun.COM int stmfAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry);
2977836SJohn.Forte@Sun.COM int stmfClearProviderData(char *providerName, int providerType);
2987836SJohn.Forte@Sun.COM int stmfCreateHostGroup(stmfGroupName *hostGroupName);
2999585STim.Szeto@Sun.COM int stmfCreateLu(luResource hdl, stmfGuid *luGuid);
3009585STim.Szeto@Sun.COM int stmfCreateLuResource(uint16_t dType, luResource *hdl);
3017836SJohn.Forte@Sun.COM int stmfCreateTargetGroup(stmfGroupName *targetGroupName);
3027836SJohn.Forte@Sun.COM int stmfDeleteHostGroup(stmfGroupName *hostGroupName);
3039585STim.Szeto@Sun.COM int stmfDeleteLu(stmfGuid *luGuid);
3047836SJohn.Forte@Sun.COM int stmfDeleteTargetGroup(stmfGroupName *targetGroupName);
3057836SJohn.Forte@Sun.COM int stmfDevidFromIscsiName(char *iscsiName, stmfDevid *devid);
3067836SJohn.Forte@Sun.COM int stmfDevidFromWwn(uchar_t wwn[8], stmfDevid *devid);
3079585STim.Szeto@Sun.COM int stmfFreeLuResource(luResource hdl);
3087836SJohn.Forte@Sun.COM void stmfFreeMemory(void *);
3097836SJohn.Forte@Sun.COM int stmfGetHostGroupList(stmfGroupList **initiatorGroupList);
3107836SJohn.Forte@Sun.COM int stmfGetHostGroupMembers(stmfGroupName *hostGroupName,
3117836SJohn.Forte@Sun.COM     stmfGroupProperties **groupProperties);
3127836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderList(stmfProviderList **localPortProviderList);
3137836SJohn.Forte@Sun.COM int stmfGetLocalPortProviderProperties(stmfProviderName *providerName,
3147836SJohn.Forte@Sun.COM     stmfLocalPortProviderProperties *providerProperties);
3157836SJohn.Forte@Sun.COM int stmfGetLogicalUnitList(stmfGuidList **logicalUnitList);
3167836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProperties(stmfGuid *logicalUnit,
3177836SJohn.Forte@Sun.COM     stmfLogicalUnitProperties *logicalUnitProps);
3187836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderList(stmfProviderList **logicalUnitProviderList);
3197836SJohn.Forte@Sun.COM int stmfGetLogicalUnitProviderProperties(stmfProviderName *providerName,
3207836SJohn.Forte@Sun.COM     stmfLogicalUnitProviderProperties *providerProperties);
3219585STim.Szeto@Sun.COM int stmfGetLuProp(luResource hdl, uint32_t propType, char *prop,
3229585STim.Szeto@Sun.COM     size_t *propLen);
3239585STim.Szeto@Sun.COM int stmfGetLuResource(stmfGuid *luGuid, luResource *hdl);
3249585STim.Szeto@Sun.COM int stmfGetPersistMethod(uint8_t *persistType, boolean_t serviceState);
3257836SJohn.Forte@Sun.COM int stmfGetProviderData(char *providerName, nvlist_t **nvl, int providerType);
3267836SJohn.Forte@Sun.COM int stmfGetProviderDataProt(char *providerName, nvlist_t **nvl,
3277836SJohn.Forte@Sun.COM     int providerType, uint64_t *setToken);
3287836SJohn.Forte@Sun.COM int stmfGetSessionList(stmfDevid *target, stmfSessionList **sessionList);
3297836SJohn.Forte@Sun.COM int stmfGetState(stmfState *);
3307836SJohn.Forte@Sun.COM int stmfGetTargetGroupList(stmfGroupList **targetGroupList);
3317836SJohn.Forte@Sun.COM int stmfGetTargetGroupMembers(stmfGroupName *targetGroupName,
3327836SJohn.Forte@Sun.COM     stmfGroupProperties **groupProperties);
3337836SJohn.Forte@Sun.COM int stmfGetTargetList(stmfDevidList **targetList);
3347836SJohn.Forte@Sun.COM int stmfGetTargetProperties(stmfDevid *target,
3357836SJohn.Forte@Sun.COM     stmfTargetProperties *targetProps);
3367836SJohn.Forte@Sun.COM int stmfGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList);
3379585STim.Szeto@Sun.COM int stmfImportLu(uint16_t dType, char *fname, stmfGuid *luGuid);
3387836SJohn.Forte@Sun.COM int stmfLoadConfig(void);
3399585STim.Szeto@Sun.COM int stmfModifyLu(stmfGuid *luGuid, uint32_t prop, const char *propVal);
3409585STim.Szeto@Sun.COM int stmfModifyLuByFname(uint16_t dType, const char *fname, uint32_t prop,
3419585STim.Szeto@Sun.COM     const char *propVal);
3427836SJohn.Forte@Sun.COM int stmfOffline(void);
3437836SJohn.Forte@Sun.COM int stmfOfflineTarget(stmfDevid *devid);
3447836SJohn.Forte@Sun.COM int stmfOfflineLogicalUnit(stmfGuid *logicalUnit);
3457836SJohn.Forte@Sun.COM int stmfOnline(void);
3467836SJohn.Forte@Sun.COM int stmfOnlineTarget(stmfDevid *devid);
3477836SJohn.Forte@Sun.COM int stmfOnlineLogicalUnit(stmfGuid *logicalUnit);
3487836SJohn.Forte@Sun.COM int stmfRemoveFromHostGroup(stmfGroupName *hostGroupName,
3497836SJohn.Forte@Sun.COM     stmfDevid *initiatorName);
3507836SJohn.Forte@Sun.COM int stmfRemoveFromTargetGroup(stmfGroupName *targetGroupName,
3517836SJohn.Forte@Sun.COM     stmfDevid *targetName);
3527836SJohn.Forte@Sun.COM int stmfRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex);
3539585STim.Szeto@Sun.COM int stmfSetLuProp(luResource hdl, uint32_t propType, const char *propVal);
3549585STim.Szeto@Sun.COM int stmfSetPersistMethod(uint8_t persistType, boolean_t serviceSet);
3557836SJohn.Forte@Sun.COM int stmfSetProviderData(char *providerName, nvlist_t *nvl, int providerType);
3567836SJohn.Forte@Sun.COM int stmfSetProviderDataProt(char *providerName, nvlist_t *nvl,
3577836SJohn.Forte@Sun.COM     int providerType, uint64_t *setToken);
3587836SJohn.Forte@Sun.COM 
3597836SJohn.Forte@Sun.COM #ifdef	__cplusplus
3607836SJohn.Forte@Sun.COM }
3617836SJohn.Forte@Sun.COM #endif
3627836SJohn.Forte@Sun.COM 
3637836SJohn.Forte@Sun.COM #endif	/* _LIBSTMF_H */
364