Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

HBA_GetNumberOfAdapters(3) OSS Library Calls Reference Manual
NAME
HBA_GetNumberOfAdapters - Returns the current number of Host Bus Adapters supported by
the library
LIBRARY
H-series OSS processes: /usr/lib/libcmnapi.a
SYNOPSIS
#include <snia_common.h>
HBA_UINT32 HBA_GetNumberOfAdapters (
void
);
PARAMETERS
None.
DESCRIPTION
This function returns the current number of HBAs supported by the library.
Calling Order
You must call the HBA_LoadLibrary( ) function before you can call the
HBA_GetNumberOfAdapters( ) function.
You must call the HBA_GetNumberOfAdapters( ) function for an adapter at least once before
you can call the HBA_GetAdapterName() function.
EXAMPLES
HBA_UINT32 version;
int i;
HBA_STATUS status;
char adapter_name[256];
number_of_adapters = HBA_GetNumberOfAdapters();
for (i = 0; i < number_of_adapters; i++) {
status = HBA_GetNumberOfAdapters(i, &adapter_name);
if (status == HBA_STATUS_OK) {
printf("Adapter %d is named %s", i, adapter_name);
}
}
RETURN VALUES
Upon successful completion, the HBA_GetNumberOfAdapters( ) function returns a 32-bit
unsigned integer value of the total number of Fibre Chanel host bus adapters on the system. Oth-
erwise a value of 0 (zero) is returned, which indicates that no adapters are available.
ERRORS
None.
RELATED INFORMATION
Functions: HBA_CloseAdapter(3), HBA_GetAdapterAttributes(3),
HBA_GetAdapterName(3), HBA_GetAdapterPortAttributes(3),
HBA_GetDiscoveredPortAttributes(3), HBA_GetFcpTargetMapping(3),
HBA_GetPortStatistics(3), HBA_GetVersion(3), HBA_LoadLibrary(3),
HBA_FreeLibrary(3), HBA_OpenAdapter(3), HBA_RefreshInformation(3).
Files: HBAAPI(5).
3182 Hewlett-Packard Company 527187-017