aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi-ssc.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-02-10 20:13:03 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-02-10 20:13:03 +0000
commit2661699e014ea4ade3b1d6280e10e36617b07748 (patch)
tree1f986ec760422d2ddace22814ce9a3908859a923 /epan/dissectors/packet-scsi-ssc.c
parent5f7321abaefc63420b5ccbdfb0d2b45c8f9ac195 (diff)
add dissection of SSC READREVERSE16 cdb
svn path=/trunk/; revision=20767
Diffstat (limited to 'epan/dissectors/packet-scsi-ssc.c')
-rw-r--r--epan/dissectors/packet-scsi-ssc.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/epan/dissectors/packet-scsi-ssc.c b/epan/dissectors/packet-scsi-ssc.c
index bd54de87c5..db966eb5bc 100644
--- a/epan/dissectors/packet-scsi-ssc.c
+++ b/epan/dissectors/packet-scsi-ssc.c
@@ -78,6 +78,7 @@ static int hf_scsi_ssc_bam = -1;
static int hf_scsi_ssc_read6_flags = -1;
static int hf_scsi_ssc_sili = -1;
static int hf_scsi_ssc_fixed = -1;
+static int hf_scsi_ssc_bytord = -1;
static gint ett_scsi_erase = -1;
static gint ett_scsi_formatmedium = -1;
@@ -152,6 +153,41 @@ dissect_ssc2_read16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
flags & 0xC0, flags & 0x4, flags & 0x1);
}
}
+static void
+dissect_ssc2_readreverse16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
+ guint offset, gboolean isreq, gboolean iscdb,
+ guint payload_len _U_, scsi_task_data_t *cdata _U_)
+{
+ guint8 flags;
+ static const int *rr16_fields[] = {
+ &hf_scsi_ssc_bytord,
+ &hf_scsi_ssc_sili,
+ &hf_scsi_ssc_fixed,
+ NULL
+ };
+
+ if (isreq) {
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
+ tvb_get_ntoh24 (tvb, offset+1));
+ }
+
+ if (tree && isreq && iscdb) {
+ proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, rr16_fields, FALSE);
+
+ proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
+
+ proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
+
+ proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+11, 3, 0);
+
+ flags = tvb_get_guint8 (tvb, offset+14);
+ proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
+ flags,
+ "Vendor Unique = %u, NACA = %u, Link = %u",
+ flags & 0xC0, flags & 0x4, flags & 0x1);
+ }
+}
static void
dissect_ssc2_write6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
@@ -900,7 +936,7 @@ scsi_cdb_table_t scsi_ssc_table[256] = {
/*SSC 0x7e*/{NULL},
/*SSC 0x7f*/{NULL},
/*SSC 0x80*/{NULL},
-/*SSC 0x81*/{NULL},
+/*SSC 0x81*/{dissect_ssc2_readreverse16},
/*SSC 0x82*/{NULL},
/*SPC 0x83*/{dissect_spc3_extcopy},
/*SSC 0x84*/{NULL},
@@ -1134,6 +1170,9 @@ proto_register_scsi_ssc(void)
{ &hf_scsi_ssc_fixed,
{"FIXED", "scsi.ssc.fixed", FT_BOOLEAN, 8,
NULL, 0x01, "", HFILL}},
+ { &hf_scsi_ssc_bytord,
+ {"BYTORD", "scsi.ssc.bytord", FT_BOOLEAN, 8,
+ NULL, 0x04, "", HFILL}},
};