Fibre Channel SNIA HBA API Programmer's Guide
3 Creating a Vendor Library for HP's HBA SNIA API
Chapter 3 introduces compiling and setting-up a third party vendor library with HP's common
HBA API.
The /etc/hba.conf File
The /etc/hba.conf file has entries for each vendor library to be loaded during a
HBA_LoadLibrary() call in the common API library. Invalid entries in this file are ignored by
the common API library. Comment lines in this file must begin with a # in the first column.
Example of entries in this file are:
# /etc/hba.conf
# WARNING - This file is not meant to be modified by the end user !
# Comments in this file begin with a '#' in the first column
# Format for entries in this file is:
# <Library Name> <Library Path>
# HP's SNIA API vendor implementation
com.hp.fcms32 /usr/lib/libhbaapihp.sl
#32 bit lib names end in '32'com.hp.fcms64 /usr/lib/pa20_64/libhbaapihp.sl
#64 bit lib names end in '64'
Headers for Inclusion
The /usr/include/snia_common.h header file may be included to use data structures used
according to the FC SNIA HBA API specifications (FC-MI Revision 1.6 Annexure A).
Simplifying Code with the Common Library
The common library ensures some APIs are allowed to execute only when no calls in the library
are simultaneously being processed. This ensures that the following APIs run exclusively when
called:
• HBA_LoadLibrary()
• HBA_FreeLibrary()
• HBA_GetNumberOfAdapters()
• HBA_RefreshInformation()
Sample Programs
The following sample programs are in the /opt/snia/demo directory:
Table 3-1 Sample Programs
Use for FileFile Name
The file used for building demo programs.makefile.demo
The SNIA API demonstration application source.snia_demo.c
The /etc/hba.conf File 37