1 SESIO(7I)                       Ioctl Requests                       SESIO(7I)
   2 
   3 NAME
   4      sesio - enclosure services device driver interface
   5 
   6 SYNOPSIS
   7      #include <sys/scsi/targets/sesio.h>
   8 
   9 DESCRIPTION
  10      The ses device driver provides the following ioctls as a means to access
  11      SCSI enclosure services devices.
  12 
  13 IOCTLS
  14      The ses driver supports the following ioctls:
  15 
  16      SES_IOCTL_GETSTATE  This ioctl obtains enclosure state in the ses_ioctl
  17                          structure.
  18 
  19      SES_IOCTL_SETSTATE  This ioctl is used to set parameters on the enclosure
  20                          services device.  The ses_ioctl structure is used to
  21                          pass information into the driver.
  22 
  23 EXAMPLES
  24      Example 1  Using the SES_IOCTL_GETSTATE ioctl
  25 
  26      The following example uses the SES_IOCTL_GETSTATE ioctl to recover 20
  27      bytes of page 4 from a previously opened device.
  28 
  29        char   abuf[30];
  30        struct ses_ioctl *sesp;
  31        int    status;
  32 
  33        sesp = (ses_ioctl *)abuf;
  34        sesp->size = 20;
  35        sesp->page_code = 4;
  36        status = ioctl(fd, SES_IOCTL_GETSTATE, abuf);
  37 
  38 ERRORS
  39      EIO     The ses driver was unable to obtain data from the enclosure
  40              services device or the  data transfer could not be completed.
  41 
  42      ENOTTY  The ses driver does not support the requested ioctl function.
  43 
  44      ENXIO   The enclosure services device does not exist.
  45 
  46      EFAULT  The user specified a bad data length.
  47 
  48 STRUCTURES
  49      The ses_ioctl structure has the following fields:
  50 
  51        uint32_t page_size;      /* Size of buffer that follows */
  52        uint8_t  page_code:      /* Page to be read/written */
  53        uint8_t  reserved[3];    /* Reserved; Set to 0 */
  54 
  55 ARCHITECTURE
  56      SPARC
  57 
  58 SEE ALSO
  59      ses(7D), ioctl(9E)
  60 
  61 illumos                        October 23, 2017                        illumos