diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-05-29 01:49:09 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-05-29 01:49:09 +0000 |
commit | 63a618724a7bd827276adab538ec2a0e17156b18 (patch) | |
tree | b495b31027806560c192e9e071c622e070a25c59 /epan/dissectors/packet-iscsi.c | |
parent | 99bc3292f20037ed04ca6fd648709a4cda4f335e (diff) |
update iscsi so that when we have ImmediateData we also call SCSI to decode the
payload (DATAOUT) and not just the scsi CDB.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14469 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-iscsi.c')
-rw-r--r-- | epan/dissectors/packet-iscsi.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index 62fcb3b7e1..cb0ee678a7 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -862,6 +862,8 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off scsi_task_id_t task_key; int paddedDataSegmentLength = data_segment_len; guint16 lun=0xffff; + guint immediate_data_length=0; + guint immediate_data_offset=0; if(paddedDataSegmentLength & 3) paddedDataSegmentLength += 4 - (paddedDataSegmentLength & 3); @@ -1149,7 +1151,9 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off } offset = handleHeaderDigest(iscsi_session, ti, tvb, offset, 48 + ahsLen); } + immediate_data_offset=offset; offset = handleDataSegment(ti, tvb, offset, data_segment_len, end_offset, hf_iscsi_immediate_data); + immediate_data_length=offset-immediate_data_offset; } else if(opcode == ISCSI_OPCODE_SCSI_RESPONSE) { /* SCSI Response */ { @@ -1681,6 +1685,17 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off /* SCSI Command */ dissect_scsi_cdb (tvb, pinfo, tree, cdb_offset, 16, SCSI_DEV_UNKNOWN, lun); + /* we dont want the immediata below to overwrite our CDB info */ + if (check_col(pinfo->cinfo, COL_INFO)) { + col_set_fence(pinfo->cinfo, COL_INFO); + } + /* where there any ImmediateData ? */ + if(immediate_data_length){ + dissect_scsi_payload (tvb, pinfo, tree, immediate_data_offset, + TRUE, + immediate_data_length, + lun ); + } } else if (opcode == ISCSI_OPCODE_SCSI_RESPONSE) { if (scsi_status == 0x2) { |