dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / mpapi / libmpapi / common / mpapi-plugin.h
blobe85f643635d5861803ef822cf925d84cfd0f26c9
1 /******************************************************************************
3 * Description
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.
8 * License:
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
13 * TBD
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
18 * under the License.
20 * The Original Code is iSCSI Management API and Multipath Management API
21 * plugin header file
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)
29 * Contributor(s):
30 * Paul von Behren Sun Microsystems(paul.vonbehren@sun.com)
32 ******************************************************************************
34 * Changes:
35 * 1/15/2005 Implemented SNIA MP API specification 1.0
36 *****************************************************************************/
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
43 #ifndef MPPLUGIN_H
44 #define MPPLUGIN_H
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
58 * the plugins.
60 typedef MP_STATUS (* TerminateFn) (void);
62 /**
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)(
75 MP_OID_LIST **ppList
78 typedef MP_STATUS (* MP_GetDeviceProductPropertiesFn)(
79 MP_OID oid,
80 MP_DEVICE_PRODUCT_PROPERTIES *pProps
83 typedef MP_STATUS (* MP_GetInitiatorPortOidListPluginFn)(
84 MP_OID_LIST **ppList
87 typedef MP_STATUS (* MP_GetInitiatorPortPropertiesFn)(
88 MP_OID oid,
89 MP_INITIATOR_PORT_PROPERTIES *pProps
92 typedef MP_STATUS (* MP_GetMultipathLusPluginFn)(
93 MP_OID_LIST **ppList
96 typedef MP_STATUS (* MP_GetMultipathLusDevProdFn)(
97 MP_OID oid,
98 MP_OID_LIST **ppList
101 typedef MP_STATUS (* MP_GetMPLogicalUnitPropertiesFn)(
102 MP_OID oid,
103 MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES *pProps
106 typedef MP_STATUS (* MP_GetAssociatedPathOidListFn)(
107 MP_OID oid,
108 MP_OID_LIST **ppList
111 typedef MP_STATUS (* MP_GetPathLogicalUnitPropertiesFn)(
112 MP_OID oid,
113 MP_PATH_LOGICAL_UNIT_PROPERTIES *pProps
116 typedef MP_STATUS (* MP_GetAssociatedTPGOidListFn)(
117 MP_OID oid,
118 MP_OID_LIST **ppList
121 typedef MP_STATUS (* MP_GetTargetPortGroupPropertiesFn)(
122 MP_OID oid,
123 MP_TARGET_PORT_GROUP_PROPERTIES *pProps
126 typedef MP_STATUS (* MP_GetMPLuOidListFromTPGFn)(
127 MP_OID oid,
128 MP_OID_LIST **ppList
131 typedef MP_STATUS (* MP_GetProprietaryLoadBalanceOidListPluginFn)(
132 MP_OID_LIST **ppList
135 typedef MP_STATUS (* MP_GetProprietaryLoadBalancePropertiesFn)(
136 MP_OID oid,
137 MP_PROPRIETARY_LOAD_BALANCE_PROPERTIES *pProps
140 typedef MP_STATUS (* MP_GetTargetPortOidListFn)(
141 MP_OID oid,
142 MP_OID_LIST **ppList
145 typedef MP_STATUS (* MP_GetTargetPortPropertiesFn)(
146 MP_OID oid,
147 MP_TARGET_PORT_PROPERTIES *pProps
151 ******************************************************************************
153 * Function table for path management API
155 ******************************************************************************
158 typedef MP_STATUS (* MP_AssignLogicalUnitToTPGFn)(
159 MP_OID tpgOid,
160 MP_OID luOid
163 typedef MP_STATUS (* MP_SetOverridePathFn)(
164 MP_OID logicalUnitOid,
165 MP_OID pathOid
168 typedef MP_STATUS (* MP_CancelOverridePathFn)(
169 MP_OID luOid
172 typedef MP_STATUS (* MP_EnableAutoFailbackPluginFn)(
175 typedef MP_STATUS (* MP_EnableAutoFailbackLuFn)(
176 MP_OID oid
179 typedef MP_STATUS (* MP_EnableAutoProbingPluginFn)(
182 typedef MP_STATUS (* MP_EnableAutoProbingLuFn)(
183 MP_OID oid
186 typedef MP_STATUS (* MP_DisableAutoFailbackPluginFn)(
189 typedef MP_STATUS (* MP_DisableAutoFailbackLuFn)(
190 MP_OID oid
193 typedef MP_STATUS (* MP_DisableAutoProbingPluginFn)(
196 typedef MP_STATUS (* MP_DisableAutoProbingLuFn)(
197 MP_OID oid
200 typedef MP_STATUS (* MP_EnablePathFn)(
201 MP_OID oid
204 typedef MP_STATUS (* MP_DisablePathFn)(
205 MP_OID oid
208 typedef MP_STATUS (* MP_SetLogicalUnitLoadBalanceTypeFn)(
209 MP_OID logicalUnitoid,
210 MP_LOAD_BALANCE_TYPE loadBalance
213 typedef MP_STATUS (* MP_SetPathWeightFn)(
214 MP_OID pathOid,
215 MP_UINT32 weight
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)(
227 MP_OID oid,
228 MP_UINT32 pollingRate
231 typedef MP_STATUS (* MP_SetProbingPollingRatePluginFn)(
232 MP_UINT32 pollingRate
235 typedef MP_STATUS (* MP_SetProbingPollingRateLuFn)(
236 MP_OID oid,
237 MP_UINT32 pollingRate
240 typedef MP_STATUS (* MP_SetProprietaryPropertiesFn)(
241 MP_OID oid,
242 MP_UINT32 count,
243 MP_PROPRIETARY_PROPERTY *pPropertyList
246 typedef MP_STATUS (* MP_SetTPGAccessFn)(
247 MP_OID luOid,
248 MP_UINT32 count,
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,
263 void *pCallerData
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,
274 void *pCallerData
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
286 #endif
288 #ifdef __cplusplus
290 #endif