Query: hbaapi_scsi_info_fns
OS: hpux
Section: 3c
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
hbaapi_scsi_info_fns(3C) hbaapi_scsi_info_fns(3C)NAMEhbaapi_scsi_info_fns: HBA_SendScsiInquiry(), HBA_SendReportLUNs(), HBA_SendReadCapacity() - Fibre Channel SNIA HBA APIs to send SCSI com- mands to SCSI devices which have been mapped behind Fibre Channel interfacesSYNOPSISDESCRIPTIONThis manpage covers Fibre Channel SNIA HBA APIs to send SCSI commands to SCSI devices which have been mapped behind Fibre Channel inter- faces. If the return status indicates success, the response buffer may be interpreted. If the return status indicates a SCSI check condi- tion, the sense buffer may have to be interpreted. These functions require that the applications calling them have an effective user id as that of the root user (euid = 0). This function sends a SCSI inquiry command to a remote WWN (World Wide Name). See INQUIRY Command and Device Identification Page in SCSI Primary Commands - 2 (SPC-2), T10 Project 1236-D revision 18. The argument handle is of type (Refer to and is obtained through a call to The port_wwn argument is remote Port WWN to which a is to be sent. The argument fc_lun corresponds to the specific FC LUN ID to send the inquiry to. The argument EVPD (Enable Vital Product Data) is set to to return the standard SCSI INQUIRY data and to to return the vital product data specified by The argument page_code is the Vital Product Data page code to request when is set to The argument ptr_rsp_buffer is a pointer to the buffer which receives the response. The argument rsp_buffer_size corresponds to the size of the buffer which receives the response. The argument ptr_sense_buffer is a pointer to the buffer which receives the sense data if any. The argument sense_buffer_size corresponds to the size of the buffer which receives the sense information. This function sends a SCSI report LUNs command to a remote WWN. See in SCSI Primary Commands - 2 (SPC-2), T10 Project 1236-D revision 18 The argument handle is of type (Refer to and is obtained through a call to The argument port_wwn is the remote Port WWN to which a report LUNs command is to be sent. The argument ptr_rsp_buffer is a pointer to the buffer which receives the response. The argument rsp_buffer_size corresponds to the size of the buffer which receives the response. The argument ptr_sense_buffer is a pointer to the buffer which receives the sense data if any. The argument sense_buffer_size corresponds to the size of the buffer which receives the sense information. This function sends a read capacity command to a remote WWN. See in SCSI Block Commands (SBC), ANSI NCITS.306:1998. The argument handle is of (Refer to type and is obtained through a call to The argument port_wwn is the remote Port WWN to which a is to be sent. The argument fc_lun corresponds to the specific FC LUN ID to which the read capacity command is to be sent. The argu- ment ptr_rsp_buffer is a pointer to the buffer which receives the response. The argument rsp_buffer_size corresponds to the size of the buffer which receives the response. The argument ptr_sense_buffer is a pointer to the buffer which receives the sense data if any. The argument sense_buffer_size corresponds to the size of the buffer which receives the sense information. 1. The bit is always set to zero in this function and hence the returned Logical Block Address and Block Length in bytes are those of the last logical block on the block device.WARNINGSThis implemention of the FC SNIA HBA API enforces a calling order as follows: or is called before any of the below mentioned functions: RETURN VALUES and return the following values: on success. when a internal library or system error is detected. when the library is busy processing a call that cannot be executed concurrently with other calls and may be modifying internal data structures. when the handle passed to this function is invalid. when any of the pointer passed to this function is NULL. when the adapter to which the handle corresponds is not available. when the WWN given as input does not match the WWN of any discovered port. when the response or sense buffer is smaller than required. when a SCSI Check condition occurs. may also return when the EVPD argument has an invalid value.EXAMPLEmemset (resp_buffer, 0, sizeof(resp_buffer)); memset (senseBuffer, 0, sizeof(sense_buffer)); if ((status = HBA_SendScsiInquiry(handle, wwn, fc_lun, evpd_reqd, page_code, &resp_buffer, sizeof(resp_buffer), &sense_buffer, sizeof(sense_buffer))) != HBA_STATUS_OK) { printf ("HBA_SendScsiInquiry error %d ", status); } else printf ("HBA_SendScsiInquiry output: %s ", resp_buffer); memset (lunBuffer, 0, sizeof(lunBuffer)); memset (senseBuffer, 0, sizeof(senseBuffer)); if ((status = HBA_SendReportLUNs(handle, wwn, &lunBuffer, sizeof(lunBuffer), &senseBuffer, sizeof(senseBuffer))) != HBA_STATUS_OK) { printf ("HBA_SendReportLUNs error %d ", status); } else printf ("HBA_SendReportLUNs %d ", lunBuffer[0]); memset (resp_buffer, 0, sizeof(resp_buffer)); memset (sense_buffer, 0, sizeof(sense_buffer)); if ((status = HBA_SendReadCapacity(handle, wwn, fc_lun, &resp_buffer, sizeof(resp_buffer), &sense_buffer, sizeof(sense_buffer))) != HBA_STATUS_OK) { printf ("HBA_SendReadCapacity error %d ", status); } else printf ("HBA_SendReadCapacity %d ", lunBuffer[0]);FILESContains the related data structures and definitions as inAUTHORThese APIs were developed by Hewlett-Packard Company.SEE ALSOHBAAPI(3C), HBA_GetVersion(3C), HBA_LoadLibrary(3C), HBA_FreeLibrary(3C), HBA_GetNumberOfAdapters(3C), HBA_GetAdapterName(3C), HBA_Ope- nAdapter(3C), HBA_CloseAdapter(3C), HBA_GetAdapterAttributes(3C), HBA_GetAdapterPortAttributes(3C), HBA_GetPortStatistics(3C), HBA_GetDis- coveredPortAttributes(3C), HBA_GetPortAttributesByWWN(3C), HBA_SendCTPassThru(3C), HBA_GetEventBuffer(3C), HBA_SetRNIDMgmtInfo(3C), HBA_GetRNIDMgmtInfo(3C), HBA_SendRNID(3C), HBA_GetFcpTargetMapping(3C), HBA_GetFcpPersistentBinding(3C), HBA_RefreshInformation(3C), HBA_ResetStatistics(3C). hbaapi_scsi_info_fns(3C)
Similar Topics in the Unix Linux Community |
---|
How to get LUN WWN in Solaris? |