'\" te .\" Copyright (c) 2001, Sun Microsystems, Inc., All Rights Reserved. .\" Copyright 1989 AT&T .\" 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 Intro 9S "15 May 2001" "SunOS 5.11" "Data Structures for Drivers" .SH NAME Intro, intro \- introduction to kernel data structures and properties .SH DESCRIPTION .sp .LP Section 9P describes kernel properties used by device drivers. Section 9S describes the data structures used by drivers to share information between the driver and the kernel. See \fBIntro\fR(9E) for an overview of device driver interfaces. .sp .LP In Section 9S, reference pages contain the following headings: .RS +4 .TP .ie t \(bu .el o \fBNAME\fR summarizes the purpose of the structure or property. .RE .RS +4 .TP .ie t \(bu .el o \fBSYNOPSIS\fR lists the include file that defines the structure or property. .RE .RS +4 .TP .ie t \(bu .el o \fBINTERFACE\fR \fBLEVEL\fR describes any architecture dependencies. .RE .RS +4 .TP .ie t \(bu .el o \fBDESCRIPTION\fR provides general information about the structure or property. .RE .RS +4 .TP .ie t \(bu .el o \fBSTRUCTURE\fR \fBMEMBERS\fR lists all accessible structure members (for Section 9S). .RE .RS +4 .TP .ie t \(bu .el o \fBSEE\fR \fBALSO\fR gives sources for further information. .RE .sp .LP Of the preceding headings, Section 9P reference pages contain the \fBNAME\fR, \fBDESCRIPTION\fR, and \fBSEE\fR \fBALSO\fR fields. .sp .LP Every driver MUST include <\fBsys/ddi.h\fR> and <\fBsys/sunddi.h\fR>, in that order, and as final entries. .sp .LP The following table summarizes the STREAMS structures described in Section 9S. .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . StructureType _ \fBcopyreq\fRDDI/DKI _ \fBcopyresp\fRDDI/DKI _ \fBdatab\fRDDI/DKI _ \fBfmodsw\fRSolaris DDI _ \fBfree_rtn\fRDDI/DKI _ \fBiocblk\fRDDI/DKI _ \fBlinkblk\fRDDI/DKI _ \fBmodule_info\fRDDI/DKI _ \fBmsgb\fRDDI/DKI _ \fBqband\fRDDI/DKI _ \fBqinit\fRDDI/DKI _ \fBqueclass\fRSolaris DDI _ \fBqueue\fRDDI/DKI _ \fBstreamtab\fRDDI/DKI _ \fBstroptions\fRDDI/DKI .TE .sp .LP The following table summarizes structures that are not specific to STREAMS I/O. .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . StructureType _ \fBaio_req\fRSolaris DDI _ \fBbuf\fRDDI/DKI _ \fBcb_ops\fRSolaris DDI _ \fBddi_device_acc_attr\fRSolaris DDI _ \fBddi_dma_attr\fRSolaris DDI _ \fBddi_dma_cookie\fRSolaris DDI _ \fBddi_dma_lim_sparc\fRSolaris SPARC DDI _ \fBddi_dma_lim_x86\fRSolaris x86 DDI _ \fBddi_dma_req\fRSolaris DDI _ \fBddi_dmae_req\fRSolaris x86 DDI _ \fBddi_idevice_cookie\fRSolaris DDI _ \fBddi_mapdev_ctl\fRSolaris DDI _ \fBdevmap_callback_ctl\fRSolaris DDI _ \fBdev_ops\fRSolaris DDI _ \fBiovec\fRDDI/DKI _ \fBkstat\fRSolaris DDI _ \fBkstat_intr\fRSolaris DDI _ \fBkstat_io\fRSolaris DDI _ \fBkstat_named\fRSolaris DDI _ \fBmap\fRDDI/DKI _ \fBmodldrv\fRSolaris DDI _ \fBmodlinkage\fRSolaris DDI _ \fBmodlstrmod\fRSolaris DDI _ \fBscsi_address\fRSolaris DDI _ \fBscsi_arq_status\fRSolaris DDI _ \fBscsi_device\fRSolaris DDI _ \fBscsi_extended_sense\fRSolaris DDI _ \fBscsi_hba_tran\fRSolaris DDI _ \fBscsi_inquiry\fRSolaris DDI _ \fBscsi_pkt\fRSolaris DDI _ \fBscsi_status\fRSolaris DDI _ \fBuio\fRDDI/DKI .TE .SH SEE ALSO .sp .LP \fBIntro\fR(9E) .SH NOTES .sp .LP Do not declare arrays of structures as the size of the structures can change between releases. Rely only on the structure members listed in this chapter and not on unlisted members or the position of a member in a structure.