|Skip Navigation Links|
|Exit Print View|
|man pages section 3: Library Interfaces and Headers Oracle Solaris 10 8/11 Information Library|
- Common Fibre Channel HBA information library
cc [ flag… ] file… -lHBAAPI [ library… ] #include <hbaapi.h>
The functions in this library access Fibre Channel HBA data.
Fibre Channel HBA information is provided through a standard interface in a vendor independent manner. This common interface provides access to the following information:
Local HBA attributes
Local HBA port attributes and statistics
Mapping between FCP-2 discovered devices and operating system SCSI information
Discovered devices port attributes
SCSI commands for discovered FCP-2 devices (Report LUNS, Read Capacity, and Inquiry)
Common Transport commands to discover Fabric details
The shared object libhbaapi.so.1 provides the public interfaces defined below. See Intro(3) for additional information on shared object interfaces.
Using the libhbaapi involves the following steps:
Optionally determining the version of the library by calling HBA_GetVersion(3HBAAPI).
Initializing the Common Library by calling HBA_LoadLibrary(3HBAAPI).
Determine the number of HBAs known to the common library by calling HBA_GetNumberOfAdapters(3HBAAPI).
Determine each HBA name in turn by calling HBA_GetAdapterName(3HBAAPI).
Open each HBA in turn by calling HBA_OpenAdapter(3HBAAPI).
Operate on a given HBA by calling the following:
Close open HBAs by calling HBA_CloseAdapter(3HBAAPI).
Unload the library by calling HBA_FreeLibrary(3HBAAPI).
Errors are generally returned from the underlying VSL and can include any of the following values:
Request completed successfully. (No Error)
Non-specific error encountered.
The VSL does not support this interface.
The handle argument does not refer to an open HBA handle.
An argument in the request was invalid.
A WWN in the request was not recognized.
An index in the request was not recognized.
A larger buffer is required to complete the requested operation.
The state of the HBA has changed, possibly due to Dynamic Reconfiguration or devices being added or removed. The caller should call HBA_RefreshInformation(3HBAAPI) and reissue any discovery logic to reset all indexes related to this HBA.
A SCSI check-condition was encountered during the I/O operation. Not all VSLs report this error value. Some might return HBA_STATUS_ERROR when a check-condition is encountered, or HBA_STATUS_OK.
The requested device is busy. A retry might be effective.
The requested I/O timed out. A retry might be effective.
The requested HBA has been removed or deactivated.
All other error values are reserved.
See attributes(5) for descriptions of the following attributes:
HBA_GetAdapterAttributes(3HBAAPI), HBA_GetAdapterName(3HBAAPI), HBA_GetAdapterPortAttributes(3HBAAPI), HBA_GetBindingCapability(3HBAAPI), HBA_GetDiscoveredPortAttributes(3HBAAPI), HBA_GetEventBuffer(3HBAAPI), HBA_GetFcpPersistentBinding(3HBAAPI), HBA_GetFcpTargetMapping(3HBAAPI), HBA_GetNumberOfAdapters(3HBAAPI), HBA_GetPortAttributesByWWN(3HBAAPI), HBA_GetPortStatistics(3HBAAPI), HBA_GetVersion(3HBAAPI), HBA_GetWrapperLibraryAttributes(3HBAAPI), HBA_LoadLibrary(3HBAAPI), HBA_OpenAdapter(3HBAAPI), HBA_RefreshInformation(3HBAAPI), HBA_RegisterForAdapterEvents(3HBAAPI), HBA_SendCTPassThru(3HBAAPI), HBA_SendRLS(3HBAAPI), HBA_SendScsiInquiry(3HBAAPI), HBA_SetRNIDMgmtInfo(3HBAAPI), hba.conf(4), attributes(5)