Fibre Channel SNIA HBA API Programmer's Guide
Input Parameters
handle - Handle to an adapter already opened by a call to HBA_
OpenAdapter().
port_index - Index of the port.
Output Parameters: port_statistics - Pointer to a structure for returning the port
statistics.
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_ERROR_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 which the
handle corresponds is not
available.
HBA_STATUS_ERROR_ILLEGAL_INDEX
Returned when the
portindex is invalid.
Call order sequence: See Appendix A.
Example code:
HBA_STATUS status;
HBA_PORTSTATISTICS port_statistics;
status=HBA_GetPortStatistics(adapter_handle,
port_index,
&port_statistics);
if (status == HBA_STATUS_OK)
{
printf("Port %u has sent %u erraneous frames.\n"
port_index,port_statistics.ErrorFrames);
}
HBA_GetDiscoveredPortAttributes
Function:
HBA_STATUS HBA_GetDiscoveredPortAttributes(
HBA_HANDLE handle,
HBA_UINT32 port_index,
HBA_UINT32 discovered_port_index,
HBA_PORTATTRIBUTES *port_attributes
);
Purpose: Returns the attributes of a remote port.
18 HBA Common Library APIs