1libMPAPI(3LIB) Interface Libraries libMPAPI(3LIB)
2
3
4
6 libMPAPI, libmpapi - Common Mulitipath Management library
7
9 cc [ flag... ] file... -lMPAPI [ library... ]
10 #include <mpapi.h>
11 #include <mpapi_sun.h>
12
13
15 The functions in this library allow a management application to admin‐
16 ister the multipath devices and associated resources through standard
17 interfaces, independent of a vendor-unique multipathing solution.
18
20 The shared object libMPAPI.so.1 provides the public interfaces defined
21 below. See Intro(3) for additional information on shared object inter‐
22 faces.
23 MP_AssignLogicalUnitToTPG
24 MP_CancelOverridePath
25 MP_CompareOIDs
26 MP_DeregisterForObjectPropertyChanges
27 MP_DeregisterForObjectVisibilityChanges
28 MP_DeregisterPlugin
29 MP_DisableAutoFailback
30 MP_DisableAutoProbing
31 MP_DisablePath
32 MP_EnableAutoFailback
33 MP_EnableAutoProbing
34 MP_EnablePath
35 MP_FreeOidList
36 MP_GetAssociatedPathOidList
37 MP_GetAssociatedPluginOid
38 MP_GetAssociatedTPGOidList
39 MP_GetDeviceProductOidList
40 MP_GetDeviceProductProperties
41 MP_GetInitiatorPortOidList
42 MP_GetInitiatorPortProperties
43 MP_GetLibraryProperties
44 MP_GetMPLogicalUnitProperties
45 MP_GetMPLuOidListFromTPG
46 MP_GetMultipathLus
47 MP_GetObjectType
48 MP_GetPathLogicalUnitProperties
49 MP_GetPluginOidList
50 MP_GetPluginProperties
51 MP_GetProprietaryLoadBalanceOidList
52 MP_GetProprietaryLoadBalanceProperties
53 MP_GetTargetPortGroupProperties
54 MP_GetTargetPortOidList
55 MP_GetTargetPortProperties
56 MP_RegisterForObjectPropertyChanges
57 MP_RegisterForObjectVisibilityChanges
58 MP_RegisterPlugin
59 MP_SetFailbackPollingRate
60 MP_SetLogicalUnitLoadBalanceType
61 MP_SetOverridePath
62 MP_SetPathWeight
63 MP_SetPluginLoadBalanceType
64 MP_SetProbingPollingRate
65 MP_SetProprietaryProperties
66 MP_SetTPGAccess
67 Sun_MP_SendScsiCmd
68
70 Client applications link with the Common Library (using -lMPAPI) to
71 access the interfaces. The Common Library dynamically loads an indi‐
72 vidual vendor-provided plugin library that is available through MP_Reg‐
73 isterPlugin(3MPAPI) on the host system.
74
75
76 Using libMPAPI involves the following steps:
77
78 1. Optionally calling MP_GetLibraryProperties() to retrieve the
79 properties of the Common Library.
80
81 2. Calling MP_GetPluginOidList() to retrieve the registered
82 plugin libraries.
83
84 3. Optionally calling MP_GetPluginProperties() to retrieve the
85 properties of the plugin library.
86
87 4. Retrieve discovery information and property information on
88 multipath devices and associated resources by calling the
89 following:
90
91 o MP_GetAssociatedPathOidList()
92
93 o MP_GetAssociatedTPGOidList()
94
95 o MP_GetDeviceProductOidList()
96
97 o MP_GetDeviceProductProperties()
98
99 o MP_GetInitiatorPortOidList()
100
101 o MP_GetInitiatorPortProperties()
102
103 o MP_GetMPLuOidListFromTPG()
104
105 o MP_GetMPLogicalUnitProperties()
106
107 o MP_GetMultipathLus()
108
109 o MP_GetPathLogicalUnitProperties()
110
111 o MP_GetProprietaryLoadBalanceOidList()
112
113 o MP_GetProprietaryLoadBalanceProperties()
114
115 o MP_GetTargetPortGroupProperties()
116
117 o MP_GetTargetPortOidList()
118
119 o MP_GetTargetPortProperties()
120
121 5. Register and deregister for property and visibility changes
122 on multipath devices and associated resources by calling:
123
124 o MP_RegisterForObjectPropertyChanges()
125
126 o MP_RegisterForObjectVisibilityChanges()
127
128 o MP_DeregisterForObjectPropertyChanges()
129
130 o MP_DeregisterForObjectVisibilityChanges()
131
132 6. Perform administrative operations on multipath devices and
133 associated resources by calling:
134
135 o MP_AssignLogicalUnitToTPG()
136
137 o MP_CancelOverridePath()
138
139 o MP_DisableAutoFailback()
140
141 o MP_DisableAutoProbing()
142
143 o MP_DisablePath()
144
145 o MP_EnableAutoFailback()
146
147 o MP_EnableAutoProbing()
148
149 o MP_EnablePath()
150
151 o MP_SetLogicalUnitLoadBalanceType()
152
153 o MP_SetOverridePath()
154
155 o MP_SetPathWeight()
156
157 o MP_SetPluginLoadBalanceType()
158
159 o MP_SetFailbackPollingRate()
160
161 o MP_SetProbingPollingRate()
162
163 o MP_SetProprietaryProperties()
164
165 o MP_SetTPGAccess()
166
167 o Sun_MP_SendScsiCmd()
168
170 Errors are generally returned from the underlying VSL and can include
171 any of the following values:
172
173 MP_STATUS_SUCCESS
174
175 This status value is returned when the requested operation is suc‐
176 cessfully carried out.
177
178
179 MP_STATUS_INVALID_PARAMETER
180
181 This status value is returned when parameters passed to an API are
182 detected to be invalid or inappropriate for a particular API param‐
183 eter. If the parameter is an object ID, this status indicates that
184 the object type subfield is defined in this specification, but is
185 not appropriate for this API
186
187
188 MP_STATUS_UNKNOWN_FN
189
190 This status value is returned when a client function passed into
191 the API is not a previously registered or known function.
192
193
194 MP_STATUS_FAILED
195
196 This status value is returned when the requested operation could
197 not be carried out.
198
199
200 MP_STATUS_INSUFFICIENT_MEMORY
201
202 This status value is returned when the API could [not] allocate the
203 memory required to complete the requested operation.
204
205
206 MP_STATUS_INVALID_OBJECT_TYPE
207
208 This status value is returned when an object ID includes a type
209 subfield that is not defined in this specification.
210
211
212 MP_STATUS_OBJECT_NOT_FOUND
213
214 This status value is returned when the object associated with the
215 ID specified in the API could not be located, or has been deleted.
216 Note that an invalid object type is covered by MP_STA‐
217 TUS_INVALID_OBJECT_TYPE so this status is limited to an invalid
218 object owner identifier or sequence number.
219
220
221 MP_STATUS_UNSUPPORTED
222
223 This status value is returned when the implementation does not sup‐
224 port the requested function.
225
226
227 MP_STATUS_FN_REPLACED
228
229 This status value is returned when a client function passed into
230 the API replaces a previously registered function.
231
232
233 MP_STATUS_ACCESS_STATE_INVALID
234
235 This status value is returned when a device processing MP_SetTPGAc‐
236 cess returns a status indicating that the caller is attempting to
237 establish an illegal combination of access states.
238
239
240 MP_STATUS_PATH_NONOPERATIONAL
241
242 This status is returned when communication cannot be established
243 with the path selected by the caller.
244
245
246 MP_STATUS_TRY_AGAIN
247
248 This status is returned when the plugin or driver is unable to com‐
249 plete the request, but might be able to complete it later.
250
251
252 MP_STATUS_NOT_PERMITTED
253
254 The operation is not permitted in the current configuration, but
255 might be permitted in other configurations.
256
257
259 /usr/lib/libMPAPI.so shared object
260
261
262 /usr/lib/64/libMPAPI.so 64-bit shared object
263
264
266 See attributes(5) for descriptions of the following attributes:
267
268
269
270
271 ┌─────────────────────────────┬─────────────────────────────┐
272 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
273 ├─────────────────────────────┼─────────────────────────────┤
274 │Availability │SUNWmpapir │
275 ├─────────────────────────────┼─────────────────────────────┤
276 │ │SUNWmpapi (Header file) │
277 ├─────────────────────────────┼─────────────────────────────┤
278 │Interface Stability │Committed │
279 │MT-Level │Safe │
280 ├─────────────────────────────┼─────────────────────────────┤
281 │Standard │ANSI INCITS 412 Multipath │
282 │ │Management API (except for │
283 │ │Sun_MP_SendScsiCmd) │
284 └─────────────────────────────┴─────────────────────────────┘
285
287 Intro(3), MP_RegisterPlugin(3MPAPI), attributes(5)
288
289
290 Multipath Management API Version 1.0
291
292
293
294SunOS 5.11 12 Dec 2006 libMPAPI(3LIB)