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