rename hte itlq structures to itlq

svn path=/trunk/; revision=17922
This commit is contained in:
Ronnie Sahlberg 2006-04-20 09:43:56 +00:00
parent a72d39bb05
commit 2b2f2e3f03
5 changed files with 45 additions and 45 deletions

View File

@ -599,7 +599,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
fcseq_conv_data_t *cdata;
fcseq_conv_key_t ckey, *req_key;
fchdr.fced=NULL;
fchdr.itlq=NULL;
/* Make entries in Protocol column and Info column on summary display */
if (check_col(pinfo->cinfo, COL_PROTOCOL))
@ -717,7 +717,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
PROTO_ITEM_SET_GENERATED(it);
}
fchdr.fced=fc_ex;
fchdr.itlq=fc_ex;
is_ack = ((fchdr.r_ctl == 0xC0) || (fchdr.r_ctl == 0xC1));

View File

@ -149,7 +149,7 @@ typedef struct _fc_hdr {
guint16 rxid;
guint8 r_ctl;
guint8 cs_ctl;
itlq_nexus_t *fced;
itlq_nexus_t *itlq;
} fc_hdr;
#endif /* __PACKET_FC_H_ */

View File

@ -431,7 +431,7 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
lun|=tvb_get_guint8(tvb, offset+1);
}
else {
fchdr->fced->lun=tvb_get_guint8 (tvb, offset+1);
fchdr->itlq->lun=tvb_get_guint8 (tvb, offset+1);
proto_tree_add_item(tree, hf_fcp_singlelun, tvb, offset+1,
1, 0);
lun=tvb_get_guint8(tvb, offset+1);
@ -466,7 +466,7 @@ dissect_fcp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, con
task_key.task_id = conversation->index;
pinfo->private_data = (void *)&task_key;
dissect_scsi_payload(tvb, pinfo, parent_tree, FALSE, fchdr->fced->lun);
dissect_scsi_payload(tvb, pinfo, parent_tree, FALSE, fchdr->itlq->lun);
}
/* fcp-3 9.5 table 24 */
@ -522,7 +522,7 @@ dissect_fcp_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, prot
/* scsi status code */
proto_tree_add_item(tree, hf_fcp_scsistatus, tvb, offset, 1, 0);
dissect_scsi_rsp(tvb, pinfo, parent_tree, fchdr->fced, tvb_get_guint8(tvb, offset));
dissect_scsi_rsp(tvb, pinfo, parent_tree, fchdr->itlq, tvb_get_guint8(tvb, offset));
offset++;
/* residual count */
@ -564,7 +564,7 @@ dissect_fcp_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, prot
sns_tvb=tvb_new_subset(tvb, offset, MIN(snslen, tvb_length_remaining(tvb, offset)), snslen);
dissect_scsi_snsinfo (sns_tvb, pinfo, parent_tree, 0,
snslen,
fchdr->fced->lun);
fchdr->itlq->lun);
offset+=snslen;
}
@ -641,24 +641,24 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* put a request_in in all frames except the command frame */
if((r_ctl!=FCP_IU_CMD)&&(fchdr->fced->first_exchange_frame)){
if((r_ctl!=FCP_IU_CMD)&&(fchdr->itlq->first_exchange_frame)){
proto_item *it;
it=proto_tree_add_uint(fcp_tree, hf_fcp_singlelun, tvb, 0, 0, fchdr->fced->lun);
it=proto_tree_add_uint(fcp_tree, hf_fcp_singlelun, tvb, 0, 0, fchdr->itlq->lun);
PROTO_ITEM_SET_GENERATED(it);
it=proto_tree_add_uint(fcp_tree, hf_fcp_request_in, tvb, 0, 0, fchdr->fced->first_exchange_frame);
it=proto_tree_add_uint(fcp_tree, hf_fcp_request_in, tvb, 0, 0, fchdr->itlq->first_exchange_frame);
PROTO_ITEM_SET_GENERATED(it);
/* only put the response time in the actual response frame */
if(r_ctl==FCP_IU_RSP){
nstime_t delta_ts;
nstime_delta(&delta_ts, &pinfo->fd->abs_ts, &fchdr->fced->fc_time);
nstime_delta(&delta_ts, &pinfo->fd->abs_ts, &fchdr->itlq->fc_time);
it=proto_tree_add_time(ti, hf_fcp_time, tvb, 0, 0, &delta_ts);
PROTO_ITEM_SET_GENERATED(it);
}
}
/* put a response_in in all frames except the response frame */
if((r_ctl!=FCP_IU_RSP)&&(fchdr->fced->last_exchange_frame)){
if((r_ctl!=FCP_IU_RSP)&&(fchdr->itlq->last_exchange_frame)){
proto_item *it;
it=proto_tree_add_uint(fcp_tree, hf_fcp_response_in, tvb, 0, 0, fchdr->fced->last_exchange_frame);
it=proto_tree_add_uint(fcp_tree, hf_fcp_response_in, tvb, 0, 0, fchdr->itlq->last_exchange_frame);
PROTO_ITEM_SET_GENERATED(it);
}

View File

@ -615,7 +615,7 @@ calculateCRC32(const void *buf, int len, guint32 crc) {
typedef struct _iscsi_conv_data {
guint32 data_in_frame;
guint32 data_out_frame;
itlq_nexus_t scsi_ed;
itlq_nexus_t itlq;
} iscsi_conv_data_t;
static int
@ -754,11 +754,11 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
cdata=(iscsi_conv_data_t *)se_tree_lookup32(iscsi_session->exchanges, tvb_get_ntohl(tvb, offset+16));
if(!cdata){
cdata = se_alloc (sizeof(iscsi_conv_data_t));
cdata->scsi_ed.lun=0xffff;
cdata->scsi_ed.scsi_opcode=0xffff;
cdata->scsi_ed.fc_time = pinfo->fd->abs_ts;
cdata->scsi_ed.first_exchange_frame=0;
cdata->scsi_ed.last_exchange_frame=0;
cdata->itlq.lun=0xffff;
cdata->itlq.scsi_opcode=0xffff;
cdata->itlq.fc_time = pinfo->fd->abs_ts;
cdata->itlq.first_exchange_frame=0;
cdata->itlq.last_exchange_frame=0;
cdata->data_in_frame=0;
cdata->data_out_frame=0;
@ -776,12 +776,12 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
/* first time we see this packet. check if we can find the request */
switch(opcode){
case ISCSI_OPCODE_SCSI_RESPONSE:
cdata->scsi_ed.last_exchange_frame=pinfo->fd->num;
cdata->itlq.last_exchange_frame=pinfo->fd->num;
break;
case ISCSI_OPCODE_SCSI_DATA_IN:
/* a bit ugly but we need to check the S bit here */
if(tvb_get_guint8(tvb, offset+1)&ISCSI_SCSI_DATA_FLAG_S){
cdata->scsi_ed.last_exchange_frame=pinfo->fd->num;
cdata->itlq.last_exchange_frame=pinfo->fd->num;
}
cdata->data_in_frame=pinfo->fd->num;
break;
@ -816,8 +816,8 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
lun=tvb_get_guint8(tvb,offset+9);
}
cdata->scsi_ed.lun=lun;
cdata->scsi_ed.first_exchange_frame=pinfo->fd->num;
cdata->itlq.lun=lun;
cdata->itlq.first_exchange_frame=pinfo->fd->num;
/* The SCSI protocol uses this as the key to detect a
* SCSI-level conversation. */
@ -1428,10 +1428,10 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
/* handle request/response matching */
switch(opcode){
case ISCSI_OPCODE_SCSI_RESPONSE:
if (cdata->scsi_ed.first_exchange_frame){
if (cdata->itlq.first_exchange_frame){
nstime_t delta_time;
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->scsi_ed.first_exchange_frame);
nstime_delta(&delta_time, &pinfo->fd->abs_ts, &cdata->scsi_ed.fc_time);
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->itlq.first_exchange_frame);
nstime_delta(&delta_time, &pinfo->fd->abs_ts, &cdata->itlq.fc_time);
proto_tree_add_time(ti, hf_iscsi_time, tvb, 0, 0, &delta_time);
}
if (cdata->data_in_frame)
@ -1443,15 +1443,15 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
/* if we have phase collaps then we might have the
response embedded in the last DataIn segment */
if(!S_bit){
if (cdata->scsi_ed.first_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->scsi_ed.first_exchange_frame);
if (cdata->scsi_ed.last_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_response_frame, tvb, 0, 0, cdata->scsi_ed.last_exchange_frame);
if (cdata->itlq.first_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->itlq.first_exchange_frame);
if (cdata->itlq.last_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_response_frame, tvb, 0, 0, cdata->itlq.last_exchange_frame);
} else {
if (cdata->scsi_ed.first_exchange_frame){
if (cdata->itlq.first_exchange_frame){
nstime_t delta_time;
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->scsi_ed.first_exchange_frame);
nstime_delta(&delta_time, &pinfo->fd->abs_ts, &cdata->scsi_ed.fc_time);
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->itlq.first_exchange_frame);
nstime_delta(&delta_time, &pinfo->fd->abs_ts, &cdata->itlq.fc_time);
proto_tree_add_time(ti, hf_iscsi_time, tvb, 0, 0, &delta_time);
}
}
@ -1459,20 +1459,20 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
proto_tree_add_uint(ti, hf_iscsi_data_out_frame, tvb, 0, 0, cdata->data_out_frame);
break;
case ISCSI_OPCODE_SCSI_DATA_OUT:
if (cdata->scsi_ed.first_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->scsi_ed.first_exchange_frame);
if (cdata->itlq.first_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_request_frame, tvb, 0, 0, cdata->itlq.first_exchange_frame);
if (cdata->data_in_frame)
proto_tree_add_uint(ti, hf_iscsi_data_in_frame, tvb, 0, 0, cdata->data_in_frame);
if (cdata->scsi_ed.last_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_response_frame, tvb, 0, 0, cdata->scsi_ed.last_exchange_frame);
if (cdata->itlq.last_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_response_frame, tvb, 0, 0, cdata->itlq.last_exchange_frame);
break;
case ISCSI_OPCODE_SCSI_COMMAND:
if (cdata->data_in_frame)
proto_tree_add_uint(ti, hf_iscsi_data_in_frame, tvb, 0, 0, cdata->data_in_frame);
if (cdata->data_out_frame)
proto_tree_add_uint(ti, hf_iscsi_data_out_frame, tvb, 0, 0, cdata->data_out_frame);
if (cdata->scsi_ed.last_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_response_frame, tvb, 0, 0, cdata->scsi_ed.last_exchange_frame);
if (cdata->itlq.last_exchange_frame)
proto_tree_add_uint(ti, hf_iscsi_response_frame, tvb, 0, 0, cdata->itlq.last_exchange_frame);
break;
}
@ -1536,12 +1536,12 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
data_tvb=tvb_new_subset(tvb, offset, tvb_len, tvb_rlen);
dissect_scsi_snsinfo (data_tvb, pinfo, tree, 0,
tvb_len,
cdata->scsi_ed.lun);
cdata->itlq.lun);
}
}
}
else {
dissect_scsi_rsp(tvb, pinfo, tree, &cdata->scsi_ed, scsi_status);
dissect_scsi_rsp(tvb, pinfo, tree, &cdata->itlq, scsi_status);
}
}
else if ((opcode == ISCSI_OPCODE_SCSI_DATA_IN) ||
@ -1559,11 +1559,11 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
data_tvb=tvb_new_subset(tvb, offset, tvb_len, tvb_rlen);
dissect_scsi_payload (data_tvb, pinfo, tree,
(opcode==ISCSI_OPCODE_SCSI_DATA_OUT),
cdata->scsi_ed.lun);
cdata->itlq.lun);
}
if(S_bit){
dissect_scsi_rsp(tvb, pinfo, tree, &cdata->scsi_ed, scsi_status);
dissect_scsi_rsp(tvb, pinfo, tree, &cdata->itlq, scsi_status);
}
}

View File

@ -92,11 +92,11 @@ fcstat_packet(void *pfc, packet_info *pinfo, epan_dissect_t *edt _U_, const void
return 0;
}
/* if we havnt seen the request, just ignore it */
if( (!fc->fced) || (fc->fced->first_exchange_frame==0) ){
if( (!fc->itlq) || (fc->itlq->first_exchange_frame==0) ){
return 0;
}
add_srt_table_data(&fs->fc_srt_table, fc->type, &fc->fced->fc_time, pinfo);
add_srt_table_data(&fs->fc_srt_table, fc->type, &fc->itlq->fc_time, pinfo);
return 1;
}