xref: /illumos-gate/usr/src/cmd/iscsiadm/sun_ima.h (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
23  */
24 
25 #ifndef	_SUN_IMA_H
26 #define	_SUN_IMA_H
27 
28 #include <iscsiadm.h>
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 IMA_API	IMA_STATUS SUN_IMA_GetDiscoveryAddressPropertiesList(
35     SUN_IMA_DISC_ADDR_PROP_LIST	**ppList);
36 IMA_API IMA_STATUS SUN_IMA_GetStaticTargetProperties(
37 	IMA_OID	staticTargetOid,
38 	SUN_IMA_STATIC_TARGET_PROPERTIES *pProps);
39 IMA_API IMA_STATUS SUN_IMA_AddStaticTarget(
40 	IMA_OID lhbaOid,
41 	const SUN_IMA_STATIC_DISCOVERY_TARGET staticConfig,
42 	IMA_OID *pTargetOid);
43 IMA_API	IMA_STATUS SUN_IMA_GetTargetProperties(
44 	IMA_OID targetId,
45 	SUN_IMA_TARGET_PROPERTIES *pProps);
46 IMA_STATUS SUN_IMA_SetTargetAuthParams(
47 	IMA_OID targetOid,
48 	IMA_AUTHMETHOD method,
49 	const IMA_INITIATOR_AUTHPARMS *pParms);
50 IMA_STATUS SUN_IMA_GetTargetAuthMethods(
51 	IMA_OID		lhbaOid,
52 	IMA_OID		targetOid,
53 	IMA_UINT	*pMethodCount,
54 	IMA_AUTHMETHOD *pMethodList);
55 IMA_STATUS SUN_IMA_SetInitiatorRadiusConfig(
56 	IMA_OID	lhbaOid,
57 	SUN_IMA_RADIUS_CONFIG *config);
58 IMA_STATUS SUN_IMA_GetInitiatorRadiusConfig(
59 	IMA_OID	lhbaOid,
60 	SUN_IMA_RADIUS_CONFIG *config);
61 IMA_STATUS SUN_IMA_SetInitiatorRadiusAccess(
62 	IMA_OID lhbaOid,
63 	IMA_BOOL radiusAccess);
64 IMA_STATUS SUN_IMA_GetInitiatorRadiusAccess(
65 	IMA_OID lhbaOid,
66 	IMA_BOOL *radiusAccess);
67 IMA_STATUS SUN_IMA_SendTargets(
68 	IMA_NODE_NAME nodeName,
69 	IMA_TARGET_ADDRESS address,
70 	SUN_IMA_DISC_ADDRESS_KEY_PROPERTIES **ppList);
71 IMA_STATUS SUN_IMA_SetTargetBidirAuthFlag(
72 	IMA_OID targetOid,
73 	IMA_BOOL *bidirAuthFlag);
74 IMA_STATUS SUN_IMA_GetTargetBidirAuthFlag(
75 	IMA_OID targetOid,
76 	IMA_BOOL *bidirAuthFlag);
77 IMA_STATUS SUN_IMA_CreateTargetOid(
78 	IMA_NODE_NAME targetName,
79 	IMA_OID *targetOid);
80 IMA_STATUS SUN_IMA_RemoveTargetParam(
81 	IMA_OID targetOid);
82 IMA_API IMA_STATUS SUN_IMA_SetHeaderDigest(
83 	IMA_OID oid,
84 	IMA_UINT algorithmCount,
85 	const SUN_IMA_DIGEST_ALGORITHM *algorithmList);
86 IMA_API IMA_STATUS SUN_IMA_SetDataDigest(
87 	IMA_OID oid,
88 	IMA_UINT algorithmCount,
89 	const SUN_IMA_DIGEST_ALGORITHM *algorithmList);
90 IMA_API IMA_STATUS SUN_IMA_GetHeaderDigest(
91 	IMA_OID oid,
92 	SUN_IMA_DIGEST_ALGORITHM_VALUE *algorithm);
93 IMA_API IMA_STATUS SUN_IMA_GetDataDigest(
94 	IMA_OID oid,
95 	SUN_IMA_DIGEST_ALGORITHM_VALUE *algorithm);
96 IMA_STATUS SUN_IMA_GetLuProperties(
97 	IMA_OID luId,
98 	SUN_IMA_LU_PROPERTIES *pProps);
99 IMA_API	IMA_STATUS SUN_IMA_GetConnOidList(
100 	IMA_OID	*oid,
101 	IMA_OID_LIST **ppList);
102 IMA_API	IMA_STATUS SUN_IMA_GetConnProperties(
103 	IMA_OID	*connOid,
104 	SUN_IMA_CONN_PROPERTIES	**pProps);
105 IMA_API IMA_STATUS SUN_IMA_GetConfigSessions(
106 	IMA_OID targetOid,
107 	SUN_IMA_CONFIG_SESSIONS **pConfigSessions);
108 IMA_API IMA_STATUS SUN_IMA_SetConfigSessions(
109 	IMA_OID targetOid,
110 	SUN_IMA_CONFIG_SESSIONS *pConfigSessions);
111 IMA_API	IMA_STATUS SUN_IMA_RemoveDiscoveryAddress(
112 	SUN_IMA_TARGET_ADDRESS discoveryAddress);
113 IMA_STATUS SUN_IMA_SetTargetAuthMethods(
114 	IMA_OID targetOid,
115 	IMA_UINT *methodCount,
116 	const IMA_AUTHMETHOD *pMethodList);
117 IMA_STATUS getNegotiatedDigest(
118 	int digestType,
119 	SUN_IMA_DIGEST_ALGORITHM_VALUE *algorithm,
120 	SUN_IMA_CONN_PROPERTIES *connProps);
121 IMA_API	IMA_STATUS SUN_IMA_GetISNSServerAddressPropertiesList(
122 	SUN_IMA_DISC_ADDR_PROP_LIST **ppList);
123 IMA_API	IMA_STATUS SUN_IMA_RemoveISNSServerAddress(
124 	SUN_IMA_TARGET_ADDRESS isnsServerAddress);
125 IMA_API IMA_STATUS SUN_IMA_AddISNSServerAddress(
126 	const SUN_IMA_TARGET_ADDRESS isnsServerAddress);
127 IMA_STATUS SUN_IMA_RetrieveISNSServerTargets(
128     IMA_TARGET_ADDRESS serverAddress,
129     SUN_IMA_DISC_ADDRESS_KEY_PROPERTIES **ppList);
130 IMA_STATUS SUN_IMA_GetSessionOidList(
131 	IMA_OID initiatorOid,
132 	IMA_OID_LIST **ppList);
133 IMA_API	IMA_STATUS SUN_IMA_GetTargetAuthParms(
134 	IMA_OID oid,
135 	IMA_AUTHMETHOD method,
136 	IMA_INITIATOR_AUTHPARMS *pParms);
137 IMA_STATUS SUN_IMA_GetBootTargetName(
138 	IMA_NODE_NAME tgtName);
139 IMA_STATUS SUN_IMA_GetBootTargetAuthParams(
140 	IMA_INITIATOR_AUTHPARMS *pTgtCHAP);
141 IMA_STATUS SUN_IMA_GetBootMpxio(
142 	IMA_BOOL *pMpxioEnabled);
143 IMA_STATUS SUN_IMA_GetBootIscsi(
144 	IMA_BOOL *pIscsiBoot);
145 IMA_STATUS SUN_IMA_GetSvcStatus(
146 	IMA_BOOL *pSvcEnabled);
147 IMA_STATUS SUN_IMA_ReEnumeration(
148 	IMA_OID targetId);
149 #ifdef	__cplusplus
150 }
151 #endif
152 
153 #endif	/* _SUN_IMA_H */
154