'\" te .\" Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. .TH libSMHBAAPI 3LIB "9 Jul 2012" "SunOS 5.11" "Interface Libraries" .SH NAME libSMHBAAPI, libsmhbaapi, SMHBA_GetAdapterAttributes, SMHBA_GetAdapterPortAttributes, SMHBA_GetBindingCapability, SMHBA_GetBindingSupport, SMHBA_GetDiscoveredPortAttributes, SMHBA_GetFCPhyAttributes, SMHBA_GetLUNStatistics, SMHBA_GetNumberofPorts, SMHBA_GetPersistentBinding, SMHBA_GetPhyStatistics, SMHBA_GetPortAttributesByWWN, SMHBA_GetPortType, SMHBA_GetProtocolStatistics, SMHBA_GetSASPhyAttributes, SMHBA_GetTargetMapping, SMHBA_GetVendorLibraryAttributes, SMHBA_GetVersion, SMHBA_GetWrapperLibraryAttributes, SMHBA_RegisterForAdapterAddEvents, SMHBA_RegisterForAdapterEvents, SMHBA_RegisterForAdapterPhyStatEvents, SMHBA_RegisterForAdapterPortEvents, SMHBA_RegisterForAdapterPortStatEvents, SMHBA_RegisterForTargetEvents, SMHBA_RegisterLibrary, SMHBA_RemoveAllPersistentBindings, SMHBA_RemovePersistentBinding, SMHBA_ScsiInquiry, SMHBA_ScsiReadCapacity, SMHBA_ScsiReportLuns, SMHBA_SendECHO, SMHBA_SendSMPPassThru, SMHBA_SendTEST, SMHBA_SetBindingSupport, SMHBA_SetPersistentBinding \- Common Storage Management HBA information library .SH SYNOPSIS .LP .nf cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lSMHBAAPI\fR [ \fIlibrary\fR\&.\|.\|. ] #include .fi .SH DESCRIPTION .sp .LP The functions in this library access Fibre Channel and/or Serial Attached SCSI HBA data depending on vendor provided implementation underneath. .sp .LP HBA information is provided through a standard interface in a vendor independent manner. This common interface provides access to the following information: .RS +4 .TP .ie t \(bu .el o Local HBA attributes .RE .RS +4 .TP .ie t \(bu .el o Local HBA port attributes and statistics .RE .RS +4 .TP .ie t \(bu .el o Mapping between discovered devices and operating system SCSI information .RE .RS +4 .TP .ie t \(bu .el o Discovered devices port attributes .RE .RS +4 .TP .ie t \(bu .el o SCSI commands for discovered devices (Report LUNS, Read Capacity, and Inquiry) .RE .RS +4 .TP .ie t \(bu .el o Storage Managment Protocol commands to discover Serial Attached SCSI configuration details .RE .RS +4 .TP .ie t \(bu .el o Common Transport commands to discover Fibre Channel Fabric details .RE .SH INTERFACES .sp .LP The shared object \fBlibSMHBAAPI.so.1\fR provides the public interfaces defined below. See \fBIntro\fR(3) for additional information on shared object interfaces. .sp .sp .TS tab(); lw(3i) lw(2.5i) lw(3i) lw(2.5i) . \fBHBA_CloseAdapter\fR\fBHBA_FreeLibrary\fR \fBHBA_GetAdapterName\fR\fBHBA_GetNumberOfAdapters\fR \fBHBA_GetRNIDMgmtInfo\fR\fBHBA_LoadLibrary\fR \fBHBA_OpenAdapter\fR\fBHBA_RefreshAdapterConfiguration\fR \fBHBA_RefreshInformation\fR\fBHBA_RegisterForLinkEvents\fR \fBHBA_RemoveCallback\fR\fBHBA_SendCTPassThruV2\fR \fBHBA_SendLIRR\fR\fBHBA_SendRLS\fR \fBHBA_SendRNIDV2\fR\fBHBA_SendRPL\fR \fBHBA_SendRPS\fR\fBHBA_SendSRL\fR \fBHBA_SetRNIDMgmtInfo\fR\fBSMHBA_GetAdapterAttributes\fR \fBSMHBA_GetAdapterPortAttributes\fR\fBSMHBA_GetBindingCapability\fR \fBSMHBA_GetBindingSupport\fR\fBSMHBA_GetDiscoveredPortAttributes\fR \fBSMHBA_GetFCPhyAttributes\fR\fBSMHBA_GetLUNStatistics\fR \fBSMHBA_GetNumberofPorts\fR\fBSMHBA_GetPersistentBinding\fR \fBSMHBA_GetPhyStatistics\fR\fBSMHBA_GetPortAttributesByWWN\fR \fBSMHBA_GetPortType\fR\fBSMHBA_GetProtocolStatistics\fR \fBSMHBA_GetSASPhyAttributes\fR\fBSMHBA_GetTargetMapping\fR \fBSMHBA_GetVendorLibraryAttributes\fR\fBSMHBA_GetVersion\fR \fBSMHBA_GetWrapperLibraryAttributes\fR\fBSMHBA_RegisterForAdapterAddEvents\fR \fBSMHBA_RegisterForAdapterEvents\fR\fBSMHBA_RegisterForAdapterPhyStatEvents\fR \fBSMHBA_RegisterForAdapterPortEvents\fR\fBSMHBA_RegisterForAdapterPortStatEvents\fR \fBSMHBA_RegisterForTargetEvents\fR\fBSMHBA_RegisterLibrary\fR \fBSMHBA_RemoveAllPersistentBindings\fR\fBSMHBA_RemovePersistentBinding\fR \fBSMHBA_ScsiInquiry\fR\fBSMHBA_ScsiReadCapacity\fR \fBSMHBA_ScsiReportLuns\fR\fBSMHBA_SendECHO\fR \fBSMHBA_SendSMPPassThru\fR\fBSMHBA_SendTEST\fR \fBSMHBA_SetBindingSupport\fR\fBSMHBA_SetPersistentBinding\fR .TE .SH USAGE .sp .LP Client applications link with the Common Library (using -\fBlSMHBAAPI\fR) to access the interfaces. The Common Library dynamically loads individual Vendor-Specific Libraries (VSL) listed in \fB/etc/smhba.conf\fR and described on \fBsmhba.conf\fR(4). .sp .LP Using the \fBlibSMHBAAPI\fR involves the following steps: .RS +4 .TP 1. Optionally determining the version of the library by calling \fBSMHBA_GetVersion()\fR. .RE .RS +4 .TP 2. Initializing the Common Library by calling \fBHBA_LoadLibrary()\fR. .RE .RS +4 .TP 3. Determine the number of HBAs known to the common library by calling \fBHBA_GetNumberOfAdapters()\fR. .RE .RS +4 .TP 4. Determine each HBA name in turn by calling \fBHBA_GetAdapterName()\fR. .RE .RS +4 .TP 5. Open each HBA in turn by calling \fBHBA_OpenAdapter()\fR. .RE .RS +4 .TP 6. Operate on a given HBA by calling the following: .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetAdapterAttributes()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetAdapterPortAttributes()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetDiscoveredPortAttributes()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetPortAttributesByWWN()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetNumberofPorts()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetPortType()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetProtocolStatistics()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetPhyStatistics()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetBindingCapability()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetBindingSupport()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_SetBindingSupport()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetTargetMapping()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetPersistentBinding()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_SetPersistentBinding()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RemoveAllPersistentBindings()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetLUNStatistics()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_SendScsiInquiry()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_SendReportLuns()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_SendReadCapacity()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RegisterForAdapterAddEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RegisterForAdapterEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RegisterForAdapterPortEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RegisterForAdapterPortStatEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RegisterForAdapterPhyStatEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_RegisterForTargetEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_RegisterForLinkEvents()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_RemoveCallback()\fR .RE For Serial Attached HBA .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetSASPhyAttributes()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBSMHBA_SendSMPPassThru()\fR .RE For Fibre Channle HBA .RS +4 .TP .ie t \(bu .el o \fBSMHBA_GetFCPhyAttributes()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendCTPassThruV2()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SetRNIDMgmtInfo()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_GetRNIDMgmtInfo()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendRNIDV2()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendRPL()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendRPS()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendSRL()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendLIRR()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendRLS()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendTEST()\fR .RE .RS +4 .TP .ie t \(bu .el o \fBHBA_SendECHO()\fR .RE .RE .RS +4 .TP 7. Close open HBAs by calling \fBHBA_CloseAdapter()\fR. .RE .RS +4 .TP 8. Unload the library by calling \fBHBA_FreeLibrary()\fR. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/library/storage/t11-sm-hba _ Interface StabilityCommitted _ MT-LevelMT-Safe _ StandardT{ ANSI INCITS 428 Storage Management Host Bus Adapter Application Programming Interface (SM-HBA) T} .TE .SH SEE ALSO .sp .LP \fBsmhba.conf\fR(4), \fBattributes\fR(5)