From Mark Burton: reinstate data segment digest handling, and stop the
SCSI dissector from treating data digests as payload. svn path=/trunk/; revision=4552
This commit is contained in:
parent
06348ee4e0
commit
704493f4e2
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Conforms to the protocol described in: draft-ietf-ips-iscsi-08.txt
|
||||
*
|
||||
* $Id: packet-iscsi.c,v 1.19 2002/01/10 01:28:43 guy Exp $
|
||||
* $Id: packet-iscsi.c,v 1.20 2002/01/16 20:25:07 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -669,6 +669,9 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
conversation_t *conversation = NULL;
|
||||
iscsi_conv_data_t *cdata = NULL;
|
||||
iscsi_conv_key_t ckey, *req_key;
|
||||
int paddedDataSegmentLength = data_segment_len;
|
||||
if(paddedDataSegmentLength & 3)
|
||||
paddedDataSegmentLength += 4 - (paddedDataSegmentLength & 3);
|
||||
|
||||
/* Make entries in Protocol column and Info column on summary display */
|
||||
if (check_col(pinfo->cinfo, COL_PROTOCOL))
|
||||
|
@ -861,6 +864,9 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
proto_tree_add_item(ti, hf_iscsi_ExpDataSN, tvb, offset + 36, 4, FALSE);
|
||||
proto_tree_add_item(ti, hf_iscsi_SCSIResponse_BidiReadResidualCount, tvb, offset + 44, 4, FALSE);
|
||||
offset = handleHeaderDigest(ti, tvb, offset, 48);
|
||||
/* do not update offset here because the data segment is
|
||||
* dissected below */
|
||||
handleDataDigest(ti, tvb, offset, paddedDataSegmentLength);
|
||||
}
|
||||
else if(opcode == ISCSI_OPCODE_TASK_MANAGEMENT_FUNCTION) {
|
||||
/* Task Management Function */
|
||||
|
@ -1003,6 +1009,9 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
proto_tree_add_item(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, FALSE);
|
||||
proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE);
|
||||
offset = handleHeaderDigest(ti, tvb, offset, 48);
|
||||
/* do not update offset here because the data segment is
|
||||
* dissected below */
|
||||
handleDataDigest(ti, tvb, offset, paddedDataSegmentLength);
|
||||
}
|
||||
else if(opcode == ISCSI_OPCODE_SCSI_DATA_IN) {
|
||||
/* SCSI Data In (read) */
|
||||
|
@ -1026,6 +1035,9 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
proto_tree_add_item(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, FALSE);
|
||||
proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE);
|
||||
offset = handleHeaderDigest(ti, tvb, offset, 48);
|
||||
/* do not update offset here because the data segment is
|
||||
* dissected below */
|
||||
handleDataDigest(ti, tvb, offset, paddedDataSegmentLength);
|
||||
}
|
||||
else if(opcode == ISCSI_OPCODE_LOGOUT_COMMAND) {
|
||||
/* Logout Command */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for decoding SCSI CDBs and responses
|
||||
* Author: Dinesh G Dutt (ddutt@cisco.com)
|
||||
*
|
||||
* $Id: packet-scsi.c,v 1.1 2002/01/10 01:28:43 guy Exp $
|
||||
* $Id: packet-scsi.c,v 1.2 2002/01/16 20:25:07 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -2055,7 +2055,7 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (tree) {
|
||||
if (cmd == SCSI_CMND_SPC2) {
|
||||
ti = proto_tree_add_protocol_format (tree, proto_scsi, tvb, offset,
|
||||
tvb_length (tvb),
|
||||
payload_len,
|
||||
"SCSI Payload (%s %s)",
|
||||
val_to_str (opcode,
|
||||
scsi_spc2_val,
|
||||
|
@ -2064,7 +2064,7 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
else if (cmd == SCSI_CMND_SBC2) {
|
||||
ti = proto_tree_add_protocol_format (tree, proto_scsi, tvb, offset,
|
||||
tvb_length (tvb),
|
||||
payload_len,
|
||||
"SCSI Payload (%s %s)",
|
||||
val_to_str (opcode,
|
||||
scsi_sbc2_val,
|
||||
|
@ -2073,7 +2073,7 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
else {
|
||||
ti = proto_tree_add_protocol_format (tree, proto_scsi, tvb, offset,
|
||||
tvb_length (tvb),
|
||||
payload_len,
|
||||
"SCSI Payload (0x%02x %s)",
|
||||
opcode,
|
||||
isreq ? "Request" : "Response");
|
||||
|
|
Loading…
Reference in New Issue