xref: /onnv-gate/usr/src/lib/libdtrace/common/scsi.d (revision 9578:c4b38ec17f4e)
1*9578SSam.Cramer@Sun.COM /*
2*9578SSam.Cramer@Sun.COM  * CDDL HEADER START
3*9578SSam.Cramer@Sun.COM  *
4*9578SSam.Cramer@Sun.COM  * The contents of this file are subject to the terms of the
5*9578SSam.Cramer@Sun.COM  * Common Development and Distribution License (the "License").
6*9578SSam.Cramer@Sun.COM  * You may not use this file except in compliance with the License.
7*9578SSam.Cramer@Sun.COM  *
8*9578SSam.Cramer@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*9578SSam.Cramer@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*9578SSam.Cramer@Sun.COM  * See the License for the specific language governing permissions
11*9578SSam.Cramer@Sun.COM  * and limitations under the License.
12*9578SSam.Cramer@Sun.COM  *
13*9578SSam.Cramer@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*9578SSam.Cramer@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*9578SSam.Cramer@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*9578SSam.Cramer@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*9578SSam.Cramer@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*9578SSam.Cramer@Sun.COM  *
19*9578SSam.Cramer@Sun.COM  * CDDL HEADER END
20*9578SSam.Cramer@Sun.COM  */
21*9578SSam.Cramer@Sun.COM 
22*9578SSam.Cramer@Sun.COM /*
23*9578SSam.Cramer@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*9578SSam.Cramer@Sun.COM  * Use is subject to license terms.
25*9578SSam.Cramer@Sun.COM  */
26*9578SSam.Cramer@Sun.COM 
27*9578SSam.Cramer@Sun.COM /*
28*9578SSam.Cramer@Sun.COM  * The scsicmd_t structure should be used by providers
29*9578SSam.Cramer@Sun.COM  * to represent a SCSI command block (cdb).
30*9578SSam.Cramer@Sun.COM  */
31*9578SSam.Cramer@Sun.COM typedef struct scsicmd {
32*9578SSam.Cramer@Sun.COM 	uint64_t ic_len;	/* CDB length */
33*9578SSam.Cramer@Sun.COM 	uint8_t  *ic_cdb;	/* CDB data */
34*9578SSam.Cramer@Sun.COM } scsicmd_t;
35*9578SSam.Cramer@Sun.COM 
36*9578SSam.Cramer@Sun.COM /*
37*9578SSam.Cramer@Sun.COM  * Translator for scsicmd_t, translating from a scsi_task_t
38*9578SSam.Cramer@Sun.COM  */
39*9578SSam.Cramer@Sun.COM #pragma D binding "1.5" translator
40*9578SSam.Cramer@Sun.COM translator scsicmd_t < scsi_task_t *T > {
41*9578SSam.Cramer@Sun.COM 	ic_len = T->task_cdb_length;
42*9578SSam.Cramer@Sun.COM 	ic_cdb = T->task_cdb;
43*9578SSam.Cramer@Sun.COM };
44