xref: /onnv-gate/usr/src/lib/mpapi/libmpapi/common/mpapi-plugin.h (revision 7836:4e95154b5b7a)
1*7836SJohn.Forte@Sun.COM /******************************************************************************
2*7836SJohn.Forte@Sun.COM  *
3*7836SJohn.Forte@Sun.COM  * Description
4*7836SJohn.Forte@Sun.COM  *  mpapi-plugin.h - interfaces for the MP API Version 1.0 plugin library.
5*7836SJohn.Forte@Sun.COM  *  A compliant plugin library should implement interfaces with name without Fn
6*7836SJohn.Forte@Sun.COM  *  suffix from function definitions below.
7*7836SJohn.Forte@Sun.COM  *
8*7836SJohn.Forte@Sun.COM  * License:
9*7836SJohn.Forte@Sun.COM  *  The contents of this file are subject to the SNIA Public License
10*7836SJohn.Forte@Sun.COM  *  Version 1.1 (the "License"); you may not use this file except in
11*7836SJohn.Forte@Sun.COM  *  compliance with the License. You may obtain a copy of the License at
12*7836SJohn.Forte@Sun.COM  *
13*7836SJohn.Forte@Sun.COM  *  TBD
14*7836SJohn.Forte@Sun.COM  *
15*7836SJohn.Forte@Sun.COM  *  Software distributed under the License is distributed on an "AS IS"
16*7836SJohn.Forte@Sun.COM  *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17*7836SJohn.Forte@Sun.COM  *  the License for the specific language governing rights and limitations
18*7836SJohn.Forte@Sun.COM  *  under the License.
19*7836SJohn.Forte@Sun.COM  *
20*7836SJohn.Forte@Sun.COM  * The Original Code is iSCSI Management API and Multipath Management API
21*7836SJohn.Forte@Sun.COM  * 	plugin header file
22*7836SJohn.Forte@Sun.COM  *
23*7836SJohn.Forte@Sun.COM  * The Initial Developer of the Original Code is:
24*7836SJohn.Forte@Sun.COM  *	Benjamin F. Kuo Troika Networks, Inc. (benk@troikanetworks.com)
25*7836SJohn.Forte@Sun.COM  *	David Dillard	VERITAS Software(david.dillard@veritas.com)
26*7836SJohn.Forte@Sun.COM  *	Jeff Ding	Adaptec, Inc. (jding@corp.adaptec.com)
27*7836SJohn.Forte@Sun.COM  *      Hyon Kim       	Sun Microsystems(hyon.kim@sun.com)
28*7836SJohn.Forte@Sun.COM  *
29*7836SJohn.Forte@Sun.COM  * Contributor(s):
30*7836SJohn.Forte@Sun.COM  *	Paul von Behren	Sun Microsystems(paul.vonbehren@sun.com)
31*7836SJohn.Forte@Sun.COM  *
32*7836SJohn.Forte@Sun.COM  ******************************************************************************
33*7836SJohn.Forte@Sun.COM  *
34*7836SJohn.Forte@Sun.COM  *   Changes:
35*7836SJohn.Forte@Sun.COM  *  1/15/2005 Implemented SNIA MP API specification 1.0
36*7836SJohn.Forte@Sun.COM  *****************************************************************************/
37*7836SJohn.Forte@Sun.COM 
38*7836SJohn.Forte@Sun.COM #ifdef __cplusplus
39*7836SJohn.Forte@Sun.COM extern "C" {
40*7836SJohn.Forte@Sun.COM #endif
41*7836SJohn.Forte@Sun.COM 
42*7836SJohn.Forte@Sun.COM 
43*7836SJohn.Forte@Sun.COM #ifndef MPPLUGIN_H
44*7836SJohn.Forte@Sun.COM #define MPPLUGIN_H
45*7836SJohn.Forte@Sun.COM 
46*7836SJohn.Forte@Sun.COM /*
47*7836SJohn.Forte@Sun.COM  * MP API common library calls InitaizeFn as part of dynamically loading
48*7836SJohn.Forte@Sun.COM  * the plugins.  For this version of implementation the common library
49*7836SJohn.Forte@Sun.COM  * passes the sequence number of the plugin oid through InitializeFn.  The
50*7836SJohn.Forte@Sun.COM  * sequnece number will be used as the ownerId for the plugin generated OIDs.
51*7836SJohn.Forte@Sun.COM  */
52*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* InitializeFn)  (
53*7836SJohn.Forte@Sun.COM         MP_UINT32   pluginOwnerID
54*7836SJohn.Forte@Sun.COM     );
55*7836SJohn.Forte@Sun.COM 
56*7836SJohn.Forte@Sun.COM /*
57*7836SJohn.Forte@Sun.COM  * MP API common library calls TerminateFn as part of dynamically unloading
58*7836SJohn.Forte@Sun.COM  * the plugins.
59*7836SJohn.Forte@Sun.COM  */
60*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* TerminateFn) (void);
61*7836SJohn.Forte@Sun.COM 
62*7836SJohn.Forte@Sun.COM /**
63*7836SJohn.Forte@Sun.COM  ******************************************************************************
64*7836SJohn.Forte@Sun.COM  *
65*7836SJohn.Forte@Sun.COM  * Function table for OID and properties discovery API
66*7836SJohn.Forte@Sun.COM  *
67*7836SJohn.Forte@Sun.COM  ******************************************************************************
68*7836SJohn.Forte@Sun.COM  */
69*7836SJohn.Forte@Sun.COM 
70*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetPluginPropertiesPluginFn)(
71*7836SJohn.Forte@Sun.COM         MP_PLUGIN_PROPERTIES *pProps
72*7836SJohn.Forte@Sun.COM );
73*7836SJohn.Forte@Sun.COM 
74*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetDeviceProductOidListPluginFn)(
75*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
76*7836SJohn.Forte@Sun.COM );
77*7836SJohn.Forte@Sun.COM 
78*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetDeviceProductPropertiesFn)(
79*7836SJohn.Forte@Sun.COM 	MP_OID 				oid,
80*7836SJohn.Forte@Sun.COM         MP_DEVICE_PRODUCT_PROPERTIES *pProps
81*7836SJohn.Forte@Sun.COM );
82*7836SJohn.Forte@Sun.COM 
83*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetInitiatorPortOidListPluginFn)(
84*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
85*7836SJohn.Forte@Sun.COM );
86*7836SJohn.Forte@Sun.COM 
87*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetInitiatorPortPropertiesFn)(
88*7836SJohn.Forte@Sun.COM         MP_OID                        oid,
89*7836SJohn.Forte@Sun.COM         MP_INITIATOR_PORT_PROPERTIES *pProps
90*7836SJohn.Forte@Sun.COM );
91*7836SJohn.Forte@Sun.COM 
92*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetMultipathLusPluginFn)(
93*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
94*7836SJohn.Forte@Sun.COM );
95*7836SJohn.Forte@Sun.COM 
96*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetMultipathLusDevProdFn)(
97*7836SJohn.Forte@Sun.COM 	MP_OID	oid,
98*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
99*7836SJohn.Forte@Sun.COM );
100*7836SJohn.Forte@Sun.COM 
101*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetMPLogicalUnitPropertiesFn)(
102*7836SJohn.Forte@Sun.COM         MP_OID                                oid,
103*7836SJohn.Forte@Sun.COM         MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES *pProps
104*7836SJohn.Forte@Sun.COM );
105*7836SJohn.Forte@Sun.COM 
106*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetAssociatedPathOidListFn)(
107*7836SJohn.Forte@Sun.COM         MP_OID        oid,
108*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
109*7836SJohn.Forte@Sun.COM );
110*7836SJohn.Forte@Sun.COM 
111*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetPathLogicalUnitPropertiesFn)(
112*7836SJohn.Forte@Sun.COM         MP_OID                           oid,
113*7836SJohn.Forte@Sun.COM         MP_PATH_LOGICAL_UNIT_PROPERTIES *pProps
114*7836SJohn.Forte@Sun.COM );
115*7836SJohn.Forte@Sun.COM 
116*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetAssociatedTPGOidListFn)(
117*7836SJohn.Forte@Sun.COM         MP_OID        oid,
118*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
119*7836SJohn.Forte@Sun.COM );
120*7836SJohn.Forte@Sun.COM 
121*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetTargetPortGroupPropertiesFn)(
122*7836SJohn.Forte@Sun.COM         MP_OID                           oid,
123*7836SJohn.Forte@Sun.COM         MP_TARGET_PORT_GROUP_PROPERTIES *pProps
124*7836SJohn.Forte@Sun.COM );
125*7836SJohn.Forte@Sun.COM 
126*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetMPLuOidListFromTPGFn)(
127*7836SJohn.Forte@Sun.COM         MP_OID        oid,
128*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
129*7836SJohn.Forte@Sun.COM );
130*7836SJohn.Forte@Sun.COM 
131*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetProprietaryLoadBalanceOidListPluginFn)(
132*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
133*7836SJohn.Forte@Sun.COM );
134*7836SJohn.Forte@Sun.COM 
135*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetProprietaryLoadBalancePropertiesFn)(
136*7836SJohn.Forte@Sun.COM         MP_OID        oid,
137*7836SJohn.Forte@Sun.COM 	MP_PROPRIETARY_LOAD_BALANCE_PROPERTIES *pProps
138*7836SJohn.Forte@Sun.COM );
139*7836SJohn.Forte@Sun.COM 
140*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetTargetPortOidListFn)(
141*7836SJohn.Forte@Sun.COM         MP_OID        oid,
142*7836SJohn.Forte@Sun.COM         MP_OID_LIST **ppList
143*7836SJohn.Forte@Sun.COM );
144*7836SJohn.Forte@Sun.COM 
145*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_GetTargetPortPropertiesFn)(
146*7836SJohn.Forte@Sun.COM         MP_OID                     oid,
147*7836SJohn.Forte@Sun.COM         MP_TARGET_PORT_PROPERTIES *pProps
148*7836SJohn.Forte@Sun.COM );
149*7836SJohn.Forte@Sun.COM 
150*7836SJohn.Forte@Sun.COM /**
151*7836SJohn.Forte@Sun.COM  ******************************************************************************
152*7836SJohn.Forte@Sun.COM  *
153*7836SJohn.Forte@Sun.COM  * Function table for path management API
154*7836SJohn.Forte@Sun.COM  *
155*7836SJohn.Forte@Sun.COM  ******************************************************************************
156*7836SJohn.Forte@Sun.COM  */
157*7836SJohn.Forte@Sun.COM 
158*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_AssignLogicalUnitToTPGFn)(
159*7836SJohn.Forte@Sun.COM         MP_OID tpgOid,
160*7836SJohn.Forte@Sun.COM         MP_OID luOid
161*7836SJohn.Forte@Sun.COM );
162*7836SJohn.Forte@Sun.COM 
163*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetOverridePathFn)(
164*7836SJohn.Forte@Sun.COM     MP_OID logicalUnitOid,
165*7836SJohn.Forte@Sun.COM     MP_OID pathOid
166*7836SJohn.Forte@Sun.COM );
167*7836SJohn.Forte@Sun.COM 
168*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_CancelOverridePathFn)(
169*7836SJohn.Forte@Sun.COM         MP_OID luOid
170*7836SJohn.Forte@Sun.COM );
171*7836SJohn.Forte@Sun.COM 
172*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_EnableAutoFailbackPluginFn)(
173*7836SJohn.Forte@Sun.COM );
174*7836SJohn.Forte@Sun.COM 
175*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_EnableAutoFailbackLuFn)(
176*7836SJohn.Forte@Sun.COM     MP_OID oid
177*7836SJohn.Forte@Sun.COM );
178*7836SJohn.Forte@Sun.COM 
179*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_EnableAutoProbingPluginFn)(
180*7836SJohn.Forte@Sun.COM );
181*7836SJohn.Forte@Sun.COM 
182*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_EnableAutoProbingLuFn)(
183*7836SJohn.Forte@Sun.COM     MP_OID oid
184*7836SJohn.Forte@Sun.COM );
185*7836SJohn.Forte@Sun.COM 
186*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DisableAutoFailbackPluginFn)(
187*7836SJohn.Forte@Sun.COM );
188*7836SJohn.Forte@Sun.COM 
189*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DisableAutoFailbackLuFn)(
190*7836SJohn.Forte@Sun.COM     MP_OID oid
191*7836SJohn.Forte@Sun.COM );
192*7836SJohn.Forte@Sun.COM 
193*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DisableAutoProbingPluginFn)(
194*7836SJohn.Forte@Sun.COM );
195*7836SJohn.Forte@Sun.COM 
196*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DisableAutoProbingLuFn)(
197*7836SJohn.Forte@Sun.COM     MP_OID oid
198*7836SJohn.Forte@Sun.COM );
199*7836SJohn.Forte@Sun.COM 
200*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_EnablePathFn)(
201*7836SJohn.Forte@Sun.COM     MP_OID oid
202*7836SJohn.Forte@Sun.COM );
203*7836SJohn.Forte@Sun.COM 
204*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DisablePathFn)(
205*7836SJohn.Forte@Sun.COM     MP_OID oid
206*7836SJohn.Forte@Sun.COM );
207*7836SJohn.Forte@Sun.COM 
208*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetLogicalUnitLoadBalanceTypeFn)(
209*7836SJohn.Forte@Sun.COM     MP_OID               logicalUnitoid,
210*7836SJohn.Forte@Sun.COM     MP_LOAD_BALANCE_TYPE loadBalance
211*7836SJohn.Forte@Sun.COM );
212*7836SJohn.Forte@Sun.COM 
213*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetPathWeightFn)(
214*7836SJohn.Forte@Sun.COM     MP_OID    pathOid,
215*7836SJohn.Forte@Sun.COM     MP_UINT32 weight
216*7836SJohn.Forte@Sun.COM );
217*7836SJohn.Forte@Sun.COM 
218*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetPluginLoadBalanceTypePluginFn)(
219*7836SJohn.Forte@Sun.COM     MP_LOAD_BALANCE_TYPE loadBalance
220*7836SJohn.Forte@Sun.COM );
221*7836SJohn.Forte@Sun.COM 
222*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetFailbackPollingRatePluginFn)(
223*7836SJohn.Forte@Sun.COM     MP_UINT32 pollingRate
224*7836SJohn.Forte@Sun.COM );
225*7836SJohn.Forte@Sun.COM 
226*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetFailbackPollingRateLuFn)(
227*7836SJohn.Forte@Sun.COM     MP_OID	oid,
228*7836SJohn.Forte@Sun.COM     MP_UINT32	pollingRate
229*7836SJohn.Forte@Sun.COM );
230*7836SJohn.Forte@Sun.COM 
231*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetProbingPollingRatePluginFn)(
232*7836SJohn.Forte@Sun.COM     MP_UINT32 pollingRate
233*7836SJohn.Forte@Sun.COM );
234*7836SJohn.Forte@Sun.COM 
235*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetProbingPollingRateLuFn)(
236*7836SJohn.Forte@Sun.COM     MP_OID	oid,
237*7836SJohn.Forte@Sun.COM     MP_UINT32	pollingRate
238*7836SJohn.Forte@Sun.COM );
239*7836SJohn.Forte@Sun.COM 
240*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetProprietaryPropertiesFn)(
241*7836SJohn.Forte@Sun.COM     MP_OID             oid,
242*7836SJohn.Forte@Sun.COM     MP_UINT32          count,
243*7836SJohn.Forte@Sun.COM     MP_PROPRIETARY_PROPERTY *pPropertyList
244*7836SJohn.Forte@Sun.COM );
245*7836SJohn.Forte@Sun.COM 
246*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_SetTPGAccessFn)(
247*7836SJohn.Forte@Sun.COM     MP_OID             luOid,
248*7836SJohn.Forte@Sun.COM     MP_UINT32          count,
249*7836SJohn.Forte@Sun.COM     MP_TPG_STATE_PAIR *pTpgStateList
250*7836SJohn.Forte@Sun.COM );
251*7836SJohn.Forte@Sun.COM 
252*7836SJohn.Forte@Sun.COM /**
253*7836SJohn.Forte@Sun.COM  ******************************************************************************
254*7836SJohn.Forte@Sun.COM  *
255*7836SJohn.Forte@Sun.COM  * Function table for event support API
256*7836SJohn.Forte@Sun.COM  *
257*7836SJohn.Forte@Sun.COM  ******************************************************************************
258*7836SJohn.Forte@Sun.COM  */
259*7836SJohn.Forte@Sun.COM 
260*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_RegisterForObjectPropertyChangesPluginFn)(
261*7836SJohn.Forte@Sun.COM     MP_OBJECT_PROPERTY_FN   pClientFn,
262*7836SJohn.Forte@Sun.COM     MP_OBJECT_TYPE	    objectType,
263*7836SJohn.Forte@Sun.COM     void		    *pCallerData
264*7836SJohn.Forte@Sun.COM );
265*7836SJohn.Forte@Sun.COM 
266*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DeregisterForObjectPropertyChangesPluginFn)(
267*7836SJohn.Forte@Sun.COM     MP_OBJECT_PROPERTY_FN   pClientFn,
268*7836SJohn.Forte@Sun.COM     MP_OBJECT_TYPE	    objectType
269*7836SJohn.Forte@Sun.COM );
270*7836SJohn.Forte@Sun.COM 
271*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_RegisterForObjectVisibilityChangesPluginFn)(
272*7836SJohn.Forte@Sun.COM     MP_OBJECT_VISIBILITY_FN pClientFn,
273*7836SJohn.Forte@Sun.COM     MP_OBJECT_TYPE	    objectType,
274*7836SJohn.Forte@Sun.COM     void		    *pCallerData
275*7836SJohn.Forte@Sun.COM );
276*7836SJohn.Forte@Sun.COM 
277*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* MP_DeregisterForObjectVisibilityChangesPluginFn)(
278*7836SJohn.Forte@Sun.COM     MP_OBJECT_VISIBILITY_FN pClientFn,
279*7836SJohn.Forte@Sun.COM     MP_OBJECT_TYPE          objectType
280*7836SJohn.Forte@Sun.COM );
281*7836SJohn.Forte@Sun.COM 
282*7836SJohn.Forte@Sun.COM typedef MP_STATUS (* Sun_MP_SendScsiCmdFn)(
283*7836SJohn.Forte@Sun.COM     MP_OID oid, struct uscsi_cmd *cmd
284*7836SJohn.Forte@Sun.COM );
285*7836SJohn.Forte@Sun.COM 
286*7836SJohn.Forte@Sun.COM #endif
287*7836SJohn.Forte@Sun.COM 
288*7836SJohn.Forte@Sun.COM #ifdef __cplusplus
289*7836SJohn.Forte@Sun.COM };
290*7836SJohn.Forte@Sun.COM #endif
291*7836SJohn.Forte@Sun.COM 
292