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