aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi-sbc.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2012-07-14 08:00:03 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2012-07-14 08:00:03 +0000
commita14d130713ee0ead1a21907a8c33150b7be7192d (patch)
treeb33650841aec731975c66e19262bab63cc0293d9 /epan/dissectors/packet-scsi-sbc.c
parent285ee0f9b556293847f946237a3edd9d16c1b911 (diff)
Add support for SCSI SBC ORWRITE command
svn path=/trunk/; revision=43711
Diffstat (limited to 'epan/dissectors/packet-scsi-sbc.c')
-rw-r--r--epan/dissectors/packet-scsi-sbc.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/epan/dissectors/packet-scsi-sbc.c b/epan/dissectors/packet-scsi-sbc.c
index 249c1aae15..c62cf6bcfe 100644
--- a/epan/dissectors/packet-scsi-sbc.c
+++ b/epan/dissectors/packet-scsi-sbc.c
@@ -684,6 +684,37 @@ dissect_sbc_write16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
}
static void
+dissect_sbc_orwrite (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_)
+{
+ static const int *rdwr16_fields[] = {
+ &hf_scsi_sbc_wrprotect,
+ &hf_scsi_sbc_dpo,
+ &hf_scsi_sbc_fua,
+ &hf_scsi_sbc_fua_nv,
+ NULL
+ };
+
+ if (isreq && iscdb) {
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: %" G_GINT64_MODIFIER "u, Len: %u)",
+ tvb_get_ntoh64 (tvb, offset+1),
+ tvb_get_ntohl (tvb, offset+9));
+ }
+
+ if (tree && isreq && iscdb) {
+ proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_sbc_read_flags,
+ ett_scsi_rdwr, rdwr16_fields, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_scsi_sbc_rdwr16_lba, tvb, offset+1, 8, ENC_NA);
+ proto_tree_add_item (tree, hf_scsi_sbc_rdwr12_xferlen, tvb, offset+9, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_scsi_sbc_group, tvb, offset+13, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bitmask(tree, tvb, offset+14, hf_scsi_control,
+ ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
+ }
+}
+
+static void
dissect_sbc_comparenwrite (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_)
@@ -1473,6 +1504,7 @@ const value_string scsi_sbc_vals[] = {
{SCSI_SBC_WRITE10 , "Write(10)"},
{SCSI_SBC_WRITE12 , "Write(12)"},
{SCSI_SBC_WRITE16 , "Write(16)"},
+ {SCSI_SBC_ORWRITE , "OrWrite(16)"},
{SCSI_SPC_WRITEBUFFER , "Write Buffer"},
{SCSI_SBC_COMPARENWRITE , "Compare & Write(16)"},
{SCSI_SBC_WRITENVERIFY10 , "Write & Verify(10)"},
@@ -1634,7 +1666,7 @@ scsi_cdb_table_t scsi_sbc_table[256] = {
/*SBC 0x88*/{dissect_sbc_read16},
/*SBC 0x89*/{dissect_sbc_comparenwrite},
/*SBC 0x8a*/{dissect_sbc_write16},
-/*SBC 0x8b*/{NULL},
+/*SBC 0x8b*/{dissect_sbc_orwrite},
/*SBC 0x8c*/{NULL},
/*SBC 0x8d*/{NULL},
/*SBC 0x8e*/{dissect_sbc_wrverify16},