aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi-osd.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-09-30 10:24:23 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-09-30 10:24:23 +0000
commitc2b08c79d299250b5b32a0d11c9f2de06def5613 (patch)
tree08a67459e15c25626a36e684f86420bec0a72f99 /epan/dissectors/packet-scsi-osd.c
parentcadbe486108cab5db209e5bea79496806e15a662 (diff)
add dissection of SCSI OSD CREATE PARTITION
svn path=/trunk/; revision=19379
Diffstat (limited to 'epan/dissectors/packet-scsi-osd.c')
-rw-r--r--epan/dissectors/packet-scsi-osd.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/epan/dissectors/packet-scsi-osd.c b/epan/dissectors/packet-scsi-osd.c
index 2a256f40d4..ae7388693f 100644
--- a/epan/dissectors/packet-scsi-osd.c
+++ b/epan/dissectors/packet-scsi-osd.c
@@ -72,6 +72,7 @@ static int hf_scsi_osd_ricv = -1;
static int hf_scsi_osd_request_nonce = -1;
static int hf_scsi_osd_diicvo = -1;
static int hf_scsi_osd_doicvo = -1;
+static int hf_scsi_osd_requested_partition_id = -1;
static gint ett_osd_option = -1;
@@ -346,10 +347,75 @@ dissect_osd_format_osd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
}
+static void
+dissect_osd_requested_partition_id(tvbuff_t *tvb, int offset, proto_tree *tree)
+{
+ /* request partition id */
+ proto_tree_add_item(tree, hf_scsi_osd_requested_partition_id, tvb, offset, 8, 0);
+ offset+=8;
+}
+
+static void
+dissect_osd_create_partition(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_)
+{
+ /* dissecting the CDB dissection starts at byte 10 of the CDB */
+ if(isreq && iscdb){
+ /* options byte */
+ dissect_osd_option(tvb, offset, tree);
+ offset++;
+
+ /* getset attributes byte */
+ dissect_osd_getsetattrib(tvb, offset, tree, cdata);
+ offset++;
+
+ /* timestamps control */
+ dissect_osd_timestamps_control(tvb, offset, tree);
+ offset++;
+
+ /* 3 reserved bytes */
+ offset+=3;
+
+ /* requested partiton id */
+ dissect_osd_requested_partition_id(tvb, offset, tree);
+ offset+=8;
+
+ /* 28 reserved bytes */
+ offset+=28;
+
+ /* attribute parameters */
+ dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
+ offset+=28;
+
+ /* capability */
+ dissect_osd_capability(tvb, offset, tree);
+ offset+=80;
+
+ /* security parameters */
+ dissect_osd_security_parameters(tvb, offset, tree);
+ offset+=40;
+ }
+
+ /* dissecting the DATA OUT */
+ if(isreq && !iscdb){
+ /* no data out for create partition */
+ }
+
+ /* dissecting the DATA IN */
+ if(!isreq && !iscdb){
+ /* no data in for create partition */
+ }
+
+}
+
+
/* OSD Service Actions */
#define OSD_FORMAT_OSD 0x8801
+#define OSD_CREATE_PARTITION 0x880b
static const value_string scsi_osd_svcaction_vals[] = {
{OSD_FORMAT_OSD, "Format OSD"},
+ {OSD_CREATE_PARTITION, "Create Partition"},
{0, NULL},
};
@@ -360,6 +426,7 @@ typedef struct _scsi_osd_svcaction_t {
} scsi_osd_svcaction_t;
static const scsi_osd_svcaction_t scsi_osd_svcaction[] = {
{OSD_FORMAT_OSD, dissect_osd_format_osd},
+ {OSD_CREATE_PARTITION, dissect_osd_create_partition},
{0, NULL},
};
@@ -836,6 +903,9 @@ proto_register_scsi_osd(void)
{ &hf_scsi_osd_doicvo,
{"Data-Out Integrity Check Value Offset", "scsi.osd.doicvo", FT_UINT32, BASE_DEC,
NULL, 0, "", HFILL}},
+ { &hf_scsi_osd_requested_partition_id,
+ {"Requested Partition Id", "scsi.osd.requested_partition_id", FT_BYTES, BASE_HEX,
+ NULL, 0, "", HFILL}},
};
/* Setup protocol subtree array */