d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * CDDL HEADER START
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * The contents of this file are subject to the terms of the
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * Common Development and Distribution License (the "License").
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * You may not use this file except in compliance with the License.
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * See the License for the specific language governing permissions
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * and limitations under the License.
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * When distributing Covered Code, include this CDDL HEADER in each
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * If applicable, add the following below this CDDL HEADER, with the
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * fields enclosed by brackets "[]" replaced with your own identifying
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * information: Portions Copyright [yyyy] [name of copyright owner]
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * CDDL HEADER END
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * Use is subject to license terms.
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * The scsicmd_t structure should be used by providers
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * to represent a SCSI command block (cdb).
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramertypedef struct scsicmd {
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * Translator for scsicmd_t, translating from a scsi_task_t
a668b114487acbb725f522170849c39f8e844673Priya Krishnan * The xferinfo_t structure can be used by providers to
a668b114487acbb725f522170849c39f8e844673Priya Krishnan * represent transfer information related to a single
a668b114487acbb725f522170849c39f8e844673Priya Krishnan * buffer. The members describing the remote memory
a668b114487acbb725f522170849c39f8e844673Priya Krishnan * are only valid if the transport layer is an RDMA-
a668b114487acbb725f522170849c39f8e844673Priya Krishnan * capable transport like Infiniband
a668b114487acbb725f522170849c39f8e844673Priya Krishnantypedef struct xferinfo {
a668b114487acbb725f522170849c39f8e844673Priya Krishnan uintptr_t xfer_laddr; /* local buffer address */
a668b114487acbb725f522170849c39f8e844673Priya Krishnan uint32_t xfer_lkey; /* access control to local memory */
a668b114487acbb725f522170849c39f8e844673Priya Krishnan uintptr_t xfer_raddr; /* remote virtual address */
a668b114487acbb725f522170849c39f8e844673Priya Krishnan uint32_t xfer_roffset; /* offset from the remote address */
a668b114487acbb725f522170849c39f8e844673Priya Krishnan uint32_t xfer_rkey; /* access control to remote virtual address */
a668b114487acbb725f522170849c39f8e844673Priya Krishnan uint32_t xfer_type; /* Read (0) or Write (1) */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan * the iscsiinfo_t is used to provide identifying information about
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan * the target and the initiator and also some PDU level information
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan * such as lun, data length and sequence numbers.
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnantypedef struct iscsiinfo {
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan string ii_isid; /* initiator session identifier */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan string ii_tsih; /* target session identifying handle */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan string ii_transport; /* transport type ("iser-ib", "sockets") */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan uint64_t ii_lun; /* target logical unit number */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan uint32_t ii_cmdsn; /* command sequence number */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan uint32_t ii_statsn; /* status sequence number */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan uint32_t ii_datasn; /* data sequence number */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan uint32_t ii_datalen; /* length of data payload */
be6802e44a2dc59129ccfb75410526d5c1d023eePriya Krishnan uint32_t ii_flags; /* probe-specific flags */