Go to the documentation of this file. 1 #ifndef ISCSI_PARAMETERS_H
2 #define ISCSI_PARAMETERS_H
51 #define IRRELEVANT "Irrelevant"
53 #define NOTUNDERSTOOD "NotUnderstood"
54 #define REJECT "Reject"
59 #define AUTHMETHOD "AuthMethod"
60 #define HEADERDIGEST "HeaderDigest"
61 #define DATADIGEST "DataDigest"
62 #define MAXCONNECTIONS "MaxConnections"
63 #define SENDTARGETS "SendTargets"
64 #define TARGETNAME "TargetName"
65 #define INITIATORNAME "InitiatorName"
66 #define TARGETALIAS "TargetAlias"
67 #define INITIATORALIAS "InitiatorAlias"
68 #define TARGETADDRESS "TargetAddress"
69 #define TARGETPORTALGROUPTAG "TargetPortalGroupTag"
70 #define INITIALR2T "InitialR2T"
71 #define IMMEDIATEDATA "ImmediateData"
72 #define MAXRECVDATASEGMENTLENGTH "MaxRecvDataSegmentLength"
73 #define MAXXMITDATASEGMENTLENGTH "MaxXmitDataSegmentLength"
74 #define MAXBURSTLENGTH "MaxBurstLength"
75 #define FIRSTBURSTLENGTH "FirstBurstLength"
76 #define DEFAULTTIME2WAIT "DefaultTime2Wait"
77 #define DEFAULTTIME2RETAIN "DefaultTime2Retain"
78 #define MAXOUTSTANDINGR2T "MaxOutstandingR2T"
79 #define DATAPDUINORDER "DataPDUInOrder"
80 #define DATASEQUENCEINORDER "DataSequenceInOrder"
81 #define ERRORRECOVERYLEVEL "ErrorRecoveryLevel"
82 #define SESSIONTYPE "SessionType"
83 #define IFMARKER "IFMarker"
84 #define OFMARKER "OFMarker"
85 #define IFMARKINT "IFMarkInt"
86 #define OFMARKINT "OFMarkInt"
87 #define X_EXTENSIONKEY "X-com.sbei.version"
88 #define X_EXTENSIONKEY_CISCO_NEW "X-com.cisco.protocol"
89 #define X_EXTENSIONKEY_CISCO_OLD "X-com.cisco.iscsi.draft"
103 #define INITIAL_AUTHMETHOD CHAP
104 #define INITIAL_HEADERDIGEST "CRC32C,None"
105 #define INITIAL_DATADIGEST "CRC32C,None"
106 #define INITIAL_MAXCONNECTIONS "1"
107 #define INITIAL_SENDTARGETS ALL
108 #define INITIAL_TARGETNAME "LIO.Target"
109 #define INITIAL_INITIATORNAME "LIO.Initiator"
110 #define INITIAL_TARGETALIAS "LIO Target"
111 #define INITIAL_INITIATORALIAS "LIO Initiator"
112 #define INITIAL_TARGETADDRESS "0.0.0.0:0000,0"
113 #define INITIAL_TARGETPORTALGROUPTAG "1"
114 #define INITIAL_INITIALR2T YES
115 #define INITIAL_IMMEDIATEDATA YES
116 #define INITIAL_MAXRECVDATASEGMENTLENGTH "8192"
120 #define INITIAL_MAXXMITDATASEGMENTLENGTH "262144"
121 #define INITIAL_MAXBURSTLENGTH "262144"
122 #define INITIAL_FIRSTBURSTLENGTH "65536"
123 #define INITIAL_DEFAULTTIME2WAIT "2"
124 #define INITIAL_DEFAULTTIME2RETAIN "20"
125 #define INITIAL_MAXOUTSTANDINGR2T "1"
126 #define INITIAL_DATAPDUINORDER YES
127 #define INITIAL_DATASEQUENCEINORDER YES
128 #define INITIAL_ERRORRECOVERYLEVEL "0"
129 #define INITIAL_SESSIONTYPE NORMAL
130 #define INITIAL_IFMARKER NO
131 #define INITIAL_OFMARKER NO
132 #define INITIAL_IFMARKINT "2048~65535"
133 #define INITIAL_OFMARKINT "2048~65535"
138 #define CRC32C "CRC32C"
143 #define DISCOVERY "Discovery"
144 #define NORMAL "Normal"
149 #define USE_LEADING_ONLY 0x01
150 #define USE_INITIAL_ONLY 0x02
153 #define IS_USE_LEADING_ONLY(p) ((p)->use & USE_LEADING_ONLY)
154 #define IS_USE_INITIAL_ONLY(p) ((p)->use & USE_INITIAL_ONLY)
155 #define IS_USE_ALL(p) ((p)->use & USE_ALL)
157 #define SET_USE_INITIAL_ONLY(p) ((p)->use |= USE_INITIAL_ONLY)
162 #define SENDER_INITIATOR 0x01
163 #define SENDER_TARGET 0x02
164 #define SENDER_BOTH 0x03
166 #define SENDER_RECEIVER 0x04
168 #define IS_SENDER_INITIATOR(p) ((p)->sender & SENDER_INITIATOR)
169 #define IS_SENDER_TARGET(p) ((p)->sender & SENDER_TARGET)
170 #define IS_SENDER_BOTH(p) ((p)->sender & SENDER_BOTH)
175 #define SCOPE_CONNECTION_ONLY 0x01
176 #define SCOPE_SESSION_WIDE 0x02
178 #define IS_SCOPE_CONNECTION_ONLY(p) ((p)->scope & SCOPE_CONNECTION_ONLY)
179 #define IS_SCOPE_SESSION_WIDE(p) ((p)->scope & SCOPE_SESSION_WIDE)
184 #define PHASE_SECURITY 0x01
185 #define PHASE_OPERATIONAL 0x02
186 #define PHASE_DECLARATIVE 0x04
187 #define PHASE_FFP0 0x08
189 #define IS_PHASE_SECURITY(p) ((p)->phase & PHASE_SECURITY)
190 #define IS_PHASE_OPERATIONAL(p) ((p)->phase & PHASE_OPERATIONAL)
191 #define IS_PHASE_DECLARATIVE(p) ((p)->phase & PHASE_DECLARATIVE)
192 #define IS_PHASE_FFP0(p) ((p)->phase & PHASE_FFP0)
197 #define TYPE_BOOL_AND 0x01
198 #define TYPE_BOOL_OR 0x02
199 #define TYPE_NUMBER 0x04
200 #define TYPE_NUMBER_RANGE 0x08
201 #define TYPE_STRING 0x10
202 #define TYPE_VALUE_LIST 0x20
204 #define IS_TYPE_BOOL_AND(p) ((p)->type & TYPE_BOOL_AND)
205 #define IS_TYPE_BOOL_OR(p) ((p)->type & TYPE_BOOL_OR)
206 #define IS_TYPE_NUMBER(p) ((p)->type & TYPE_NUMBER)
207 #define IS_TYPE_NUMBER_RANGE(p) ((p)->type & TYPE_NUMBER_RANGE)
208 #define IS_TYPE_STRING(p) ((p)->type & TYPE_STRING)
209 #define IS_TYPE_VALUE_LIST(p) ((p)->type & TYPE_VALUE_LIST)
214 #define TYPERANGE_BOOL_AND 0x0001
215 #define TYPERANGE_BOOL_OR 0x0002
216 #define TYPERANGE_0_TO_2 0x0004
217 #define TYPERANGE_0_TO_3600 0x0008
218 #define TYPERANGE_0_TO_32767 0x0010
219 #define TYPERANGE_0_TO_65535 0x0020
220 #define TYPERANGE_1_TO_65535 0x0040
221 #define TYPERANGE_2_TO_3600 0x0080
222 #define TYPERANGE_512_TO_16777215 0x0100
223 #define TYPERANGE_AUTH 0x0200
224 #define TYPERANGE_DIGEST 0x0400
225 #define TYPERANGE_ISCSINAME 0x0800
226 #define TYPERANGE_MARKINT 0x1000
227 #define TYPERANGE_SESSIONTYPE 0x2000
228 #define TYPERANGE_TARGETADDRESS 0x4000
229 #define TYPERANGE_UTF8 0x8000
231 #define IS_TYPERANGE_0_TO_2(p) ((p)->type_range & TYPERANGE_0_TO_2)
232 #define IS_TYPERANGE_0_TO_3600(p) ((p)->type_range & TYPERANGE_0_TO_3600)
233 #define IS_TYPERANGE_0_TO_32767(p) ((p)->type_range & TYPERANGE_0_TO_32767)
234 #define IS_TYPERANGE_0_TO_65535(p) ((p)->type_range & TYPERANGE_0_TO_65535)
235 #define IS_TYPERANGE_1_TO_65535(p) ((p)->type_range & TYPERANGE_1_TO_65535)
236 #define IS_TYPERANGE_2_TO_3600(p) ((p)->type_range & TYPERANGE_2_TO_3600)
237 #define IS_TYPERANGE_512_TO_16777215(p) ((p)->type_range & \
238 TYPERANGE_512_TO_16777215)
239 #define IS_TYPERANGE_AUTH_PARAM(p) ((p)->type_range & TYPERANGE_AUTH)
240 #define IS_TYPERANGE_DIGEST_PARAM(p) ((p)->type_range & TYPERANGE_DIGEST)
241 #define IS_TYPERANGE_SESSIONTYPE(p) ((p)->type_range & \
242 TYPERANGE_SESSIONTYPE)
247 #define PSTATE_ACCEPTOR 0x01
248 #define PSTATE_NEGOTIATE 0x02
249 #define PSTATE_PROPOSER 0x04
250 #define PSTATE_IRRELEVANT 0x08
251 #define PSTATE_REJECT 0x10
252 #define PSTATE_REPLY_OPTIONAL 0x20
253 #define PSTATE_RESPONSE_GOT 0x40
254 #define PSTATE_RESPONSE_SENT 0x80
256 #define IS_PSTATE_ACCEPTOR(p) ((p)->state & PSTATE_ACCEPTOR)
257 #define IS_PSTATE_NEGOTIATE(p) ((p)->state & PSTATE_NEGOTIATE)
258 #define IS_PSTATE_PROPOSER(p) ((p)->state & PSTATE_PROPOSER)
259 #define IS_PSTATE_IRRELEVANT(p) ((p)->state & PSTATE_IRRELEVANT)
260 #define IS_PSTATE_REJECT(p) ((p)->state & PSTATE_REJECT)
261 #define IS_PSTATE_REPLY_OPTIONAL(p) ((p)->state & PSTATE_REPLY_OPTIONAL)
262 #define IS_PSTATE_RESPONSE_GOT(p) ((p)->state & PSTATE_RESPONSE_GOT)
263 #define IS_PSTATE_RESPONSE_SENT(p) ((p)->state & PSTATE_RESPONSE_SENT)
265 #define SET_PSTATE_ACCEPTOR(p) ((p)->state |= PSTATE_ACCEPTOR)
266 #define SET_PSTATE_NEGOTIATE(p) ((p)->state |= PSTATE_NEGOTIATE)
267 #define SET_PSTATE_PROPOSER(p) ((p)->state |= PSTATE_PROPOSER)
268 #define SET_PSTATE_IRRELEVANT(p) ((p)->state |= PSTATE_IRRELEVANT)
269 #define SET_PSTATE_REJECT(p) ((p)->state |= PSTATE_REJECT)
270 #define SET_PSTATE_REPLY_OPTIONAL(p) ((p)->state |= PSTATE_REPLY_OPTIONAL)
271 #define SET_PSTATE_RESPONSE_GOT(p) ((p)->state |= PSTATE_RESPONSE_GOT)
272 #define SET_PSTATE_RESPONSE_SENT(p) ((p)->state |= PSTATE_RESPONSE_SENT)