1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LIBSMHBAAPI 3LIB "Sep 28, 2009"
7 .SH NAME
8 libSMHBAAPI, libsmhbaapi, SMHBA_GetAdapterAttributes,
9 SMHBA_GetAdapterPortAttributes, SMHBA_GetBindingCapability,
10 SMHBA_GetBindingSupport, SMHBA_GetDiscoveredPortAttributes,
11 SMHBA_GetFCPhyAttributes, SMHBA_GetLUNStatistics, SMHBA_GetNumberofPorts,
12 SMHBA_GetPersistentBinding, SMHBA_GetPhyStatistics,
13 SMHBA_GetPortAttributesByWWN, SMHBA_GetPortType, SMHBA_GetProtocolStatistics,
14 SMHBA_GetSASPhyAttributes, SMHBA_GetTargetMapping,
15 SMHBA_GetVendorLibraryAttributes, SMHBA_GetVersion,
16 SMHBA_GetWrapperLibraryAttributes, SMHBA_RegisterForAdapterAddEvents,
17 SMHBA_RegisterForAdapterEvents, SMHBA_RegisterForAdapterPhyStatEvents,
18 SMHBA_RegisterForAdapterPortEvents, SMHBA_RegisterForAdapterPortStatEvents,
19 SMHBA_RegisterForTargetEvents, SMHBA_RegisterLibrary,
20 SMHBA_RemoveAllPersistentBindings, SMHBA_RemovePersistentBinding,
21 SMHBA_ScsiInquiry, SMHBA_ScsiReadCapacity, SMHBA_ScsiReportLuns,
22 SMHBA_SendECHO, SMHBA_SendSMPPassThru, SMHBA_SendTEST, SMHBA_SetBindingSupport,
23 SMHBA_SetPersistentBinding \- Common Storage Management HBA information library
24 .SH SYNOPSIS
25 .LP
26 .nf
27 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lSMHBAAPI\fR [ \fIlibrary\fR\&.\|.\|. ]
28 #include <smhbaapi.h>
29 .fi
30
31 .SH DESCRIPTION
32 .sp
33 .LP
34 The functions in this library access Fibre Channel and/or Serial Attached SCSI
35 HBA data depending on vendor provided implementation underneath.
36 .sp
37 .LP
38 HBA information is provided through a standard interface in a vendor
39 independent manner. This common interface provides access to the following
40 information:
41 .RS +4
42 .TP
43 .ie t \(bu
44 .el o
45 Local HBA attributes
46 .RE
47 .RS +4
48 .TP
49 .ie t \(bu
50 .el o
51 Local HBA port attributes and statistics
52 .RE
53 .RS +4
54 .TP
55 .ie t \(bu
56 .el o
57 Mapping between discovered devices and operating system SCSI information
58 .RE
59 .RS +4
60 .TP
61 .ie t \(bu
62 .el o
63 Discovered devices port attributes
64 .RE
65 .RS +4
66 .TP
67 .ie t \(bu
68 .el o
69 SCSI commands for discovered devices (Report LUNS, Read Capacity, and Inquiry)
70 .RE
71 .RS +4
72 .TP
73 .ie t \(bu
74 .el o
75 Storage Managment Protocol commands to discover Serial Attached SCSI
76 configuration details
77 .RE
78 .RS +4
79 .TP
80 .ie t \(bu
81 .el o
82 Common Transport commands to discover Fibre Channel Fabric details
83 .RE
84 .SH INTERFACES
85 .sp
86 .LP
87 The shared object \fBlibSMHBAAPI.so.1\fR provides the public interfaces defined
88 below. See \fBIntro\fR(3) for additional information on shared object
89 interfaces.
90 .sp
91
92 .sp
93 .TS
94 l l
95 l l .
96 \fBHBA_CloseAdapter\fR \fBHBA_FreeLibrary\fR
97 \fBHBA_GetAdapterName\fR \fBHBA_GetNumberOfAdapters\fR
98 \fBHBA_GetRNIDMgmtInfo\fR \fBHBA_LoadLibrary\fR
99 \fBHBA_OpenAdapter\fR \fBHBA_RefreshAdapterConfiguration\fR
100 \fBHBA_RefreshInformation\fR \fBHBA_RegisterForLinkEvents\fR
101 \fBHBA_RemoveCallback\fR \fBHBA_SendCTPassThruV2\fR
102 \fBHBA_SendLIRR\fR \fBHBA_SendRLS\fR
103 \fBHBA_SendRNIDV2\fR \fBHBA_SendRPL\fR
104 \fBHBA_SendRPS\fR \fBHBA_SendSRL\fR
105 \fBHBA_SetRNIDMgmtInfo\fR \fBSMHBA_GetAdapterAttributes\fR
106 \fBSMHBA_GetAdapterPortAttributes\fR \fBSMHBA_GetBindingCapability\fR
107 \fBSMHBA_GetBindingSupport\fR \fBSMHBA_GetDiscoveredPortAttributes\fR
108 \fBSMHBA_GetFCPhyAttributes\fR \fBSMHBA_GetLUNStatistics\fR
109 \fBSMHBA_GetNumberofPorts\fR \fBSMHBA_GetPersistentBinding\fR
110 \fBSMHBA_GetPhyStatistics\fR \fBSMHBA_GetPortAttributesByWWN\fR
111 \fBSMHBA_GetPortType\fR \fBSMHBA_GetProtocolStatistics\fR
112 \fBSMHBA_GetSASPhyAttributes\fR \fBSMHBA_GetTargetMapping\fR
113 \fBSMHBA_GetVendorLibraryAttributes\fR \fBSMHBA_GetVersion\fR
114 \fBSMHBA_GetWrapperLibraryAttributes\fR \fBSMHBA_RegisterForAdapterAddEvents\fR
115 \fBSMHBA_RegisterForAdapterEvents\fR \fBSMHBA_RegisterForAdapterPhyStatEvents\fR
116 \fBSMHBA_RegisterForAdapterPortEvents\fR \fBSMHBA_RegisterForAdapterPortStatEvents\fR
117 \fBSMHBA_RegisterForTargetEvents\fR \fBSMHBA_RegisterLibrary\fR
118 \fBSMHBA_RemoveAllPersistentBindings\fR \fBSMHBA_RemovePersistentBinding\fR
119 \fBSMHBA_ScsiInquiry\fR \fBSMHBA_ScsiReadCapacity\fR
120 \fBSMHBA_ScsiReportLuns\fR \fBSMHBA_SendECHO\fR
121 \fBSMHBA_SendSMPPassThru\fR \fBSMHBA_SendTEST\fR
122 \fBSMHBA_SetBindingSupport\fR \fBSMHBA_SetPersistentBinding\fR
123 .TE
124
125 .SH USAGE
126 .sp
127 .LP
128 Client applications link with the Common Library (using -\fBlSMHBAAPI\fR) to
129 access the interfaces. The Common Library dynamically loads individual
130 Vendor-Specific Libraries (VSL) listed in \fB/etc/smhba.conf\fR and described
131 on \fBsmhba.conf\fR(4).
132 .sp
133 .LP
134 Using the \fBlibSMHBAAPI\fR involves the following steps:
135 .RS +4
136 .TP
137 1.
138 Optionally determining the version of the library by calling
139 \fBSMHBA_GetVersion()\fR.
140 .RE
141 .RS +4
142 .TP
143 2.
144 Initializing the Common Library by calling \fBHBA_LoadLibrary()\fR.
145 .RE
146 .RS +4
147 .TP
148 3.
149 Determine the number of HBAs known to the common library by calling
150 \fBHBA_GetNumberOfAdapters()\fR.
151 .RE
152 .RS +4
153 .TP
154 4.
155 Determine each HBA name in turn by calling \fBHBA_GetAdapterName()\fR.
156 .RE
157 .RS +4
158 .TP
159 5.
160 Open each HBA in turn by calling \fBHBA_OpenAdapter()\fR.
161 .RE
162 .RS +4
163 .TP
164 6.
165 Operate on a given HBA by calling the following:
166 .RS +4
167 .TP
168 .ie t \(bu
169 .el o
170 \fBSMHBA_GetAdapterAttributes()\fR
171 .RE
172 .RS +4
173 .TP
174 .ie t \(bu
175 .el o
176 \fBSMHBA_GetAdapterPortAttributes()\fR
177 .RE
178 .RS +4
179 .TP
180 .ie t \(bu
181 .el o
182 \fBSMHBA_GetDiscoveredPortAttributes()\fR
183 .RE
184 .RS +4
185 .TP
186 .ie t \(bu
187 .el o
188 \fBSMHBA_GetPortAttributesByWWN()\fR
189 .RE
190 .RS +4
191 .TP
192 .ie t \(bu
193 .el o
194 \fBSMHBA_GetNumberofPorts()\fR
195 .RE
196 .RS +4
197 .TP
198 .ie t \(bu
199 .el o
200 \fBSMHBA_GetPortType()\fR
201 .RE
202 .RS +4
203 .TP
204 .ie t \(bu
205 .el o
206 \fBSMHBA_GetProtocolStatistics()\fR
207 .RE
208 .RS +4
209 .TP
210 .ie t \(bu
211 .el o
212 \fBSMHBA_GetPhyStatistics()\fR
213 .RE
214 .RS +4
215 .TP
216 .ie t \(bu
217 .el o
218 \fBSMHBA_GetBindingCapability()\fR
219 .RE
220 .RS +4
221 .TP
222 .ie t \(bu
223 .el o
224 \fBSMHBA_GetBindingSupport()\fR
225 .RE
226 .RS +4
227 .TP
228 .ie t \(bu
229 .el o
230 \fBSMHBA_SetBindingSupport()\fR
231 .RE
232 .RS +4
233 .TP
234 .ie t \(bu
235 .el o
236 \fBSMHBA_GetTargetMapping()\fR
237 .RE
238 .RS +4
239 .TP
240 .ie t \(bu
241 .el o
242 \fBSMHBA_GetPersistentBinding()\fR
243 .RE
244 .RS +4
245 .TP
246 .ie t \(bu
247 .el o
248 \fBSMHBA_SetPersistentBinding()\fR
249 .RE
250 .RS +4
251 .TP
252 .ie t \(bu
253 .el o
254 \fBSMHBA_RemoveAllPersistentBindings()\fR
255 .RE
256 .RS +4
257 .TP
258 .ie t \(bu
259 .el o
260 \fBSMHBA_GetLUNStatistics()\fR
261 .RE
262 .RS +4
263 .TP
264 .ie t \(bu
265 .el o
266 \fBSMHBA_SendScsiInquiry()\fR
267 .RE
268 .RS +4
269 .TP
270 .ie t \(bu
271 .el o
272 \fBSMHBA_SendReportLuns()\fR
273 .RE
274 .RS +4
275 .TP
276 .ie t \(bu
277 .el o
278 \fBSMHBA_SendReadCapacity()\fR
279 .RE
280 .RS +4
281 .TP
282 .ie t \(bu
283 .el o
284 \fBSMHBA_RegisterForAdapterAddEvents()\fR
285 .RE
286 .RS +4
287 .TP
288 .ie t \(bu
289 .el o
290 \fBSMHBA_RegisterForAdapterEvents()\fR
291 .RE
292 .RS +4
293 .TP
294 .ie t \(bu
295 .el o
296 \fBSMHBA_RegisterForAdapterPortEvents()\fR
297 .RE
298 .RS +4
299 .TP
300 .ie t \(bu
301 .el o
302 \fBSMHBA_RegisterForAdapterPortStatEvents()\fR
303 .RE
304 .RS +4
305 .TP
306 .ie t \(bu
307 .el o
308 \fBSMHBA_RegisterForAdapterPhyStatEvents()\fR
309 .RE
310 .RS +4
311 .TP
312 .ie t \(bu
313 .el o
314 \fBSMHBA_RegisterForTargetEvents()\fR
315 .RE
316 .RS +4
317 .TP
318 .ie t \(bu
319 .el o
320 \fBHBA_RegisterForLinkEvents()\fR
321 .RE
322 .RS +4
323 .TP
324 .ie t \(bu
325 .el o
326 \fBHBA_RemoveCallback()\fR
327 .RE
328 For Serial Attached HBA
329 .RS +4
330 .TP
331 .ie t \(bu
332 .el o
333 \fBSMHBA_GetSASPhyAttributes()\fR
334 .RE
335 .RS +4
336 .TP
337 .ie t \(bu
338 .el o
339 \fBSMHBA_SendSMPPassThru()\fR
340 .RE
341 For Fibre Channle HBA
342 .RS +4
343 .TP
344 .ie t \(bu
345 .el o
346 \fBSMHBA_GetFCPhyAttributes()\fR
347 .RE
348 .RS +4
349 .TP
350 .ie t \(bu
351 .el o
352 \fBHBA_SendCTPassThruV2()\fR
353 .RE
354 .RS +4
355 .TP
356 .ie t \(bu
357 .el o
358 \fBHBA_SetRNIDMgmtInfo()\fR
359 .RE
360 .RS +4
361 .TP
362 .ie t \(bu
363 .el o
364 \fBHBA_GetRNIDMgmtInfo()\fR
365 .RE
366 .RS +4
367 .TP
368 .ie t \(bu
369 .el o
370 \fBHBA_SendRNIDV2()\fR
371 .RE
372 .RS +4
373 .TP
374 .ie t \(bu
375 .el o
376 \fBHBA_SendRPL()\fR
377 .RE
378 .RS +4
379 .TP
380 .ie t \(bu
381 .el o
382 \fBHBA_SendRPS()\fR
383 .RE
384 .RS +4
385 .TP
386 .ie t \(bu
387 .el o
388 \fBHBA_SendSRL()\fR
389 .RE
390 .RS +4
391 .TP
392 .ie t \(bu
393 .el o
394 \fBHBA_SendLIRR()\fR
395 .RE
396 .RS +4
397 .TP
398 .ie t \(bu
399 .el o
400 \fBHBA_SendRLS()\fR
401 .RE
402 .RS +4
403 .TP
404 .ie t \(bu
405 .el o
406 \fBHBA_SendTEST()\fR
407 .RE
408 .RS +4
409 .TP
410 .ie t \(bu
411 .el o
412 \fBHBA_SendECHO()\fR
413 .RE
414 .RE
415 .RS +4
416 .TP
417 7.
418 Close open HBAs by calling \fBHBA_CloseAdapter()\fR.
419 .RE
420 .RS +4
421 .TP
422 8.
423 Unload the library by calling \fBHBA_FreeLibrary()\fR.
424 .RE
425 .SH ATTRIBUTES
426 .sp
427 .LP
428 See \fBattributes\fR(5) for descriptions of the following attributes:
429 .sp
430
431 .sp
432 .TS
433 box;
434 c | c
435 l | l .
436 ATTRIBUTE TYPE ATTRIBUTE VALUE
437 _
438 Interface Stability Committed
439 _
440 MT-Level MT-Safe
441 _
442 Standard T{
443 ANSI INCITS 428 Storage Management Host Bus Adapter Application Programming Interface (SM-HBA)
444 T}
445 .TE
446
447 .SH SEE ALSO
448 .sp
449 .LP
450 \fBsmhba.conf\fR(4), \fBattributes\fR(5)