HBA_SendReportLUNs man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

hbaapi_scsi_info_fns(3C)			      hbaapi_scsi_info_fns(3C)

NAME
       hbaapi_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
       interfaces

SYNOPSIS

DESCRIPTION
       This manpage covers Fibre Channel SNIA HBA APIs to send	SCSI  commands
       to SCSI devices which have been mapped behind Fibre Channel interfaces.
       If the return status indicates success,	the  response  buffer  may  be
       interpreted. If the return status indicates a SCSI check condition, 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  Pri‐
	      mary 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	 argu‐
	      ment  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 buf‐
	      fer  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	 revi‐
	      sion 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
	      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 argu‐
	      ment ptr_sense_buffer is a pointer to the buffer which  receives
	      the  sense  data	if  any. The argument sense_buffer_size corre‐
	      sponds to the size of the buffer which receives the sense infor‐
	      mation.

	      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.

WARNINGS
       This  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  exe‐
	      cuted  concurrently with other calls and may be modifying inter‐
	      nal 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	avail‐
	      able.

	      when  the	 WWN given as input does not match the WWN of any dis‐
	      covered 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.

EXAMPLE
       memset (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\n", status);
	      } else
		   printf ("HBA_SendScsiInquiry output: %s\n", 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\n", status);
	      }	 else
		   printf ("HBA_SendReportLUNs %d\n", 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\n", status);
	      } else
		   printf ("HBA_SendReadCapacity %d\n", lunBuffer[0]);

FILES
       Contains the related data structures and definitions as in

AUTHOR
       These APIs were developed by Hewlett-Packard Company.

SEE ALSO
       HBAAPI(3C),   HBA_GetVersion(3C),   HBA_LoadLibrary(3C),	   HBA_FreeLi‐
       brary(3C),     HBA_GetNumberOfAdapters(3C),     HBA_GetAdapterName(3C),
       HBA_OpenAdapter(3C),	 HBA_CloseAdapter(3C),	     HBA_GetAdapterAt‐
       tributes(3C),	HBA_GetAdapterPortAttributes(3C),   HBA_GetPortStatis‐
       tics(3C), HBA_GetDiscoveredPortAttributes(3C), HBA_GetPortAttributesBy‐
       WWN(3C),	 HBA_SendCTPassThru(3C),  HBA_GetEventBuffer(3C), HBA_SetRNID‐
       MgmtInfo(3C), HBA_GetRNIDMgmtInfo(3C), HBA_SendRNID(3C), HBA_GetFcpTar‐
       getMapping(3C),	 HBA_GetFcpPersistentBinding(3C),  HBA_RefreshInforma‐
       tion(3C), HBA_ResetStatistics(3C).

						      hbaapi_scsi_info_fns(3C)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net