aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-04-22 10:31:30 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-04-22 10:31:30 +0000
commit72adb198109cd9a33cbb862be11ce7a3a6b2a3dc (patch)
tree2bbe8737f7e00d893ba70c293b81ea7bba299ed6
parente09c0cde8c2343b799abf69be1797242cb6b6a6c (diff)
put some exchange tracking info in scsi CDBs and DATA pdus
svn path=/trunk/; revision=17957
-rw-r--r--epan/dissectors/packet-scsi.c54
1 files changed, 36 insertions, 18 deletions
diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c
index adf24ae0cf..0bbe036b1d 100644
--- a/epan/dissectors/packet-scsi.c
+++ b/epan/dissectors/packet-scsi.c
@@ -7737,20 +7737,25 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
"0x%02x")
);
scsi_tree = proto_item_add_subtree (ti, ett_scsi);
+ }
- ti=proto_tree_add_uint(scsi_tree, hf_scsi_lun, tvb, 0, 0, itlq->lun);
- PROTO_ITEM_SET_GENERATED(ti);
+ ti=proto_tree_add_uint(scsi_tree, hf_scsi_lun, tvb, 0, 0, itlq->lun);
+ PROTO_ITEM_SET_GENERATED(ti);
+ if(itlq->last_exchange_frame){
+ ti=proto_tree_add_uint(scsi_tree, hf_scsi_response_frame, tvb, 0, 0, itlq->last_exchange_frame);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
- if (valstr != NULL) {
- proto_tree_add_uint_format (scsi_tree, csdata->hf_opcode, tvb,
- offset, 1,
- tvb_get_guint8 (tvb, offset),
- "Opcode: %s (0x%02x)", valstr,
- opcode);
- } else {
- proto_tree_add_item (scsi_tree, hf_scsi_spcopcode, tvb, offset, 1, 0);
- }
+
+ if (valstr != NULL) {
+ proto_tree_add_uint_format (scsi_tree, csdata->hf_opcode, tvb,
+ offset, 1,
+ tvb_get_guint8 (tvb, offset),
+ "Opcode: %s (0x%02x)", valstr,
+ opcode);
+ } else {
+ proto_tree_add_item (scsi_tree, hf_scsi_spcopcode, tvb, offset, 1, 0);
}
if(csdata->cdb_table[opcode].func){
@@ -7826,13 +7831,26 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ti=proto_tree_add_uint(scsi_tree, hf_scsi_lun, tvb, 0, 0, itlq->lun);
PROTO_ITEM_SET_GENERATED(ti);
- ti=proto_tree_add_uint_format(scsi_tree, csdata->hf_opcode, tvb,
- offset, 0, opcode,
- "Opcode: %s (0x%02x)",
- val_to_str(opcode, csdata->cdb_vals,
- "0x%02x"),
- opcode);
- PROTO_ITEM_SET_GENERATED(ti);
+ if(itl){
+ ti=proto_tree_add_uint_format(scsi_tree, hf_scsi_inq_devtype, tvb, 0, 0, itl->cmdset, "Command Set:%s (0x%02x)", val_to_str(itl->cmdset, scsi_devtype_val, "Unknown"), itl->cmdset);
+ PROTO_ITEM_SET_GENERATED(ti);
+
+ if(itlq && itlq->scsi_opcode!=0xffff){
+ ti=proto_tree_add_uint(scsi_tree, csdata->hf_opcode, tvb, 0, 0, itlq->scsi_opcode);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
+ }
+
+ if(itlq->first_exchange_frame){
+ ti=proto_tree_add_uint(scsi_tree, hf_scsi_request_frame, tvb, 0, 0, itlq->first_exchange_frame);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
+
+ if(itlq->last_exchange_frame){
+ ti=proto_tree_add_uint(scsi_tree, hf_scsi_response_frame, tvb, 0, 0, itlq->last_exchange_frame);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
+
if (tree == NULL) {
/*