preprocessor cleanup: __sparc
[unleashed/tickless.git] / usr / src / lib / libima / common / ima-plugin.h
blob1ed5121b6f827d1e3869ae1a815189a11966278d
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
28 * Description
29 * imaPlugin.h: interface for the iScsiPlugin class.
31 * License:
32 * The contents of this file are subject to the SNIA Public License
33 * Version 1.0 (the "License"); you may not use this file except in
34 * compliance with the License. You may obtain a copy of the License at
36 * /http://www.snia.org/English/Resources/Code/OpenSource.html
38 * Software distributed under the License is distributed on an "AS IS"
39 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
40 * the License for the specific language governing rights and limitations
41 * under the License.
43 * The Original Code is SNIA HBA API and IMA general header file
45 * The Initial Developer of the Original Code is:
46 * Benjamin F. Kuo, Troika Networks, Inc. (benk@troikanetworks.com)
47 * David Dillard VERITAS Software david.dillard@veritas.com
49 * Contributor(s):
50 * Jeff Ding, Adaptec, Inc. (jding@corp.adaptec.com)
52 *******************************************************************************
54 * Changes:
55 * 09/24/2003 Initial Draft
56 * (for other changes... see the CVS logs)
57 * 12/15/2003 corrected the defined parameter in IMA_SetPhbaIsnsDiscovery().
58 * lower case the computer name as iscsi name in IMA_GenerateNodeName().
59 ******************************************************************************/
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
65 #ifndef IMAPLUGIN_H
66 #define IMAPLUGIN_H
68 typedef IMA_STATUS (* Initialize)(
69 IMA_UINT32 pluginOid
72 typedef void (* TerminateFn)();
75 typedef IMA_STATUS (* IMA_GetPluginPropertiesFn)(
76 IMA_OID pluginOid,
77 IMA_PLUGIN_PROPERTIES *pProps
81 typedef IMA_STATUS (* IMA_GetSharedNodeOidFn)(
82 IMA_OID *pSharedNodeId
86 typedef IMA_STATUS (* IMA_GetNodePropertiesFn)(
87 IMA_OID nodeOid,
88 IMA_NODE_PROPERTIES *pProps
92 typedef IMA_STATUS (* IMA_SetNodeNameFn)(
93 IMA_OID nodeOid,
94 const IMA_NODE_NAME newName
98 typedef IMA_STATUS (* IMA_GenerateNodeNameFn)(
99 IMA_NODE_NAME generatedname
103 typedef IMA_STATUS (* IMA_SetNodeAliasFn)(
104 IMA_OID nodeOid,
105 const IMA_NODE_ALIAS newAlias
109 typedef IMA_STATUS (* IMA_GetLhbaOidListFn)(
110 IMA_OID_LIST **ppList
113 typedef IMA_STATUS (* IMA_GetLhbaPropertiesFn)(
114 IMA_OID lhbaId,
115 IMA_LHBA_PROPERTIES *pProps
119 typedef IMA_STATUS (* IMA_GetPhbaOidListFn)(
120 IMA_OID_LIST **ppList
124 typedef IMA_STATUS (* IMA_GetPhbaPropertiesFn)(
125 IMA_OID phbaId,
126 IMA_PHBA_PROPERTIES *pProps
130 typedef IMA_STATUS (* IMA_GetNonSharedNodeOidListFn)(
131 IMA_OID_LIST **ppList
135 typedef IMA_STATUS (* IMA_GetFirstBurstLengthPropertiesFn)(
136 IMA_OID Oid,
137 IMA_MIN_MAX_VALUE *pProps
141 typedef IMA_STATUS (* IMA_GetMaxBurstLengthPropertiesFn)(
142 IMA_OID Oid,
143 IMA_MIN_MAX_VALUE *pProps
147 typedef IMA_STATUS (* IMA_GetMaxRecvDataSegmentLengthPropertiesFn)(
148 IMA_OID Oid,
149 IMA_MIN_MAX_VALUE *pProps
153 /*---------------------------------------------*/
154 typedef IMA_STATUS (* IMA_PluginIOCtlFn)(
155 IMA_OID pluginOid,
156 IMA_UINT command,
157 const void *pInputBuffer,
158 IMA_UINT inputBufferLength,
159 void *pOutputBuffer,
160 IMA_UINT *pOutputBufferLength
164 typedef IMA_STATUS (* IMA_GetNetworkPortalOidListFn)(
165 IMA_OID lhbaId,
166 IMA_OID_LIST **ppList
170 typedef IMA_STATUS (* IMA_SetFirstBurstLengthFn)(
171 IMA_OID lhbaId,
172 IMA_UINT firstBurstLength
175 typedef IMA_STATUS (* IMA_SetMaxBurstLengthFn)(
176 IMA_OID lhbaId,
177 IMA_UINT maxBurstLength
180 typedef IMA_STATUS (* IMA_SetMaxRecvDataSegmentLengthFn)(
181 IMA_OID lhbaId,
182 IMA_UINT maxRecvDataSegmentLength
185 typedef IMA_STATUS (* IMA_GetMaxConnectionsPropertiesFn)(
186 IMA_OID Oid,
187 IMA_MIN_MAX_VALUE *pProps
190 typedef IMA_STATUS (* IMA_SetMaxConnectionsFn)(
191 IMA_OID lhbaId,
192 IMA_UINT maxConnections
195 typedef IMA_STATUS (* IMA_GetDefaultTime2RetainPropertiesFn)(
196 IMA_OID lhbaId,
197 IMA_MIN_MAX_VALUE *pProps
200 typedef IMA_STATUS (* IMA_SetDefaultTime2RetainFn)(
201 IMA_OID lhbaId,
202 IMA_UINT defaultTime2Retain
205 typedef IMA_STATUS (* IMA_GetDefaultTime2WaitPropertiesFn)(
206 IMA_OID lhbaId,
207 IMA_MIN_MAX_VALUE *pProps
210 typedef IMA_STATUS (* IMA_SetDefaultTime2WaitFn)(
211 IMA_OID lhbaId,
212 IMA_UINT defaultTime2Wait
215 typedef IMA_STATUS (* IMA_GetMaxOutstandingR2TPropertiesFn)(
216 IMA_OID Oid,
217 IMA_MIN_MAX_VALUE *pProps
220 typedef IMA_STATUS (* IMA_SetMaxOutstandingR2TFn)(
221 IMA_OID lhbaId,
222 IMA_UINT maxOutstandingR2T
225 typedef IMA_STATUS (* IMA_GetErrorRecoveryLevelPropertiesFn)(
226 IMA_OID Oid,
227 IMA_MIN_MAX_VALUE *pProps
230 typedef IMA_STATUS (* IMA_SetErrorRecoveryLevelFn)(
231 IMA_OID Oid,
232 IMA_UINT errorRecoveryLevel
235 typedef IMA_STATUS (* IMA_GetInitialR2TPropertiesFn)(
236 IMA_OID Oid,
237 IMA_BOOL_VALUE *pProps
240 typedef IMA_STATUS (* IMA_SetInitialR2TFn)(
241 IMA_OID Oid,
242 IMA_BOOL initialR2T
245 typedef IMA_STATUS (* IMA_GetImmediateDataPropertiesFn)(
246 IMA_OID Oid,
247 IMA_BOOL_VALUE *pProps
250 typedef IMA_STATUS (* IMA_SetImmediateDataFn)(
251 IMA_OID Oid,
252 IMA_BOOL immediateData
255 typedef IMA_STATUS (* IMA_GetDataPduInOrderPropertiesFn)(
256 IMA_OID Oid,
257 IMA_BOOL_VALUE *pProps
260 typedef IMA_STATUS (* IMA_SetDataPduInOrderFn)(
261 IMA_OID Oid,
262 IMA_BOOL dataPduInOrder
265 typedef IMA_STATUS (* IMA_GetDataSequenceInOrderPropertiesFn)(
266 IMA_OID Oid,
267 IMA_BOOL_VALUE *pProps
270 typedef IMA_STATUS (* IMA_SetDataSequenceInOrderFn)(
271 IMA_OID Oid,
272 IMA_BOOL dataSequenceInOrder
275 typedef IMA_STATUS (* IMA_SetStatisticsCollectionFn)(
276 IMA_OID Oid,
277 IMA_BOOL enableStatisticsCollection
280 typedef IMA_STATUS (* IMA_GetNetworkPortStatusFn)(
281 IMA_OID portOid,
282 IMA_NETWORK_PORT_STATUS *pStatus
285 typedef IMA_STATUS (* IMA_GetTargetOidListFn)(
286 IMA_OID Oid,
287 IMA_OID_LIST **ppList
290 typedef IMA_STATUS (* IMA_RemoveStaleDataFn)(
291 IMA_OID lhbaId
294 typedef IMA_STATUS (* IMA_SetIsnsDiscoveryFn)(
295 IMA_OID phbaId,
296 IMA_BOOL enableIsnsDiscovery,
297 IMA_ISNS_DISCOVERY_METHOD discoveryMethod,
298 const IMA_HOST_ID *iSnsHost
301 typedef IMA_STATUS (* IMA_SetSlpDiscoveryFn)(
302 IMA_OID phbaId,
303 IMA_BOOL enableSlpDiscovery
306 typedef IMA_STATUS (* IMA_SetStaticDiscoveryFn)(
307 IMA_OID phbaId,
308 IMA_BOOL enableStaticDiscovery
311 typedef IMA_STATUS (* IMA_SetSendTargetsDiscoveryFn)(
312 IMA_OID phbaId,
313 IMA_BOOL enableSendTargetsDiscovery
316 typedef IMA_STATUS (* IMA_AddPhbaStaticDiscoveryTargetFn)(
317 IMA_OID phbaOid,
318 const IMA_TARGET_ADDRESS targetAddress,
319 IMA_OID_LIST **pTargetOidList
322 typedef IMA_STATUS (* IMA_RemovePhbaStaticDiscoveryTargetFn)(
323 IMA_OID phbaOid,
324 IMA_OID targetOid
327 typedef IMA_STATUS (* IMA_GetPnpOidListFn)(
328 IMA_OID Oid,
329 IMA_OID_LIST **ppList
332 typedef IMA_STATUS (* IMA_GetPhbaDownloadPropertiesFn)(
333 IMA_OID phbaId,
334 IMA_PHBA_DOWNLOAD_PROPERTIES *pProps
337 typedef IMA_STATUS (* IMA_IsPhbaDownloadFileFn)(
338 IMA_OID phbaId,
339 const IMA_WCHAR *pFileName,
340 IMA_PHBA_DOWNLOAD_IMAGE_PROPERTIES *pProps
343 typedef IMA_STATUS (* IMA_PhbaDownloadFn)(
344 IMA_OID phbaId,
345 IMA_PHBA_DOWNLOAD_IMAGE_TYPE imageType,
346 const IMA_WCHAR *pFileName
349 typedef IMA_STATUS (* IMA_GetNetworkPortalPropertiesFn)(
350 IMA_OID networkPortalId,
351 IMA_NETWORK_PORTAL_PROPERTIES *pProps
354 typedef IMA_STATUS (* IMA_SetNetworkPortalIpAddressFn)(
355 IMA_OID networkPortalId,
356 const IMA_IP_ADDRESS NewIpAddress
359 typedef IMA_STATUS (* IMA_GetLnpOidListFn)(
360 IMA_OID_LIST **ppList
363 typedef IMA_STATUS (* IMA_GetLnpPropertiesFn)(
364 IMA_OID lnpId,
365 IMA_LNP_PROPERTIES *pProps
368 typedef IMA_STATUS (* IMA_GetPnpPropertiesFn)(
369 IMA_OID pnpId,
370 IMA_PNP_PROPERTIES *pProps
373 typedef IMA_STATUS (* IMA_GetPnpStatisticsFn)(
374 IMA_OID pnpId,
375 IMA_PNP_STATISTICS *pStats
378 typedef IMA_STATUS (* IMA_GetConnectionPropertiesFn)(
379 IMA_OID connectionId,
380 IMA_CONNECTION_PROPERTIES *pProps
383 typedef IMA_STATUS (* IMA_GetTargetPropertiesFn)(
384 IMA_OID targetId,
385 IMA_TARGET_PROPERTIES *pProps
388 typedef IMA_STATUS (* IMA_GetSessionPropertiesFn)(
389 IMA_OID sessionId,
390 IMA_SESSION_PROPERTIES *pProps
393 typedef IMA_STATUS (* IMA_GetTargetErrorStatisticsFn)(
394 IMA_OID targetId,
395 IMA_TARGET_ERROR_STATISTICS *pStats
398 typedef IMA_STATUS (* IMA_GetLuOidListFn)(
399 IMA_OID Oid,
400 IMA_OID_LIST **ppList
403 typedef IMA_STATUS (* IMA_GetLuOidFn)(
404 IMA_OID targetId,
405 IMA_UINT64 lun,
406 IMA_OID *pluId
409 typedef IMA_STATUS (* IMA_GetLuPropertiesFn)(
410 IMA_OID luId,
411 IMA_LU_PROPERTIES *pProps
414 typedef IMA_STATUS (* IMA_GetStatisticsPropertiesFn)(
415 IMA_OID oid,
416 IMA_STATISTICS_PROPERTIES *pProps
419 typedef IMA_STATUS (* IMA_GetDeviceStatisticsFn)(
420 IMA_OID luId,
421 IMA_DEVICE_STATISTICS *pStats
424 typedef IMA_STATUS (* IMA_LuInquiryFn)(
425 IMA_OID deviceId,
426 IMA_BOOL evpd,
427 IMA_BOOL cmddt,
428 IMA_BYTE pageCode,
430 IMA_BYTE *pOutputBuffer,
431 IMA_UINT *pOutputBufferLength,
433 IMA_BYTE *pSenseBuffer,
434 IMA_UINT *pSenseBufferLength
437 typedef IMA_STATUS (* IMA_LuReadCapacityFn)(
438 IMA_OID deviceId,
439 IMA_UINT cdbLength,
440 IMA_BYTE *pOutputBuffer,
441 IMA_UINT *pOutputBufferLength,
443 IMA_BYTE *pSenseBuffer,
444 IMA_UINT *pSenseBufferLength
447 typedef IMA_STATUS (* IMA_LuReportLunsFn)(
448 IMA_OID deviceId,
449 IMA_BOOL sendToWellKnownLun,
450 IMA_BYTE selectReport,
452 IMA_BYTE *pOutputBuffer,
453 IMA_UINT *pOutputBufferLength,
455 IMA_BYTE *pSenseBuffer,
456 IMA_UINT *pSenseBufferLength
459 typedef IMA_STATUS (* IMA_ExposeLuFn)(
460 IMA_OID luId
463 typedef IMA_STATUS (* IMA_UnexposeLuFn)(
464 IMA_OID luId
467 typedef IMA_STATUS (* IMA_GetPhbaStatusFn)(
468 IMA_OID hbaId,
469 IMA_PHBA_STATUS *pStatus
472 typedef IMA_STATUS (* IMA_RegisterForObjectVisibilityChangesFn) (
473 IMA_OBJECT_VISIBILITY_FN pClientFn
476 typedef IMA_STATUS (* IMA_DeregisterForObjectVisibilityChangesFn) (
477 IMA_OBJECT_VISIBILITY_FN pClientFn
480 typedef IMA_STATUS (* IMA_RegisterForObjectPropertyChangesFn) (
481 IMA_OBJECT_PROPERTY_FN pClientFn
484 typedef IMA_STATUS (* IMA_DeregisterForObjectPropertyChangesFn) (
485 IMA_OBJECT_PROPERTY_FN pClientFn
489 typedef IMA_STATUS (* IMA_GetAddressKeyPropertiesFn)(
490 IMA_OID targetOid,
491 IMA_ADDRESS_KEY_PROPERTIES **ppProps
494 typedef IMA_STATUS (* IMA_GetIpPropertiesFn)(
495 IMA_OID oid,
496 IMA_IP_PROPERTIES *pProps
499 typedef IMA_STATUS (* IMA_SetIpConfigMethodFn)(
500 IMA_OID oid,
501 IMA_BOOL enableDhcpIpConfiguration
504 typedef IMA_STATUS (* IMA_SetSubnetMaskFn)(
505 IMA_OID oid,
506 IMA_IP_ADDRESS subnetMask
509 typedef IMA_STATUS (* IMA_SetDnsServerAddressFn)(
510 IMA_OID oid,
511 const IMA_IP_ADDRESS *primaryDnsServerAddress,
512 const IMA_IP_ADDRESS *alternateDnsServerAddress
515 typedef IMA_STATUS (* IMA_SetDefaultGatewayFn)(
516 IMA_OID oid,
517 IMA_IP_ADDRESS defaultGateway
520 typedef IMA_STATUS (* IMA_GetSupportedAuthMethodsFn)(
521 IMA_OID lhbaOid,
522 IMA_BOOL getSettableMethods,
523 IMA_UINT *pMethodCount,
524 IMA_AUTHMETHOD *pMethodList
527 typedef IMA_STATUS (* IMA_GetInUseInitiatorAuthMethodsFn)(
528 IMA_OID lhbaOid,
529 IMA_UINT *pMethodCount,
530 IMA_AUTHMETHOD *pMethodList
533 typedef IMA_STATUS (* IMA_GetInitiatorAuthParmsFn)(
534 IMA_OID lhbaOid,
535 IMA_AUTHMETHOD method,
536 IMA_INITIATOR_AUTHPARMS *pParms
539 typedef IMA_STATUS (* IMA_SetInitiatorAuthMethodsFn)(
540 IMA_OID lhbaOid,
541 IMA_UINT methodCount,
542 const IMA_AUTHMETHOD *pMethodList
545 typedef IMA_STATUS (* IMA_SetInitiatorAuthParmsFn)(
546 IMA_OID lhbaOid,
547 IMA_AUTHMETHOD method,
548 const IMA_INITIATOR_AUTHPARMS *pParms
551 typedef IMA_STATUS (* IMA_FreeMemoryFn)(
552 void *pMemory
555 typedef IMA_STATUS (* IMA_GetStaticDiscoveryTargetOidListFn)(
556 IMA_OID oid,
557 IMA_OID_LIST **ppList
560 typedef IMA_STATUS (* IMA_GetDiscoveryPropertiesFn)(
561 IMA_OID oid,
562 IMA_DISCOVERY_PROPERTIES *pProps
565 typedef IMA_STATUS (* IMA_AddDiscoveryAddressFn)(
566 IMA_OID oid,
567 const IMA_TARGET_ADDRESS discoveryAddress,
568 IMA_OID *pDiscoveryAddressOid
571 typedef IMA_STATUS (* IMA_AddStaticDiscoveryTargetFn)(
572 IMA_OID oid,
573 const IMA_STATIC_DISCOVERY_TARGET staticDiscoveryTarget,
574 IMA_OID *pStaticDiscoveryTargetOid
577 typedef IMA_STATUS (* IMA_RemoveStaticDiscoveryTargetFn)(
578 IMA_OID oid
581 typedef IMA_STATUS (* IMA_GetStaticDiscoveryTargetPropertiesFn)(
582 IMA_OID staticDiscoveryTargetOid,
583 IMA_STATIC_DISCOVERY_TARGET_PROPERTIES *pProps
586 typedef IMA_STATUS (* IMA_GetDiscoveryAddressOidListFn) (
587 IMA_OID Oid,
588 IMA_OID_LIST **ppList
591 typedef IMA_STATUS (* IMA_GetSessionOidListFn) (
592 IMA_OID Oid,
593 IMA_OID_LIST **ppList
596 typedef IMA_STATUS (* IMA_GetConnectionOidListFn) (
597 IMA_OID Oid,
598 IMA_OID_LIST **ppList
601 typedef IMA_STATUS (* IMA_GetDiscoveryAddressPropertiesFn) (
602 IMA_OID discoveryAddressOid,
603 IMA_DISCOVERY_ADDRESS_PROPERTIES *pProps
606 typedef IMA_STATUS (* IMA_RemoveDiscoveryAddressFn) (
607 IMA_OID discoveryAddressOid
610 typedef IMA_STATUS (* IMA_GetIpsecPropertiesFn) (
611 IMA_OID oid,
612 IMA_IPSEC_PROPERTIES *pProps
615 typedef IMA_STATUS (* IMA_GetAddressKeysFn) (
616 IMA_OID targetOid,
617 IMA_ADDRESS_KEYS **ppKeys
620 typedef IMA_STATUS (* QIMA_SetUpdateIntervalFn)(
621 IMA_OID pluginOid,
622 time_t interval
625 typedef IMA_STATUS (* IMA_CommitHbaParametersFn)(
626 IMA_OID oid, IMA_COMMIT_LEVEL commitLevel
629 typedef IMA_STATUS (* SUN_IMA_GetTunablePropertiesFn) (
630 IMA_OID oid,
631 ISCSI_TUNABLE_PARAM *param
634 typedef IMA_STATUS (* SUN_IMA_SetTunablePropertiesFn) (
635 IMA_OID oid,
636 ISCSI_TUNABLE_PARAM *param
639 #endif
641 #ifdef __cplusplus
643 #endif