xref: /titanic_44/usr/src/cmd/iscsiadm/sun_ima.h (revision b695575577bae0337af339d76949713bfe1c9013)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SUN_IMA_H
27 #define	_SUN_IMA_H
28 
29 #include <iscsiadm.h>
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 IMA_API	IMA_STATUS SUN_IMA_GetDiscoveryAddressPropertiesList(
36     SUN_IMA_DISC_ADDR_PROP_LIST	**ppList);
37 IMA_API IMA_STATUS SUN_IMA_GetStaticTargetProperties(
38 	IMA_OID	staticTargetOid,
39 	SUN_IMA_STATIC_TARGET_PROPERTIES *pProps);
40 IMA_API IMA_STATUS SUN_IMA_AddStaticTarget(
41 	IMA_OID lhbaOid,
42 	const SUN_IMA_STATIC_DISCOVERY_TARGET staticConfig,
43 	IMA_OID *pTargetOid);
44 IMA_API	IMA_STATUS SUN_IMA_GetTargetProperties(
45 	IMA_OID targetId,
46 	SUN_IMA_TARGET_PROPERTIES *pProps);
47 IMA_STATUS SUN_IMA_SetTargetAuthParams(
48 	IMA_OID targetOid,
49 	IMA_AUTHMETHOD method,
50 	const IMA_INITIATOR_AUTHPARMS *pParms);
51 IMA_STATUS SUN_IMA_GetTargetAuthMethods(
52 	IMA_OID		lhbaOid,
53 	IMA_OID		targetOid,
54 	IMA_UINT	*pMethodCount,
55 	IMA_AUTHMETHOD *pMethodList);
56 IMA_STATUS SUN_IMA_SetInitiatorRadiusConfig(
57 	IMA_OID	lhbaOid,
58 	SUN_IMA_RADIUS_CONFIG *config);
59 IMA_STATUS SUN_IMA_GetInitiatorRadiusConfig(
60 	IMA_OID	lhbaOid,
61 	SUN_IMA_RADIUS_CONFIG *config);
62 IMA_STATUS SUN_IMA_SetInitiatorRadiusAccess(
63 	IMA_OID lhbaOid,
64 	IMA_BOOL radiusAccess);
65 IMA_STATUS SUN_IMA_GetInitiatorRadiusAccess(
66 	IMA_OID lhbaOid,
67 	IMA_BOOL *radiusAccess);
68 IMA_STATUS SUN_IMA_SendTargets(
69 	IMA_NODE_NAME nodeName,
70 	IMA_TARGET_ADDRESS address,
71 	SUN_IMA_DISC_ADDRESS_KEY_PROPERTIES **ppList);
72 IMA_STATUS SUN_IMA_SetTargetBidirAuthFlag(
73 	IMA_OID targetOid,
74 	IMA_BOOL *bidirAuthFlag);
75 IMA_STATUS SUN_IMA_GetTargetBidirAuthFlag(
76 	IMA_OID targetOid,
77 	IMA_BOOL *bidirAuthFlag);
78 IMA_STATUS SUN_IMA_CreateTargetOid(
79 	IMA_NODE_NAME targetName,
80 	IMA_OID *targetOid);
81 IMA_STATUS SUN_IMA_RemoveTargetParam(
82 	IMA_OID targetOid);
83 IMA_API IMA_STATUS SUN_IMA_SetHeaderDigest(
84 	IMA_OID oid,
85 	IMA_UINT algorithmCount,
86 	const SUN_IMA_DIGEST_ALGORITHM *algorithmList);
87 IMA_API IMA_STATUS SUN_IMA_SetDataDigest(
88 	IMA_OID oid,
89 	IMA_UINT algorithmCount,
90 	const SUN_IMA_DIGEST_ALGORITHM *algorithmList);
91 IMA_API IMA_STATUS SUN_IMA_GetHeaderDigest(
92 	IMA_OID oid,
93 	SUN_IMA_DIGEST_ALGORITHM_VALUE *algorithm);
94 IMA_API IMA_STATUS SUN_IMA_GetDataDigest(
95 	IMA_OID oid,
96 	SUN_IMA_DIGEST_ALGORITHM_VALUE *algorithm);
97 IMA_STATUS SUN_IMA_GetLuProperties(
98 	IMA_OID luId,
99 	SUN_IMA_LU_PROPERTIES *pProps);
100 IMA_API	IMA_STATUS SUN_IMA_GetConnOidList(
101 	IMA_OID	*oid,
102 	IMA_OID_LIST **ppList);
103 IMA_API	IMA_STATUS SUN_IMA_GetConnProperties(
104 	IMA_OID	*connOid,
105 	SUN_IMA_CONN_PROPERTIES	**pProps);
106 IMA_API IMA_STATUS SUN_IMA_GetConfigSessions(
107 	IMA_OID targetOid,
108 	SUN_IMA_CONFIG_SESSIONS **pConfigSessions);
109 IMA_API IMA_STATUS SUN_IMA_SetConfigSessions(
110 	IMA_OID targetOid,
111 	SUN_IMA_CONFIG_SESSIONS *pConfigSessions);
112 IMA_API	IMA_STATUS SUN_IMA_RemoveDiscoveryAddress(
113 	SUN_IMA_TARGET_ADDRESS discoveryAddress);
114 IMA_STATUS SUN_IMA_SetTargetAuthMethods(
115 	IMA_OID targetOid,
116 	IMA_UINT *methodCount,
117 	const IMA_AUTHMETHOD *pMethodList);
118 IMA_STATUS getNegotiatedDigest(
119 	int digestType,
120 	SUN_IMA_DIGEST_ALGORITHM_VALUE *algorithm,
121 	SUN_IMA_CONN_PROPERTIES *connProps);
122 IMA_API	IMA_STATUS SUN_IMA_GetISNSServerAddressPropertiesList(
123 	SUN_IMA_DISC_ADDR_PROP_LIST **ppList);
124 IMA_API	IMA_STATUS SUN_IMA_RemoveISNSServerAddress(
125 	SUN_IMA_TARGET_ADDRESS isnsServerAddress);
126 IMA_API IMA_STATUS SUN_IMA_AddISNSServerAddress(
127 	const SUN_IMA_TARGET_ADDRESS isnsServerAddress);
128 IMA_STATUS SUN_IMA_RetrieveISNSServerTargets(
129     IMA_TARGET_ADDRESS serverAddress,
130     SUN_IMA_DISC_ADDRESS_KEY_PROPERTIES **ppList);
131 IMA_STATUS SUN_IMA_GetSessionOidList(
132 	IMA_OID initiatorOid,
133 	IMA_OID_LIST **ppList);
134 IMA_API	IMA_STATUS SUN_IMA_GetTargetAuthParms(
135 	IMA_OID oid,
136 	IMA_AUTHMETHOD method,
137 	IMA_INITIATOR_AUTHPARMS *pParms);
138 IMA_STATUS SUN_IMA_GetBootTargetName(
139 	IMA_NODE_NAME tgtName);
140 IMA_STATUS SUN_IMA_GetBootTargetAuthParams(
141 	IMA_INITIATOR_AUTHPARMS *pTgtCHAP);
142 IMA_STATUS SUN_IMA_GetBootMpxio(
143 	IMA_BOOL *pMpxioEnabled);
144 IMA_STATUS SUN_IMA_GetBootIscsi(
145 	IMA_BOOL *pIscsiBoot);
146 IMA_STATUS SUN_IMA_GetSvcStatus(
147 	IMA_BOOL *pSvcEnabled);
148 
149 #ifdef	__cplusplus
150 }
151 #endif
152 
153 #endif	/* _SUN_IMA_H */
154