7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 2002 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 #include <epan/strutil.h>
33 #include <epan/packet.h>
34 #include <epan/prefs.h>
35 #include <epan/emem.h>
36 #include <epan/conversation.h>
38 #include "packet-scsi.h"
39 #include "packet-fc.h"
40 #include "packet-scsi-osd.h"
43 static int proto_scsi_osd = -1;
44 int hf_scsi_osd_opcode = -1;
45 static int hf_scsi_osd_control = -1;
46 static int hf_scsi_osd_add_cdblen = -1;
47 static int hf_scsi_osd_svcaction = -1;
48 static int hf_scsi_osd_option = -1;
49 static int hf_scsi_osd_option_dpo = -1;
50 static int hf_scsi_osd_option_fua = -1;
51 static int hf_scsi_osd_getsetattrib = -1;
52 static int hf_scsi_osd_timestamps_control = -1;
53 static int hf_scsi_osd_formatted_capacity = -1;
54 static int hf_scsi_osd_get_attributes_page = -1;
55 static int hf_scsi_osd_get_attributes_allocation_length = -1;
56 static int hf_scsi_osd_get_attributes_list_length= -1;
57 static int hf_scsi_osd_get_attributes_list_offset= -1;
58 static int hf_scsi_osd_retreived_attributes_offset = -1;
59 static int hf_scsi_osd_set_attributes_page = -1;
60 static int hf_scsi_osd_set_attribute_length = -1;
61 static int hf_scsi_osd_set_attribute_number = -1;
62 static int hf_scsi_osd_set_attributes_offset = -1;
63 static int hf_scsi_osd_set_attributes_list_length= -1;
64 static int hf_scsi_osd_set_attributes_list_offset= -1;
65 static int hf_scsi_osd_capability_format = -1;
66 static int hf_scsi_osd_key_version = -1;
67 static int hf_scsi_osd_icva = -1;
68 static int hf_scsi_osd_security_method = -1;
69 static int hf_scsi_osd_capability_expiration_time= -1;
70 static int hf_scsi_osd_audit= -1;
71 static int hf_scsi_osd_capability_discriminator = -1;
72 static int hf_scsi_osd_object_created_time= -1;
73 static int hf_scsi_osd_object_type = -1;
74 static int hf_scsi_osd_permissions = -1;
75 static int hf_scsi_osd_permissions_read = -1;
76 static int hf_scsi_osd_permissions_write = -1;
77 static int hf_scsi_osd_permissions_get_attr = -1;
78 static int hf_scsi_osd_permissions_set_attr = -1;
79 static int hf_scsi_osd_permissions_create = -1;
80 static int hf_scsi_osd_permissions_remove = -1;
81 static int hf_scsi_osd_permissions_obj_mgmt = -1;
82 static int hf_scsi_osd_permissions_append = -1;
83 static int hf_scsi_osd_permissions_dev_mgmt = -1;
84 static int hf_scsi_osd_permissions_global = -1;
85 static int hf_scsi_osd_permissions_pol_sec = -1;
86 static int hf_scsi_osd_object_descriptor_type = -1;
87 static int hf_scsi_osd_object_descriptor= -1;
88 static int hf_scsi_osd_ricv = -1;
89 static int hf_scsi_osd_request_nonce = -1;
90 static int hf_scsi_osd_diicvo = -1;
91 static int hf_scsi_osd_doicvo = -1;
92 static int hf_scsi_osd_requested_partition_id = -1;
93 static int hf_scsi_osd_sortorder = -1;
94 static int hf_scsi_osd_partition_id = -1;
95 static int hf_scsi_osd_list_identifier = -1;
96 static int hf_scsi_osd_allocation_length= -1;
97 static int hf_scsi_osd_length= -1;
98 static int hf_scsi_osd_starting_byte_address = -1;
99 static int hf_scsi_osd_initial_object_id= -1;
100 static int hf_scsi_osd_additional_length= -1;
101 static int hf_scsi_osd_continuation_object_id= -1;
102 static int hf_scsi_osd_list_flags_lstchg= -1;
103 static int hf_scsi_osd_list_flags_root= -1;
104 static int hf_scsi_osd_user_object_id= -1;
105 static int hf_scsi_osd_requested_user_object_id = -1;
106 static int hf_scsi_osd_number_of_user_objects = -1;
107 static int hf_scsi_osd_key_to_set = -1;
108 static int hf_scsi_osd_set_key_version = -1;
109 static int hf_scsi_osd_key_identifier = -1;
110 static int hf_scsi_osd_seed = -1;
111 static int hf_scsi_osd_collection_fcr = -1;
112 static int hf_scsi_osd_collection_object_id = -1;
113 static int hf_scsi_osd_requested_collection_object_id = -1;
114 static int hf_scsi_osd_partition_created_in = -1;
115 static int hf_scsi_osd_partition_removed_in = -1;
116 static int hf_scsi_osd_flush_scope = -1;
117 static int hf_scsi_osd_flush_collection_scope = -1;
119 static gint ett_osd_option = -1;
120 static gint ett_osd_partition = -1;
121 static gint ett_osd_attribute_parameters= -1;
122 static gint ett_osd_capability = -1;
123 static gint ett_osd_permission_bitmask = -1;
124 static gint ett_osd_security_parameters = -1;
128 /* There will be one such structure create for each conversation ontop of which
129 * there is an OSD session
131 typedef struct _scsi_osd_conv_info_t {
133 } scsi_osd_conv_info_t;
135 /* there will be one such structure created for each lun for each conversation
136 * that is handled by the OSD dissector
138 typedef struct _scsi_osd_lun_info_t {
139 emem_tree_t *partitions;
140 } scsi_osd_lun_info_t;
142 typedef void (*scsi_osd_dissector_t)(tvbuff_t *tvb, packet_info *pinfo,
143 proto_tree *tree, guint offset,
144 gboolean isreq, gboolean iscdb,
145 guint32 payload_len, scsi_task_data_t *cdata,
146 scsi_osd_conv_info_t *conv_info,
147 scsi_osd_lun_info_t *lun_info
150 /* One such structure is created per conversation/lun/partition to
151 * keep track of when partitions are created/used/destroyed
153 typedef struct _partition_info_t {
159 /* This is a set of extra data specific to OSD that we need to attach to every
162 typedef struct _scsi_osd_extra_data_t {
166 struct { /* gsatype: attribute list */
167 guint32 get_list_length;
168 guint32 get_list_offset;
169 guint32 get_list_allocation_length;
170 guint32 retreived_list_offset;
171 guint32 set_list_length;
172 guint32 set_list_offset;
175 } scsi_osd_extra_data_t;
177 static const true_false_string option_dpo_tfs = {
181 static const true_false_string option_fua_tfs = {
188 dissect_osd_option(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
190 proto_tree *tree=NULL;
194 option=tvb_get_guint8(tvb, offset);
197 it=proto_tree_add_item(parent_tree, hf_scsi_osd_option, tvb, offset, 1, 0);
198 tree = proto_item_add_subtree(it, ett_osd_option);
201 proto_tree_add_item(tree, hf_scsi_osd_option_dpo, tvb, offset, 1, 0);
203 proto_item_append_text(tree, " DPO");
206 proto_tree_add_item(tree, hf_scsi_osd_option_fua, tvb, offset, 1, 0);
208 proto_item_append_text(tree, " FUA");
213 static const value_string scsi_osd_getsetattrib_vals[] = {
214 {2, "Get an attributes page and set an attribute value"},
215 {3, "Get and set attributes using a list"},
220 dissect_osd_getsetattrib(tvbuff_t *tvb, int offset, proto_tree *tree, scsi_task_data_t *cdata)
222 if(cdata && cdata->itlq && cdata->itlq->extra_data){
223 scsi_osd_extra_data_t *extra_data=cdata->itlq->extra_data;
224 extra_data->gsatype=(tvb_get_guint8(tvb, offset)>>4)&0x03;
226 proto_tree_add_item(tree, hf_scsi_osd_getsetattrib, tvb, offset, 1, 0);
230 static const value_string scsi_osd_timestamps_control_vals[] = {
231 {0x00, "Timestamps shall be updated"},
232 {0x7f, "Timestamps shall not be updated"},
237 dissect_osd_timestamps_control(tvbuff_t *tvb, int offset, proto_tree *tree)
239 proto_tree_add_item(tree, hf_scsi_osd_timestamps_control, tvb, offset, 1, 0);
244 dissect_osd_formatted_capacity(tvbuff_t *tvb, int offset, proto_tree *tree)
246 proto_tree_add_item(tree, hf_scsi_osd_formatted_capacity, tvb, offset, 8, 0);
251 dissect_osd_attribute_parameters(tvbuff_t *tvb, int offset, proto_tree *parent_tree, scsi_task_data_t *cdata)
254 proto_item *item=NULL;
255 proto_tree *tree=NULL;
256 scsi_osd_extra_data_t *extra_data=NULL;
259 item = proto_tree_add_text(parent_tree, tvb, offset, 28,
260 "Attribute Parameters");
261 tree = proto_item_add_subtree(item, ett_osd_attribute_parameters);
264 if(cdata && cdata->itlq && cdata->itlq->extra_data){
265 extra_data=cdata->itlq->extra_data;
266 gsatype=extra_data->gsatype;
272 case 2: /* 5.2.2.2 attribute page */
273 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_page, tvb, offset, 4, 0);
275 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_allocation_length, tvb, offset, 4, 0);
277 proto_tree_add_item(tree, hf_scsi_osd_retreived_attributes_offset, tvb, offset, 4, 0);
279 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_page, tvb, offset, 4, 0);
281 proto_tree_add_item(tree, hf_scsi_osd_set_attribute_number, tvb, offset, 4, 0);
283 proto_tree_add_item(tree, hf_scsi_osd_set_attribute_length, tvb, offset, 4, 0);
285 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_offset, tvb, offset, 4, 0);
288 case 3: /* 5.2.2.3 attribute list */
289 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_list_length, tvb, offset, 4, 0);
290 extra_data->get_list_length=tvb_get_ntohl(tvb, offset);
293 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_list_offset, tvb, offset, 4, 0);
294 extra_data->get_list_offset=tvb_get_ntohl(tvb, offset);
297 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_allocation_length, tvb, offset, 4, 0);
298 extra_data->get_list_allocation_length=tvb_get_ntohl(tvb, offset);
301 proto_tree_add_item(tree, hf_scsi_osd_retreived_attributes_offset, tvb, offset, 4, 0);
302 extra_data->retreived_list_offset=tvb_get_ntohl(tvb, offset);
305 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_list_length, tvb, offset, 4, 0);
306 extra_data->set_list_length=tvb_get_ntohl(tvb, offset);
309 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_list_offset, tvb, offset, 4, 0);
310 extra_data->set_list_offset=tvb_get_ntohl(tvb, offset);
313 /* 4 reserved bytes */
322 dissect_osd_attribute_data_out(tvbuff_t *tvb, int offset _U_, proto_tree *tree, scsi_task_data_t *cdata)
325 scsi_osd_extra_data_t *extra_data=NULL;
327 if(cdata && cdata->itlq && cdata->itlq->extra_data){
328 extra_data=cdata->itlq->extra_data;
329 gsatype=extra_data->gsatype;
335 case 2: /* 5.2.2.2 attribute page */
338 case 3: /* 5.2.2.3 attribute list */
339 if(extra_data->get_list_length){
340 proto_tree_add_text(tree, tvb, extra_data->get_list_offset, extra_data->get_list_length, "Get Attributes Data");
342 if(extra_data->set_list_length){
343 proto_tree_add_text(tree, tvb, extra_data->set_list_offset, extra_data->set_list_length, "Set Attributes Data");
351 dissect_osd_attribute_data_in(tvbuff_t *tvb, int offset _U_, proto_tree *tree, scsi_task_data_t *cdata)
354 scsi_osd_extra_data_t *extra_data=NULL;
356 if(cdata && cdata->itlq && cdata->itlq->extra_data){
357 extra_data=cdata->itlq->extra_data;
358 gsatype=extra_data->gsatype;
364 case 2: /* 5.2.2.2 attribute page */
367 case 3: /* 5.2.2.3 attribute list */
368 if(extra_data->get_list_allocation_length){
369 proto_tree_add_text(tree, tvb, extra_data->retreived_list_offset, extra_data->get_list_allocation_length, "Get Attributes Data");
376 static const value_string scsi_osd_capability_format_vals[] = {
377 {0x00, "No Capability"},
378 {0x01, "SCSI OSD Capabilities"},
381 static const value_string scsi_osd_object_type_vals[] = {
384 {0x40, "COLLECTION"},
388 static const value_string scsi_osd_object_descriptor_type_vals[] = {
389 {0, "NONE: the object descriptor field shall be ignored"},
390 {1, "U/C: a single collection or user object"},
391 {2, "PAR: a single partition, including partition zero"},
395 static const true_false_string permissions_read_tfs = {
399 static const true_false_string permissions_write_tfs = {
403 static const true_false_string permissions_get_attr_tfs = {
405 "Get_attr is NOT set"
407 static const true_false_string permissions_set_attr_tfs = {
409 "Set_attr is NOT set"
411 static const true_false_string permissions_create_tfs = {
415 static const true_false_string permissions_remove_tfs = {
419 static const true_false_string permissions_obj_mgmt_tfs = {
421 "Obj_mgmt is NOT set"
423 static const true_false_string permissions_append_tfs = {
427 static const true_false_string permissions_dev_mgmt_tfs = {
429 "Dev_mgmt is NOT set"
431 static const true_false_string permissions_global_tfs = {
435 static const true_false_string permissions_pol_sec_tfs = {
441 dissect_osd_permissions(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
443 proto_tree *tree=NULL;
447 permissions=tvb_get_ntohs(tvb, offset);
450 it=proto_tree_add_item(parent_tree, hf_scsi_osd_permissions, tvb, offset, 2, 0);
451 tree = proto_item_add_subtree(it, ett_osd_permission_bitmask);
454 proto_tree_add_item(tree, hf_scsi_osd_permissions_read, tvb, offset, 2, 0);
455 if(permissions&0x8000){
456 proto_item_append_text(tree, " READ");
458 proto_tree_add_item(tree, hf_scsi_osd_permissions_write, tvb, offset, 2, 0);
459 if(permissions&0x4000){
460 proto_item_append_text(tree, " WRITE");
462 proto_tree_add_item(tree, hf_scsi_osd_permissions_get_attr, tvb, offset, 2, 0);
463 if(permissions&0x2000){
464 proto_item_append_text(tree, " GET_ATTR");
466 proto_tree_add_item(tree, hf_scsi_osd_permissions_set_attr, tvb, offset, 2, 0);
467 if(permissions&0x1000){
468 proto_item_append_text(tree, " SET_ATTR");
470 proto_tree_add_item(tree, hf_scsi_osd_permissions_create, tvb, offset, 2, 0);
471 if(permissions&0x0800){
472 proto_item_append_text(tree, " CREATE");
474 proto_tree_add_item(tree, hf_scsi_osd_permissions_remove, tvb, offset, 2, 0);
475 if(permissions&0x0400){
476 proto_item_append_text(tree, " REMOVE");
478 proto_tree_add_item(tree, hf_scsi_osd_permissions_obj_mgmt, tvb, offset, 2, 0);
479 if(permissions&0x0200){
480 proto_item_append_text(tree, " OBJ_MGMT");
482 proto_tree_add_item(tree, hf_scsi_osd_permissions_append, tvb, offset, 2, 0);
483 if(permissions&0x0100){
484 proto_item_append_text(tree, " APPEND");
486 proto_tree_add_item(tree, hf_scsi_osd_permissions_dev_mgmt, tvb, offset, 2, 0);
487 if(permissions&0x0080){
488 proto_item_append_text(tree, " DEV_MGMT");
490 proto_tree_add_item(tree, hf_scsi_osd_permissions_global, tvb, offset, 2, 0);
491 if(permissions&0x0040){
492 proto_item_append_text(tree, " GLOBAL");
494 proto_tree_add_item(tree, hf_scsi_osd_permissions_pol_sec, tvb, offset, 2, 0);
495 if(permissions&0x0020){
496 proto_item_append_text(tree, " POL/SEC");
502 dissect_osd_capability(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
504 proto_item *item=NULL;
505 proto_tree *tree=NULL;
508 item = proto_tree_add_text(parent_tree, tvb, offset, 80,
510 tree = proto_item_add_subtree(item, ett_osd_capability);
513 /* capability format */
514 proto_tree_add_item(tree, hf_scsi_osd_capability_format, tvb, offset, 1, 0);
517 /* key version and icva */
518 proto_tree_add_item(tree, hf_scsi_osd_key_version, tvb, offset, 1, 0);
519 proto_tree_add_item(tree, hf_scsi_osd_icva, tvb, offset, 1, 0);
522 /* security method */
523 proto_tree_add_item(tree, hf_scsi_osd_security_method, tvb, offset, 1, 0);
526 /* a reserved byte */
529 /* capability expiration time */
530 proto_tree_add_item(tree, hf_scsi_osd_capability_expiration_time, tvb, offset, 6, 0);
534 proto_tree_add_item(tree, hf_scsi_osd_audit, tvb, offset, 20, 0);
537 /* capability discriminator */
538 proto_tree_add_item(tree, hf_scsi_osd_capability_discriminator, tvb, offset, 12, 0);
541 /* object created time */
542 proto_tree_add_item(tree, hf_scsi_osd_object_created_time, tvb, offset, 6, 0);
546 proto_tree_add_item(tree, hf_scsi_osd_object_type, tvb, offset, 1, 0);
549 /* permission bitmask */
550 dissect_osd_permissions(tvb, offset, tree);
553 /* a reserved byte */
556 /* object descriptor type */
557 proto_tree_add_item(tree, hf_scsi_osd_object_descriptor_type, tvb, offset, 1, 0);
560 /* object descriptor */
561 proto_tree_add_item(tree, hf_scsi_osd_object_descriptor, tvb, offset, 24, 0);
569 dissect_osd_security_parameters(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
571 proto_item *item=NULL;
572 proto_tree *tree=NULL;
575 item = proto_tree_add_text(parent_tree, tvb, offset, 40,
576 "Security Parameters");
577 tree = proto_item_add_subtree(item, ett_osd_security_parameters);
580 /* request integrity check value */
581 proto_tree_add_item(tree, hf_scsi_osd_ricv, tvb, offset, 20, 0);
585 proto_tree_add_item(tree, hf_scsi_osd_request_nonce, tvb, offset, 12, 0);
588 /* data in integrity check value offset */
589 proto_tree_add_item(tree, hf_scsi_osd_diicvo, tvb, offset, 4, 0);
592 /* data out integrity check value offset */
593 proto_tree_add_item(tree, hf_scsi_osd_doicvo, tvb, offset, 4, 0);
598 dissect_osd_format_osd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
599 guint offset, gboolean isreq, gboolean iscdb,
600 guint payload_len _U_, scsi_task_data_t *cdata _U_,
601 scsi_osd_conv_info_t *conv_info _U_,
602 scsi_osd_lun_info_t *lun_info _U_)
604 /* dissecting the CDB dissection starts at byte 10 of the CDB */
607 dissect_osd_option(tvb, offset, tree);
610 /* getset attributes byte */
611 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
614 /* timestamps control */
615 dissect_osd_timestamps_control(tvb, offset, tree);
618 /* 23 reserved bytes */
621 /* formatted capacity */
622 dissect_osd_formatted_capacity(tvb, offset, tree);
625 /* 8 reserved bytes */
628 /* attribute parameters */
629 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
633 dissect_osd_capability(tvb, offset, tree);
636 /* security parameters */
637 dissect_osd_security_parameters(tvb, offset, tree);
641 /* dissecting the DATA OUT */
643 /* attribute data out */
644 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
646 /* no data out for format osd */
649 /* dissecting the DATA IN */
650 if(!isreq && !iscdb){
651 /* attribute data in */
652 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
654 /* no data in for format osd */
661 dissect_osd_partition_id(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree, int hf_index, scsi_osd_lun_info_t *lun_info, gboolean is_created, gboolean is_removed)
663 proto_item *item=NULL;
664 guint64 partition_id;
667 item=proto_tree_add_item(tree, hf_index, tvb, offset, 8, 0);
668 partition_id=tvb_get_ntoh64(tvb, offset);
670 proto_item_append_text(item, " (ROOT partition)");
672 partition_info_t *part_info;
673 emem_tree_key_t pikey[2];
674 proto_tree *partition_tree=NULL;
677 pikey[0].key=(guint32 *)&partition_id;
679 part_info=se_tree_lookup32_array(lun_info->partitions, &pikey[0]);
681 part_info=se_alloc(sizeof(partition_info_t));
682 part_info->created_in=0;
683 part_info->removed_in=0;
686 pikey[0].key=(guint32 *)&partition_id;
688 se_tree_insert32_array(lun_info->partitions, &pikey[0], part_info);
691 part_info->created_in=pinfo->fd->num;
694 part_info->removed_in=pinfo->fd->num;
697 partition_tree=proto_item_add_subtree(item, ett_osd_partition);
699 if(part_info->created_in){
700 proto_item *tmp_item;
701 tmp_item=proto_tree_add_uint(partition_tree, hf_scsi_osd_partition_created_in, tvb, 0, 0, part_info->created_in);
702 PROTO_ITEM_SET_GENERATED(tmp_item);
704 if(part_info->removed_in){
705 proto_item *tmp_item;
706 tmp_item=proto_tree_add_uint(partition_tree, hf_scsi_osd_partition_removed_in, tvb, 0, 0, part_info->removed_in);
707 PROTO_ITEM_SET_GENERATED(tmp_item);
716 dissect_osd_create_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
717 guint offset, gboolean isreq, gboolean iscdb,
718 guint payload_len _U_, scsi_task_data_t *cdata _U_,
719 scsi_osd_conv_info_t *conv_info _U_,
720 scsi_osd_lun_info_t *lun_info)
722 /* dissecting the CDB dissection starts at byte 10 of the CDB */
725 dissect_osd_option(tvb, offset, tree);
728 /* getset attributes byte */
729 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
732 /* timestamps control */
733 dissect_osd_timestamps_control(tvb, offset, tree);
736 /* 3 reserved bytes */
739 /* requested partiton id */
740 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_requested_partition_id, lun_info, TRUE, FALSE);
743 /* 28 reserved bytes */
746 /* attribute parameters */
747 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
751 dissect_osd_capability(tvb, offset, tree);
754 /* security parameters */
755 dissect_osd_security_parameters(tvb, offset, tree);
759 /* dissecting the DATA OUT */
761 /* attribute data out */
762 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
764 /* no data out for create partition */
767 /* dissecting the DATA IN */
768 if(!isreq && !iscdb){
769 /* attribute data in */
770 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
772 /* no data in for create partition */
777 static const value_string scsi_osd_sort_order_vals[] = {
778 {0x00, "Ascending numeric value"},
782 dissect_osd_sortorder(tvbuff_t *tvb, int offset, proto_tree *tree)
785 proto_tree_add_item(tree, hf_scsi_osd_sortorder, tvb, offset, 1, 0);
790 dissect_osd_list_identifier(tvbuff_t *tvb, int offset, proto_tree *tree)
792 /* list identifier */
793 proto_tree_add_item(tree, hf_scsi_osd_list_identifier, tvb, offset, 4, 0);
798 dissect_osd_allocation_length(tvbuff_t *tvb, int offset, proto_tree *tree)
800 /* allocation length */
801 proto_tree_add_item(tree, hf_scsi_osd_allocation_length, tvb, offset, 8, 0);
806 dissect_osd_initial_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
808 /* initial object id */
809 proto_tree_add_item(tree, hf_scsi_osd_initial_object_id, tvb, offset, 8, 0);
814 dissect_osd_additional_length(tvbuff_t *tvb, int offset, proto_tree *tree)
816 /* additional length */
817 proto_tree_add_item(tree, hf_scsi_osd_additional_length, tvb, offset, 8, 0);
823 dissect_osd_continuation_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
825 /* continuation object id */
826 proto_tree_add_item(tree, hf_scsi_osd_continuation_object_id, tvb, offset, 8, 0);
830 static const true_false_string list_lstchg_tfs = {
831 "List has CHANGED since the first List command",
832 "List has NOT changed since first command"
834 static const true_false_string list_root_tfs = {
835 "Objects are from root and are PARTITION IDs",
836 "Objects are from a partition and are USER OBJECTs"
840 dissect_osd_user_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
843 proto_tree_add_item(tree, hf_scsi_osd_user_object_id, tvb, offset, 8, 0);
848 dissect_osd_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
849 guint offset, gboolean isreq, gboolean iscdb,
850 guint payload_len _U_, scsi_task_data_t *cdata _U_,
851 scsi_osd_conv_info_t *conv_info _U_,
852 scsi_osd_lun_info_t *lun_info)
854 /* dissecting the CDB dissection starts at byte 10 of the CDB */
857 dissect_osd_option(tvb, offset, tree);
860 /* getset attributes byte / sort order */
861 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
862 dissect_osd_sortorder(tvb, offset, tree);
865 /* timestamps control */
866 dissect_osd_timestamps_control(tvb, offset, tree);
869 /* 3 reserved bytes */
873 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
876 /* 8 reserved bytes */
879 /* list identifier */
880 dissect_osd_list_identifier(tvb, offset, tree);
883 /* allocation length */
884 dissect_osd_allocation_length(tvb, offset, tree);
887 /* initial object id */
888 dissect_osd_initial_object_id(tvb, offset, tree);
891 /* attribute parameters */
892 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
896 dissect_osd_capability(tvb, offset, tree);
899 /* security parameters */
900 dissect_osd_security_parameters(tvb, offset, tree);
904 /* dissecting the DATA OUT */
906 /* attribute data out */
907 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
909 /* no data out for LIST */
912 /* dissecting the DATA IN */
913 if(!isreq && !iscdb){
914 guint64 additional_length;
917 /* attribute data in */
918 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
920 /* dissection of the LIST DATA-IN */
921 /* additional length */
922 additional_length=tvb_get_ntoh64(tvb, offset);
923 dissect_osd_additional_length(tvb, offset, tree);
926 /* continuation object id */
927 dissect_osd_continuation_object_id(tvb, offset, tree);
930 /* list identifier */
931 dissect_osd_list_identifier(tvb, offset, tree);
934 /* 3 reserved bytes */
937 /* LSTCHG and ROOT flags */
938 proto_tree_add_item(tree, hf_scsi_osd_list_flags_lstchg, tvb, offset, 1, 0);
939 proto_tree_add_item(tree, hf_scsi_osd_list_flags_root, tvb, offset, 1, 0);
940 is_root=tvb_get_guint8(tvb, offset)&0x01;
944 /* list of user object ids or partition ids */
945 while(additional_length > (offset-8)){
947 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
949 dissect_osd_user_object_id(tvb, offset, tree);
958 dissect_osd_requested_user_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
960 /* request user object id */
961 proto_tree_add_item(tree, hf_scsi_osd_requested_user_object_id, tvb, offset, 8, 0);
966 dissect_osd_number_of_user_objects(tvbuff_t *tvb, int offset, proto_tree *tree)
968 /* number_of_user_objects */
969 proto_tree_add_item(tree, hf_scsi_osd_number_of_user_objects, tvb, offset, 2, 0);
974 dissect_osd_create(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
975 guint offset, gboolean isreq, gboolean iscdb,
976 guint payload_len _U_, scsi_task_data_t *cdata _U_,
977 scsi_osd_conv_info_t *conv_info _U_,
978 scsi_osd_lun_info_t *lun_info)
980 /* dissecting the CDB dissection starts at byte 10 of the CDB */
983 dissect_osd_option(tvb, offset, tree);
986 /* getset attributes byte */
987 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
990 /* timestamps control */
991 dissect_osd_timestamps_control(tvb, offset, tree);
994 /* 3 reserved bytes */
998 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1001 /* requested user_object id */
1002 dissect_osd_requested_user_object_id(tvb, offset, tree);
1005 /* 4 reserved bytes */
1008 /* number of user objects */
1009 dissect_osd_number_of_user_objects(tvb, offset, tree);
1012 /* 14 reserved bytes */
1015 /* attribute parameters */
1016 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1020 dissect_osd_capability(tvb, offset, tree);
1023 /* security parameters */
1024 dissect_osd_security_parameters(tvb, offset, tree);
1028 /* dissecting the DATA OUT */
1029 if(isreq && !iscdb){
1030 /* attribute data out */
1031 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1033 /* no data out for create */
1036 /* dissecting the DATA IN */
1037 if(!isreq && !iscdb){
1038 /* attribute data in */
1039 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1041 /* no data in for create */
1048 dissect_osd_remove_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1049 guint offset, gboolean isreq, gboolean iscdb,
1050 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1051 scsi_osd_conv_info_t *conv_info _U_,
1052 scsi_osd_lun_info_t *lun_info)
1054 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1057 dissect_osd_option(tvb, offset, tree);
1060 /* getset attributes byte */
1061 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1064 /* timestamps control */
1065 dissect_osd_timestamps_control(tvb, offset, tree);
1068 /* 3 reserved bytes */
1072 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, TRUE);
1075 /* 28 reserved bytes */
1078 /* attribute parameters */
1079 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1083 dissect_osd_capability(tvb, offset, tree);
1086 /* security parameters */
1087 dissect_osd_security_parameters(tvb, offset, tree);
1091 /* dissecting the DATA OUT */
1092 if(isreq && !iscdb){
1093 /* attribute data out */
1094 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1096 /* no data out for remove partition */
1099 /* dissecting the DATA IN */
1100 if(!isreq && !iscdb){
1101 /* attribute data in */
1102 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1104 /* no data in for remove partition */
1109 static const value_string key_to_set_vals[] = {
1116 dissect_osd_key_to_set(tvbuff_t *tvb, int offset, proto_tree *tree)
1118 proto_tree_add_item(tree, hf_scsi_osd_key_to_set, tvb, offset, 1, 0);
1122 dissect_osd_set_key_version(tvbuff_t *tvb, int offset, proto_tree *tree)
1124 proto_tree_add_item(tree, hf_scsi_osd_set_key_version, tvb, offset, 1, 0);
1128 dissect_osd_key_identifier(tvbuff_t *tvb, int offset, proto_tree *tree)
1130 proto_tree_add_item(tree, hf_scsi_osd_key_identifier, tvb, offset, 7, 0);
1134 dissect_osd_seed(tvbuff_t *tvb, int offset, proto_tree *tree)
1136 proto_tree_add_item(tree, hf_scsi_osd_seed, tvb, offset, 20, 0);
1140 dissect_osd_set_key(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1141 guint offset, gboolean isreq, gboolean iscdb,
1142 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1143 scsi_osd_conv_info_t *conv_info _U_,
1144 scsi_osd_lun_info_t *lun_info)
1146 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1148 /* a reserved byte */
1151 /* getset attributes byte and key to set*/
1152 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1153 dissect_osd_key_to_set(tvb, offset, tree);
1156 /* timestamps control */
1157 dissect_osd_timestamps_control(tvb, offset, tree);
1160 /* 3 reserved bytes */
1164 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1168 dissect_osd_set_key_version(tvb, offset, tree);
1171 /* key identifier */
1172 dissect_osd_key_identifier(tvb, offset, tree);
1176 dissect_osd_seed(tvb, offset, tree);
1179 /* attribute parameters */
1180 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1184 dissect_osd_capability(tvb, offset, tree);
1187 /* security parameters */
1188 dissect_osd_security_parameters(tvb, offset, tree);
1192 /* dissecting the DATA OUT */
1193 if(isreq && !iscdb){
1194 /* attribute data out */
1195 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1197 /* no data out for set key */
1200 /* dissecting the DATA IN */
1201 if(!isreq && !iscdb){
1202 /* attribute data in */
1203 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1205 /* no data in for set key */
1211 dissect_osd_remove(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1212 guint offset, gboolean isreq, gboolean iscdb,
1213 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1214 scsi_osd_conv_info_t *conv_info _U_,
1215 scsi_osd_lun_info_t *lun_info)
1217 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1220 dissect_osd_option(tvb, offset, tree);
1223 /* getset attributes byte */
1224 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1227 /* timestamps control */
1228 dissect_osd_timestamps_control(tvb, offset, tree);
1231 /* 3 reserved bytes */
1235 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1238 /* user object id */
1239 dissect_osd_user_object_id(tvb, offset, tree);
1242 /* 20 reserved bytes */
1245 /* attribute parameters */
1246 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1250 dissect_osd_capability(tvb, offset, tree);
1253 /* security parameters */
1254 dissect_osd_security_parameters(tvb, offset, tree);
1258 /* dissecting the DATA OUT */
1259 if(isreq && !iscdb){
1260 /* attribute data out */
1261 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1263 /* no data out for remove */
1266 /* dissecting the DATA IN */
1267 if(!isreq && !iscdb){
1268 /* attribute data in */
1269 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1271 /* no data in for remove */
1276 static const true_false_string collection_fcr_tfs = {
1281 dissect_osd_collection_fcr(tvbuff_t *tvb, int offset, proto_tree *tree)
1283 proto_tree_add_item(tree, hf_scsi_osd_collection_fcr, tvb, offset, 1, 0);
1287 dissect_osd_collection_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1289 /* collection object id */
1290 proto_tree_add_item(tree, hf_scsi_osd_collection_object_id, tvb, offset, 8, 0);
1296 dissect_osd_remove_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1297 guint offset, gboolean isreq, gboolean iscdb,
1298 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1299 scsi_osd_conv_info_t *conv_info _U_,
1300 scsi_osd_lun_info_t *lun_info)
1302 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1305 dissect_osd_option(tvb, offset, tree);
1308 /* getset attributes byte */
1309 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1310 dissect_osd_collection_fcr(tvb, offset, tree);
1313 /* timestamps control */
1314 dissect_osd_timestamps_control(tvb, offset, tree);
1317 /* 3 reserved bytes */
1321 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1324 /* collection object id */
1325 dissect_osd_collection_object_id(tvb, offset, tree);
1328 /* 20 reserved bytes */
1331 /* attribute parameters */
1332 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1336 dissect_osd_capability(tvb, offset, tree);
1339 /* security parameters */
1340 dissect_osd_security_parameters(tvb, offset, tree);
1344 /* dissecting the DATA OUT */
1345 if(isreq && !iscdb){
1346 /* attribute data out */
1347 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1349 /* no data out for remove collection */
1352 /* dissecting the DATA IN */
1353 if(!isreq && !iscdb){
1354 /* attribute data in */
1355 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1357 /* no data in for remove collection */
1364 dissect_osd_length(tvbuff_t *tvb, int offset, proto_tree *tree)
1367 proto_tree_add_item(tree, hf_scsi_osd_length, tvb, offset, 8, 0);
1372 dissect_osd_starting_byte_address(tvbuff_t *tvb, int offset, proto_tree *tree)
1374 /* starting_byte_address */
1375 proto_tree_add_item(tree, hf_scsi_osd_starting_byte_address, tvb, offset, 8, 0);
1381 dissect_osd_write(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1382 guint offset, gboolean isreq, gboolean iscdb,
1383 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1384 scsi_osd_conv_info_t *conv_info _U_,
1385 scsi_osd_lun_info_t *lun_info)
1387 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1390 dissect_osd_option(tvb, offset, tree);
1393 /* getset attributes byte / sort order */
1394 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1395 dissect_osd_sortorder(tvb, offset, tree);
1398 /* timestamps control */
1399 dissect_osd_timestamps_control(tvb, offset, tree);
1402 /* 3 reserved bytes */
1406 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1409 /* user object id */
1410 dissect_osd_user_object_id(tvb, offset, tree);
1413 /* 4 reserved bytes */
1417 dissect_osd_length(tvb, offset, tree);
1420 /* starting byte address */
1421 dissect_osd_starting_byte_address(tvb, offset, tree);
1424 /* attribute parameters */
1425 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1429 dissect_osd_capability(tvb, offset, tree);
1432 /* security parameters */
1433 dissect_osd_security_parameters(tvb, offset, tree);
1437 /* dissecting the DATA OUT */
1438 if(isreq && !iscdb){
1439 /* attribute data out */
1440 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1442 /* xxx should dissect the data ? */
1445 /* dissecting the DATA IN */
1446 if(!isreq && !iscdb){
1447 /* attribute data in */
1448 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1450 /* no data in for WRITE */
1457 dissect_osd_requested_collection_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1459 /* requested collection object id */
1460 proto_tree_add_item(tree, hf_scsi_osd_requested_collection_object_id, tvb, offset, 8, 0);
1466 dissect_osd_create_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1467 guint offset, gboolean isreq, gboolean iscdb,
1468 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1469 scsi_osd_conv_info_t *conv_info _U_,
1470 scsi_osd_lun_info_t *lun_info)
1472 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1475 dissect_osd_option(tvb, offset, tree);
1478 /* getset attributes byte */
1479 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1480 dissect_osd_collection_fcr(tvb, offset, tree);
1483 /* timestamps control */
1484 dissect_osd_timestamps_control(tvb, offset, tree);
1487 /* 3 reserved bytes */
1491 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1494 /* requested collection object id */
1495 dissect_osd_requested_collection_object_id(tvb, offset, tree);
1498 /* 20 reserved bytes */
1501 /* attribute parameters */
1502 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1506 dissect_osd_capability(tvb, offset, tree);
1509 /* security parameters */
1510 dissect_osd_security_parameters(tvb, offset, tree);
1514 /* dissecting the DATA OUT */
1515 if(isreq && !iscdb){
1516 /* attribute data out */
1517 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1519 /* no data out for create collection */
1522 /* dissecting the DATA IN */
1523 if(!isreq && !iscdb){
1524 /* attribute data in */
1525 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1527 /* no data in for create collection */
1533 static const value_string flush_scope_vals[] = {
1534 {0, "User object data and attributes"},
1535 {1, "User object attributes only"},
1540 dissect_osd_flush_scope(tvbuff_t *tvb, int offset, proto_tree *tree)
1543 proto_tree_add_item(tree, hf_scsi_osd_flush_scope, tvb, offset, 1, 0);
1548 dissect_osd_flush(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1549 guint offset, gboolean isreq, gboolean iscdb,
1550 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1551 scsi_osd_conv_info_t *conv_info _U_,
1552 scsi_osd_lun_info_t *lun_info)
1554 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1557 dissect_osd_flush_scope(tvb, offset, tree);
1560 /* getset attributes byte */
1561 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1562 dissect_osd_collection_fcr(tvb, offset, tree);
1565 /* timestamps control */
1566 dissect_osd_timestamps_control(tvb, offset, tree);
1569 /* 3 reserved bytes */
1573 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1576 /* user object id */
1577 dissect_osd_user_object_id(tvb, offset, tree);
1580 /* 20 reserved bytes */
1583 /* attribute parameters */
1584 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1588 dissect_osd_capability(tvb, offset, tree);
1591 /* security parameters */
1592 dissect_osd_security_parameters(tvb, offset, tree);
1596 /* dissecting the DATA OUT */
1597 if(isreq && !iscdb){
1598 /* attribute data out */
1599 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1601 /* no data out for flush */
1604 /* dissecting the DATA IN */
1605 if(!isreq && !iscdb){
1606 /* attribute data in */
1607 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1609 /* no data in for flush */
1615 static const value_string flush_collection_scope_vals[] = {
1616 {0, "List of user objects contained in the collection"},
1617 {1, "Collection attributes only"},
1618 {2, "List of user objects and collection attributes"},
1623 dissect_osd_flush_collection_scope(tvbuff_t *tvb, int offset, proto_tree *tree)
1625 /* flush collection scope */
1626 proto_tree_add_item(tree, hf_scsi_osd_flush_collection_scope, tvb, offset, 1, 0);
1631 dissect_osd_flush_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1632 guint offset, gboolean isreq, gboolean iscdb,
1633 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1634 scsi_osd_conv_info_t *conv_info _U_,
1635 scsi_osd_lun_info_t *lun_info)
1637 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1640 dissect_osd_flush_collection_scope(tvb, offset, tree);
1643 /* getset attributes byte */
1644 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1645 dissect_osd_collection_fcr(tvb, offset, tree);
1648 /* timestamps control */
1649 dissect_osd_timestamps_control(tvb, offset, tree);
1652 /* 3 reserved bytes */
1656 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1659 /* collection object id */
1660 dissect_osd_collection_object_id(tvb, offset, tree);
1663 /* 20 reserved bytes */
1666 /* attribute parameters */
1667 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1671 dissect_osd_capability(tvb, offset, tree);
1674 /* security parameters */
1675 dissect_osd_security_parameters(tvb, offset, tree);
1679 /* dissecting the DATA OUT */
1680 if(isreq && !iscdb){
1681 /* attribute data out */
1682 dissect_osd_attribute_data_out(tvb, offset, tree, cdata);
1684 /* no data out for flush collection */
1687 /* dissecting the DATA IN */
1688 if(!isreq && !iscdb){
1689 /* attribute data in */
1690 dissect_osd_attribute_data_in(tvb, offset, tree, cdata);
1692 /* no data in for flush collection */
1699 /* OSD Service Actions */
1700 #define OSD_FORMAT_OSD 0x8801
1701 #define OSD_CREATE 0x8802
1702 #define OSD_LIST 0x8803
1703 #define OSD_WRITE 0x8806
1704 #define OSD_FLUSH 0x8808
1705 #define OSD_REMOVE 0x880a
1706 #define OSD_CREATE_PARTITION 0x880b
1707 #define OSD_REMOVE_PARTITION 0x880c
1708 #define OSD_CREATE_COLLECTION 0x8815
1709 #define OSD_REMOVE_COLLECTION 0x8816
1710 #define OSD_SET_KEY 0x8818
1711 #define OSD_FLUSH_COLLECTION 0x881a
1712 static const value_string scsi_osd_svcaction_vals[] = {
1713 {OSD_FORMAT_OSD, "Format OSD"},
1714 {OSD_CREATE, "Create"},
1716 {OSD_WRITE, "Write"},
1717 {OSD_FLUSH, "Flush"},
1718 {OSD_REMOVE, "Remove"},
1719 {OSD_CREATE_PARTITION, "Create Partition"},
1720 {OSD_REMOVE_PARTITION, "Remove Partition"},
1721 {OSD_CREATE_COLLECTION, "Create Collection"},
1722 {OSD_REMOVE_COLLECTION, "Remove Collection"},
1723 {OSD_SET_KEY, "Set Key"},
1724 {OSD_FLUSH_COLLECTION, "Flush Collection"},
1728 /* OSD Service Action dissectors */
1729 typedef struct _scsi_osd_svcaction_t {
1731 scsi_osd_dissector_t dissector;
1732 } scsi_osd_svcaction_t;
1733 static const scsi_osd_svcaction_t scsi_osd_svcaction[] = {
1734 {OSD_FORMAT_OSD, dissect_osd_format_osd},
1735 {OSD_CREATE, dissect_osd_create},
1736 {OSD_LIST, dissect_osd_list},
1737 {OSD_WRITE, dissect_osd_write},
1738 {OSD_FLUSH, dissect_osd_flush},
1739 {OSD_REMOVE, dissect_osd_remove},
1740 {OSD_CREATE_PARTITION, dissect_osd_create_partition},
1741 {OSD_REMOVE_PARTITION, dissect_osd_remove_partition},
1742 {OSD_CREATE_COLLECTION, dissect_osd_create_collection},
1743 {OSD_REMOVE_COLLECTION, dissect_osd_remove_collection},
1744 {OSD_SET_KEY, dissect_osd_set_key},
1745 {OSD_FLUSH_COLLECTION, dissect_osd_flush_collection},
1749 static scsi_osd_dissector_t
1750 find_svcaction_dissector(guint16 svcaction)
1752 const scsi_osd_svcaction_t *sa=scsi_osd_svcaction;
1754 while(sa&&sa->dissector){
1755 if(sa->svcaction==svcaction){
1756 return sa->dissector;
1766 dissect_osd_opcode(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1767 guint offset, gboolean isreq, gboolean iscdb,
1768 guint payload_len, scsi_task_data_t *cdata)
1770 guint16 svcaction=0;
1771 scsi_osd_dissector_t dissector;
1772 scsi_osd_conv_info_t *conv_info=NULL;
1773 scsi_osd_lun_info_t *lun_info=NULL;
1779 /* We must have an itl an itlq and a conversation */
1780 if(!cdata || !cdata->itl || !cdata->itl->conversation || !cdata->itlq){
1783 /* make sure we have a conversation info for this */
1784 conv_info=conversation_get_proto_data(cdata->itl->conversation, proto_scsi_osd);
1786 conv_info=se_alloc(sizeof(scsi_osd_conv_info_t));
1787 conv_info->luns=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "SCSI OSD luns tree");
1788 conversation_add_proto_data(cdata->itl->conversation, proto_scsi_osd, conv_info);
1790 /* make sure we have a lun_info structure for this */
1791 lun_info=se_tree_lookup32(conv_info->luns, cdata->itlq->lun);
1793 lun_info=se_alloc(sizeof(scsi_osd_lun_info_t));
1794 lun_info->partitions=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "SCSI OSD partitions tree");
1795 se_tree_insert32(conv_info->luns, cdata->itlq->lun, (void *)lun_info);
1798 /* dissecting the CDB */
1799 if (isreq && iscdb) {
1800 proto_tree_add_item (tree, hf_scsi_osd_control, tvb, offset, 1, 0);
1803 /* 5 reserved bytes */
1806 proto_tree_add_item (tree, hf_scsi_osd_add_cdblen, tvb, offset, 1, 0);
1809 svcaction=tvb_get_ntohs(tvb, offset);
1810 if(cdata && cdata->itlq){
1811 /* We must store the service action for this itlq
1812 * so we can indentify what the data contains
1814 if((!pinfo->fd->flags.visited) && (!cdata->itlq->extra_data)){
1815 scsi_osd_extra_data_t *extra_data;
1817 extra_data=se_alloc(sizeof(scsi_osd_extra_data_t));
1818 extra_data->svcaction=svcaction;
1819 extra_data->gsatype=0;
1820 cdata->itlq->extra_data=extra_data;
1823 proto_tree_add_item (tree, hf_scsi_osd_svcaction, tvb, offset, 2, 0);
1827 if(check_col(pinfo->cinfo, COL_INFO)){
1828 col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
1829 val_to_str(svcaction, scsi_osd_svcaction_vals, "Unknown OSD Serviceaction"));
1831 dissector=find_svcaction_dissector(svcaction);
1833 (*dissector)(tvb, pinfo, tree, offset, isreq, iscdb, payload_len, cdata, conv_info, lun_info);
1838 /* If it was not a CDB, try to find the service action and pass it
1839 * off to the service action dissector
1841 if(cdata && cdata->itlq && cdata->itlq->extra_data){
1842 scsi_osd_extra_data_t *extra_data=cdata->itlq->extra_data;
1843 svcaction=extra_data->svcaction;
1845 if(check_col(pinfo->cinfo, COL_INFO)){
1846 col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
1847 val_to_str(svcaction, scsi_osd_svcaction_vals, "Unknown OSD Serviceaction"));
1851 it=proto_tree_add_uint_format(tree, hf_scsi_osd_svcaction, tvb, 0, 0, svcaction, "Service Action: 0x%04x", svcaction);
1852 PROTO_ITEM_SET_GENERATED(it);
1854 dissector=find_svcaction_dissector(svcaction);
1856 (*dissector)(tvb, pinfo, tree, offset, isreq, iscdb, payload_len, cdata, conv_info, lun_info);
1863 const value_string scsi_osd_vals[] = {
1864 {SCSI_SPC2_INQUIRY , "Inquiry"},
1865 {SCSI_SPC2_LOGSELECT , "Log Select"},
1866 {SCSI_SPC2_LOGSENSE , "Log Sense"},
1867 {SCSI_SPC2_MODESELECT10 , "Mode Select(10)"},
1868 {SCSI_SPC2_MODESENSE10 , "Mode Sense(10)"},
1869 {SCSI_SPC2_PERSRESVIN , "Persistent Reserve In"},
1870 {SCSI_SPC2_PERSRESVOUT , "Persistent Reserve Out"},
1871 {SCSI_SPC2_REPORTLUNS , "Report LUNs"},
1872 {SCSI_OSD_OPCODE , "OSD Command" },
1878 scsi_cdb_table_t scsi_osd_table[256] = {
1897 /*OSD 0x12*/{dissect_spc3_inquiry},
1955 /*OSD 0x4c*/{dissect_spc3_logselect},
1956 /*OSD 0x4d*/{dissect_spc3_logsense},
1964 /*OSD 0x55*/{dissect_spc3_modeselect10},
1969 /*OSD 0x5a*/{dissect_spc3_modesense10},
1973 /*OSD 0x5e*/{dissect_spc3_persistentreservein},
1974 /*OSD 0x5f*/{dissect_spc3_persistentreserveout},
2006 /*OSD 0x7f*/{dissect_osd_opcode},
2039 /*OSD 0xa0*/{dissect_spc3_reportluns},
2141 proto_register_scsi_osd(void)
2143 static hf_register_info hf[] = {
2144 { &hf_scsi_osd_opcode,
2145 {"OSD Opcode", "scsi.osd.opcode", FT_UINT8, BASE_HEX,
2146 VALS (scsi_osd_vals), 0x0, "", HFILL}},
2147 { &hf_scsi_osd_control,
2148 {"Control", "scsi.osd.cdb.control", FT_UINT8, BASE_HEX,
2149 NULL, 0x0, "", HFILL}},
2150 { &hf_scsi_osd_add_cdblen,
2151 {"Additional CDB Length", "scsi.osd.addcdblen", FT_UINT8, BASE_DEC,
2152 NULL, 0x0, "", HFILL}},
2153 { &hf_scsi_osd_svcaction,
2154 {"Service Action", "scsi.osd.svcaction", FT_UINT16, BASE_HEX,
2155 VALS(scsi_osd_svcaction_vals), 0x0, "", HFILL}},
2156 { &hf_scsi_osd_option,
2157 {"Options Byte", "scsi.osd.option", FT_UINT8, BASE_HEX,
2158 NULL, 0x0, "", HFILL}},
2159 { &hf_scsi_osd_option_dpo,
2160 {"DPO", "scsi.osd.option.dpo", FT_BOOLEAN, 8,
2161 TFS(&option_dpo_tfs), 0x10, "", HFILL}},
2162 { &hf_scsi_osd_option_fua,
2163 {"FUA", "scsi.osd.option.fua", FT_BOOLEAN, 8,
2164 TFS(&option_fua_tfs), 0x08, "", HFILL}},
2165 { &hf_scsi_osd_getsetattrib,
2166 {"GET/SET CDBFMT", "scsi.osd.getset", FT_UINT8, BASE_HEX,
2167 VALS(scsi_osd_getsetattrib_vals), 0x30, "", HFILL}},
2168 { &hf_scsi_osd_timestamps_control,
2169 {"Timestamps Control", "scsi.osd.timestamps_control", FT_UINT8, BASE_HEX,
2170 VALS(scsi_osd_timestamps_control_vals), 0x0, "", HFILL}},
2171 { &hf_scsi_osd_formatted_capacity,
2172 {"Formatted Capacity", "scsi.osd.formatted_capacity", FT_UINT64, BASE_DEC,
2173 NULL, 0x0, "", HFILL}},
2174 { &hf_scsi_osd_get_attributes_page,
2175 {"Get Attributes Page", "scsi.osd.get_attributes_page", FT_UINT32, BASE_HEX,
2176 NULL, 0x0, "", HFILL}},
2177 { &hf_scsi_osd_get_attributes_list_length,
2178 {"Get Attributes List Length", "scsi.osd.get_attributes_list_length", FT_UINT32, BASE_HEX,
2179 NULL, 0x0, "", HFILL}},
2180 { &hf_scsi_osd_get_attributes_list_offset,
2181 {"Get Attributes List Offset", "scsi.osd.get_attributes_list_offset", FT_UINT32, BASE_HEX,
2182 NULL, 0x0, "", HFILL}},
2183 { &hf_scsi_osd_set_attributes_list_length,
2184 {"Set Attributes List Length", "scsi.osd.set_attributes_list_length", FT_UINT32, BASE_HEX,
2185 NULL, 0x0, "", HFILL}},
2186 { &hf_scsi_osd_set_attributes_list_offset,
2187 {"Set Attributes List Offset", "scsi.osd.set_attributes_list_offset", FT_UINT32, BASE_HEX,
2188 NULL, 0x0, "", HFILL}},
2189 { &hf_scsi_osd_get_attributes_allocation_length,
2190 {"Get Attributes Allocation Length", "scsi.osd.get_attributes_allocation_length", FT_UINT32, BASE_HEX,
2191 NULL, 0x0, "", HFILL}},
2192 { &hf_scsi_osd_retreived_attributes_offset,
2193 {"Retreived Attributes Offset", "scsi.osd.retreived_attributes_offset", FT_UINT32, BASE_HEX,
2194 NULL, 0x0, "", HFILL}},
2195 { &hf_scsi_osd_set_attributes_page,
2196 {"Set Attributes Page", "scsi.osd.set_attributes_page", FT_UINT32, BASE_HEX,
2197 NULL, 0x0, "", HFILL}},
2198 { &hf_scsi_osd_set_attribute_length,
2199 {"Set Attribute Length", "scsi.osd.set_attribute_length", FT_UINT32, BASE_HEX,
2200 NULL, 0x0, "", HFILL}},
2201 { &hf_scsi_osd_set_attribute_number,
2202 {"Set Attribute Number", "scsi.osd.set_attribute_number", FT_UINT32, BASE_HEX,
2203 NULL, 0x0, "", HFILL}},
2204 { &hf_scsi_osd_set_attributes_offset,
2205 {"Set Attributes Offset", "scsi.osd.set_attributes_offset", FT_UINT32, BASE_HEX,
2206 NULL, 0x0, "", HFILL}},
2207 { &hf_scsi_osd_capability_format,
2208 {"Capability Format", "scsi.osd.capability_format", FT_UINT8, BASE_HEX,
2209 VALS(scsi_osd_capability_format_vals), 0x0f, "", HFILL}},
2210 { &hf_scsi_osd_key_version,
2211 {"Key Version", "scsi.osd.key_version", FT_UINT8, BASE_HEX,
2212 NULL, 0xf0, "", HFILL}},
2213 { &hf_scsi_osd_icva,
2214 {"Integrity Check Value Algorithm", "scsi.osd.icva", FT_UINT8, BASE_HEX,
2215 NULL, 0x0f, "", HFILL}},
2216 { &hf_scsi_osd_security_method,
2217 {"Security Method", "scsi.osd.security_method", FT_UINT8, BASE_HEX,
2218 NULL, 0x0f, "", HFILL}},
2219 { &hf_scsi_osd_capability_expiration_time,
2220 {"Capability Expiration Time", "scsi.osd.capability_expiration_time", FT_BYTES, BASE_HEX,
2221 NULL, 0, "", HFILL}},
2222 { &hf_scsi_osd_audit,
2223 {"Audit", "scsi.osd.audit", FT_BYTES, BASE_HEX,
2224 NULL, 0, "", HFILL}},
2225 { &hf_scsi_osd_capability_discriminator,
2226 {"Capability Discriminator", "scsi.osd.capability_descriminator", FT_BYTES, BASE_HEX,
2227 NULL, 0, "", HFILL}},
2228 { &hf_scsi_osd_object_created_time,
2229 {"Object Created Time", "scsi.osd.object_created_time", FT_BYTES, BASE_HEX,
2230 NULL, 0, "", HFILL}},
2231 { &hf_scsi_osd_object_type,
2232 {"Object Type", "scsi.osd.object_type", FT_UINT8, BASE_HEX,
2233 VALS(scsi_osd_object_type_vals), 0, "", HFILL}},
2234 { &hf_scsi_osd_permissions,
2235 {"Permissions", "scsi.osd.permissions", FT_UINT16, BASE_HEX,
2236 NULL, 0, "", HFILL}},
2237 { &hf_scsi_osd_permissions_read,
2238 {"READ", "scsi.osd.permissions.read", FT_BOOLEAN, 16,
2239 TFS(&permissions_read_tfs), 0x8000, "", HFILL}},
2240 { &hf_scsi_osd_permissions_write,
2241 {"WRITE", "scsi.osd.permissions.write", FT_BOOLEAN, 16,
2242 TFS(&permissions_write_tfs), 0x4000, "", HFILL}},
2243 { &hf_scsi_osd_permissions_get_attr,
2244 {"GET_ATTR", "scsi.osd.permissions.get_attr", FT_BOOLEAN, 16,
2245 TFS(&permissions_get_attr_tfs), 0x2000, "", HFILL}},
2246 { &hf_scsi_osd_permissions_set_attr,
2247 {"SET_ATTR", "scsi.osd.permissions.set_attr", FT_BOOLEAN, 16,
2248 TFS(&permissions_set_attr_tfs), 0x1000, "", HFILL}},
2249 { &hf_scsi_osd_permissions_create,
2250 {"CREATE", "scsi.osd.permissions.create", FT_BOOLEAN, 16,
2251 TFS(&permissions_create_tfs), 0x0800, "", HFILL}},
2252 { &hf_scsi_osd_permissions_remove,
2253 {"REMOVE", "scsi.osd.permissions.remove", FT_BOOLEAN, 16,
2254 TFS(&permissions_remove_tfs), 0x0400, "", HFILL}},
2255 { &hf_scsi_osd_permissions_obj_mgmt,
2256 {"OBJ_MGMT", "scsi.osd.permissions.obj_mgmt", FT_BOOLEAN, 16,
2257 TFS(&permissions_obj_mgmt_tfs), 0x0200, "", HFILL}},
2258 { &hf_scsi_osd_permissions_append,
2259 {"APPEND", "scsi.osd.permissions.append", FT_BOOLEAN, 16,
2260 TFS(&permissions_append_tfs), 0x0100, "", HFILL}},
2261 { &hf_scsi_osd_permissions_dev_mgmt,
2262 {"DEV_MGMT", "scsi.osd.permissions.dev_mgmt", FT_BOOLEAN, 16,
2263 TFS(&permissions_dev_mgmt_tfs), 0x0080, "", HFILL}},
2264 { &hf_scsi_osd_permissions_global,
2265 {"GLOBAL", "scsi.osd.permissions.global", FT_BOOLEAN, 16,
2266 TFS(&permissions_global_tfs), 0x0040, "", HFILL}},
2267 { &hf_scsi_osd_permissions_pol_sec,
2268 {"POL/SEC", "scsi.osd.permissions.pol_sec", FT_BOOLEAN, 16,
2269 TFS(&permissions_pol_sec_tfs), 0x0020, "", HFILL}},
2271 { &hf_scsi_osd_object_descriptor_type,
2272 {"Object Descriptor Type", "scsi.osd.object_descriptor_type", FT_UINT8, BASE_HEX,
2273 VALS(scsi_osd_object_descriptor_type_vals), 0xf0, "", HFILL}},
2274 { &hf_scsi_osd_object_descriptor,
2275 {"Object Descriptor", "scsi.osd.object_descriptor", FT_BYTES, BASE_HEX,
2276 NULL, 0, "", HFILL}},
2277 { &hf_scsi_osd_ricv,
2278 {"Request Integrity Check value", "scsi.osd.ricv", FT_BYTES, BASE_HEX,
2279 NULL, 0, "", HFILL}},
2280 { &hf_scsi_osd_request_nonce,
2281 {"Request Nonce", "scsi.osd.request_nonce", FT_BYTES, BASE_HEX,
2282 NULL, 0, "", HFILL}},
2283 { &hf_scsi_osd_diicvo,
2284 {"Data-In Integrity Check Value Offset", "scsi.osd.diicvo", FT_UINT32, BASE_DEC,
2285 NULL, 0, "", HFILL}},
2286 { &hf_scsi_osd_doicvo,
2287 {"Data-Out Integrity Check Value Offset", "scsi.osd.doicvo", FT_UINT32, BASE_DEC,
2288 NULL, 0, "", HFILL}},
2289 { &hf_scsi_osd_requested_partition_id,
2290 {"Requested Partition Id", "scsi.osd.requested_partition_id", FT_UINT64, BASE_HEX,
2291 NULL, 0, "", HFILL}},
2292 { &hf_scsi_osd_sortorder,
2293 {"Sort Order", "scsi.osd.sort_order", FT_UINT8, BASE_DEC,
2294 VALS(scsi_osd_sort_order_vals), 0x0f, "", HFILL}},
2295 { &hf_scsi_osd_partition_id,
2296 {"Partition Id", "scsi.osd.partition_id", FT_UINT64, BASE_HEX,
2297 NULL, 0, "", HFILL}},
2298 { &hf_scsi_osd_list_identifier,
2299 {"List Identifier", "scsi.osd.list_identifier", FT_UINT32, BASE_DEC,
2300 NULL, 0, "", HFILL}},
2301 { &hf_scsi_osd_allocation_length,
2302 {"Allocation Length", "scsi.osd.allocation_length", FT_UINT64, BASE_DEC,
2303 NULL, 0, "", HFILL}},
2304 { &hf_scsi_osd_length,
2305 {"Length", "scsi.osd.length", FT_UINT64, BASE_DEC,
2306 NULL, 0, "", HFILL}},
2307 { &hf_scsi_osd_starting_byte_address,
2308 {"Starting Byte Address", "scsi.osd.starting_byte_address", FT_UINT64, BASE_DEC,
2309 NULL, 0, "", HFILL}},
2310 { &hf_scsi_osd_initial_object_id,
2311 {"Initial Object Id", "scsi.osd.initial_object_id", FT_BYTES, BASE_HEX,
2312 NULL, 0, "", HFILL}},
2313 { &hf_scsi_osd_additional_length,
2314 {"Additional Length", "scsi.osd.additional_length", FT_UINT64, BASE_DEC,
2315 NULL, 0, "", HFILL}},
2316 { &hf_scsi_osd_continuation_object_id,
2317 {"Continuation Object Id", "scsi.osd.continuation_object_id", FT_BYTES, BASE_HEX,
2318 NULL, 0, "", HFILL}},
2319 { &hf_scsi_osd_user_object_id,
2320 {"User Object Id", "scsi.osd.user_object_id", FT_BYTES, BASE_HEX,
2321 NULL, 0, "", HFILL}},
2322 { &hf_scsi_osd_list_flags_lstchg,
2323 {"LSTCHG", "scsi.osd.list.lstchg", FT_BOOLEAN, 8,
2324 TFS(&list_lstchg_tfs), 0x02, "", HFILL}},
2325 { &hf_scsi_osd_list_flags_root,
2326 {"ROOT", "scsi.osd.list.root", FT_BOOLEAN, 8,
2327 TFS(&list_root_tfs), 0x01, "", HFILL}},
2328 { &hf_scsi_osd_requested_user_object_id,
2329 {"Requested User Object Id", "scsi.osd.requested_user_object_id", FT_BYTES, BASE_HEX,
2330 NULL, 0, "", HFILL}},
2331 { &hf_scsi_osd_number_of_user_objects,
2332 {"Number Of User Objects", "scsi.osd.number_of_user_objects", FT_UINT16, BASE_DEC,
2333 NULL, 0, "", HFILL}},
2334 { &hf_scsi_osd_key_to_set,
2335 {"Key to Set", "scsi.osd.key_to_set", FT_UINT8, BASE_DEC,
2336 VALS(key_to_set_vals), 0x03, "", HFILL}},
2337 { &hf_scsi_osd_set_key_version,
2338 {"Key Version", "scsi.osd.set_key_version", FT_UINT8, BASE_DEC,
2339 NULL, 0x0f, "", HFILL}},
2340 { &hf_scsi_osd_key_identifier,
2341 {"Key Identifier", "scsi.osd.key_identifier", FT_BYTES, BASE_HEX,
2342 NULL, 0, "", HFILL}},
2343 { &hf_scsi_osd_seed,
2344 {"Seed", "scsi.osd.seed", FT_BYTES, BASE_HEX,
2345 NULL, 0, "", HFILL}},
2346 { &hf_scsi_osd_collection_fcr,
2347 {"FCR", "scsi.osd.collection.fcr", FT_BOOLEAN, 8,
2348 TFS(&collection_fcr_tfs), 0x01, "", HFILL}},
2349 { &hf_scsi_osd_collection_object_id,
2350 {"Collection Object Id", "scsi.osd.collection_object_id", FT_BYTES, BASE_HEX,
2351 NULL, 0, "", HFILL}},
2352 { &hf_scsi_osd_requested_collection_object_id,
2353 {"Requested Collection Object Id", "scsi.osd.requested_collection_object_id", FT_BYTES, BASE_HEX,
2354 NULL, 0, "", HFILL}},
2355 { &hf_scsi_osd_partition_created_in,
2356 { "Created In", "scsi.osd.partition.created_in", FT_FRAMENUM, BASE_NONE,
2357 NULL, 0x0, "The frame this partition was created", HFILL }},
2359 { &hf_scsi_osd_partition_removed_in,
2360 { "Removed In", "scsi.osd.partition.removed_in", FT_FRAMENUM, BASE_NONE,
2361 NULL, 0x0, "The frame this partition was removed", HFILL }},
2363 { &hf_scsi_osd_flush_scope,
2364 {"Flush Scope", "scsi.osd.flush.scope", FT_UINT8, BASE_DEC,
2365 VALS(flush_scope_vals), 0x03, "", HFILL}},
2367 { &hf_scsi_osd_flush_collection_scope,
2368 {"Flush Collection Scope", "scsi.osd.flush_collection.scope", FT_UINT8, BASE_DEC,
2369 VALS(flush_collection_scope_vals), 0x03, "", HFILL}},
2372 /* Setup protocol subtree array */
2373 static gint *ett[] = {
2376 &ett_osd_attribute_parameters,
2377 &ett_osd_capability,
2378 &ett_osd_permission_bitmask,
2379 &ett_osd_security_parameters,
2382 /* Register the protocol name and description */
2383 proto_scsi_osd = proto_register_protocol("SCSI_OSD", "SCSI_OSD", "scsi_osd");
2385 /* Required function calls to register the header fields and subtrees used */
2386 proto_register_field_array(proto_scsi_osd, hf, array_length(hf));
2387 proto_register_subtree_array(ett, array_length(ett));
2391 proto_reg_handoff_scsi_osd(void)