1 /******************************************************************************
4 * mpapi-plugin.h - interfaces for the MP API Version 1.0 plugin library.
5 * A compliant plugin library should implement interfaces with name without Fn
6 * suffix from function definitions below.
9 * The contents of this file are subject to the SNIA Public License
10 * Version 1.1 (the "License"); you may not use this file except in
11 * compliance with the License. You may obtain a copy of the License at
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
20 * The Original Code is iSCSI Management API and Multipath Management API
23 * The Initial Developer of the Original Code is:
24 * Benjamin F. Kuo Troika Networks, Inc. (benk@troikanetworks.com)
25 * David Dillard VERITAS Software(david.dillard@veritas.com)
26 * Jeff Ding Adaptec, Inc. (jding@corp.adaptec.com)
27 * Hyon Kim Sun Microsystems(hyon.kim@sun.com)
30 * Paul von Behren Sun Microsystems(paul.vonbehren@sun.com)
32 ******************************************************************************
35 * 1/15/2005 Implemented SNIA MP API specification 1.0
36 *****************************************************************************/
47 * MP API common library calls InitaizeFn as part of dynamically loading
48 * the plugins. For this version of implementation the common library
49 * passes the sequence number of the plugin oid through InitializeFn. The
50 * sequnece number will be used as the ownerId for the plugin generated OIDs.
52 typedef MP_STATUS (* InitializeFn
) (
53 MP_UINT32 pluginOwnerID
57 * MP API common library calls TerminateFn as part of dynamically unloading
60 typedef MP_STATUS (* TerminateFn
) (void);
63 ******************************************************************************
65 * Function table for OID and properties discovery API
67 ******************************************************************************
70 typedef MP_STATUS (* MP_GetPluginPropertiesPluginFn
)(
71 MP_PLUGIN_PROPERTIES
*pProps
74 typedef MP_STATUS (* MP_GetDeviceProductOidListPluginFn
)(
78 typedef MP_STATUS (* MP_GetDeviceProductPropertiesFn
)(
80 MP_DEVICE_PRODUCT_PROPERTIES
*pProps
83 typedef MP_STATUS (* MP_GetInitiatorPortOidListPluginFn
)(
87 typedef MP_STATUS (* MP_GetInitiatorPortPropertiesFn
)(
89 MP_INITIATOR_PORT_PROPERTIES
*pProps
92 typedef MP_STATUS (* MP_GetMultipathLusPluginFn
)(
96 typedef MP_STATUS (* MP_GetMultipathLusDevProdFn
)(
101 typedef MP_STATUS (* MP_GetMPLogicalUnitPropertiesFn
)(
103 MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES
*pProps
106 typedef MP_STATUS (* MP_GetAssociatedPathOidListFn
)(
111 typedef MP_STATUS (* MP_GetPathLogicalUnitPropertiesFn
)(
113 MP_PATH_LOGICAL_UNIT_PROPERTIES
*pProps
116 typedef MP_STATUS (* MP_GetAssociatedTPGOidListFn
)(
121 typedef MP_STATUS (* MP_GetTargetPortGroupPropertiesFn
)(
123 MP_TARGET_PORT_GROUP_PROPERTIES
*pProps
126 typedef MP_STATUS (* MP_GetMPLuOidListFromTPGFn
)(
131 typedef MP_STATUS (* MP_GetProprietaryLoadBalanceOidListPluginFn
)(
135 typedef MP_STATUS (* MP_GetProprietaryLoadBalancePropertiesFn
)(
137 MP_PROPRIETARY_LOAD_BALANCE_PROPERTIES
*pProps
140 typedef MP_STATUS (* MP_GetTargetPortOidListFn
)(
145 typedef MP_STATUS (* MP_GetTargetPortPropertiesFn
)(
147 MP_TARGET_PORT_PROPERTIES
*pProps
151 ******************************************************************************
153 * Function table for path management API
155 ******************************************************************************
158 typedef MP_STATUS (* MP_AssignLogicalUnitToTPGFn
)(
163 typedef MP_STATUS (* MP_SetOverridePathFn
)(
164 MP_OID logicalUnitOid
,
168 typedef MP_STATUS (* MP_CancelOverridePathFn
)(
172 typedef MP_STATUS (* MP_EnableAutoFailbackPluginFn
)(
175 typedef MP_STATUS (* MP_EnableAutoFailbackLuFn
)(
179 typedef MP_STATUS (* MP_EnableAutoProbingPluginFn
)(
182 typedef MP_STATUS (* MP_EnableAutoProbingLuFn
)(
186 typedef MP_STATUS (* MP_DisableAutoFailbackPluginFn
)(
189 typedef MP_STATUS (* MP_DisableAutoFailbackLuFn
)(
193 typedef MP_STATUS (* MP_DisableAutoProbingPluginFn
)(
196 typedef MP_STATUS (* MP_DisableAutoProbingLuFn
)(
200 typedef MP_STATUS (* MP_EnablePathFn
)(
204 typedef MP_STATUS (* MP_DisablePathFn
)(
208 typedef MP_STATUS (* MP_SetLogicalUnitLoadBalanceTypeFn
)(
209 MP_OID logicalUnitoid
,
210 MP_LOAD_BALANCE_TYPE loadBalance
213 typedef MP_STATUS (* MP_SetPathWeightFn
)(
218 typedef MP_STATUS (* MP_SetPluginLoadBalanceTypePluginFn
)(
219 MP_LOAD_BALANCE_TYPE loadBalance
222 typedef MP_STATUS (* MP_SetFailbackPollingRatePluginFn
)(
223 MP_UINT32 pollingRate
226 typedef MP_STATUS (* MP_SetFailbackPollingRateLuFn
)(
228 MP_UINT32 pollingRate
231 typedef MP_STATUS (* MP_SetProbingPollingRatePluginFn
)(
232 MP_UINT32 pollingRate
235 typedef MP_STATUS (* MP_SetProbingPollingRateLuFn
)(
237 MP_UINT32 pollingRate
240 typedef MP_STATUS (* MP_SetProprietaryPropertiesFn
)(
243 MP_PROPRIETARY_PROPERTY
*pPropertyList
246 typedef MP_STATUS (* MP_SetTPGAccessFn
)(
249 MP_TPG_STATE_PAIR
*pTpgStateList
253 ******************************************************************************
255 * Function table for event support API
257 ******************************************************************************
260 typedef MP_STATUS (* MP_RegisterForObjectPropertyChangesPluginFn
)(
261 MP_OBJECT_PROPERTY_FN pClientFn
,
262 MP_OBJECT_TYPE objectType
,
266 typedef MP_STATUS (* MP_DeregisterForObjectPropertyChangesPluginFn
)(
267 MP_OBJECT_PROPERTY_FN pClientFn
,
268 MP_OBJECT_TYPE objectType
271 typedef MP_STATUS (* MP_RegisterForObjectVisibilityChangesPluginFn
)(
272 MP_OBJECT_VISIBILITY_FN pClientFn
,
273 MP_OBJECT_TYPE objectType
,
277 typedef MP_STATUS (* MP_DeregisterForObjectVisibilityChangesPluginFn
)(
278 MP_OBJECT_VISIBILITY_FN pClientFn
,
279 MP_OBJECT_TYPE objectType
282 typedef MP_STATUS (* Sun_MP_SendScsiCmdFn
)(
283 MP_OID oid
, struct uscsi_cmd
*cmd