2 * Dissector for the SCSI OSD (object based storage) commandset
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 2002 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #include <epan/strutil.h>
35 #include <epan/packet.h>
36 #include <epan/prefs.h>
37 #include <epan/emem.h>
38 #include <epan/conversation.h>
40 #include "packet-scsi.h"
41 #include "packet-fc.h"
42 #include "packet-scsi-osd.h"
45 static int proto_scsi_osd = -1;
46 int hf_scsi_osd_opcode = -1;
47 static int hf_scsi_osd_add_cdblen = -1;
48 static int hf_scsi_osd_svcaction = -1;
49 static int hf_scsi_osd_option = -1;
50 static int hf_scsi_osd_option_dpo = -1;
51 static int hf_scsi_osd_option_fua = -1;
52 static int hf_scsi_osd_getsetattrib = -1;
53 static int hf_scsi_osd_timestamps_control = -1;
54 static int hf_scsi_osd_formatted_capacity = -1;
55 static int hf_scsi_osd_get_attributes_page = -1;
56 static int hf_scsi_osd_get_attributes_allocation_length = -1;
57 static int hf_scsi_osd_get_attributes_list_length= -1;
58 static int hf_scsi_osd_get_attributes_list_offset= -1;
59 static int hf_scsi_osd_retreived_attributes_offset = -1;
60 static int hf_scsi_osd_set_attributes_page = -1;
61 static int hf_scsi_osd_set_attribute_length = -1;
62 static int hf_scsi_osd_set_attribute_number = -1;
63 static int hf_scsi_osd_set_attributes_offset = -1;
64 static int hf_scsi_osd_set_attributes_list_length= -1;
65 static int hf_scsi_osd_set_attributes_list_offset= -1;
66 static int hf_scsi_osd_capability_format = -1;
67 static int hf_scsi_osd_key_version = -1;
68 static int hf_scsi_osd_icva = -1;
69 static int hf_scsi_osd_security_method = -1;
70 static int hf_scsi_osd_capability_expiration_time= -1;
71 static int hf_scsi_osd_audit= -1;
72 static int hf_scsi_osd_capability_discriminator = -1;
73 static int hf_scsi_osd_object_created_time= -1;
74 static int hf_scsi_osd_object_type = -1;
75 static int hf_scsi_osd_permissions = -1;
76 static int hf_scsi_osd_permissions_read = -1;
77 static int hf_scsi_osd_permissions_write = -1;
78 static int hf_scsi_osd_permissions_get_attr = -1;
79 static int hf_scsi_osd_permissions_set_attr = -1;
80 static int hf_scsi_osd_permissions_create = -1;
81 static int hf_scsi_osd_permissions_remove = -1;
82 static int hf_scsi_osd_permissions_obj_mgmt = -1;
83 static int hf_scsi_osd_permissions_append = -1;
84 static int hf_scsi_osd_permissions_dev_mgmt = -1;
85 static int hf_scsi_osd_permissions_global = -1;
86 static int hf_scsi_osd_permissions_pol_sec = -1;
87 static int hf_scsi_osd_object_descriptor_type = -1;
88 static int hf_scsi_osd_object_descriptor= -1;
89 static int hf_scsi_osd_ricv = -1;
90 static int hf_scsi_osd_request_nonce = -1;
91 static int hf_scsi_osd_diicvo = -1;
92 static int hf_scsi_osd_doicvo = -1;
93 static int hf_scsi_osd_requested_partition_id = -1;
94 static int hf_scsi_osd_sortorder = -1;
95 static int hf_scsi_osd_partition_id = -1;
96 static int hf_scsi_osd_list_identifier = -1;
97 static int hf_scsi_osd_allocation_length= -1;
98 static int hf_scsi_osd_length= -1;
99 static int hf_scsi_osd_starting_byte_address = -1;
100 static int hf_scsi_osd_initial_object_id= -1;
101 static int hf_scsi_osd_additional_length= -1;
102 static int hf_scsi_osd_continuation_object_id= -1;
103 static int hf_scsi_osd_list_flags_lstchg= -1;
104 static int hf_scsi_osd_list_flags_root= -1;
105 static int hf_scsi_osd_user_object_id= -1;
106 static int hf_scsi_osd_requested_user_object_id = -1;
107 static int hf_scsi_osd_number_of_user_objects = -1;
108 static int hf_scsi_osd_key_to_set = -1;
109 static int hf_scsi_osd_set_key_version = -1;
110 static int hf_scsi_osd_key_identifier = -1;
111 static int hf_scsi_osd_seed = -1;
112 static int hf_scsi_osd_collection_fcr = -1;
113 static int hf_scsi_osd_collection_object_id = -1;
114 static int hf_scsi_osd_requested_collection_object_id = -1;
115 static int hf_scsi_osd_partition_created_in = -1;
116 static int hf_scsi_osd_partition_removed_in = -1;
117 static int hf_scsi_osd_flush_scope = -1;
118 static int hf_scsi_osd_flush_collection_scope = -1;
119 static int hf_scsi_osd_flush_partition_scope = -1;
120 static int hf_scsi_osd_flush_osd_scope = -1;
121 static int hf_scsi_osd_attributes_list_type = -1;
122 static int hf_scsi_osd_attributes_list_length = -1;
123 static int hf_scsi_osd_attributes_page = -1;
124 static int hf_scsi_osd_attribute_number = -1;
125 static int hf_scsi_osd_attribute_length = -1;
126 static int hf_scsi_osd_user_object_logical_length = -1;
128 static gint ett_osd_option = -1;
129 static gint ett_osd_partition = -1;
130 static gint ett_osd_attribute_parameters= -1;
131 static gint ett_osd_capability = -1;
132 static gint ett_osd_permission_bitmask = -1;
133 static gint ett_osd_security_parameters = -1;
136 #define PAGE_NUMBER_PARTITION 0x30000000
137 #define PAGE_NUMBER_COLLECTION 0x60000000
138 #define PAGE_NUMBER_ROOT 0x90000000
140 #define AP_USER_OBJECT_INFO 0x00000001
142 /* There will be one such structure create for each conversation ontop of which
143 * there is an OSD session
145 typedef struct _scsi_osd_conv_info_t {
147 } scsi_osd_conv_info_t;
149 /* there will be one such structure created for each lun for each conversation
150 * that is handled by the OSD dissector
152 typedef struct _scsi_osd_lun_info_t {
153 emem_tree_t *partitions;
154 } scsi_osd_lun_info_t;
156 typedef void (*scsi_osd_dissector_t)(tvbuff_t *tvb, packet_info *pinfo,
157 proto_tree *tree, guint offset,
158 gboolean isreq, gboolean iscdb,
159 guint32 payload_len, scsi_task_data_t *cdata,
160 scsi_osd_conv_info_t *conv_info,
161 scsi_osd_lun_info_t *lun_info
164 /* One such structure is created per conversation/lun/partition to
165 * keep track of when partitions are created/used/destroyed
167 typedef struct _partition_info_t {
173 /* This is a set of extra data specific to OSD that we need to attach to every
176 typedef struct _scsi_osd_extra_data_t {
180 struct { /* gsatype: attribute list */
181 guint32 get_list_length;
182 guint32 get_list_offset;
183 guint32 get_list_allocation_length;
184 guint32 retreived_list_offset;
185 guint32 set_list_length;
186 guint32 set_list_offset;
189 } scsi_osd_extra_data_t;
192 dissect_osd_user_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
195 proto_tree_add_item(tree, hf_scsi_osd_user_object_id, tvb, offset, 8, 0);
202 attribute_1_82(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
207 proto_tree_add_item(tree, hf_scsi_osd_user_object_logical_length, tvb, offset, 8, 0);
213 typedef void (*attribute_dissector)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
215 typedef struct _attribute_page_numbers_t {
218 attribute_dissector dissector;
219 } attribute_page_numbers_t;
220 static const attribute_page_numbers_t user_object_info_attributes[] = {
221 {0x82, "User object logical length", attribute_1_82},
225 typedef struct _attribute_pages_t {
227 const attribute_page_numbers_t *attributes;
229 static const attribute_pages_t attribute_pages[] = {
230 {AP_USER_OBJECT_INFO, user_object_info_attributes},
234 static const value_string attributes_page_vals[] = {
235 {AP_USER_OBJECT_INFO, "User Object Information"},
240 static const value_string attributes_list_type_vals[] = {
241 {0x01, "Retreive attributes for this OSD object"},
242 {0x09, "Retreive/Set attributes for this OSD object"},
243 {0x0f, "Retreive attributes for a CREATE command"},
249 dissect_osd_attributes_list(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree)
252 guint16 length, attribute_length;
253 guint32 page, number;
254 int start_offset=offset;
256 const attribute_pages_t *ap;
257 const attribute_page_numbers_t *apn;
261 type=tvb_get_guint8(tvb, offset)&0x0f;
262 proto_tree_add_item(tree, hf_scsi_osd_attributes_list_type, tvb, offset, 1, 0);
265 /* a reserved byte */
269 length=tvb_get_ntohs(tvb, offset);
270 proto_tree_add_item(tree, hf_scsi_osd_attributes_list_length, tvb, offset, 2, 0);
273 /* if type is 1 length will be zero and we have to cycle over
274 * all remaining bytes. 7.1.3.1
277 length=tvb_length_remaining(tvb, offset);
280 while( (offset-start_offset)<(length+4) ){
282 case 0x01: /* retrieving attributes 7.1.3.2 */
283 /* attributes page */
284 page=tvb_get_ntohl(tvb, offset);
285 proto_tree_add_item(tree, hf_scsi_osd_attributes_page, tvb, offset, 4, 0);
288 /* attribute number */
289 number=tvb_get_ntohl(tvb, offset);
290 item=proto_tree_add_item(tree, hf_scsi_osd_attribute_number, tvb, offset, 4, 0);
293 /* find the proper attributes page */
295 for(ap=attribute_pages;ap->attributes;ap++){
302 proto_tree_add_text(tree, tvb, offset, length, "Unknown attribute page. can not decode attribute value");
305 /* find the specific attribute */
306 for(;apn->name;apn++){
307 if(apn->number==number){
312 proto_tree_add_text(tree, tvb, offset, length, "Unknown attribute. can not decode attribute value");
316 proto_item_append_text(item, " (%s)", apn->name);
319 case 0x0f: /* create attributes 7.1.3.4 */
321 dissect_osd_user_object_id(tvb, offset, tree);
324 /* fallthrough to the next case */
325 case 0x09: /* retreived/set attributes 7.1.3.3 */
326 /* attributes page */
327 page=tvb_get_ntohl(tvb, offset);
328 proto_tree_add_item(tree, hf_scsi_osd_attributes_page, tvb, offset, 4, 0);
331 /* attribute number */
332 number=tvb_get_ntohl(tvb, offset);
333 item=proto_tree_add_item(tree, hf_scsi_osd_attribute_number, tvb, offset, 4, 0);
336 /* attribute length */
337 attribute_length=tvb_get_ntohs(tvb, offset);
338 proto_tree_add_item(tree, hf_scsi_osd_attribute_length, tvb, offset, 2, 0);
341 /* find the proper attributes page */
343 for(ap=attribute_pages;ap->attributes;ap++){
350 proto_tree_add_text(tree, tvb, offset, length, "Unknown attribute page. can not decode attribute value");
351 offset+=attribute_length;
354 /* find the specific attribute */
355 for(;apn->name;apn++){
356 if(apn->number==number){
361 proto_tree_add_text(tree, tvb, offset, length, "Unknown attribute. can not decode attribute value");
362 offset+=attribute_length;
366 proto_item_append_text(item, " (%s)", apn->name);
367 if(attribute_length==0){
368 /* nothing to dissect */
369 offset+=attribute_length;
372 next_tvb=tvb_new_subset(tvb, offset, attribute_length, attribute_length);
373 apn->dissector(next_tvb, pinfo, tree);
375 offset+=attribute_length;
378 proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "Dont know how to decode this attribute list type:0x%02x",type);
384 static const true_false_string option_dpo_tfs = {
388 static const true_false_string option_fua_tfs = {
395 dissect_osd_option(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
397 proto_tree *tree=NULL;
401 option=tvb_get_guint8(tvb, offset);
404 it=proto_tree_add_item(parent_tree, hf_scsi_osd_option, tvb, offset, 1, 0);
405 tree = proto_item_add_subtree(it, ett_osd_option);
408 proto_tree_add_item(tree, hf_scsi_osd_option_dpo, tvb, offset, 1, 0);
410 proto_item_append_text(tree, " DPO");
413 proto_tree_add_item(tree, hf_scsi_osd_option_fua, tvb, offset, 1, 0);
415 proto_item_append_text(tree, " FUA");
420 static const value_string scsi_osd_getsetattrib_vals[] = {
421 {2, "Get an attributes page and set an attribute value"},
422 {3, "Get and set attributes using a list"},
427 dissect_osd_getsetattrib(tvbuff_t *tvb, int offset, proto_tree *tree, scsi_task_data_t *cdata)
429 if(cdata && cdata->itlq && cdata->itlq->extra_data){
430 scsi_osd_extra_data_t *extra_data=cdata->itlq->extra_data;
431 extra_data->gsatype=(tvb_get_guint8(tvb, offset)>>4)&0x03;
433 proto_tree_add_item(tree, hf_scsi_osd_getsetattrib, tvb, offset, 1, 0);
437 static const value_string scsi_osd_timestamps_control_vals[] = {
438 {0x00, "Timestamps shall be updated"},
439 {0x7f, "Timestamps shall not be updated"},
444 dissect_osd_timestamps_control(tvbuff_t *tvb, int offset, proto_tree *tree)
446 proto_tree_add_item(tree, hf_scsi_osd_timestamps_control, tvb, offset, 1, 0);
451 dissect_osd_formatted_capacity(tvbuff_t *tvb, int offset, proto_tree *tree)
453 proto_tree_add_item(tree, hf_scsi_osd_formatted_capacity, tvb, offset, 8, 0);
458 dissect_osd_attribute_parameters(tvbuff_t *tvb, int offset, proto_tree *parent_tree, scsi_task_data_t *cdata)
461 proto_item *item=NULL;
462 proto_tree *tree=NULL;
463 scsi_osd_extra_data_t *extra_data=NULL;
466 item = proto_tree_add_text(parent_tree, tvb, offset, 28,
467 "Attribute Parameters");
468 tree = proto_item_add_subtree(item, ett_osd_attribute_parameters);
471 if(cdata && cdata->itlq && cdata->itlq->extra_data){
472 extra_data=cdata->itlq->extra_data;
473 gsatype=extra_data->gsatype;
479 case 2: /* 5.2.2.2 attribute page */
480 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_page, tvb, offset, 4, 0);
482 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_allocation_length, tvb, offset, 4, 0);
484 proto_tree_add_item(tree, hf_scsi_osd_retreived_attributes_offset, tvb, offset, 4, 0);
486 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_page, tvb, offset, 4, 0);
488 proto_tree_add_item(tree, hf_scsi_osd_set_attribute_number, tvb, offset, 4, 0);
490 proto_tree_add_item(tree, hf_scsi_osd_set_attribute_length, tvb, offset, 4, 0);
492 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_offset, tvb, offset, 4, 0);
495 case 3: /* 5.2.2.3 attribute list */
496 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_list_length, tvb, offset, 4, 0);
497 extra_data->u.al.get_list_length=tvb_get_ntohl(tvb, offset);
501 extra_data->u.al.get_list_offset=tvb_get_ntohl(tvb, offset);
502 extra_data->u.al.get_list_offset=(extra_data->u.al.get_list_offset&0x0fffffff)<<((extra_data->u.al.get_list_offset>>28)&0x0f);
503 extra_data->u.al.get_list_offset<<=8;
504 proto_tree_add_uint(tree, hf_scsi_osd_get_attributes_list_offset, tvb, offset, 4, extra_data->u.al.get_list_offset);
507 proto_tree_add_item(tree, hf_scsi_osd_get_attributes_allocation_length, tvb, offset, 4, 0);
508 extra_data->u.al.get_list_allocation_length=tvb_get_ntohl(tvb, offset);
512 extra_data->u.al.retreived_list_offset=tvb_get_ntohl(tvb, offset);
513 extra_data->u.al.retreived_list_offset=(extra_data->u.al.retreived_list_offset&0x0fffffff)<<((extra_data->u.al.retreived_list_offset>>28)&0x0f);
514 extra_data->u.al.retreived_list_offset<<=8;
515 proto_tree_add_uint(tree, hf_scsi_osd_retreived_attributes_offset, tvb, offset, 4, extra_data->u.al.retreived_list_offset);
518 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_list_length, tvb, offset, 4, 0);
519 extra_data->u.al.set_list_length=tvb_get_ntohl(tvb, offset);
522 proto_tree_add_item(tree, hf_scsi_osd_set_attributes_list_offset, tvb, offset, 4, 0);
523 extra_data->u.al.set_list_offset=tvb_get_ntohl(tvb, offset);
526 /* 4 reserved bytes */
535 dissect_osd_attribute_data_out(packet_info *pinfo, tvbuff_t *tvb, int offset _U_, proto_tree *tree, scsi_task_data_t *cdata)
538 scsi_osd_extra_data_t *extra_data=NULL;
540 if(cdata && cdata->itlq && cdata->itlq->extra_data){
541 extra_data=cdata->itlq->extra_data;
542 gsatype=extra_data->gsatype;
548 case 2: /* 5.2.2.2 attribute page */
551 case 3: /* 5.2.2.3 attribute list */
552 if(extra_data->u.al.get_list_length){
553 dissect_osd_attributes_list(pinfo, tvb, extra_data->u.al.get_list_offset, tree);
555 if(extra_data->u.al.set_list_length){
556 proto_tree_add_text(tree, tvb, extra_data->u.al.set_list_offset, extra_data->u.al.set_list_length, "Set Attributes Data");
564 dissect_osd_attribute_data_in(packet_info *pinfo, tvbuff_t *tvb, int offset _U_, proto_tree *tree, scsi_task_data_t *cdata)
567 scsi_osd_extra_data_t *extra_data=NULL;
569 if(cdata && cdata->itlq && cdata->itlq->extra_data){
570 extra_data=cdata->itlq->extra_data;
571 gsatype=extra_data->gsatype;
577 case 2: /* 5.2.2.2 attribute page */
580 case 3: /* 5.2.2.3 attribute list */
581 if(extra_data->u.al.get_list_allocation_length){
582 dissect_osd_attributes_list(pinfo, tvb, extra_data->u.al.retreived_list_offset, tree);
589 static const value_string scsi_osd_capability_format_vals[] = {
590 {0x00, "No Capability"},
591 {0x01, "SCSI OSD Capabilities"},
594 static const value_string scsi_osd_object_type_vals[] = {
597 {0x40, "COLLECTION"},
601 static const value_string scsi_osd_object_descriptor_type_vals[] = {
602 {0, "NONE: the object descriptor field shall be ignored"},
603 {1, "U/C: a single collection or user object"},
604 {2, "PAR: a single partition, including partition zero"},
608 static const true_false_string permissions_read_tfs = {
612 static const true_false_string permissions_write_tfs = {
616 static const true_false_string permissions_get_attr_tfs = {
618 "Get_attr is NOT set"
620 static const true_false_string permissions_set_attr_tfs = {
622 "Set_attr is NOT set"
624 static const true_false_string permissions_create_tfs = {
628 static const true_false_string permissions_remove_tfs = {
632 static const true_false_string permissions_obj_mgmt_tfs = {
634 "Obj_mgmt is NOT set"
636 static const true_false_string permissions_append_tfs = {
640 static const true_false_string permissions_dev_mgmt_tfs = {
642 "Dev_mgmt is NOT set"
644 static const true_false_string permissions_global_tfs = {
648 static const true_false_string permissions_pol_sec_tfs = {
654 dissect_osd_permissions(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
656 proto_tree *tree=NULL;
660 permissions=tvb_get_ntohs(tvb, offset);
663 it=proto_tree_add_item(parent_tree, hf_scsi_osd_permissions, tvb, offset, 2, 0);
664 tree = proto_item_add_subtree(it, ett_osd_permission_bitmask);
667 proto_tree_add_item(tree, hf_scsi_osd_permissions_read, tvb, offset, 2, 0);
668 if(permissions&0x8000){
669 proto_item_append_text(tree, " READ");
671 proto_tree_add_item(tree, hf_scsi_osd_permissions_write, tvb, offset, 2, 0);
672 if(permissions&0x4000){
673 proto_item_append_text(tree, " WRITE");
675 proto_tree_add_item(tree, hf_scsi_osd_permissions_get_attr, tvb, offset, 2, 0);
676 if(permissions&0x2000){
677 proto_item_append_text(tree, " GET_ATTR");
679 proto_tree_add_item(tree, hf_scsi_osd_permissions_set_attr, tvb, offset, 2, 0);
680 if(permissions&0x1000){
681 proto_item_append_text(tree, " SET_ATTR");
683 proto_tree_add_item(tree, hf_scsi_osd_permissions_create, tvb, offset, 2, 0);
684 if(permissions&0x0800){
685 proto_item_append_text(tree, " CREATE");
687 proto_tree_add_item(tree, hf_scsi_osd_permissions_remove, tvb, offset, 2, 0);
688 if(permissions&0x0400){
689 proto_item_append_text(tree, " REMOVE");
691 proto_tree_add_item(tree, hf_scsi_osd_permissions_obj_mgmt, tvb, offset, 2, 0);
692 if(permissions&0x0200){
693 proto_item_append_text(tree, " OBJ_MGMT");
695 proto_tree_add_item(tree, hf_scsi_osd_permissions_append, tvb, offset, 2, 0);
696 if(permissions&0x0100){
697 proto_item_append_text(tree, " APPEND");
699 proto_tree_add_item(tree, hf_scsi_osd_permissions_dev_mgmt, tvb, offset, 2, 0);
700 if(permissions&0x0080){
701 proto_item_append_text(tree, " DEV_MGMT");
703 proto_tree_add_item(tree, hf_scsi_osd_permissions_global, tvb, offset, 2, 0);
704 if(permissions&0x0040){
705 proto_item_append_text(tree, " GLOBAL");
707 proto_tree_add_item(tree, hf_scsi_osd_permissions_pol_sec, tvb, offset, 2, 0);
708 if(permissions&0x0020){
709 proto_item_append_text(tree, " POL/SEC");
715 dissect_osd_capability(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
717 proto_item *item=NULL;
718 proto_tree *tree=NULL;
721 item = proto_tree_add_text(parent_tree, tvb, offset, 80,
723 tree = proto_item_add_subtree(item, ett_osd_capability);
726 /* capability format */
727 proto_tree_add_item(tree, hf_scsi_osd_capability_format, tvb, offset, 1, 0);
730 /* key version and icva */
731 proto_tree_add_item(tree, hf_scsi_osd_key_version, tvb, offset, 1, 0);
732 proto_tree_add_item(tree, hf_scsi_osd_icva, tvb, offset, 1, 0);
735 /* security method */
736 proto_tree_add_item(tree, hf_scsi_osd_security_method, tvb, offset, 1, 0);
739 /* a reserved byte */
742 /* capability expiration time */
743 proto_tree_add_item(tree, hf_scsi_osd_capability_expiration_time, tvb, offset, 6, 0);
747 proto_tree_add_item(tree, hf_scsi_osd_audit, tvb, offset, 20, 0);
750 /* capability discriminator */
751 proto_tree_add_item(tree, hf_scsi_osd_capability_discriminator, tvb, offset, 12, 0);
754 /* object created time */
755 proto_tree_add_item(tree, hf_scsi_osd_object_created_time, tvb, offset, 6, 0);
759 proto_tree_add_item(tree, hf_scsi_osd_object_type, tvb, offset, 1, 0);
762 /* permission bitmask */
763 dissect_osd_permissions(tvb, offset, tree);
766 /* a reserved byte */
769 /* object descriptor type */
770 proto_tree_add_item(tree, hf_scsi_osd_object_descriptor_type, tvb, offset, 1, 0);
773 /* object descriptor */
774 proto_tree_add_item(tree, hf_scsi_osd_object_descriptor, tvb, offset, 24, 0);
782 dissect_osd_security_parameters(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
784 proto_item *item=NULL;
785 proto_tree *tree=NULL;
788 item = proto_tree_add_text(parent_tree, tvb, offset, 40,
789 "Security Parameters");
790 tree = proto_item_add_subtree(item, ett_osd_security_parameters);
793 /* request integrity check value */
794 proto_tree_add_item(tree, hf_scsi_osd_ricv, tvb, offset, 20, 0);
798 proto_tree_add_item(tree, hf_scsi_osd_request_nonce, tvb, offset, 12, 0);
801 /* data in integrity check value offset */
802 proto_tree_add_item(tree, hf_scsi_osd_diicvo, tvb, offset, 4, 0);
805 /* data out integrity check value offset */
806 proto_tree_add_item(tree, hf_scsi_osd_doicvo, tvb, offset, 4, 0);
811 dissect_osd_format_osd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
812 guint offset, gboolean isreq, gboolean iscdb,
813 guint payload_len _U_, scsi_task_data_t *cdata _U_,
814 scsi_osd_conv_info_t *conv_info _U_,
815 scsi_osd_lun_info_t *lun_info _U_)
817 /* dissecting the CDB dissection starts at byte 10 of the CDB */
820 dissect_osd_option(tvb, offset, tree);
823 /* getset attributes byte */
824 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
827 /* timestamps control */
828 dissect_osd_timestamps_control(tvb, offset, tree);
831 /* 23 reserved bytes */
834 /* formatted capacity */
835 dissect_osd_formatted_capacity(tvb, offset, tree);
838 /* 8 reserved bytes */
841 /* attribute parameters */
842 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
846 dissect_osd_capability(tvb, offset, tree);
849 /* security parameters */
850 dissect_osd_security_parameters(tvb, offset, tree);
854 /* dissecting the DATA OUT */
856 /* attribute data out */
857 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
859 /* no data out for format osd */
862 /* dissecting the DATA IN */
863 if(!isreq && !iscdb){
864 /* attribute data in */
865 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
867 /* no data in for format osd */
874 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)
876 proto_item *item=NULL;
877 guint64 partition_id;
880 item=proto_tree_add_item(tree, hf_index, tvb, offset, 8, 0);
881 partition_id=tvb_get_ntoh64(tvb, offset);
883 proto_item_append_text(item, " (ROOT partition)");
885 partition_info_t *part_info;
886 emem_tree_key_t pikey[2];
887 proto_tree *partition_tree=NULL;
890 pikey[0].key=(guint32 *)&partition_id;
892 part_info=se_tree_lookup32_array(lun_info->partitions, &pikey[0]);
894 part_info=se_alloc(sizeof(partition_info_t));
895 part_info->created_in=0;
896 part_info->removed_in=0;
899 pikey[0].key=(guint32 *)&partition_id;
901 se_tree_insert32_array(lun_info->partitions, &pikey[0], part_info);
904 part_info->created_in=pinfo->fd->num;
907 part_info->removed_in=pinfo->fd->num;
910 partition_tree=proto_item_add_subtree(item, ett_osd_partition);
912 if(part_info->created_in){
913 proto_item *tmp_item;
914 tmp_item=proto_tree_add_uint(partition_tree, hf_scsi_osd_partition_created_in, tvb, 0, 0, part_info->created_in);
915 PROTO_ITEM_SET_GENERATED(tmp_item);
917 if(part_info->removed_in){
918 proto_item *tmp_item;
919 tmp_item=proto_tree_add_uint(partition_tree, hf_scsi_osd_partition_removed_in, tvb, 0, 0, part_info->removed_in);
920 PROTO_ITEM_SET_GENERATED(tmp_item);
929 dissect_osd_create_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
930 guint offset, gboolean isreq, gboolean iscdb,
931 guint payload_len _U_, scsi_task_data_t *cdata _U_,
932 scsi_osd_conv_info_t *conv_info _U_,
933 scsi_osd_lun_info_t *lun_info)
935 /* dissecting the CDB dissection starts at byte 10 of the CDB */
938 dissect_osd_option(tvb, offset, tree);
941 /* getset attributes byte */
942 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
945 /* timestamps control */
946 dissect_osd_timestamps_control(tvb, offset, tree);
949 /* 3 reserved bytes */
952 /* requested partiton id */
953 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_requested_partition_id, lun_info, TRUE, FALSE);
956 /* 28 reserved bytes */
959 /* attribute parameters */
960 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
964 dissect_osd_capability(tvb, offset, tree);
967 /* security parameters */
968 dissect_osd_security_parameters(tvb, offset, tree);
972 /* dissecting the DATA OUT */
974 /* attribute data out */
975 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
977 /* no data out for create partition */
980 /* dissecting the DATA IN */
981 if(!isreq && !iscdb){
982 /* attribute data in */
983 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
985 /* no data in for create partition */
990 static const value_string scsi_osd_sort_order_vals[] = {
991 {0x00, "Ascending numeric value"},
995 dissect_osd_sortorder(tvbuff_t *tvb, int offset, proto_tree *tree)
998 proto_tree_add_item(tree, hf_scsi_osd_sortorder, tvb, offset, 1, 0);
1003 dissect_osd_list_identifier(tvbuff_t *tvb, int offset, proto_tree *tree)
1005 /* list identifier */
1006 proto_tree_add_item(tree, hf_scsi_osd_list_identifier, tvb, offset, 4, 0);
1011 dissect_osd_allocation_length(tvbuff_t *tvb, int offset, proto_tree *tree)
1013 /* allocation length */
1014 proto_tree_add_item(tree, hf_scsi_osd_allocation_length, tvb, offset, 8, 0);
1019 dissect_osd_initial_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1021 /* initial object id */
1022 proto_tree_add_item(tree, hf_scsi_osd_initial_object_id, tvb, offset, 8, 0);
1027 dissect_osd_additional_length(tvbuff_t *tvb, int offset, proto_tree *tree)
1029 /* additional length */
1030 proto_tree_add_item(tree, hf_scsi_osd_additional_length, tvb, offset, 8, 0);
1036 dissect_osd_continuation_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1038 /* continuation object id */
1039 proto_tree_add_item(tree, hf_scsi_osd_continuation_object_id, tvb, offset, 8, 0);
1043 static const true_false_string list_lstchg_tfs = {
1044 "List has CHANGED since the first List command",
1045 "List has NOT changed since first command"
1047 static const true_false_string list_root_tfs = {
1048 "Objects are from root and are PARTITION IDs",
1049 "Objects are from a partition and are USER OBJECTs"
1054 dissect_osd_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1055 guint offset, gboolean isreq, gboolean iscdb,
1056 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1057 scsi_osd_conv_info_t *conv_info _U_,
1058 scsi_osd_lun_info_t *lun_info)
1060 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1063 dissect_osd_option(tvb, offset, tree);
1066 /* getset attributes byte / sort order */
1067 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1068 dissect_osd_sortorder(tvb, offset, tree);
1071 /* timestamps control */
1072 dissect_osd_timestamps_control(tvb, offset, tree);
1075 /* 3 reserved bytes */
1079 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1082 /* 8 reserved bytes */
1085 /* list identifier */
1086 dissect_osd_list_identifier(tvb, offset, tree);
1089 /* allocation length */
1090 dissect_osd_allocation_length(tvb, offset, tree);
1093 /* initial object id */
1094 dissect_osd_initial_object_id(tvb, offset, tree);
1097 /* attribute parameters */
1098 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1102 dissect_osd_capability(tvb, offset, tree);
1105 /* security parameters */
1106 dissect_osd_security_parameters(tvb, offset, tree);
1110 /* dissecting the DATA OUT */
1111 if(isreq && !iscdb){
1112 /* attribute data out */
1113 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1115 /* no data out for LIST */
1118 /* dissecting the DATA IN */
1119 if(!isreq && !iscdb){
1120 guint64 additional_length;
1123 /* attribute data in */
1124 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1126 /* dissection of the LIST DATA-IN */
1127 /* additional length */
1128 additional_length=tvb_get_ntoh64(tvb, offset);
1129 dissect_osd_additional_length(tvb, offset, tree);
1132 /* continuation object id */
1133 dissect_osd_continuation_object_id(tvb, offset, tree);
1136 /* list identifier */
1137 dissect_osd_list_identifier(tvb, offset, tree);
1140 /* 3 reserved bytes */
1143 /* LSTCHG and ROOT flags */
1144 proto_tree_add_item(tree, hf_scsi_osd_list_flags_lstchg, tvb, offset, 1, 0);
1145 proto_tree_add_item(tree, hf_scsi_osd_list_flags_root, tvb, offset, 1, 0);
1146 is_root=tvb_get_guint8(tvb, offset)&0x01;
1150 /* list of user object ids or partition ids */
1151 while(additional_length > (offset-8)){
1153 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1155 dissect_osd_user_object_id(tvb, offset, tree);
1164 dissect_osd_requested_user_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1166 /* request user object id */
1167 proto_tree_add_item(tree, hf_scsi_osd_requested_user_object_id, tvb, offset, 8, 0);
1172 dissect_osd_number_of_user_objects(tvbuff_t *tvb, int offset, proto_tree *tree)
1174 /* number_of_user_objects */
1175 proto_tree_add_item(tree, hf_scsi_osd_number_of_user_objects, tvb, offset, 2, 0);
1180 dissect_osd_create(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1181 guint offset, gboolean isreq, gboolean iscdb,
1182 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1183 scsi_osd_conv_info_t *conv_info _U_,
1184 scsi_osd_lun_info_t *lun_info)
1186 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1189 dissect_osd_option(tvb, offset, tree);
1192 /* getset attributes byte */
1193 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1196 /* timestamps control */
1197 dissect_osd_timestamps_control(tvb, offset, tree);
1200 /* 3 reserved bytes */
1204 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1207 /* requested user_object id */
1208 dissect_osd_requested_user_object_id(tvb, offset, tree);
1211 /* 4 reserved bytes */
1214 /* number of user objects */
1215 dissect_osd_number_of_user_objects(tvb, offset, tree);
1218 /* 14 reserved bytes */
1221 /* attribute parameters */
1222 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1226 dissect_osd_capability(tvb, offset, tree);
1229 /* security parameters */
1230 dissect_osd_security_parameters(tvb, offset, tree);
1234 /* dissecting the DATA OUT */
1235 if(isreq && !iscdb){
1236 /* attribute data out */
1237 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1239 /* no data out for create */
1242 /* dissecting the DATA IN */
1243 if(!isreq && !iscdb){
1244 /* attribute data in */
1245 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1247 /* no data in for create */
1254 dissect_osd_remove_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1255 guint offset, gboolean isreq, gboolean iscdb,
1256 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1257 scsi_osd_conv_info_t *conv_info _U_,
1258 scsi_osd_lun_info_t *lun_info)
1260 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1263 dissect_osd_option(tvb, offset, tree);
1266 /* getset attributes byte */
1267 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1270 /* timestamps control */
1271 dissect_osd_timestamps_control(tvb, offset, tree);
1274 /* 3 reserved bytes */
1278 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, TRUE);
1281 /* 28 reserved bytes */
1284 /* attribute parameters */
1285 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1289 dissect_osd_capability(tvb, offset, tree);
1292 /* security parameters */
1293 dissect_osd_security_parameters(tvb, offset, tree);
1297 /* dissecting the DATA OUT */
1298 if(isreq && !iscdb){
1299 /* attribute data out */
1300 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1302 /* no data out for remove partition */
1305 /* dissecting the DATA IN */
1306 if(!isreq && !iscdb){
1307 /* attribute data in */
1308 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1310 /* no data in for remove partition */
1315 static const value_string key_to_set_vals[] = {
1322 dissect_osd_key_to_set(tvbuff_t *tvb, int offset, proto_tree *tree)
1324 proto_tree_add_item(tree, hf_scsi_osd_key_to_set, tvb, offset, 1, 0);
1328 dissect_osd_set_key_version(tvbuff_t *tvb, int offset, proto_tree *tree)
1330 proto_tree_add_item(tree, hf_scsi_osd_set_key_version, tvb, offset, 1, 0);
1334 dissect_osd_key_identifier(tvbuff_t *tvb, int offset, proto_tree *tree)
1336 proto_tree_add_item(tree, hf_scsi_osd_key_identifier, tvb, offset, 7, 0);
1340 dissect_osd_seed(tvbuff_t *tvb, int offset, proto_tree *tree)
1342 proto_tree_add_item(tree, hf_scsi_osd_seed, tvb, offset, 20, 0);
1346 dissect_osd_set_key(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1347 guint offset, gboolean isreq, gboolean iscdb,
1348 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1349 scsi_osd_conv_info_t *conv_info _U_,
1350 scsi_osd_lun_info_t *lun_info)
1352 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1354 /* a reserved byte */
1357 /* getset attributes byte and key to set*/
1358 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1359 dissect_osd_key_to_set(tvb, offset, tree);
1362 /* timestamps control */
1363 dissect_osd_timestamps_control(tvb, offset, tree);
1366 /* 3 reserved bytes */
1370 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1374 dissect_osd_set_key_version(tvb, offset, tree);
1377 /* key identifier */
1378 dissect_osd_key_identifier(tvb, offset, tree);
1382 dissect_osd_seed(tvb, offset, tree);
1385 /* attribute parameters */
1386 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1390 dissect_osd_capability(tvb, offset, tree);
1393 /* security parameters */
1394 dissect_osd_security_parameters(tvb, offset, tree);
1398 /* dissecting the DATA OUT */
1399 if(isreq && !iscdb){
1400 /* attribute data out */
1401 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1403 /* no data out for set key */
1406 /* dissecting the DATA IN */
1407 if(!isreq && !iscdb){
1408 /* attribute data in */
1409 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1411 /* no data in for set key */
1417 dissect_osd_remove(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1418 guint offset, gboolean isreq, gboolean iscdb,
1419 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1420 scsi_osd_conv_info_t *conv_info _U_,
1421 scsi_osd_lun_info_t *lun_info)
1423 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1426 dissect_osd_option(tvb, offset, tree);
1429 /* getset attributes byte */
1430 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1433 /* timestamps control */
1434 dissect_osd_timestamps_control(tvb, offset, tree);
1437 /* 3 reserved bytes */
1441 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1444 /* user object id */
1445 dissect_osd_user_object_id(tvb, offset, tree);
1448 /* 20 reserved bytes */
1451 /* attribute parameters */
1452 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1456 dissect_osd_capability(tvb, offset, tree);
1459 /* security parameters */
1460 dissect_osd_security_parameters(tvb, offset, tree);
1464 /* dissecting the DATA OUT */
1465 if(isreq && !iscdb){
1466 /* attribute data out */
1467 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1469 /* no data out for remove */
1472 /* dissecting the DATA IN */
1473 if(!isreq && !iscdb){
1474 /* attribute data in */
1475 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1477 /* no data in for remove */
1482 static const true_false_string collection_fcr_tfs = {
1487 dissect_osd_collection_fcr(tvbuff_t *tvb, int offset, proto_tree *tree)
1489 proto_tree_add_item(tree, hf_scsi_osd_collection_fcr, tvb, offset, 1, 0);
1493 dissect_osd_collection_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1495 /* collection object id */
1496 proto_tree_add_item(tree, hf_scsi_osd_collection_object_id, tvb, offset, 8, 0);
1502 dissect_osd_remove_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1503 guint offset, gboolean isreq, gboolean iscdb,
1504 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1505 scsi_osd_conv_info_t *conv_info _U_,
1506 scsi_osd_lun_info_t *lun_info)
1508 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1511 dissect_osd_option(tvb, offset, tree);
1514 /* getset attributes byte */
1515 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1516 dissect_osd_collection_fcr(tvb, offset, tree);
1519 /* timestamps control */
1520 dissect_osd_timestamps_control(tvb, offset, tree);
1523 /* 3 reserved bytes */
1527 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1530 /* collection object id */
1531 dissect_osd_collection_object_id(tvb, offset, tree);
1534 /* 20 reserved bytes */
1537 /* attribute parameters */
1538 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1542 dissect_osd_capability(tvb, offset, tree);
1545 /* security parameters */
1546 dissect_osd_security_parameters(tvb, offset, tree);
1550 /* dissecting the DATA OUT */
1551 if(isreq && !iscdb){
1552 /* attribute data out */
1553 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1555 /* no data out for remove collection */
1558 /* dissecting the DATA IN */
1559 if(!isreq && !iscdb){
1560 /* attribute data in */
1561 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1563 /* no data in for remove collection */
1570 dissect_osd_length(tvbuff_t *tvb, int offset, proto_tree *tree)
1573 proto_tree_add_item(tree, hf_scsi_osd_length, tvb, offset, 8, 0);
1578 dissect_osd_starting_byte_address(tvbuff_t *tvb, int offset, proto_tree *tree)
1580 /* starting_byte_address */
1581 proto_tree_add_item(tree, hf_scsi_osd_starting_byte_address, tvb, offset, 8, 0);
1587 dissect_osd_write(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1588 guint offset, gboolean isreq, gboolean iscdb,
1589 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1590 scsi_osd_conv_info_t *conv_info _U_,
1591 scsi_osd_lun_info_t *lun_info)
1593 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1596 dissect_osd_option(tvb, offset, tree);
1599 /* getset attributes byte / sort order */
1600 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1603 /* timestamps control */
1604 dissect_osd_timestamps_control(tvb, offset, tree);
1607 /* 3 reserved bytes */
1611 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1614 /* user object id */
1615 dissect_osd_user_object_id(tvb, offset, tree);
1618 /* 4 reserved bytes */
1622 dissect_osd_length(tvb, offset, tree);
1625 /* starting byte address */
1626 dissect_osd_starting_byte_address(tvb, offset, tree);
1629 /* attribute parameters */
1630 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1634 dissect_osd_capability(tvb, offset, tree);
1637 /* security parameters */
1638 dissect_osd_security_parameters(tvb, offset, tree);
1642 /* dissecting the DATA OUT */
1643 if(isreq && !iscdb){
1644 /* attribute data out */
1645 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1647 /* xxx should dissect the data ? */
1650 /* dissecting the DATA IN */
1651 if(!isreq && !iscdb){
1652 /* attribute data in */
1653 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1655 /* no data in for WRITE */
1662 dissect_osd_requested_collection_object_id(tvbuff_t *tvb, int offset, proto_tree *tree)
1664 /* requested collection object id */
1665 proto_tree_add_item(tree, hf_scsi_osd_requested_collection_object_id, tvb, offset, 8, 0);
1671 dissect_osd_create_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1672 guint offset, gboolean isreq, gboolean iscdb,
1673 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1674 scsi_osd_conv_info_t *conv_info _U_,
1675 scsi_osd_lun_info_t *lun_info)
1677 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1680 dissect_osd_option(tvb, offset, tree);
1683 /* getset attributes byte */
1684 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1685 dissect_osd_collection_fcr(tvb, offset, tree);
1688 /* timestamps control */
1689 dissect_osd_timestamps_control(tvb, offset, tree);
1692 /* 3 reserved bytes */
1696 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1699 /* requested collection object id */
1700 dissect_osd_requested_collection_object_id(tvb, offset, tree);
1703 /* 20 reserved bytes */
1706 /* attribute parameters */
1707 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1711 dissect_osd_capability(tvb, offset, tree);
1714 /* security parameters */
1715 dissect_osd_security_parameters(tvb, offset, tree);
1719 /* dissecting the DATA OUT */
1720 if(isreq && !iscdb){
1721 /* attribute data out */
1722 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1724 /* no data out for create collection */
1727 /* dissecting the DATA IN */
1728 if(!isreq && !iscdb){
1729 /* attribute data in */
1730 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1732 /* no data in for create collection */
1738 static const value_string flush_scope_vals[] = {
1739 {0, "User object data and attributes"},
1740 {1, "User object attributes only"},
1745 dissect_osd_flush_scope(tvbuff_t *tvb, int offset, proto_tree *tree)
1748 proto_tree_add_item(tree, hf_scsi_osd_flush_scope, tvb, offset, 1, 0);
1753 dissect_osd_flush(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1754 guint offset, gboolean isreq, gboolean iscdb,
1755 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1756 scsi_osd_conv_info_t *conv_info _U_,
1757 scsi_osd_lun_info_t *lun_info)
1759 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1762 dissect_osd_flush_scope(tvb, offset, tree);
1765 /* getset attributes byte */
1766 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1769 /* timestamps control */
1770 dissect_osd_timestamps_control(tvb, offset, tree);
1773 /* 3 reserved bytes */
1777 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1780 /* user object id */
1781 dissect_osd_user_object_id(tvb, offset, tree);
1784 /* 20 reserved bytes */
1787 /* attribute parameters */
1788 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1792 dissect_osd_capability(tvb, offset, tree);
1795 /* security parameters */
1796 dissect_osd_security_parameters(tvb, offset, tree);
1800 /* dissecting the DATA OUT */
1801 if(isreq && !iscdb){
1802 /* attribute data out */
1803 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1805 /* no data out for flush */
1808 /* dissecting the DATA IN */
1809 if(!isreq && !iscdb){
1810 /* attribute data in */
1811 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1813 /* no data in for flush */
1819 static const value_string flush_collection_scope_vals[] = {
1820 {0, "List of user objects contained in the collection"},
1821 {1, "Collection attributes only"},
1822 {2, "List of user objects and collection attributes"},
1827 dissect_osd_flush_collection_scope(tvbuff_t *tvb, int offset, proto_tree *tree)
1829 /* flush collection scope */
1830 proto_tree_add_item(tree, hf_scsi_osd_flush_collection_scope, tvb, offset, 1, 0);
1835 dissect_osd_flush_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1836 guint offset, gboolean isreq, gboolean iscdb,
1837 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1838 scsi_osd_conv_info_t *conv_info _U_,
1839 scsi_osd_lun_info_t *lun_info)
1841 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1844 dissect_osd_flush_collection_scope(tvb, offset, tree);
1847 /* getset attributes byte */
1848 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1849 dissect_osd_collection_fcr(tvb, offset, tree);
1852 /* timestamps control */
1853 dissect_osd_timestamps_control(tvb, offset, tree);
1856 /* 3 reserved bytes */
1860 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1863 /* collection object id */
1864 dissect_osd_collection_object_id(tvb, offset, tree);
1867 /* 20 reserved bytes */
1870 /* attribute parameters */
1871 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1875 dissect_osd_capability(tvb, offset, tree);
1878 /* security parameters */
1879 dissect_osd_security_parameters(tvb, offset, tree);
1883 /* dissecting the DATA OUT */
1884 if(isreq && !iscdb){
1885 /* attribute data out */
1886 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1888 /* no data out for flush collection */
1891 /* dissecting the DATA IN */
1892 if(!isreq && !iscdb){
1893 /* attribute data in */
1894 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1896 /* no data in for flush collection */
1903 dissect_osd_append(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1904 guint offset, gboolean isreq, gboolean iscdb,
1905 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1906 scsi_osd_conv_info_t *conv_info _U_,
1907 scsi_osd_lun_info_t *lun_info)
1909 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1912 dissect_osd_option(tvb, offset, tree);
1915 /* getset attributes byte / sort order */
1916 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1917 dissect_osd_sortorder(tvb, offset, tree);
1920 /* timestamps control */
1921 dissect_osd_timestamps_control(tvb, offset, tree);
1924 /* 3 reserved bytes */
1928 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
1931 /* user object id */
1932 dissect_osd_user_object_id(tvb, offset, tree);
1935 /* 4 reserved bytes */
1939 dissect_osd_length(tvb, offset, tree);
1942 /* 8 reserved bytes */
1945 /* attribute parameters */
1946 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
1950 dissect_osd_capability(tvb, offset, tree);
1953 /* security parameters */
1954 dissect_osd_security_parameters(tvb, offset, tree);
1958 /* dissecting the DATA OUT */
1959 if(isreq && !iscdb){
1960 /* attribute data out */
1961 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
1963 /* xxx should dissect the data ? */
1966 /* dissecting the DATA IN */
1967 if(!isreq && !iscdb){
1968 /* attribute data in */
1969 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
1971 /* no data in for append */
1977 dissect_osd_create_and_write(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1978 guint offset, gboolean isreq, gboolean iscdb,
1979 guint payload_len _U_, scsi_task_data_t *cdata _U_,
1980 scsi_osd_conv_info_t *conv_info _U_,
1981 scsi_osd_lun_info_t *lun_info)
1983 /* dissecting the CDB dissection starts at byte 10 of the CDB */
1986 dissect_osd_option(tvb, offset, tree);
1989 /* getset attributes byte */
1990 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
1993 /* timestamps control */
1994 dissect_osd_timestamps_control(tvb, offset, tree);
1997 /* 3 reserved bytes */
2001 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
2004 /* requested user_object id */
2005 dissect_osd_requested_user_object_id(tvb, offset, tree);
2008 /* 4 reserved bytes */
2012 dissect_osd_length(tvb, offset, tree);
2015 /* starting byte address */
2016 dissect_osd_starting_byte_address(tvb, offset, tree);
2019 /* attribute parameters */
2020 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2024 dissect_osd_capability(tvb, offset, tree);
2027 /* security parameters */
2028 dissect_osd_security_parameters(tvb, offset, tree);
2032 /* dissecting the DATA OUT */
2033 if(isreq && !iscdb){
2034 /* attribute data out */
2035 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2037 /* should we dissect the data? */
2040 /* dissecting the DATA IN */
2041 if(!isreq && !iscdb){
2042 /* attribute data in */
2043 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2045 /* no data in for create and write*/
2051 static const value_string flush_osd_scope_vals[] = {
2052 {0, "List of partitions contained in the OSD logical unit"},
2053 {1, "Root object attributes only"},
2059 dissect_osd_flush_osd_scope(tvbuff_t *tvb, int offset, proto_tree *tree)
2061 /* flush osd scope */
2062 proto_tree_add_item(tree, hf_scsi_osd_flush_osd_scope, tvb, offset, 1, 0);
2067 dissect_osd_flush_osd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2068 guint offset, gboolean isreq, gboolean iscdb,
2069 guint payload_len _U_, scsi_task_data_t *cdata _U_,
2070 scsi_osd_conv_info_t *conv_info _U_,
2071 scsi_osd_lun_info_t *lun_info _U_)
2073 /* dissecting the CDB dissection starts at byte 10 of the CDB */
2076 dissect_osd_flush_osd_scope(tvb, offset, tree);
2079 /* getset attributes byte */
2080 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
2083 /* timestamps control */
2084 dissect_osd_timestamps_control(tvb, offset, tree);
2087 /* 39 reserved bytes */
2090 /* attribute parameters */
2091 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2095 dissect_osd_capability(tvb, offset, tree);
2098 /* security parameters */
2099 dissect_osd_security_parameters(tvb, offset, tree);
2103 /* dissecting the DATA OUT */
2104 if(isreq && !iscdb){
2105 /* attribute data out */
2106 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2108 /* no data out for flush osd */
2111 /* dissecting the DATA IN */
2112 if(!isreq && !iscdb){
2113 /* attribute data in */
2114 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2116 /* no data in for flush osd */
2122 static const value_string flush_partition_scope_vals[] = {
2123 {0, "List of user objects and collections in the partition"},
2124 {1, "Partition attributes only"},
2130 dissect_osd_flush_partition_scope(tvbuff_t *tvb, int offset, proto_tree *tree)
2132 /* flush partition scope */
2133 proto_tree_add_item(tree, hf_scsi_osd_flush_partition_scope, tvb, offset, 1, 0);
2139 dissect_osd_flush_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2140 guint offset, gboolean isreq, gboolean iscdb,
2141 guint payload_len _U_, scsi_task_data_t *cdata _U_,
2142 scsi_osd_conv_info_t *conv_info _U_,
2143 scsi_osd_lun_info_t *lun_info)
2145 /* dissecting the CDB dissection starts at byte 10 of the CDB */
2148 dissect_osd_flush_partition_scope(tvb, offset, tree);
2151 /* getset attributes byte */
2152 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
2155 /* timestamps control */
2156 dissect_osd_timestamps_control(tvb, offset, tree);
2159 /* 3 reserved bytes */
2163 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
2166 /* 28 reserved bytes */
2169 /* attribute parameters */
2170 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2174 dissect_osd_capability(tvb, offset, tree);
2177 /* security parameters */
2178 dissect_osd_security_parameters(tvb, offset, tree);
2182 /* dissecting the DATA OUT */
2183 if(isreq && !iscdb){
2184 /* attribute data out */
2185 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2187 /* no data out for flush partition */
2190 /* dissecting the DATA IN */
2191 if(!isreq && !iscdb){
2192 /* attribute data in */
2193 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2195 /* no data in for flush partition */
2202 dissect_osd_get_attributes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2203 guint offset, gboolean isreq, gboolean iscdb,
2204 guint payload_len _U_, scsi_task_data_t *cdata _U_,
2205 scsi_osd_conv_info_t *conv_info _U_,
2206 scsi_osd_lun_info_t *lun_info)
2208 /* dissecting the CDB dissection starts at byte 10 of the CDB */
2211 dissect_osd_option(tvb, offset, tree);
2214 /* getset attributes byte */
2215 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
2218 /* timestamps control */
2219 dissect_osd_timestamps_control(tvb, offset, tree);
2222 /* 3 reserved bytes */
2226 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, TRUE);
2229 /* user_object id */
2230 dissect_osd_user_object_id(tvb, offset, tree);
2233 /* 20 reserved bytes */
2236 /* attribute parameters */
2237 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2241 dissect_osd_capability(tvb, offset, tree);
2244 /* security parameters */
2245 dissect_osd_security_parameters(tvb, offset, tree);
2249 /* dissecting the DATA OUT */
2250 if(isreq && !iscdb){
2251 /* attribute data out */
2252 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2254 /* no data out for get attributes */
2257 /* dissecting the DATA IN */
2258 if(!isreq && !iscdb){
2259 /* attribute data in */
2260 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2262 /* no data in for get attributes */
2269 dissect_osd_list_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2270 guint offset, gboolean isreq, gboolean iscdb,
2271 guint payload_len _U_, scsi_task_data_t *cdata _U_,
2272 scsi_osd_conv_info_t *conv_info _U_,
2273 scsi_osd_lun_info_t *lun_info)
2275 /* dissecting the CDB dissection starts at byte 10 of the CDB */
2277 /* one reserved byte */
2280 /* getset attributes byte */
2281 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
2284 /* timestamps control */
2285 dissect_osd_timestamps_control(tvb, offset, tree);
2288 /* 3 reserved bytes */
2292 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
2295 /* collection object id */
2296 dissect_osd_collection_object_id(tvb, offset, tree);
2299 /* list identifier */
2300 dissect_osd_list_identifier(tvb, offset, tree);
2303 /* allocation length */
2304 dissect_osd_allocation_length(tvb, offset, tree);
2307 /* initial object id */
2308 dissect_osd_initial_object_id(tvb, offset, tree);
2311 /* attribute parameters */
2312 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2316 dissect_osd_capability(tvb, offset, tree);
2319 /* security parameters */
2320 dissect_osd_security_parameters(tvb, offset, tree);
2324 /* dissecting the DATA OUT */
2325 if(isreq && !iscdb){
2326 /* attribute data out */
2327 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2329 /* no data out for list collection */
2332 /* dissecting the DATA IN */
2333 if(!isreq && !iscdb){
2334 /* attribute data in */
2335 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2337 /* XXX dissect the data */
2345 dissect_osd_read(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2346 guint offset, gboolean isreq, gboolean iscdb,
2347 guint payload_len _U_, scsi_task_data_t *cdata _U_,
2348 scsi_osd_conv_info_t *conv_info _U_,
2349 scsi_osd_lun_info_t *lun_info)
2351 /* dissecting the CDB dissection starts at byte 10 of the CDB */
2354 dissect_osd_option(tvb, offset, tree);
2357 /* getset attributes byte / sort order */
2358 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
2361 /* timestamps control */
2362 dissect_osd_timestamps_control(tvb, offset, tree);
2365 /* 3 reserved bytes */
2369 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, FALSE);
2372 /* user object id */
2373 dissect_osd_user_object_id(tvb, offset, tree);
2376 /* 4 reserved bytes */
2380 dissect_osd_length(tvb, offset, tree);
2383 /* starting byte address */
2384 dissect_osd_starting_byte_address(tvb, offset, tree);
2387 /* attribute parameters */
2388 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2392 dissect_osd_capability(tvb, offset, tree);
2395 /* security parameters */
2396 dissect_osd_security_parameters(tvb, offset, tree);
2400 /* dissecting the DATA OUT */
2401 if(isreq && !iscdb){
2402 /* attribute data out */
2403 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2405 /* no data out for READ */
2408 /* dissecting the DATA IN */
2409 if(!isreq && !iscdb){
2410 /* attribute data in */
2411 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2413 /* xxx should dissect the data ? */
2420 dissect_osd_set_attributes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2421 guint offset, gboolean isreq, gboolean iscdb,
2422 guint payload_len _U_, scsi_task_data_t *cdata _U_,
2423 scsi_osd_conv_info_t *conv_info _U_,
2424 scsi_osd_lun_info_t *lun_info)
2426 /* dissecting the CDB dissection starts at byte 10 of the CDB */
2429 dissect_osd_option(tvb, offset, tree);
2432 /* getset attributes byte */
2433 dissect_osd_getsetattrib(tvb, offset, tree, cdata);
2436 /* timestamps control */
2437 dissect_osd_timestamps_control(tvb, offset, tree);
2440 /* 3 reserved bytes */
2444 dissect_osd_partition_id(pinfo, tvb, offset, tree, hf_scsi_osd_partition_id, lun_info, FALSE, TRUE);
2447 /* user_object id */
2448 dissect_osd_user_object_id(tvb, offset, tree);
2451 /* 20 reserved bytes */
2454 /* attribute parameters */
2455 dissect_osd_attribute_parameters(tvb, offset, tree, cdata);
2459 dissect_osd_capability(tvb, offset, tree);
2462 /* security parameters */
2463 dissect_osd_security_parameters(tvb, offset, tree);
2467 /* dissecting the DATA OUT */
2468 if(isreq && !iscdb){
2469 /* attribute data out */
2470 dissect_osd_attribute_data_out(pinfo, tvb, offset, tree, cdata);
2472 /* no data out for set attributes */
2475 /* dissecting the DATA IN */
2476 if(!isreq && !iscdb){
2477 /* attribute data in */
2478 dissect_osd_attribute_data_in(pinfo, tvb, offset, tree, cdata);
2480 /* no data in for set attributes */
2485 /* OSD Service Actions */
2486 #define OSD_FORMAT_OSD 0x8801
2487 #define OSD_CREATE 0x8802
2488 #define OSD_LIST 0x8803
2489 #define OSD_READ 0x8805
2490 #define OSD_WRITE 0x8806
2491 #define OSD_APPEND 0x8807
2492 #define OSD_FLUSH 0x8808
2493 #define OSD_REMOVE 0x880a
2494 #define OSD_CREATE_PARTITION 0x880b
2495 #define OSD_REMOVE_PARTITION 0x880c
2496 #define OSD_GET_ATTRIBUTES 0x880e
2497 #define OSD_SET_ATTRIBUTES 0x880f
2498 #define OSD_CREATE_AND_WRITE 0x8812
2499 #define OSD_CREATE_COLLECTION 0x8815
2500 #define OSD_REMOVE_COLLECTION 0x8816
2501 #define OSD_LIST_COLLECTION 0x8817
2502 #define OSD_SET_KEY 0x8818
2503 #define OSD_FLUSH_COLLECTION 0x881a
2504 #define OSD_FLUSH_PARTITION 0x881b
2505 #define OSD_FLUSH_OSD 0x881c
2506 static const value_string scsi_osd_svcaction_vals[] = {
2507 {OSD_FORMAT_OSD, "Format OSD"},
2508 {OSD_CREATE, "Create"},
2511 {OSD_WRITE, "Write"},
2512 {OSD_APPEND, "Append"},
2513 {OSD_FLUSH, "Flush"},
2514 {OSD_REMOVE, "Remove"},
2515 {OSD_CREATE_PARTITION, "Create Partition"},
2516 {OSD_REMOVE_PARTITION, "Remove Partition"},
2517 {OSD_GET_ATTRIBUTES, "Get Attributes"},
2518 {OSD_SET_ATTRIBUTES, "Set Attributes"},
2519 {OSD_CREATE_AND_WRITE, "Create And Write"},
2520 {OSD_CREATE_COLLECTION, "Create Collection"},
2521 {OSD_REMOVE_COLLECTION, "Remove Collection"},
2522 {OSD_LIST_COLLECTION, "List Collection"},
2523 {OSD_SET_KEY, "Set Key"},
2524 {OSD_FLUSH_COLLECTION, "Flush Collection"},
2525 {OSD_FLUSH_PARTITION, "Flush Partition"},
2526 {OSD_FLUSH_OSD, "Flush OSD"},
2530 /* OSD Service Action dissectors */
2531 typedef struct _scsi_osd_svcaction_t {
2533 scsi_osd_dissector_t dissector;
2534 } scsi_osd_svcaction_t;
2535 static const scsi_osd_svcaction_t scsi_osd_svcaction[] = {
2536 {OSD_FORMAT_OSD, dissect_osd_format_osd},
2537 {OSD_CREATE, dissect_osd_create},
2538 {OSD_LIST, dissect_osd_list},
2539 {OSD_READ, dissect_osd_read},
2540 {OSD_WRITE, dissect_osd_write},
2541 {OSD_APPEND, dissect_osd_append},
2542 {OSD_FLUSH, dissect_osd_flush},
2543 {OSD_REMOVE, dissect_osd_remove},
2544 {OSD_CREATE_PARTITION, dissect_osd_create_partition},
2545 {OSD_REMOVE_PARTITION, dissect_osd_remove_partition},
2546 {OSD_GET_ATTRIBUTES, dissect_osd_get_attributes},
2547 {OSD_SET_ATTRIBUTES, dissect_osd_set_attributes},
2548 {OSD_CREATE_AND_WRITE, dissect_osd_create_and_write},
2549 {OSD_CREATE_COLLECTION, dissect_osd_create_collection},
2550 {OSD_REMOVE_COLLECTION, dissect_osd_remove_collection},
2551 {OSD_LIST_COLLECTION, dissect_osd_list_collection},
2552 {OSD_SET_KEY, dissect_osd_set_key},
2553 {OSD_FLUSH_COLLECTION, dissect_osd_flush_collection},
2554 {OSD_FLUSH_PARTITION, dissect_osd_flush_partition},
2555 {OSD_FLUSH_OSD, dissect_osd_flush_osd},
2559 static scsi_osd_dissector_t
2560 find_svcaction_dissector(guint16 svcaction)
2562 const scsi_osd_svcaction_t *sa=scsi_osd_svcaction;
2564 while(sa&&sa->dissector){
2565 if(sa->svcaction==svcaction){
2566 return sa->dissector;
2576 dissect_osd_opcode(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
2577 guint offset, gboolean isreq, gboolean iscdb,
2578 guint payload_len, scsi_task_data_t *cdata)
2580 guint16 svcaction=0;
2581 scsi_osd_dissector_t dissector;
2582 scsi_osd_conv_info_t *conv_info=NULL;
2583 scsi_osd_lun_info_t *lun_info=NULL;
2589 /* We must have an itl an itlq and a conversation */
2590 if(!cdata || !cdata->itl || !cdata->itl->conversation || !cdata->itlq){
2593 /* make sure we have a conversation info for this */
2594 conv_info=conversation_get_proto_data(cdata->itl->conversation, proto_scsi_osd);
2596 conv_info=se_alloc(sizeof(scsi_osd_conv_info_t));
2597 conv_info->luns=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "SCSI OSD luns tree");
2598 conversation_add_proto_data(cdata->itl->conversation, proto_scsi_osd, conv_info);
2600 /* make sure we have a lun_info structure for this */
2601 lun_info=se_tree_lookup32(conv_info->luns, cdata->itlq->lun);
2603 lun_info=se_alloc(sizeof(scsi_osd_lun_info_t));
2604 lun_info->partitions=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "SCSI OSD partitions tree");
2605 se_tree_insert32(conv_info->luns, cdata->itlq->lun, (void *)lun_info);
2608 /* dissecting the CDB */
2609 if (isreq && iscdb) {
2610 proto_tree_add_item (tree, hf_scsi_control, tvb, offset, 1, 0);
2613 /* 5 reserved bytes */
2616 proto_tree_add_item (tree, hf_scsi_osd_add_cdblen, tvb, offset, 1, 0);
2619 svcaction=tvb_get_ntohs(tvb, offset);
2620 if(cdata && cdata->itlq){
2621 /* We must store the service action for this itlq
2622 * so we can indentify what the data contains
2624 if((!pinfo->fd->flags.visited) && (!cdata->itlq->extra_data)){
2625 scsi_osd_extra_data_t *extra_data;
2627 extra_data=se_alloc(sizeof(scsi_osd_extra_data_t));
2628 extra_data->svcaction=svcaction;
2629 extra_data->gsatype=0;
2630 cdata->itlq->extra_data=extra_data;
2633 proto_tree_add_item (tree, hf_scsi_osd_svcaction, tvb, offset, 2, 0);
2637 if(check_col(pinfo->cinfo, COL_INFO)){
2638 col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
2639 val_to_str(svcaction, scsi_osd_svcaction_vals, "Unknown OSD Serviceaction"));
2641 dissector=find_svcaction_dissector(svcaction);
2643 (*dissector)(tvb, pinfo, tree, offset, isreq, iscdb, payload_len, cdata, conv_info, lun_info);
2648 /* If it was not a CDB, try to find the service action and pass it
2649 * off to the service action dissector
2651 if(cdata && cdata->itlq && cdata->itlq->extra_data){
2652 scsi_osd_extra_data_t *extra_data=cdata->itlq->extra_data;
2653 svcaction=extra_data->svcaction;
2655 if(check_col(pinfo->cinfo, COL_INFO)){
2656 col_append_fstr(pinfo->cinfo, COL_INFO, "%s",
2657 val_to_str(svcaction, scsi_osd_svcaction_vals, "Unknown OSD Serviceaction"));
2661 it=proto_tree_add_uint_format(tree, hf_scsi_osd_svcaction, tvb, 0, 0, svcaction, "Service Action: 0x%04x", svcaction);
2662 PROTO_ITEM_SET_GENERATED(it);
2664 dissector=find_svcaction_dissector(svcaction);
2666 (*dissector)(tvb, pinfo, tree, offset, isreq, iscdb, payload_len, cdata, conv_info, lun_info);
2673 const value_string scsi_osd_vals[] = {
2674 {SCSI_SPC_INQUIRY , "Inquiry"},
2675 {SCSI_SPC_LOGSELECT , "Log Select"},
2676 {SCSI_SPC_LOGSENSE , "Log Sense"},
2677 {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
2678 {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
2679 {SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
2680 {SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
2681 {SCSI_SPC_REPORTLUNS , "Report LUNs"},
2682 {SCSI_OSD_OPCODE , "OSD Command" },
2688 scsi_cdb_table_t scsi_osd_table[256] = {
2707 /*OSD 0x12*/{dissect_spc_inquiry},
2765 /*OSD 0x4c*/{dissect_spc_logselect},
2766 /*OSD 0x4d*/{dissect_spc_logsense},
2774 /*OSD 0x55*/{dissect_spc_modeselect10},
2779 /*OSD 0x5a*/{dissect_spc_modesense10},
2783 /*OSD 0x5e*/{dissect_spc_persistentreservein},
2784 /*OSD 0x5f*/{dissect_spc_persistentreserveout},
2816 /*OSD 0x7f*/{dissect_osd_opcode},
2849 /*OSD 0xa0*/{dissect_spc_reportluns},
2951 proto_register_scsi_osd(void)
2953 static hf_register_info hf[] = {
2954 { &hf_scsi_osd_opcode,
2955 {"OSD Opcode", "scsi.osd.opcode", FT_UINT8, BASE_HEX,
2956 VALS (scsi_osd_vals), 0x0, "", HFILL}},
2957 { &hf_scsi_osd_add_cdblen,
2958 {"Additional CDB Length", "scsi.osd.addcdblen", FT_UINT8, BASE_DEC,
2959 NULL, 0x0, "", HFILL}},
2960 { &hf_scsi_osd_svcaction,
2961 {"Service Action", "scsi.osd.svcaction", FT_UINT16, BASE_HEX,
2962 VALS(scsi_osd_svcaction_vals), 0x0, "", HFILL}},
2963 { &hf_scsi_osd_option,
2964 {"Options Byte", "scsi.osd.option", FT_UINT8, BASE_HEX,
2965 NULL, 0x0, "", HFILL}},
2966 { &hf_scsi_osd_option_dpo,
2967 {"DPO", "scsi.osd.option.dpo", FT_BOOLEAN, 8,
2968 TFS(&option_dpo_tfs), 0x10, "", HFILL}},
2969 { &hf_scsi_osd_option_fua,
2970 {"FUA", "scsi.osd.option.fua", FT_BOOLEAN, 8,
2971 TFS(&option_fua_tfs), 0x08, "", HFILL}},
2972 { &hf_scsi_osd_getsetattrib,
2973 {"GET/SET CDBFMT", "scsi.osd.getset", FT_UINT8, BASE_HEX,
2974 VALS(scsi_osd_getsetattrib_vals), 0x30, "", HFILL}},
2975 { &hf_scsi_osd_timestamps_control,
2976 {"Timestamps Control", "scsi.osd.timestamps_control", FT_UINT8, BASE_HEX,
2977 VALS(scsi_osd_timestamps_control_vals), 0x0, "", HFILL}},
2978 { &hf_scsi_osd_formatted_capacity,
2979 {"Formatted Capacity", "scsi.osd.formatted_capacity", FT_UINT64, BASE_DEC,
2980 NULL, 0x0, "", HFILL}},
2981 { &hf_scsi_osd_get_attributes_page,
2982 {"Get Attributes Page", "scsi.osd.get_attributes_page", FT_UINT32, BASE_HEX,
2983 NULL, 0x0, "", HFILL}},
2984 { &hf_scsi_osd_get_attributes_list_length,
2985 {"Get Attributes List Length", "scsi.osd.get_attributes_list_length", FT_UINT32, BASE_HEX,
2986 NULL, 0x0, "", HFILL}},
2987 { &hf_scsi_osd_get_attributes_list_offset,
2988 {"Get Attributes List Offset", "scsi.osd.get_attributes_list_offset", FT_UINT32, BASE_HEX,
2989 NULL, 0x0, "", HFILL}},
2990 { &hf_scsi_osd_set_attributes_list_length,
2991 {"Set Attributes List Length", "scsi.osd.set_attributes_list_length", FT_UINT32, BASE_HEX,
2992 NULL, 0x0, "", HFILL}},
2993 { &hf_scsi_osd_set_attributes_list_offset,
2994 {"Set Attributes List Offset", "scsi.osd.set_attributes_list_offset", FT_UINT32, BASE_HEX,
2995 NULL, 0x0, "", HFILL}},
2996 { &hf_scsi_osd_get_attributes_allocation_length,
2997 {"Get Attributes Allocation Length", "scsi.osd.get_attributes_allocation_length", FT_UINT32, BASE_HEX,
2998 NULL, 0x0, "", HFILL}},
2999 { &hf_scsi_osd_retreived_attributes_offset,
3000 {"Retreived Attributes Offset", "scsi.osd.retreived_attributes_offset", FT_UINT32, BASE_HEX,
3001 NULL, 0x0, "", HFILL}},
3002 { &hf_scsi_osd_set_attributes_page,
3003 {"Set Attributes Page", "scsi.osd.set_attributes_page", FT_UINT32, BASE_HEX,
3004 NULL, 0x0, "", HFILL}},
3005 { &hf_scsi_osd_set_attribute_length,
3006 {"Set Attribute Length", "scsi.osd.set_attribute_length", FT_UINT32, BASE_HEX,
3007 NULL, 0x0, "", HFILL}},
3008 { &hf_scsi_osd_set_attribute_number,
3009 {"Set Attribute Number", "scsi.osd.set_attribute_number", FT_UINT32, BASE_HEX,
3010 NULL, 0x0, "", HFILL}},
3011 { &hf_scsi_osd_set_attributes_offset,
3012 {"Set Attributes Offset", "scsi.osd.set_attributes_offset", FT_UINT32, BASE_HEX,
3013 NULL, 0x0, "", HFILL}},
3014 { &hf_scsi_osd_capability_format,
3015 {"Capability Format", "scsi.osd.capability_format", FT_UINT8, BASE_HEX,
3016 VALS(scsi_osd_capability_format_vals), 0x0f, "", HFILL}},
3017 { &hf_scsi_osd_key_version,
3018 {"Key Version", "scsi.osd.key_version", FT_UINT8, BASE_HEX,
3019 NULL, 0xf0, "", HFILL}},
3020 { &hf_scsi_osd_icva,
3021 {"Integrity Check Value Algorithm", "scsi.osd.icva", FT_UINT8, BASE_HEX,
3022 NULL, 0x0f, "", HFILL}},
3023 { &hf_scsi_osd_security_method,
3024 {"Security Method", "scsi.osd.security_method", FT_UINT8, BASE_HEX,
3025 NULL, 0x0f, "", HFILL}},
3026 { &hf_scsi_osd_capability_expiration_time,
3027 {"Capability Expiration Time", "scsi.osd.capability_expiration_time", FT_BYTES, BASE_HEX,
3028 NULL, 0, "", HFILL}},
3029 { &hf_scsi_osd_audit,
3030 {"Audit", "scsi.osd.audit", FT_BYTES, BASE_HEX,
3031 NULL, 0, "", HFILL}},
3032 { &hf_scsi_osd_capability_discriminator,
3033 {"Capability Discriminator", "scsi.osd.capability_descriminator", FT_BYTES, BASE_HEX,
3034 NULL, 0, "", HFILL}},
3035 { &hf_scsi_osd_object_created_time,
3036 {"Object Created Time", "scsi.osd.object_created_time", FT_BYTES, BASE_HEX,
3037 NULL, 0, "", HFILL}},
3038 { &hf_scsi_osd_object_type,
3039 {"Object Type", "scsi.osd.object_type", FT_UINT8, BASE_HEX,
3040 VALS(scsi_osd_object_type_vals), 0, "", HFILL}},
3041 { &hf_scsi_osd_permissions,
3042 {"Permissions", "scsi.osd.permissions", FT_UINT16, BASE_HEX,
3043 NULL, 0, "", HFILL}},
3044 { &hf_scsi_osd_permissions_read,
3045 {"READ", "scsi.osd.permissions.read", FT_BOOLEAN, 16,
3046 TFS(&permissions_read_tfs), 0x8000, "", HFILL}},
3047 { &hf_scsi_osd_permissions_write,
3048 {"WRITE", "scsi.osd.permissions.write", FT_BOOLEAN, 16,
3049 TFS(&permissions_write_tfs), 0x4000, "", HFILL}},
3050 { &hf_scsi_osd_permissions_get_attr,
3051 {"GET_ATTR", "scsi.osd.permissions.get_attr", FT_BOOLEAN, 16,
3052 TFS(&permissions_get_attr_tfs), 0x2000, "", HFILL}},
3053 { &hf_scsi_osd_permissions_set_attr,
3054 {"SET_ATTR", "scsi.osd.permissions.set_attr", FT_BOOLEAN, 16,
3055 TFS(&permissions_set_attr_tfs), 0x1000, "", HFILL}},
3056 { &hf_scsi_osd_permissions_create,
3057 {"CREATE", "scsi.osd.permissions.create", FT_BOOLEAN, 16,
3058 TFS(&permissions_create_tfs), 0x0800, "", HFILL}},
3059 { &hf_scsi_osd_permissions_remove,
3060 {"REMOVE", "scsi.osd.permissions.remove", FT_BOOLEAN, 16,
3061 TFS(&permissions_remove_tfs), 0x0400, "", HFILL}},
3062 { &hf_scsi_osd_permissions_obj_mgmt,
3063 {"OBJ_MGMT", "scsi.osd.permissions.obj_mgmt", FT_BOOLEAN, 16,
3064 TFS(&permissions_obj_mgmt_tfs), 0x0200, "", HFILL}},
3065 { &hf_scsi_osd_permissions_append,
3066 {"APPEND", "scsi.osd.permissions.append", FT_BOOLEAN, 16,
3067 TFS(&permissions_append_tfs), 0x0100, "", HFILL}},
3068 { &hf_scsi_osd_permissions_dev_mgmt,
3069 {"DEV_MGMT", "scsi.osd.permissions.dev_mgmt", FT_BOOLEAN, 16,
3070 TFS(&permissions_dev_mgmt_tfs), 0x0080, "", HFILL}},
3071 { &hf_scsi_osd_permissions_global,
3072 {"GLOBAL", "scsi.osd.permissions.global", FT_BOOLEAN, 16,
3073 TFS(&permissions_global_tfs), 0x0040, "", HFILL}},
3074 { &hf_scsi_osd_permissions_pol_sec,
3075 {"POL/SEC", "scsi.osd.permissions.pol_sec", FT_BOOLEAN, 16,
3076 TFS(&permissions_pol_sec_tfs), 0x0020, "", HFILL}},
3078 { &hf_scsi_osd_object_descriptor_type,
3079 {"Object Descriptor Type", "scsi.osd.object_descriptor_type", FT_UINT8, BASE_HEX,
3080 VALS(scsi_osd_object_descriptor_type_vals), 0xf0, "", HFILL}},
3081 { &hf_scsi_osd_object_descriptor,
3082 {"Object Descriptor", "scsi.osd.object_descriptor", FT_BYTES, BASE_HEX,
3083 NULL, 0, "", HFILL}},
3084 { &hf_scsi_osd_ricv,
3085 {"Request Integrity Check value", "scsi.osd.ricv", FT_BYTES, BASE_HEX,
3086 NULL, 0, "", HFILL}},
3087 { &hf_scsi_osd_request_nonce,
3088 {"Request Nonce", "scsi.osd.request_nonce", FT_BYTES, BASE_HEX,
3089 NULL, 0, "", HFILL}},
3090 { &hf_scsi_osd_diicvo,
3091 {"Data-In Integrity Check Value Offset", "scsi.osd.diicvo", FT_UINT32, BASE_DEC,
3092 NULL, 0, "", HFILL}},
3093 { &hf_scsi_osd_doicvo,
3094 {"Data-Out Integrity Check Value Offset", "scsi.osd.doicvo", FT_UINT32, BASE_DEC,
3095 NULL, 0, "", HFILL}},
3096 { &hf_scsi_osd_requested_partition_id,
3097 {"Requested Partition Id", "scsi.osd.requested_partition_id", FT_UINT64, BASE_HEX,
3098 NULL, 0, "", HFILL}},
3099 { &hf_scsi_osd_sortorder,
3100 {"Sort Order", "scsi.osd.sort_order", FT_UINT8, BASE_DEC,
3101 VALS(scsi_osd_sort_order_vals), 0x0f, "", HFILL}},
3102 { &hf_scsi_osd_partition_id,
3103 {"Partition Id", "scsi.osd.partition_id", FT_UINT64, BASE_HEX,
3104 NULL, 0, "", HFILL}},
3105 { &hf_scsi_osd_list_identifier,
3106 {"List Identifier", "scsi.osd.list_identifier", FT_UINT32, BASE_DEC,
3107 NULL, 0, "", HFILL}},
3108 { &hf_scsi_osd_allocation_length,
3109 {"Allocation Length", "scsi.osd.allocation_length", FT_UINT64, BASE_DEC,
3110 NULL, 0, "", HFILL}},
3111 { &hf_scsi_osd_length,
3112 {"Length", "scsi.osd.length", FT_UINT64, BASE_DEC,
3113 NULL, 0, "", HFILL}},
3114 { &hf_scsi_osd_starting_byte_address,
3115 {"Starting Byte Address", "scsi.osd.starting_byte_address", FT_UINT64, BASE_DEC,
3116 NULL, 0, "", HFILL}},
3117 { &hf_scsi_osd_initial_object_id,
3118 {"Initial Object Id", "scsi.osd.initial_object_id", FT_BYTES, BASE_HEX,
3119 NULL, 0, "", HFILL}},
3120 { &hf_scsi_osd_additional_length,
3121 {"Additional Length", "scsi.osd.additional_length", FT_UINT64, BASE_DEC,
3122 NULL, 0, "", HFILL}},
3123 { &hf_scsi_osd_continuation_object_id,
3124 {"Continuation Object Id", "scsi.osd.continuation_object_id", FT_BYTES, BASE_HEX,
3125 NULL, 0, "", HFILL}},
3126 { &hf_scsi_osd_user_object_id,
3127 {"User Object Id", "scsi.osd.user_object_id", FT_BYTES, BASE_HEX,
3128 NULL, 0, "", HFILL}},
3129 { &hf_scsi_osd_list_flags_lstchg,
3130 {"LSTCHG", "scsi.osd.list.lstchg", FT_BOOLEAN, 8,
3131 TFS(&list_lstchg_tfs), 0x02, "", HFILL}},
3132 { &hf_scsi_osd_list_flags_root,
3133 {"ROOT", "scsi.osd.list.root", FT_BOOLEAN, 8,
3134 TFS(&list_root_tfs), 0x01, "", HFILL}},
3135 { &hf_scsi_osd_requested_user_object_id,
3136 {"Requested User Object Id", "scsi.osd.requested_user_object_id", FT_BYTES, BASE_HEX,
3137 NULL, 0, "", HFILL}},
3138 { &hf_scsi_osd_number_of_user_objects,
3139 {"Number Of User Objects", "scsi.osd.number_of_user_objects", FT_UINT16, BASE_DEC,
3140 NULL, 0, "", HFILL}},
3141 { &hf_scsi_osd_key_to_set,
3142 {"Key to Set", "scsi.osd.key_to_set", FT_UINT8, BASE_DEC,
3143 VALS(key_to_set_vals), 0x03, "", HFILL}},
3144 { &hf_scsi_osd_set_key_version,
3145 {"Key Version", "scsi.osd.set_key_version", FT_UINT8, BASE_DEC,
3146 NULL, 0x0f, "", HFILL}},
3147 { &hf_scsi_osd_key_identifier,
3148 {"Key Identifier", "scsi.osd.key_identifier", FT_BYTES, BASE_HEX,
3149 NULL, 0, "", HFILL}},
3150 { &hf_scsi_osd_seed,
3151 {"Seed", "scsi.osd.seed", FT_BYTES, BASE_HEX,
3152 NULL, 0, "", HFILL}},
3153 { &hf_scsi_osd_collection_fcr,
3154 {"FCR", "scsi.osd.collection.fcr", FT_BOOLEAN, 8,
3155 TFS(&collection_fcr_tfs), 0x01, "", HFILL}},
3156 { &hf_scsi_osd_collection_object_id,
3157 {"Collection Object Id", "scsi.osd.collection_object_id", FT_BYTES, BASE_HEX,
3158 NULL, 0, "", HFILL}},
3159 { &hf_scsi_osd_requested_collection_object_id,
3160 {"Requested Collection Object Id", "scsi.osd.requested_collection_object_id", FT_BYTES, BASE_HEX,
3161 NULL, 0, "", HFILL}},
3162 { &hf_scsi_osd_partition_created_in,
3163 { "Created In", "scsi.osd.partition.created_in", FT_FRAMENUM, BASE_NONE,
3164 NULL, 0x0, "The frame this partition was created", HFILL }},
3166 { &hf_scsi_osd_partition_removed_in,
3167 { "Removed In", "scsi.osd.partition.removed_in", FT_FRAMENUM, BASE_NONE,
3168 NULL, 0x0, "The frame this partition was removed", HFILL }},
3170 { &hf_scsi_osd_flush_scope,
3171 {"Flush Scope", "scsi.osd.flush.scope", FT_UINT8, BASE_DEC,
3172 VALS(flush_scope_vals), 0x03, "", HFILL}},
3174 { &hf_scsi_osd_flush_collection_scope,
3175 {"Flush Collection Scope", "scsi.osd.flush_collection.scope", FT_UINT8, BASE_DEC,
3176 VALS(flush_collection_scope_vals), 0x03, "", HFILL}},
3178 { &hf_scsi_osd_flush_partition_scope,
3179 {"Flush Partition Scope", "scsi.osd.flush_partition.scope", FT_UINT8, BASE_DEC,
3180 VALS(flush_partition_scope_vals), 0x03, "", HFILL}},
3182 { &hf_scsi_osd_flush_osd_scope,
3183 {"Flush OSD Scope", "scsi.osd.flush_osd.scope", FT_UINT8, BASE_DEC,
3184 VALS(flush_osd_scope_vals), 0x03, "", HFILL}},
3185 { &hf_scsi_osd_attributes_list_type,
3186 {"Attributes List Type", "scsi.osd.attributes_list.type", FT_UINT8, BASE_HEX,
3187 VALS(attributes_list_type_vals), 0x0f, "", HFILL}},
3188 { &hf_scsi_osd_attributes_list_length,
3189 {"Attributes List Length", "scsi.osd.attributes_list.length", FT_UINT16, BASE_DEC,
3190 NULL, 0, "", HFILL}},
3191 { &hf_scsi_osd_attributes_page,
3192 {"Attributes Page", "scsi.osd.attributes.page", FT_UINT32, BASE_HEX,
3193 VALS(attributes_page_vals), 0, "", HFILL}},
3194 { &hf_scsi_osd_attribute_number,
3195 {"Attribute Number", "scsi.osd.attribute.number", FT_UINT32, BASE_HEX,
3196 NULL, 0, "", HFILL}},
3197 { &hf_scsi_osd_attribute_length,
3198 {"Attribute Length", "scsi.osd.attribute.length", FT_UINT16, BASE_DEC,
3199 NULL, 0, "", HFILL}},
3200 { &hf_scsi_osd_user_object_logical_length,
3201 {"User Object Logical Length", "scsi.osd.user_object.logical_length", FT_UINT64, BASE_DEC,
3202 NULL, 0, "", HFILL}},
3205 /* Setup protocol subtree array */
3206 static gint *ett[] = {
3209 &ett_osd_attribute_parameters,
3210 &ett_osd_capability,
3211 &ett_osd_permission_bitmask,
3212 &ett_osd_security_parameters,
3215 /* Register the protocol name and description */
3216 proto_scsi_osd = proto_register_protocol("SCSI_OSD", "SCSI_OSD", "scsi_osd");
3218 /* Required function calls to register the header fields and subtrees used */
3219 proto_register_field_array(proto_scsi_osd, hf, array_length(hf));
3220 proto_register_subtree_array(ett, array_length(ett));
3224 proto_reg_handoff_scsi_osd(void)