Fibre Channel SNIA HBA API Programmer's Guide

HBA_ADAPTERATTRIBUTES
*hba_attributes
);
Purpose: Returns the attributes for an adapter port.
Input Parameters handle - Handle to an adapter already opened by a call to
HBA_OpenAdapter().
Output Parameters: hba_attributes - Pointer to a structure for returning the adapter
attributes.
Return Values: Returned after a
successful execution of the
call.
HBA_STATUS_OK
HBA_STATUS_ERROR
Returned when an
internal library or system
error is detected.
HBA_STATUS_ERROR_BUSY
Returned when the library
is busy and cannot
currently process this call.
HBA_STATUS_ERRROR_INVALID_HANDLE
Returned when the handle
passed to this function is
invalid.
HBA_STATUS_ERROR_ARG
Returned when the
pointer passed to this
function is NULL.
HBA_STATUS_ERROR_UNAVAILABLE
Returned when the
adapter to the
corresponding handle is
not available.
Call order sequence: See Appendix A.
Example code:
HBA_STATUS status;
HBA_ADAPTERATTRIBUTES adapter_attributes;
status = HBA_GetAdapterAttributes(adapter_handle,
&adapter_attributes);
if (status == HBA_STATUS_OK)
{
printf("Manufacturer: %s\n",
adaper_attributes.Manufacturer);
printf("Serial Number: %s\n",
adapter_attributes.SerialNumber);
}
HBA_GetAdapterPortAttributes
Function:
HBA_STATUS HBA_GetAdapterPortAttributes(
HBA_HANDLE handle,
HBA_UINT32 port_index,
HBA_PORTATTRIBUTES *port_attributes
);
Purpose: Returns the attributes for an adapter port.
Input Parameters: handle - Handle to an adapter already opened by a call to
HBA_OpenAdapter().
port_index - Index of the port.
16 HBA Common Library APIs