2 .\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SESIO 7I "Mar 27, 1997"
8 sesio \- enclosure services device driver interface
12 \fB#include <sys/sesio.h>\fR
18 The \fBses\fR device driver provides the following ioctls as a means to access
19 SCSI enclosure services devices.
23 The \fBses\fR driver supports the following ioctls:
27 \fB\fBSES_IOCTL_GETSTATE\fR\fR
30 This ioctl obtains enclosure state in the \fBses_ioctl\fR structure.
36 \fB\fBSES_IOCTL_SETSTATE\fR\fR
39 This ioctl is used to set parameters on the enclosure services device. The
40 \fBses_ioctl\fR structure is used to pass information into the driver.
50 The \fBses\fR driver was unable to obtain data from the enclosure services
51 device or the data transfer could not be completed.
60 The \fBses\fR driver does not support the requested ioctl function.
69 The enclosure services device does not exist.
78 The user specified a bad data length.
84 The \fBses_ioctl\fR structure has the following fields:
88 uint32_t; /* Size of buffer that follows */
89 uint8_t page_code: /* Page to be read/written */
90 uint8_t reserved[3]; /* Reserved; Set to 0 */
91 unit8t buffer[1]; /* Size arbitrary, user specifies */
97 \fBExample 1 \fRUsing the \fBSES_IOCTL_GETSTATE\fR ioctl
100 The following example uses the \fBSES_IOCTL_GETSTATE\fR ioctl to recover 20
101 bytes of page 4 from a previously opened device.
107 struct ses_ioctl *sesp;
109 sesp = (ses_ioctl *)abuf;
112 status = ioctl(fd, SES_IOCTL_GETSTATE, abuf);
119 See \fBattributes\fR(5) for descriptions of the following attributes:
127 ATTRIBUTE TYPE ATTRIBUTE VALUE
135 \fBses\fR(7D), \fBioctl\fR(9E)