HBA_SendRNID Subroutine

Purpose

Sends an RNID command through a call to SCIOLPAYLD to a remote port of the end device.

Library

Common Host Bus Adapter Library (libHBAAPI.a)

Syntax

#include <sys/hbaapi.h>

HBA_STATUS HBA_SendRNID (handle, wwn, wwntype, pRspBuffer, RspBufferSize)
HBA_HANDLE handle;
HBA_WWN wwn;
HBA_WWNTYPE wwntype;
void *pRspBuffer;
HBA_UINT32 RspBufferSize;

Description

The HBA_SendRNID subroutine sends a SCSI RNID command with the Node Identification Data Format set to indicate the default Topology Discovery format. This is done through a call to ioctl with the SCIOLPAYLD operation as its argument. The arg parameter for the SCIOLPAYLD operation is the address of an scsi_trans_payld structure. This structure is defined in the /usr/include/sys/scsi_buf.h file. The scsi_trans_payld parameter block allows the caller to select the SCSI and LUN IDs to be queried. In addition, the caller must specify the fcph_rnid_payld_t structure to hold the command and the topology format for SCIOLPAYLD. The structure for the fcph_rnid_payld_t structure is defined in the /usr/include/sys/fcph.h file.

If successful, the RNID data is returned in pRspBuffer. The returned RNID data must be examined to see if the requested information exists.

Parameters

Item Description
handle Specifies the open file descriptor obtained from a successful call to the open subroutine.
wwn Specifies the world wide name or port name of the target device.
wwntype Specifies the type of the world wide name or port name of the target device.
pRspBuffer Points to a buffer containing the requested instruction for a send/read capacity request to an open adapter.
RspBufferSize Specifies the size of the buffer to the pRspBuffer parameter.

Return Values

Upon successful completion, the HBA_SendRNID subroutine returns a buffer in bytes containing the SCSI RNID data and a value of HBA_STATUS_OK, or a value of 0. If unsuccessful, an empty buffer for the SCSI RNID and a value of HBA_STATUS_ERROR, or a value of 1 is returned.

Error Codes

The Storage Area Network Host Bus Adapter API subroutines return the following error codes:
Item Description
HBA_STATUS_OK A value of 0 on successful completion.
HBA_STATUS_ERROR A value of 1 if an error occurred.
HBA_STATUS_ERROR_NOT_SUPPORTED A value of 2 if the function is not supported.
HBA_STATUS_ERROR_INVALID_HANDLE A value of 3 if there was an invalid file handle.
HBA_STATUS_ERROR_ILLEGAL_WWN A value of 5 if the world wide name was not recognized.