iscsi_proto.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. /*
  2. * RFC 3720 (iSCSI) protocol data types
  3. *
  4. * Copyright (C) 2005 Dmitry Yusupov
  5. * Copyright (C) 2005 Alex Aizman
  6. * maintained by open-iscsi@googlegroups.com
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published
  10. * by the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * See the file COPYING included with this distribution for more details.
  19. */
  20. #ifndef ISCSI_PROTO_H
  21. #define ISCSI_PROTO_H
  22. #define ISCSI_VERSION_STR "0.3"
  23. #define ISCSI_DATE_STR "22-Apr-2005"
  24. #define ISCSI_DRAFT20_VERSION 0x00
  25. /* default iSCSI listen port for incoming connections */
  26. #define ISCSI_LISTEN_PORT 3260
  27. /* Padding word length */
  28. #define PAD_WORD_LEN 4
  29. /*
  30. * useful common(control and data pathes) macro
  31. */
  32. #define ntoh24(p) (((p)[0] << 16) | ((p)[1] << 8) | ((p)[2]))
  33. #define hton24(p, v) { \
  34. p[0] = (((v) >> 16) & 0xFF); \
  35. p[1] = (((v) >> 8) & 0xFF); \
  36. p[2] = ((v) & 0xFF); \
  37. }
  38. #define zero_data(p) {p[0]=0;p[1]=0;p[2]=0;}
  39. /*
  40. * iSCSI Template Message Header
  41. */
  42. struct iscsi_hdr {
  43. uint8_t opcode;
  44. uint8_t flags; /* Final bit */
  45. uint8_t rsvd2[2];
  46. uint8_t hlength; /* AHSs total length */
  47. uint8_t dlength[3]; /* Data length */
  48. uint8_t lun[8];
  49. __be32 itt; /* Initiator Task Tag */
  50. __be32 ttt; /* Target Task Tag */
  51. __be32 statsn;
  52. __be32 exp_statsn;
  53. uint8_t other[16];
  54. };
  55. /************************* RFC 3720 Begin *****************************/
  56. #define ISCSI_RESERVED_TAG 0xffffffff
  57. /* Opcode encoding bits */
  58. #define ISCSI_OP_RETRY 0x80
  59. #define ISCSI_OP_IMMEDIATE 0x40
  60. #define ISCSI_OPCODE_MASK 0x3F
  61. /* Initiator Opcode values */
  62. #define ISCSI_OP_NOOP_OUT 0x00
  63. #define ISCSI_OP_SCSI_CMD 0x01
  64. #define ISCSI_OP_SCSI_TMFUNC 0x02
  65. #define ISCSI_OP_LOGIN 0x03
  66. #define ISCSI_OP_TEXT 0x04
  67. #define ISCSI_OP_SCSI_DATA_OUT 0x05
  68. #define ISCSI_OP_LOGOUT 0x06
  69. #define ISCSI_OP_SNACK 0x10
  70. /* Target Opcode values */
  71. #define ISCSI_OP_NOOP_IN 0x20
  72. #define ISCSI_OP_SCSI_CMD_RSP 0x21
  73. #define ISCSI_OP_SCSI_TMFUNC_RSP 0x22
  74. #define ISCSI_OP_LOGIN_RSP 0x23
  75. #define ISCSI_OP_TEXT_RSP 0x24
  76. #define ISCSI_OP_SCSI_DATA_IN 0x25
  77. #define ISCSI_OP_LOGOUT_RSP 0x26
  78. #define ISCSI_OP_R2T 0x31
  79. #define ISCSI_OP_ASYNC_EVENT 0x32
  80. #define ISCSI_OP_REJECT 0x3f
  81. /* iSCSI PDU Header */
  82. struct iscsi_cmd {
  83. uint8_t opcode;
  84. uint8_t flags;
  85. uint8_t rsvd2;
  86. uint8_t cmdrn;
  87. uint8_t hlength;
  88. uint8_t dlength[3];
  89. uint8_t lun[8];
  90. __be32 itt; /* Initiator Task Tag */
  91. __be32 data_length;
  92. __be32 cmdsn;
  93. __be32 exp_statsn;
  94. uint8_t cdb[16]; /* SCSI Command Block */
  95. /* Additional Data (Command Dependent) */
  96. };
  97. /* Command PDU flags */
  98. #define ISCSI_FLAG_CMD_FINAL 0x80
  99. #define ISCSI_FLAG_CMD_READ 0x40
  100. #define ISCSI_FLAG_CMD_WRITE 0x20
  101. #define ISCSI_FLAG_CMD_ATTR_MASK 0x07 /* 3 bits */
  102. /* SCSI Command Attribute values */
  103. #define ISCSI_ATTR_UNTAGGED 0
  104. #define ISCSI_ATTR_SIMPLE 1
  105. #define ISCSI_ATTR_ORDERED 2
  106. #define ISCSI_ATTR_HEAD_OF_QUEUE 3
  107. #define ISCSI_ATTR_ACA 4
  108. /* SCSI Response Header */
  109. struct iscsi_cmd_rsp {
  110. uint8_t opcode;
  111. uint8_t flags;
  112. uint8_t response;
  113. uint8_t cmd_status;
  114. uint8_t hlength;
  115. uint8_t dlength[3];
  116. uint8_t rsvd[8];
  117. __be32 itt; /* Initiator Task Tag */
  118. __be32 rsvd1;
  119. __be32 statsn;
  120. __be32 exp_cmdsn;
  121. __be32 max_cmdsn;
  122. __be32 exp_datasn;
  123. __be32 bi_residual_count;
  124. __be32 residual_count;
  125. /* Response or Sense Data (optional) */
  126. };
  127. /* Command Response PDU flags */
  128. #define ISCSI_FLAG_CMD_BIDI_OVERFLOW 0x10
  129. #define ISCSI_FLAG_CMD_BIDI_UNDERFLOW 0x08
  130. #define ISCSI_FLAG_CMD_OVERFLOW 0x04
  131. #define ISCSI_FLAG_CMD_UNDERFLOW 0x02
  132. /* iSCSI Status values. Valid if Rsp Selector bit is not set */
  133. #define ISCSI_STATUS_CMD_COMPLETED 0
  134. #define ISCSI_STATUS_TARGET_FAILURE 1
  135. #define ISCSI_STATUS_SUBSYS_FAILURE 2
  136. /* Asynchronous Event Header */
  137. struct iscsi_async {
  138. uint8_t opcode;
  139. uint8_t flags;
  140. uint8_t rsvd2[2];
  141. uint8_t rsvd3;
  142. uint8_t dlength[3];
  143. uint8_t lun[8];
  144. uint8_t rsvd4[8];
  145. __be32 statsn;
  146. __be32 exp_cmdsn;
  147. __be32 max_cmdsn;
  148. uint8_t async_event;
  149. uint8_t async_vcode;
  150. __be16 param1;
  151. __be16 param2;
  152. __be16 param3;
  153. uint8_t rsvd5[4];
  154. };
  155. /* iSCSI Event Codes */
  156. #define ISCSI_ASYNC_MSG_SCSI_EVENT 0
  157. #define ISCSI_ASYNC_MSG_REQUEST_LOGOUT 1
  158. #define ISCSI_ASYNC_MSG_DROPPING_CONNECTION 2
  159. #define ISCSI_ASYNC_MSG_DROPPING_ALL_CONNECTIONS 3
  160. #define ISCSI_ASYNC_MSG_PARAM_NEGOTIATION 4
  161. #define ISCSI_ASYNC_MSG_VENDOR_SPECIFIC 255
  162. /* NOP-Out Message */
  163. struct iscsi_nopout {
  164. uint8_t opcode;
  165. uint8_t flags;
  166. __be16 rsvd2;
  167. uint8_t rsvd3;
  168. uint8_t dlength[3];
  169. uint8_t lun[8];
  170. __be32 itt; /* Initiator Task Tag */
  171. __be32 ttt; /* Target Transfer Tag */
  172. __be32 cmdsn;
  173. __be32 exp_statsn;
  174. uint8_t rsvd4[16];
  175. };
  176. /* NOP-In Message */
  177. struct iscsi_nopin {
  178. uint8_t opcode;
  179. uint8_t flags;
  180. __be16 rsvd2;
  181. uint8_t rsvd3;
  182. uint8_t dlength[3];
  183. uint8_t lun[8];
  184. __be32 itt; /* Initiator Task Tag */
  185. __be32 ttt; /* Target Transfer Tag */
  186. __be32 statsn;
  187. __be32 exp_cmdsn;
  188. __be32 max_cmdsn;
  189. uint8_t rsvd4[12];
  190. };
  191. /* SCSI Task Management Message Header */
  192. struct iscsi_tm {
  193. uint8_t opcode;
  194. uint8_t flags;
  195. uint8_t rsvd1[2];
  196. uint8_t hlength;
  197. uint8_t dlength[3];
  198. uint8_t lun[8];
  199. __be32 itt; /* Initiator Task Tag */
  200. __be32 rtt; /* Reference Task Tag */
  201. __be32 cmdsn;
  202. __be32 exp_statsn;
  203. __be32 refcmdsn;
  204. __be32 exp_datasn;
  205. uint8_t rsvd2[8];
  206. };
  207. #define ISCSI_FLAG_TASK_MGMT_FUNCTION_MASK 0x7F
  208. /* Function values */
  209. #define ISCSI_TM_FUNC_ABORT_TASK 1
  210. #define ISCSI_TM_FUNC_ABORT_TASK_SET 2
  211. #define ISCSI_TM_FUNC_CLEAR_ACA 3
  212. #define ISCSI_TM_FUNC_CLEAR_TASK_SET 4
  213. #define ISCSI_TM_FUNC_LOGICAL_UNIT_RESET 5
  214. #define ISCSI_TM_FUNC_TARGET_WARM_RESET 6
  215. #define ISCSI_TM_FUNC_TARGET_COLD_RESET 7
  216. #define ISCSI_TM_FUNC_TASK_REASSIGN 8
  217. /* SCSI Task Management Response Header */
  218. struct iscsi_tm_rsp {
  219. uint8_t opcode;
  220. uint8_t flags;
  221. uint8_t response; /* see Response values below */
  222. uint8_t qualifier;
  223. uint8_t hlength;
  224. uint8_t dlength[3];
  225. uint8_t rsvd2[8];
  226. __be32 itt; /* Initiator Task Tag */
  227. __be32 rtt; /* Reference Task Tag */
  228. __be32 statsn;
  229. __be32 exp_cmdsn;
  230. __be32 max_cmdsn;
  231. uint8_t rsvd3[12];
  232. };
  233. /* Response values */
  234. #define SCSI_TCP_TM_RESP_COMPLETE 0x00
  235. #define SCSI_TCP_TM_RESP_NO_TASK 0x01
  236. #define SCSI_TCP_TM_RESP_NO_LUN 0x02
  237. #define SCSI_TCP_TM_RESP_TASK_ALLEGIANT 0x03
  238. #define SCSI_TCP_TM_RESP_NO_FAILOVER 0x04
  239. #define SCSI_TCP_TM_RESP_NOT_SUPPORTED 0x05
  240. #define SCSI_TCP_TM_RESP_AUTH_FAILED 0x06
  241. #define SCSI_TCP_TM_RESP_REJECTED 0xff
  242. /* Ready To Transfer Header */
  243. struct iscsi_r2t_rsp {
  244. uint8_t opcode;
  245. uint8_t flags;
  246. uint8_t rsvd2[2];
  247. uint8_t hlength;
  248. uint8_t dlength[3];
  249. uint8_t lun[8];
  250. __be32 itt; /* Initiator Task Tag */
  251. __be32 ttt; /* Target Transfer Tag */
  252. __be32 statsn;
  253. __be32 exp_cmdsn;
  254. __be32 max_cmdsn;
  255. __be32 r2tsn;
  256. __be32 data_offset;
  257. __be32 data_length;
  258. };
  259. /* SCSI Data Hdr */
  260. struct iscsi_data {
  261. uint8_t opcode;
  262. uint8_t flags;
  263. uint8_t rsvd2[2];
  264. uint8_t rsvd3;
  265. uint8_t dlength[3];
  266. uint8_t lun[8];
  267. __be32 itt;
  268. __be32 ttt;
  269. __be32 rsvd4;
  270. __be32 exp_statsn;
  271. __be32 rsvd5;
  272. __be32 datasn;
  273. __be32 offset;
  274. __be32 rsvd6;
  275. /* Payload */
  276. };
  277. /* SCSI Data Response Hdr */
  278. struct iscsi_data_rsp {
  279. uint8_t opcode;
  280. uint8_t flags;
  281. uint8_t rsvd2;
  282. uint8_t cmd_status;
  283. uint8_t hlength;
  284. uint8_t dlength[3];
  285. uint8_t lun[8];
  286. __be32 itt;
  287. __be32 ttt;
  288. __be32 statsn;
  289. __be32 exp_cmdsn;
  290. __be32 max_cmdsn;
  291. __be32 datasn;
  292. __be32 offset;
  293. __be32 residual_count;
  294. };
  295. /* Data Response PDU flags */
  296. #define ISCSI_FLAG_DATA_ACK 0x40
  297. #define ISCSI_FLAG_DATA_OVERFLOW 0x04
  298. #define ISCSI_FLAG_DATA_UNDERFLOW 0x02
  299. #define ISCSI_FLAG_DATA_STATUS 0x01
  300. /* Text Header */
  301. struct iscsi_text {
  302. uint8_t opcode;
  303. uint8_t flags;
  304. uint8_t rsvd2[2];
  305. uint8_t hlength;
  306. uint8_t dlength[3];
  307. uint8_t rsvd4[8];
  308. __be32 itt;
  309. __be32 ttt;
  310. __be32 cmdsn;
  311. __be32 exp_statsn;
  312. uint8_t rsvd5[16];
  313. /* Text - key=value pairs */
  314. };
  315. #define ISCSI_FLAG_TEXT_CONTINUE 0x40
  316. /* Text Response Header */
  317. struct iscsi_text_rsp {
  318. uint8_t opcode;
  319. uint8_t flags;
  320. uint8_t rsvd2[2];
  321. uint8_t hlength;
  322. uint8_t dlength[3];
  323. uint8_t rsvd4[8];
  324. __be32 itt;
  325. __be32 ttt;
  326. __be32 statsn;
  327. __be32 exp_cmdsn;
  328. __be32 max_cmdsn;
  329. uint8_t rsvd5[12];
  330. /* Text Response - key:value pairs */
  331. };
  332. /* Login Header */
  333. struct iscsi_login {
  334. uint8_t opcode;
  335. uint8_t flags;
  336. uint8_t max_version; /* Max. version supported */
  337. uint8_t min_version; /* Min. version supported */
  338. uint8_t hlength;
  339. uint8_t dlength[3];
  340. uint8_t isid[6]; /* Initiator Session ID */
  341. __be16 tsih; /* Target Session Handle */
  342. __be32 itt; /* Initiator Task Tag */
  343. __be16 cid;
  344. __be16 rsvd3;
  345. __be32 cmdsn;
  346. __be32 exp_statsn;
  347. uint8_t rsvd5[16];
  348. };
  349. /* Login PDU flags */
  350. #define ISCSI_FLAG_LOGIN_TRANSIT 0x80
  351. #define ISCSI_FLAG_LOGIN_CONTINUE 0x40
  352. #define ISCSI_FLAG_LOGIN_CURRENT_STAGE_MASK 0x0C /* 2 bits */
  353. #define ISCSI_FLAG_LOGIN_NEXT_STAGE_MASK 0x03 /* 2 bits */
  354. #define ISCSI_LOGIN_CURRENT_STAGE(flags) \
  355. ((flags & ISCSI_FLAG_LOGIN_CURRENT_STAGE_MASK) >> 2)
  356. #define ISCSI_LOGIN_NEXT_STAGE(flags) \
  357. (flags & ISCSI_FLAG_LOGIN_NEXT_STAGE_MASK)
  358. /* Login Response Header */
  359. struct iscsi_login_rsp {
  360. uint8_t opcode;
  361. uint8_t flags;
  362. uint8_t max_version; /* Max. version supported */
  363. uint8_t active_version; /* Active version */
  364. uint8_t hlength;
  365. uint8_t dlength[3];
  366. uint8_t isid[6]; /* Initiator Session ID */
  367. __be16 tsih; /* Target Session Handle */
  368. __be32 itt; /* Initiator Task Tag */
  369. __be32 rsvd3;
  370. __be32 statsn;
  371. __be32 exp_cmdsn;
  372. __be32 max_cmdsn;
  373. uint8_t status_class; /* see Login RSP ststus classes below */
  374. uint8_t status_detail; /* see Login RSP Status details below */
  375. uint8_t rsvd4[10];
  376. };
  377. /* Login stage (phase) codes for CSG, NSG */
  378. #define ISCSI_INITIAL_LOGIN_STAGE -1
  379. #define ISCSI_SECURITY_NEGOTIATION_STAGE 0
  380. #define ISCSI_OP_PARMS_NEGOTIATION_STAGE 1
  381. #define ISCSI_FULL_FEATURE_PHASE 3
  382. /* Login Status response classes */
  383. #define ISCSI_STATUS_CLS_SUCCESS 0x00
  384. #define ISCSI_STATUS_CLS_REDIRECT 0x01
  385. #define ISCSI_STATUS_CLS_INITIATOR_ERR 0x02
  386. #define ISCSI_STATUS_CLS_TARGET_ERR 0x03
  387. /* Login Status response detail codes */
  388. /* Class-0 (Success) */
  389. #define ISCSI_LOGIN_STATUS_ACCEPT 0x00
  390. /* Class-1 (Redirection) */
  391. #define ISCSI_LOGIN_STATUS_TGT_MOVED_TEMP 0x01
  392. #define ISCSI_LOGIN_STATUS_TGT_MOVED_PERM 0x02
  393. /* Class-2 (Initiator Error) */
  394. #define ISCSI_LOGIN_STATUS_INIT_ERR 0x00
  395. #define ISCSI_LOGIN_STATUS_AUTH_FAILED 0x01
  396. #define ISCSI_LOGIN_STATUS_TGT_FORBIDDEN 0x02
  397. #define ISCSI_LOGIN_STATUS_TGT_NOT_FOUND 0x03
  398. #define ISCSI_LOGIN_STATUS_TGT_REMOVED 0x04
  399. #define ISCSI_LOGIN_STATUS_NO_VERSION 0x05
  400. #define ISCSI_LOGIN_STATUS_ISID_ERROR 0x06
  401. #define ISCSI_LOGIN_STATUS_MISSING_FIELDS 0x07
  402. #define ISCSI_LOGIN_STATUS_CONN_ADD_FAILED 0x08
  403. #define ISCSI_LOGIN_STATUS_NO_SESSION_TYPE 0x09
  404. #define ISCSI_LOGIN_STATUS_NO_SESSION 0x0a
  405. #define ISCSI_LOGIN_STATUS_INVALID_REQUEST 0x0b
  406. /* Class-3 (Target Error) */
  407. #define ISCSI_LOGIN_STATUS_TARGET_ERROR 0x00
  408. #define ISCSI_LOGIN_STATUS_SVC_UNAVAILABLE 0x01
  409. #define ISCSI_LOGIN_STATUS_NO_RESOURCES 0x02
  410. /* Logout Header */
  411. struct iscsi_logout {
  412. uint8_t opcode;
  413. uint8_t flags;
  414. uint8_t rsvd1[2];
  415. uint8_t hlength;
  416. uint8_t dlength[3];
  417. uint8_t rsvd2[8];
  418. __be32 itt; /* Initiator Task Tag */
  419. __be16 cid;
  420. uint8_t rsvd3[2];
  421. __be32 cmdsn;
  422. __be32 exp_statsn;
  423. uint8_t rsvd4[16];
  424. };
  425. /* Logout PDU flags */
  426. #define ISCSI_FLAG_LOGOUT_REASON_MASK 0x7F
  427. /* logout reason_code values */
  428. #define ISCSI_LOGOUT_REASON_CLOSE_SESSION 0
  429. #define ISCSI_LOGOUT_REASON_CLOSE_CONNECTION 1
  430. #define ISCSI_LOGOUT_REASON_RECOVERY 2
  431. #define ISCSI_LOGOUT_REASON_AEN_REQUEST 3
  432. /* Logout Response Header */
  433. struct iscsi_logout_rsp {
  434. uint8_t opcode;
  435. uint8_t flags;
  436. uint8_t response; /* see Logout response values below */
  437. uint8_t rsvd2;
  438. uint8_t hlength;
  439. uint8_t dlength[3];
  440. uint8_t rsvd3[8];
  441. __be32 itt; /* Initiator Task Tag */
  442. __be32 rsvd4;
  443. __be32 statsn;
  444. __be32 exp_cmdsn;
  445. __be32 max_cmdsn;
  446. __be32 rsvd5;
  447. __be16 t2wait;
  448. __be16 t2retain;
  449. __be32 rsvd6;
  450. };
  451. /* logout response status values */
  452. #define ISCSI_LOGOUT_SUCCESS 0
  453. #define ISCSI_LOGOUT_CID_NOT_FOUND 1
  454. #define ISCSI_LOGOUT_RECOVERY_UNSUPPORTED 2
  455. #define ISCSI_LOGOUT_CLEANUP_FAILED 3
  456. /* SNACK Header */
  457. struct iscsi_snack {
  458. uint8_t opcode;
  459. uint8_t flags;
  460. uint8_t rsvd2[14];
  461. __be32 itt;
  462. __be32 begrun;
  463. __be32 runlength;
  464. __be32 exp_statsn;
  465. __be32 rsvd3;
  466. __be32 exp_datasn;
  467. uint8_t rsvd6[8];
  468. };
  469. /* SNACK PDU flags */
  470. #define ISCSI_FLAG_SNACK_TYPE_MASK 0x0F /* 4 bits */
  471. /* Reject Message Header */
  472. struct iscsi_reject {
  473. uint8_t opcode;
  474. uint8_t flags;
  475. uint8_t reason;
  476. uint8_t rsvd2;
  477. uint8_t rsvd3;
  478. uint8_t dlength[3];
  479. uint8_t rsvd4[16];
  480. __be32 statsn;
  481. __be32 exp_cmdsn;
  482. __be32 max_cmdsn;
  483. __be32 datasn;
  484. uint8_t rsvd5[8];
  485. /* Text - Rejected hdr */
  486. };
  487. /* Reason for Reject */
  488. #define CMD_BEFORE_LOGIN 1
  489. #define DATA_DIGEST_ERROR 2
  490. #define DATA_SNACK_REJECT 3
  491. #define ISCSI_PROTOCOL_ERROR 4
  492. #define CMD_NOT_SUPPORTED 5
  493. #define IMM_CMD_REJECT 6
  494. #define TASK_IN_PROGRESS 7
  495. #define INVALID_SNACK 8
  496. #define BOOKMARK_REJECTED 9
  497. #define BOOKMARK_NO_RESOURCES 10
  498. #define NEGOTIATION_RESET 11
  499. /* Max. number of Key=Value pairs in a text message */
  500. #define MAX_KEY_VALUE_PAIRS 8192
  501. /* maximum length for text keys/values */
  502. #define KEY_MAXLEN 64
  503. #define VALUE_MAXLEN 255
  504. #define TARGET_NAME_MAXLEN VALUE_MAXLEN
  505. #define DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH 8192
  506. /************************* RFC 3720 End *****************************/
  507. #endif /* ISCSI_PROTO_H */