2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#pragma D depends_on module genunix
2N/A#pragma D depends_on module stmf
2N/A
2N/A/*
2N/A * The scsicmd_t structure should be used by providers
2N/A * to represent a SCSI command block (cdb).
2N/A */
2N/Atypedef struct scsicmd {
2N/A uint64_t ic_len; /* CDB length */
2N/A uint8_t *ic_cdb; /* CDB data */
2N/A} scsicmd_t;
2N/A
2N/A/*
2N/A * Translator for scsicmd_t, translating from a scsi_task_t
2N/A */
2N/A#pragma D binding "1.5" translator
2N/Atranslator scsicmd_t < scsi_task_t *T > {
2N/A ic_len = T->task_cdb_length;
2N/A ic_cdb = T->task_cdb;
2N/A};
2N/A
2N/A/*
2N/A * The xferinfo_t structure can be used by providers to
2N/A * represent transfer information related to a single
2N/A * buffer. The members describing the remote memory
2N/A * are only valid if the transport layer is an RDMA-
2N/A * capable transport like Infiniband
2N/A */
2N/Atypedef struct xferinfo {
2N/A uintptr_t xfer_laddr; /* local buffer address */
2N/A uint32_t xfer_loffset;
2N/A uint32_t xfer_lkey; /* access control to local memory */
2N/A uintptr_t xfer_raddr; /* remote virtual address */
2N/A uint32_t xfer_roffset; /* offset from the remote address */
2N/A uint32_t xfer_rkey; /* access control to remote virtual address */
2N/A uint32_t xfer_len; /* transfer length */
2N/A uint32_t xfer_type; /* Read (0) or Write (1) */
2N/A} xferinfo_t;
2N/A
2N/A/*
2N/A * the iscsiinfo_t is used to provide identifying information about
2N/A * the target and the initiator and also some PDU level information
2N/A * such as lun, data length and sequence numbers.
2N/A */
2N/Atypedef struct iscsiinfo {
2N/A string ii_target; /* target iqn */
2N/A string ii_initiator; /* initiator iqn */
2N/A string ii_isid; /* initiator session identifier */
2N/A string ii_tsih; /* target session identifying handle */
2N/A string ii_transport; /* transport type ("iser-ib", "sockets") */
2N/A
2N/A uint64_t ii_lun; /* target logical unit number */
2N/A
2N/A uint32_t ii_itt; /* initiator task tag */
2N/A uint32_t ii_ttt; /* target transfer tag */
2N/A
2N/A uint32_t ii_cmdsn; /* command sequence number */
2N/A uint32_t ii_statsn; /* status sequence number */
2N/A uint32_t ii_datasn; /* data sequence number */
2N/A
2N/A uint32_t ii_datalen; /* length of data payload */
2N/A uint32_t ii_flags; /* probe-specific flags */
2N/A} iscsiinfo_t;