Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
HBA_GetAdapterName(3) OSS Library Calls Reference Manual
NAME
HBA_GetAdapterName - Obtains the name of the specified Fibre Channel Host Bus Adapter
LIBRARY
H-series OSS processes: /usr/lib/libcmnapi.a
SYNOPSIS
#include <snia_common.h>
HBA_STATUS HBA_GetAdapterName (
HBA_UINT32 adapter_index,
char *adapter_name
);
PARAMETERS
adapter_index The index of the adapter among the multiple adapters being handled by this
library. The valid range of adapter_index is from 0 (zero) to 1 less than the value
returned by the HBA_GetNumberOfAdapters( ) function.
adapter_name The text string pointed to by the adapter_name parameter describes the adapter
and is used to open the adapter within the library. This string is of the form
mfgdomain-model-adapter_index and is allocated by the application calling this
function.
DESCRIPTION
This function is used to obtain the name of the adapter, supported by this library, whose index is
adapter_index.
Calling Order
You must call the HBA_LoadLibrary( ) function before you can call the
HBA_GetNumberOfAdapters( ) function.
You must call the HBA_GetAdapterName( ) function for an adapter before you can call the
HBA_GetAdapterPortAttributes( ) function or the HBA_GetPortStatistics( ) function for the
same adapter.
You must call the HBA_GetAdapterName( ) function for an adapter at least once before you
can call the HBA_OpenAdapter( ) 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_GetAdapterName(i, &adapter_name);
if (status == HBA_STATUS_OK) {
printf("Adapter %d is named %s", i, adapter_name);
}
}
RETURN VALUES
The HBA_GetAdapterName( ) function returns these values:
HBA_STATUS_OK
The call to this function was successful.
3−174 Hewlett-Packard Company 527187-017