'\" te .\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] .TH sesio 7I "27 Mar 1997" "SunOS 5.11" "Ioctl Requests" .SH NAME sesio \- enclosure services device driver interface .SH SYNOPSIS .LP .nf \fB#include \fR .fi .SH DESCRIPTION .sp .LP The \fBses\fR device driver provides the following ioctls as a means to access SCSI enclosure services devices. .SH IOCTLS .sp .LP The \fBses\fR driver supports the following ioctls: .sp .ne 2 .mk .na \fB\fBSES_IOCTL_GETSTATE\fR\fR .ad .RS 22n .rt This ioctl obtains enclosure state in the \fBses_ioctl\fR structure. .RE .sp .ne 2 .mk .na \fB\fBSES_IOCTL_SETSTATE\fR\fR .ad .RS 22n .rt This ioctl is used to set parameters on the enclosure services device. The \fBses_ioctl\fR structure is used to pass information into the driver. .RE .SH ERRORS .sp .ne 2 .mk .na \fB\fBEIO\fR\fR .ad .RS 10n .rt The \fBses\fR driver was unable to obtain data from the enclosure services device or the data transfer could not be completed. .RE .sp .ne 2 .mk .na \fB\fBENOTTY\fR\fR .ad .RS 10n .rt The \fBses\fR driver does not support the requested ioctl function. .RE .sp .ne 2 .mk .na \fB\fBENXIO\fR\fR .ad .RS 10n .rt The enclosure services device does not exist. .RE .sp .ne 2 .mk .na \fB\fBEFAULT\fR\fR .ad .RS 10n .rt The user specified a bad data length. .RE .SH STRUCTURES .sp .LP The \fBses_ioctl\fR structure has the following fields: .sp .in +2 .nf uint32_t; /* Size of buffer that follows */ uint8_t page_code: /* Page to be read/written */ uint8_t reserved[3]; /* Reserved; Set to 0 */ unit8t buffer[1]; /* Size arbitrary, user specifies */ .fi .in -2 .SH EXAMPLES .LP \fBExample 1 \fRUsing the \fBSES_IOCTL_GETSTATE\fR ioctl .sp .LP The following example uses the \fBSES_IOCTL_GETSTATE\fR ioctl to recover 20 bytes of page 4 from a previously opened device. .sp .in +2 .nf char abuf[30]; struct ses_ioctl *sesp; int status; sesp = (ses_ioctl *)abuf; sesp->size = 20; sesp->page_code = 4; status = ioctl(fd, SES_IOCTL_GETSTATE, abuf); .fi .in -2 .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ ArchitectureSPARC .TE .SH SEE ALSO .sp .LP \fBses\fR(7D), \fBioctl\fR(9E)