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:23:38 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-02-10 20:23:38 +0000
commit38fef4967b2f634f01e46ddcb1b2c7da8647c7d5 (patch)
tree7bdec4e3c8f252fbd1f4bea80a066d9aa345dd5e /epan/dissectors/packet-scsi-ssc.c
parent2661699e014ea4ade3b1d6280e10e36617b07748 (diff)
add dissection of SSC VERIFY16 cdb
svn path=/trunk/; revision=20768
Diffstat (limited to 'epan/dissectors/packet-scsi-ssc.c')
-rw-r--r--epan/dissectors/packet-scsi-ssc.c51
1 files changed, 50 insertions, 1 deletions
diff --git a/epan/dissectors/packet-scsi-ssc.c b/epan/dissectors/packet-scsi-ssc.c
index db966eb5bc..1505894552 100644
--- a/epan/dissectors/packet-scsi-ssc.c
+++ b/epan/dissectors/packet-scsi-ssc.c
@@ -47,6 +47,7 @@
static int proto_scsi_ssc = -1;
int hf_scsi_ssc_opcode = -1;
static int hf_scsi_ssc_rdwr6_xferlen = -1;
+static int hf_scsi_ssc_ver16_verlen = -1;
static int hf_scsi_ssc_locate10_loid = -1;
static int hf_scsi_ssc_locate16_loid = -1;
static int hf_scsi_ssc_space6_count = -1;
@@ -79,6 +80,8 @@ 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 int hf_scsi_ssc_bytcmp = -1;
+static int hf_scsi_ssc_verify16_immed = -1;
static gint ett_scsi_erase = -1;
static gint ett_scsi_formatmedium = -1;
@@ -153,6 +156,43 @@ dissect_ssc2_read16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
flags & 0xC0, flags & 0x4, flags & 0x1);
}
}
+
+static void
+dissect_ssc2_verify16 (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 *verify16_fields[] = {
+ &hf_scsi_ssc_verify16_immed,
+ &hf_scsi_ssc_bytcmp,
+ &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, verify16_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_ver16_verlen, 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_readreverse16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint offset, gboolean isreq, gboolean iscdb,
@@ -950,7 +990,7 @@ scsi_cdb_table_t scsi_ssc_table[256] = {
/*SSC 0x8c*/{NULL},
/*SSC 0x8d*/{NULL},
/*SSC 0x8e*/{NULL},
-/*SSC 0x8f*/{NULL},
+/*SSC 0x8f*/{dissect_ssc2_verify16},
/*SSC 0x90*/{NULL},
/*SSC 0x91*/{dissect_ssc2_space16},
/*SSC 0x92*/{dissect_ssc2_locate16},
@@ -1077,6 +1117,9 @@ proto_register_scsi_ssc(void)
{ &hf_scsi_ssc_rdwr6_xferlen,
{"Transfer Length", "scsi.ssc.rdwr6.xferlen", FT_UINT24, BASE_DEC, NULL, 0x0,
"", HFILL}},
+ { &hf_scsi_ssc_ver16_verlen,
+ {"Verification Length", "scsi.ssc.verify16.verify_len", FT_UINT24, BASE_DEC, NULL, 0x0,
+ "", HFILL}},
{ &hf_scsi_ssc_locate10_loid,
{"Logical Object Identifier", "scsi.ssc.locate10.loid", FT_UINT32, BASE_DEC, NULL, 0x0,
"", HFILL}},
@@ -1173,6 +1216,12 @@ proto_register_scsi_ssc(void)
{ &hf_scsi_ssc_bytord,
{"BYTORD", "scsi.ssc.bytord", FT_BOOLEAN, 8,
NULL, 0x04, "", HFILL}},
+ { &hf_scsi_ssc_bytcmp,
+ {"BYTCMP", "scsi.ssc.bytcmp", FT_BOOLEAN, 8,
+ NULL, 0x02, "", HFILL}},
+ { &hf_scsi_ssc_verify16_immed,
+ {"IMMED", "scsi.ssc.verify16_immed", FT_BOOLEAN, 8,
+ NULL, 0x04, "", HFILL}},
};