Fibre Channel SNIA HBA API Programmer's Guide

NOTE: HP's vendor library returns HBA_PORTSPEED_UNKNOWN
as the supported and current port speed attributes for all remote
ports.
Input Parameters: handle - Handle to an adapter already opened by a call to
HBA_OpenAdapter().
port_index - Index of the port.
discovered_port_index - Index of the discovered port for which
port attributes are desired.
Output Parameters: port_attributes - Pointer to a structure for returning the remote
port 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_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
corresponding handle's
adapter is not available.
HBA_STATUS_ERROR_ILLEGAL_INDEX
Returned when the
port_index or
discovered_port_index is
invalid.
Call order sequence: See Appendix A.
NOTE: The number of discovered ports for a discovered port is always 0. (FC-MI Rev 1.6
A.7.12.4)
Example code:
HBA_STATUS status;
HBA_PORTATTRIBUTES port_attributes;
/* Get the attributes for the first discovered port on
first adapter port */
status =
HBA_GetDiscoveredPortAttributes(adapter_handle, 0, 0,
&port_attributes);
if (status == HBA_STATUS_OK)
{
printf("Discovered Port 0 on Adapter Port 0 is "
"of type %u\n", port_attributes.PortType);
}
Informational Functions 19