Fibre Channel SNIA HBA API Programmer's Guide

HBA_GetPortAttributesByWWN
Function:
HBA_STATUS HBA_GetPortAttributesByWWN(
HBA_HANDLE handle,
HBA_WWN port_wwn,
HBA_PORTATTRIBUTES *port_attributes
);
Purpose: Returns the port attributes of a remote port when its WWN is
specified.
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_wwn - WWN of the remote port whose attributes are
required.
Output Parameters port_attributes - Pointer to a structure for returning the 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_WWN
Returned when the WWN
given as input does not
match the WWN of any
discovered port.
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;
20 HBA Common Library APIs