include/scsi/iscsi_proto.h
Source file repositories/reference/linux-study-clean/include/scsi/iscsi_proto.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/iscsi_proto.h- Extension
.h- Size
- 15915 bytes
- Lines
- 658
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hscsi/scsi.h
Detected Declarations
struct iscsi_hdrstruct iscsi_ahs_hdrstruct iscsi_scsi_reqstruct iscsi_rlength_ahdrstruct iscsi_ecdb_ahdrstruct iscsi_scsi_rspstruct iscsi_asyncstruct iscsi_nopoutstruct iscsi_nopinstruct iscsi_tmstruct iscsi_tm_rspstruct iscsi_r2t_rspstruct iscsi_datastruct iscsi_data_rspstruct iscsi_textstruct iscsi_text_rspstruct iscsi_login_reqstruct iscsi_login_rspstruct iscsi_logoutstruct iscsi_logout_rspstruct iscsi_snackstruct iscsi_rejectfunction Copyrightfunction iscsi_sna_ltefunction iscsi_sna_gtfunction iscsi_sna_gtefunction common
Annotated Snippet
struct iscsi_hdr {
uint8_t opcode;
uint8_t flags; /* Final bit */
uint8_t rsvd2[2];
uint8_t hlength; /* AHSs total length */
uint8_t dlength[3]; /* Data length */
struct scsi_lun lun;
itt_t itt; /* Initiator Task Tag, opaque for target */
__be32 ttt; /* Target Task Tag */
__be32 statsn;
__be32 exp_statsn;
__be32 max_statsn;
uint8_t other[12];
};
/************************* RFC 3720 Begin *****************************/
#define ISCSI_RESERVED_TAG 0xffffffff
/* Opcode encoding bits */
#define ISCSI_OP_RETRY 0x80
#define ISCSI_OP_IMMEDIATE 0x40
#define ISCSI_OPCODE_MASK 0x3F
/* Initiator Opcode values */
#define ISCSI_OP_NOOP_OUT 0x00
#define ISCSI_OP_SCSI_CMD 0x01
#define ISCSI_OP_SCSI_TMFUNC 0x02
#define ISCSI_OP_LOGIN 0x03
#define ISCSI_OP_TEXT 0x04
#define ISCSI_OP_SCSI_DATA_OUT 0x05
#define ISCSI_OP_LOGOUT 0x06
#define ISCSI_OP_SNACK 0x10
#define ISCSI_OP_VENDOR1_CMD 0x1c
#define ISCSI_OP_VENDOR2_CMD 0x1d
#define ISCSI_OP_VENDOR3_CMD 0x1e
#define ISCSI_OP_VENDOR4_CMD 0x1f
/* Target Opcode values */
#define ISCSI_OP_NOOP_IN 0x20
#define ISCSI_OP_SCSI_CMD_RSP 0x21
#define ISCSI_OP_SCSI_TMFUNC_RSP 0x22
#define ISCSI_OP_LOGIN_RSP 0x23
#define ISCSI_OP_TEXT_RSP 0x24
#define ISCSI_OP_SCSI_DATA_IN 0x25
#define ISCSI_OP_LOGOUT_RSP 0x26
#define ISCSI_OP_R2T 0x31
#define ISCSI_OP_ASYNC_EVENT 0x32
#define ISCSI_OP_REJECT 0x3f
struct iscsi_ahs_hdr {
__be16 ahslength;
uint8_t ahstype;
uint8_t ahspec[5];
};
#define ISCSI_AHSTYPE_CDB 1
#define ISCSI_AHSTYPE_RLENGTH 2
#define ISCSI_CDB_SIZE 16
/* iSCSI PDU Header */
struct iscsi_scsi_req {
uint8_t opcode;
uint8_t flags;
__be16 rsvd2;
uint8_t hlength;
uint8_t dlength[3];
struct scsi_lun lun;
itt_t itt; /* Initiator Task Tag */
__be32 data_length;
__be32 cmdsn;
__be32 exp_statsn;
uint8_t cdb[ISCSI_CDB_SIZE]; /* SCSI Command Block */
/* Additional Data (Command Dependent) */
};
/* Command PDU flags */
#define ISCSI_FLAG_CMD_FINAL 0x80
#define ISCSI_FLAG_CMD_READ 0x40
#define ISCSI_FLAG_CMD_WRITE 0x20
#define ISCSI_FLAG_CMD_ATTR_MASK 0x07 /* 3 bits */
/* SCSI Command Attribute values */
#define ISCSI_ATTR_UNTAGGED 0
#define ISCSI_ATTR_SIMPLE 1
#define ISCSI_ATTR_ORDERED 2
#define ISCSI_ATTR_HEAD_OF_QUEUE 3
#define ISCSI_ATTR_ACA 4
Annotation
- Immediate include surface: `linux/types.h`, `scsi/scsi.h`.
- Detected declarations: `struct iscsi_hdr`, `struct iscsi_ahs_hdr`, `struct iscsi_scsi_req`, `struct iscsi_rlength_ahdr`, `struct iscsi_ecdb_ahdr`, `struct iscsi_scsi_rsp`, `struct iscsi_async`, `struct iscsi_nopout`, `struct iscsi_nopin`, `struct iscsi_tm`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.