Fibre Channel SNIA HBA API Programmer's Guide
2 HBA Common Library APIs
Chapter 2 introduces the HBA common library APIs.
Introduction - How to Read Each API
HBA common library APIs are classified by the functionality each provides. The following table
defines each segment of the APIs:
Table 2-1 Definitions of the API Portions
DefinitionSegment
Function prototypeFunction
Function arguments strictly for the function being called. Input
parameters are passed by value and do not change upon call return.
Input
Parameters
Function arguments whose value you can interpret after call returns.Output
Parameters
Value returned from the function called.Return Values
Specifies the needed sequence of calls prior to calling the
corresponding function. See Appendix A.
Call Order
Sequence
NOTE: The common library will return HBA_STATUS_ERROR_NOT_SUPPORTED if the vendor
library does not support an API.
General Vendor Implemented Functions
General vendor implemented functions relate to general adapter operations. All vendor libraries
and the common library must implement the following functions:
HBA_GetVersion
Function:
HBA_UINT32 HBA_GetVersion();
Purpose: Returns the version of the SNIA API that the common library
conforms to.
Input Parameters: None.
Output Parameters: None.
Return Values: The version of the SNIA HBA API specification this library
conforms to.
Call order sequence: See Appendix A.
Example code:
HBA_UINT32 version;
version = HBA_GetVersion();
printf("Running version %u of the HBA API library.\n",
version);
HBA_LoadLibrary
Function:
HBA_STATUS HBA_LoadLibrary();
Purpose: Loads all vendor libraries from the common library configuration
file (/etc/hba.conf).
Input Parameters: None.
Introduction - How to Read Each API 11