remove offset and len from the signature of dissect_scsi_payload()
svn path=/trunk/; revision=14473
This commit is contained in:
parent
e66ff913ff
commit
aa7157462c
|
@ -399,10 +399,10 @@ dissect_fcp_data (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_uint_hidden (fcp_tree, hf_fcp_singlelun, tvb,
|
||||
0, 0, cdata->fcp_lun);
|
||||
|
||||
dissect_scsi_payload (tvb, pinfo, tree, 0, FALSE, cdata->fcp_dl, (guint16) cdata->fcp_lun);
|
||||
dissect_scsi_payload (tvb, pinfo, tree, FALSE, (guint16) cdata->fcp_lun);
|
||||
}
|
||||
else {
|
||||
dissect_scsi_payload (tvb, pinfo, tree, 0, FALSE, 0, 0xffff);
|
||||
dissect_scsi_payload (tvb, pinfo, tree, FALSE, 0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1708,9 +1708,8 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
if(tvb_rlen>(int)immediate_data_length)
|
||||
tvb_rlen=immediate_data_length;
|
||||
data_tvb=tvb_new_subset(tvb, immediate_data_offset, tvb_len, tvb_rlen);
|
||||
dissect_scsi_payload (data_tvb, pinfo, tree, 0,
|
||||
dissect_scsi_payload (data_tvb, pinfo, tree,
|
||||
TRUE,
|
||||
immediate_data_length,
|
||||
lun );
|
||||
}
|
||||
}
|
||||
|
@ -1758,9 +1757,8 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
if(tvb_rlen>(int)data_segment_len)
|
||||
tvb_rlen=data_segment_len;
|
||||
data_tvb=tvb_new_subset(tvb, offset, tvb_len, tvb_rlen);
|
||||
dissect_scsi_payload (data_tvb, pinfo, tree, 0,
|
||||
dissect_scsi_payload (data_tvb, pinfo, tree,
|
||||
(opcode==ISCSI_OPCODE_SCSI_DATA_OUT),
|
||||
tvb_len,
|
||||
(guint16) (cdata?cdata->lun:0xffff) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1147,8 +1147,19 @@ dissect_execute_cdb_payload(tvbuff_t *tvb, int offset, packet_info *pinfo, proto
|
|||
offset += 4;
|
||||
|
||||
if (payload_len != 0) {
|
||||
dissect_scsi_payload(tvb, pinfo, tree, offset, isreq,
|
||||
payload_len, 0xffff);
|
||||
tvbuff_t *data_tvb;
|
||||
int tvb_len, tvb_rlen;
|
||||
|
||||
tvb_len=tvb_length_remaining(tvb, offset);
|
||||
if(tvb_len>(int)payload_len)
|
||||
tvb_len=payload_len;
|
||||
tvb_rlen=tvb_reported_length_remaining(tvb, offset);
|
||||
if(tvb_rlen>(int)payload_len)
|
||||
tvb_rlen=payload_len;
|
||||
data_tvb=tvb_new_subset(tvb, offset, tvb_len, tvb_rlen);
|
||||
|
||||
dissect_scsi_payload(data_tvb, pinfo, tree, isreq,
|
||||
0xffff);
|
||||
offset += payload_len_full;
|
||||
}
|
||||
|
||||
|
|
|
@ -6460,15 +6460,17 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
void
|
||||
dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
guint offset, gboolean isreq, guint32 payload_len,
|
||||
guint16 lun)
|
||||
gboolean isreq, guint16 lun)
|
||||
{
|
||||
int offset=0;
|
||||
proto_item *ti;
|
||||
proto_tree *scsi_tree = NULL;
|
||||
guint8 opcode = 0xFF;
|
||||
scsi_device_type devtype;
|
||||
scsi_task_data_t *cdata = NULL;
|
||||
int payload_len;
|
||||
|
||||
payload_len=tvb_length(tvb);
|
||||
cdata = scsi_find_task (pinfo);
|
||||
|
||||
if (!cdata) {
|
||||
|
|
|
@ -65,8 +65,8 @@ extern const value_string scsi_status_val[];
|
|||
void dissect_scsi_cdb (tvbuff_t *, packet_info *, proto_tree *,
|
||||
gint, guint16);
|
||||
void dissect_scsi_rsp (tvbuff_t *, packet_info *, proto_tree *, guint16, guint8);
|
||||
void dissect_scsi_payload (tvbuff_t *, packet_info *, proto_tree *, guint,
|
||||
gboolean, guint32, guint16);
|
||||
void dissect_scsi_payload (tvbuff_t *, packet_info *, proto_tree *,
|
||||
gboolean, guint16);
|
||||
void dissect_scsi_snsinfo (tvbuff_t *, packet_info *, proto_tree *, guint, guint, guint16);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue