Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iscsi_target_seq_pdu_list.h
Go to the documentation of this file.
1 #ifndef ISCSI_SEQ_AND_PDU_LIST_H
2 #define ISCSI_SEQ_AND_PDU_LIST_H
3 
4 /* struct iscsi_pdu->status */
5 #define DATAOUT_PDU_SENT 1
6 
7 /* struct iscsi_seq->type */
8 #define SEQTYPE_IMMEDIATE 1
9 #define SEQTYPE_UNSOLICITED 2
10 #define SEQTYPE_NORMAL 3
11 
12 /* struct iscsi_seq->status */
13 #define DATAOUT_SEQUENCE_GOT_R2T 1
14 #define DATAOUT_SEQUENCE_WITHIN_COMMAND_RECOVERY 2
15 #define DATAOUT_SEQUENCE_COMPLETE 3
16 
17 /* iscsi_determine_counts_for_list() type */
18 #define PDULIST_NORMAL 1
19 #define PDULIST_IMMEDIATE 2
20 #define PDULIST_UNSOLICITED 3
21 #define PDULIST_IMMEDIATE_AND_UNSOLICITED 4
22 
23 /* struct iscsi_pdu->type */
24 #define PDUTYPE_IMMEDIATE 1
25 #define PDUTYPE_UNSOLICITED 2
26 #define PDUTYPE_NORMAL 3
27 
28 /* struct iscsi_pdu->status */
29 #define ISCSI_PDU_NOT_RECEIVED 0
30 #define ISCSI_PDU_RECEIVED_OK 1
31 #define ISCSI_PDU_CRC_FAILED 2
32 #define ISCSI_PDU_TIMED_OUT 3
33 
34 /* struct iscsi_build_list->randomize */
35 #define RANDOM_DATAIN_PDU_OFFSETS 0x01
36 #define RANDOM_DATAIN_SEQ_OFFSETS 0x02
37 #define RANDOM_DATAOUT_PDU_OFFSETS 0x04
38 #define RANDOM_R2T_OFFSETS 0x08
39 
40 /* struct iscsi_build_list->data_direction */
41 #define ISCSI_PDU_READ 0x01
42 #define ISCSI_PDU_WRITE 0x02
43 
46  int randomize;
47  int type;
49 };
50 
51 struct iscsi_pdu {
52  int status;
53  int type;
61 
62 struct iscsi_seq {
63  int sent;
64  int status;
65  int type;
80 
81 extern int iscsit_build_pdu_and_seq_lists(struct iscsi_cmd *, u32);
82 extern struct iscsi_pdu *iscsit_get_pdu_holder(struct iscsi_cmd *, u32, u32);
83 extern struct iscsi_pdu *iscsit_get_pdu_holder_for_seq(struct iscsi_cmd *, struct iscsi_seq *);
84 extern struct iscsi_seq *iscsit_get_seq_holder(struct iscsi_cmd *, u32, u32);
85 
86 #endif /* ISCSI_SEQ_AND_PDU_LIST_H */