3 * copied from packet-scsi.c
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-mmc.h"
41 #include "packet-scsi-sbc.h"
44 static int proto_scsi_mmc = -1;
45 int hf_scsi_mmc_opcode = -1;
46 static int hf_scsi_mmc_setstreaming_type = -1;
47 static int hf_scsi_mmc_setstreaming_param_len = -1;
48 static int hf_scsi_mmc_setstreaming_wrc = -1;
49 static int hf_scsi_mmc_setstreaming_rdd = -1;
50 static int hf_scsi_mmc_setstreaming_exact = -1;
51 static int hf_scsi_mmc_setstreaming_ra = -1;
52 static int hf_scsi_mmc_setstreaming_start_lba = -1;
53 static int hf_scsi_mmc_setstreaming_end_lba = -1;
54 static int hf_scsi_mmc_setstreaming_read_size = -1;
55 static int hf_scsi_mmc_setstreaming_read_time = -1;
56 static int hf_scsi_mmc_setstreaming_write_size = -1;
57 static int hf_scsi_mmc_setstreaming_write_time = -1;
58 static int hf_scsi_mmc_setcdspeed_rc = -1;
59 static int hf_scsi_mmc_rbc_block = -1;
60 static int hf_scsi_mmc_rbc_lob_blocks = -1;
61 static int hf_scsi_mmc_rbc_alob_blocks = -1;
62 static int hf_scsi_mmc_rbc_lob_bytes = -1;
63 static int hf_scsi_mmc_rbc_alob_bytes = -1;
64 static int hf_scsi_mmc_rti_address_type = -1;
65 static int hf_scsi_mmc_rti_damage = -1;
66 static int hf_scsi_mmc_rti_copy = -1;
67 static int hf_scsi_mmc_rti_track_mode = -1;
68 static int hf_scsi_mmc_rti_rt = -1;
69 static int hf_scsi_mmc_rti_blank = -1;
70 static int hf_scsi_mmc_rti_packet = -1;
71 static int hf_scsi_mmc_rti_fp = -1;
72 static int hf_scsi_mmc_rti_data_mode = -1;
73 static int hf_scsi_mmc_rti_lra_v = -1;
74 static int hf_scsi_mmc_rti_nwa_v = -1;
75 static int hf_scsi_mmc_report_key_type_code = -1;
76 static int hf_scsi_mmc_report_key_vendor_resets = -1;
77 static int hf_scsi_mmc_report_key_user_changes = -1;
78 static int hf_scsi_mmc_report_key_region_mask = -1;
79 static int hf_scsi_mmc_report_key_rpc_scheme = -1;
80 static int hf_scsi_mmc_key_class = -1;
81 static int hf_scsi_mmc_key_format = -1;
82 static int hf_scsi_mmc_disc_info_erasable = -1;
83 static int hf_scsi_mmc_disc_info_state_of_last_session = -1;
84 static int hf_scsi_mmc_disc_info_disk_status = -1;
85 static int hf_scsi_mmc_disc_info_number_of_sessions = -1;
86 static int hf_scsi_mmc_disc_info_first_track_in_last_session = -1;
87 static int hf_scsi_mmc_disc_info_last_track_in_last_session = -1;
88 static int hf_scsi_mmc_disc_info_did_v = -1;
89 static int hf_scsi_mmc_disc_info_dbc_v = -1;
90 static int hf_scsi_mmc_disc_info_uru = -1;
91 static int hf_scsi_mmc_disc_info_dac_v = -1;
92 static int hf_scsi_mmc_disc_info_dbit = -1;
93 static int hf_scsi_mmc_disc_info_bgfs = -1;
94 static int hf_scsi_mmc_disc_info_disc_type = -1;
95 static int hf_scsi_mmc_disc_info_disc_identification = -1;
96 static int hf_scsi_mmc_disc_info_last_session_lead_in_start_address = -1;
97 static int hf_scsi_mmc_disc_info_last_possible_lead_out_start_address = -1;
98 static int hf_scsi_mmc_disc_info_disc_bar_code = -1;
99 static int hf_scsi_mmc_readtoc_time = -1;
100 static int hf_scsi_mmc_readtoc_format = -1;
101 static int hf_scsi_mmc_readtoc_first_session = -1;
102 static int hf_scsi_mmc_readtoc_last_track = -1;
103 static int hf_scsi_mmc_readtoc_last_session = -1;
104 static int hf_scsi_mmc_q_subchannel_adr = -1;
105 static int hf_scsi_mmc_q_subchannel_control = -1;
106 static int hf_scsi_mmc_agid = -1;
107 static int hf_scsi_mmc_track = -1;
108 static int hf_scsi_mmc_track_size = -1;
109 static int hf_scsi_mmc_track_start_address = -1;
110 static int hf_scsi_mmc_track_start_time = -1;
111 static int hf_scsi_mmc_lba = -1;
112 static int hf_scsi_mmc_session = -1;
113 static int hf_scsi_mmc_data_length = -1;
114 static int hf_scsi_mmc_getconf_rt = -1;
115 static int hf_scsi_mmc_getconf_starting_feature = -1;
116 static int hf_scsi_mmc_getconf_current_profile = -1;
117 static int hf_scsi_mmc_feature = -1;
118 static int hf_scsi_mmc_feature_version = -1;
119 static int hf_scsi_mmc_feature_persistent = -1;
120 static int hf_scsi_mmc_feature_current = -1;
121 static int hf_scsi_mmc_feature_additional_length = -1;
122 static int hf_scsi_mmc_feature_lun_sn = -1;
123 static int hf_scsi_mmc_feature_cdread_dap = -1;
124 static int hf_scsi_mmc_feature_cdread_c2flag = -1;
125 static int hf_scsi_mmc_feature_cdread_cdtext = -1;
126 static int hf_scsi_mmc_feature_dvdrw_write = -1;
127 static int hf_scsi_mmc_feature_dvdrw_quickstart = -1;
128 static int hf_scsi_mmc_feature_dvdrw_closeonly = -1;
129 static int hf_scsi_mmc_feature_dvdr_write = -1;
130 static int hf_scsi_mmc_feature_tao_buf = -1;
131 static int hf_scsi_mmc_feature_tao_rwraw = -1;
132 static int hf_scsi_mmc_feature_tao_rwpack = -1;
133 static int hf_scsi_mmc_feature_tao_testwrite = -1;
134 static int hf_scsi_mmc_feature_tao_cdrw = -1;
135 static int hf_scsi_mmc_feature_tao_rwsubcode = -1;
136 static int hf_scsi_mmc_feature_dts = -1;
137 static int hf_scsi_mmc_feature_sao_buf = -1;
138 static int hf_scsi_mmc_feature_sao_sao = -1;
139 static int hf_scsi_mmc_feature_sao_rawms = -1;
140 static int hf_scsi_mmc_feature_sao_raw = -1;
141 static int hf_scsi_mmc_feature_sao_testwrite = -1;
142 static int hf_scsi_mmc_feature_sao_cdrw = -1;
143 static int hf_scsi_mmc_feature_sao_rw = -1;
144 static int hf_scsi_mmc_feature_sao_mcsl = -1;
145 static int hf_scsi_mmc_feature_dvdr_buf = -1;
146 static int hf_scsi_mmc_feature_dvdr_testwrite = -1;
147 static int hf_scsi_mmc_feature_dvdr_dvdrw = -1;
148 static int hf_scsi_mmc_feature_profile = -1;
149 static int hf_scsi_mmc_feature_profile_current = -1;
150 static int hf_scsi_mmc_feature_isw_buf = -1;
151 static int hf_scsi_mmc_feature_isw_num_linksize = -1;
152 static int hf_scsi_mmc_feature_isw_linksize = -1;
153 static int hf_scsi_mmc_read_compatibility_lba = -1;
154 static int hf_scsi_mmc_reservation_size = -1;
155 static int hf_scsi_mmc_last_recorded_address = -1;
156 static int hf_scsi_mmc_first_track = -1;
157 static int hf_scsi_mmc_fixed_packet_size = -1;
158 static int hf_scsi_mmc_synccache_immed = -1;
159 static int hf_scsi_mmc_synccache_reladr = -1;
160 static int hf_scsi_mmc_num_blocks = -1;
161 static int hf_scsi_mmc_next_writable_address = -1;
162 static int hf_scsi_mmc_free_blocks = -1;
165 static gint ett_scsi_mmc_profile = -1;
173 static const value_string scsi_getconf_rt_val[] = {
174 {0x00, "Return all features"},
175 {0x01, "Return all current features"},
176 {0x02, "Return all identified by Starting Feature"},
179 static const value_string scsi_getconf_current_profile_val[] = {
180 {0x0000, "Reserved"},
181 {0x0001, "Non-removable disk"},
182 {0x0002, "Removable disk"},
183 {0x0003, "MO Erasable"},
184 {0x0004, "Optical Write Once"},
192 {0x0013, "DVD-RW Restricted Overwrite"},
193 {0x0014, "DVD-RW Sequential recording"},
196 {0x0020, "DDCD-ROM"},
199 {0xffff, "Logical unit not conforming to a standard profile"},
203 static const value_string scsi_feature_val[] = {
204 {0x0000, "Profile List"},
206 {0x0002, "Morphing"},
207 {0x0003, "Removable Medium"},
208 {0x0004, "Write Protect"},
209 {0x0010, "Random Readable"},
210 {0x001d, "Multi-read"},
212 {0x001f, "DVD Read"},
213 {0x0020, "Random Writeable"},
214 {0x0021, "Incremental Streaming Writeable"},
215 {0x0022, "Sector Erasable"},
216 {0x0023, "Formattable"},
217 {0x0024, "Defect Management"},
218 {0x0025, "Write Once"},
219 {0x0026, "Restricted Overwrite"},
220 {0x0027, "CD-RW CAV Write"},
222 {0x0029, "Enhanced Defect Reporting"},
225 {0x002c, "Rigid Restricted Overwrite"},
226 {0x002d, "CD Track At Once"},
227 {0x002e, "CD Mastering"},
228 {0x002f, "DVD-R/-RW Write"},
229 {0x0030, "DDCD Read"},
230 {0x0031, "DDCD-R Write"},
231 {0x0032, "DDCD-RW Write"},
232 {0x0037, "CD-RW Media Write Support"},
233 {0x0100, "Power Management"},
235 {0x0102, "Embedded Changer"},
236 {0x0103, "CD Audio analog play"},
237 {0x0104, "Microcode Upgrade"},
240 {0x0107, "Real Time Streaming"},
241 {0x0108, "Logical Unit serial number"},
242 {0x010a, "Disc control Block"},
243 {0x010b, "DVD CPRM"},
244 {0x010c, "Firmware Information"},
249 dissect_mmc4_getconfiguration (tvbuff_t *tvb, packet_info *pinfo _U_,
250 proto_tree *tree, guint offset,
251 gboolean isreq, gboolean iscdb,
252 guint payload_len _U_,
253 scsi_task_data_t *cdata _U_)
259 tvbuff_t *volatile tvb_v = tvb;
260 volatile guint offset_v = offset;
262 if (tree && isreq && iscdb) {
263 proto_tree_add_item (tree, hf_scsi_mmc_getconf_rt, tvb_v, offset_v+0, 1, 0);
264 proto_tree_add_item (tree, hf_scsi_mmc_getconf_starting_feature, tvb_v, offset_v+1, 2, 0);
266 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb_v, offset_v+6, 2, 0);
267 /* we need the alloc_len in the response */
269 cdata->itlq->alloc_len=tvb_get_ntohs(tvb_v, offset_v+6);
272 flags = tvb_get_guint8 (tvb_v, offset_v+8);
273 proto_tree_add_uint_format (tree, hf_scsi_control, tvb_v, offset_v+8, 1,
275 "Vendor Unique = %u, NACA = %u, Link = %u",
276 flags & 0xC0, flags & 0x4, flags & 0x1);
283 TRY_SCSI_CDB_ALLOC_LEN(pinfo, tvb_v, offset_v, cdata->itlq->alloc_len);
285 len=tvb_get_ntohl(tvb_v, offset_v+0);
286 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb_v, offset_v, 4, 0);
287 proto_tree_add_item (tree, hf_scsi_mmc_getconf_current_profile, tvb_v, offset_v+6, 2, 0);
292 guint8 additional_length;
295 feature=tvb_get_ntohs(tvb_v, offset_v);
296 proto_tree_add_item (tree, hf_scsi_mmc_feature, tvb_v, offset_v, 2, 0);
298 proto_tree_add_item (tree, hf_scsi_mmc_feature_version, tvb_v, offset_v, 1, 0);
299 proto_tree_add_item (tree, hf_scsi_mmc_feature_persistent, tvb_v, offset_v, 1, 0);
300 proto_tree_add_item (tree, hf_scsi_mmc_feature_current, tvb_v, offset_v, 1, 0);
302 additional_length=tvb_get_guint8(tvb_v, offset_v);
303 proto_tree_add_item (tree, hf_scsi_mmc_feature_additional_length, tvb_v, offset_v, 1, 0);
307 case 0x0000: /* profile list */
308 while(offset_v<(old_offset+additional_length)){
315 it=proto_tree_add_text(tree, tvb_v, offset_v, 4, "Profile:");
316 tr=proto_item_add_subtree(it, ett_scsi_mmc_profile);
319 profile=tvb_get_ntohs(tvb_v, offset_v);
320 proto_tree_add_item (tr, hf_scsi_mmc_feature_profile, tvb_v, offset_v, 2, 0);
321 proto_item_append_text(it, "%s", val_to_str(profile, scsi_getconf_current_profile_val, "Unknown 0x%04x"));
323 cur_profile=tvb_get_guint8(tvb_v, offset_v+2);
324 proto_tree_add_item (tr, hf_scsi_mmc_feature_profile_current, tvb_v, offset_v+2, 1, 0);
325 if(cur_profile&0x01){
326 proto_item_append_text(it, " [CURRENT PROFILE]");
332 case 0x001d: /* multi-read */
333 case 0x001f: /* dvd read feature */
334 /* no data for this one */
336 case 0x001e: /* cd read */
337 proto_tree_add_item (tree, hf_scsi_mmc_feature_cdread_dap, tvb_v, offset_v, 1, 0);
338 proto_tree_add_item (tree, hf_scsi_mmc_feature_cdread_c2flag, tvb_v, offset_v, 1, 0);
339 proto_tree_add_item (tree, hf_scsi_mmc_feature_cdread_cdtext, tvb_v, offset_v, 1, 0);
341 case 0x0021: /* incremental streaming writeable */
342 proto_tree_add_item (tree, hf_scsi_mmc_feature_dts, tvb_v, offset_v, 2, 0);
344 proto_tree_add_item (tree, hf_scsi_mmc_feature_isw_buf, tvb_v, offset_v, 1, 0);
346 num_linksize=tvb_get_guint8(tvb_v, offset_v);
347 proto_tree_add_item (tree, hf_scsi_mmc_feature_isw_num_linksize, tvb_v, offset_v, 1, 0);
349 while(num_linksize--){
350 proto_tree_add_item (tree, hf_scsi_mmc_feature_isw_linksize, tvb_v, offset_v, 1, 0);
354 case 0x002a: /* dvd-rw */
355 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdrw_write, tvb_v, offset_v, 1, 0);
356 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdrw_quickstart, tvb_v, offset_v, 2, 0);
357 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdrw_closeonly, tvb_v, offset_v, 2, 0);
359 case 0x002b: /* dvd-r */
360 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_write, tvb_v, offset_v, 1, 0);
362 case 0x002d: /* track at once */
363 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_buf, tvb_v, offset_v, 1, 0);
364 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_rwraw, tvb_v, offset_v, 1, 0);
365 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_rwpack, tvb_v, offset_v, 1, 0);
366 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_testwrite, tvb_v, offset_v, 1, 0);
367 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_cdrw, tvb_v, offset_v, 1, 0);
368 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_rwsubcode, tvb_v, offset_v, 1, 0);
369 proto_tree_add_item (tree, hf_scsi_mmc_feature_dts, tvb_v, offset_v+2, 2, 0);
371 case 0x002e: /* session at once */
372 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_buf, tvb_v, offset_v, 1, 0);
373 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_sao, tvb_v, offset_v, 1, 0);
374 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_rawms, tvb_v, offset_v, 1, 0);
375 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_raw, tvb_v, offset_v, 1, 0);
376 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_testwrite, tvb_v, offset_v, 1, 0);
377 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_cdrw, tvb_v, offset_v, 1, 0);
378 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_rw, tvb_v, offset_v, 1, 0);
379 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_mcsl, tvb_v, offset_v+1, 3, 0);
381 case 0x002f: /* dvd-r/-rw*/
382 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_buf, tvb_v, offset_v, 1, 0);
383 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_testwrite, tvb_v, offset_v, 1, 0);
384 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_dvdrw, tvb_v, offset_v, 1, 0);
386 case 0x0108: /* logical unit serial number */
387 proto_tree_add_item (tree, hf_scsi_mmc_feature_lun_sn, tvb_v, offset_v, additional_length, 0);
390 proto_tree_add_text (tree, tvb_v, offset_v, additional_length,
391 "SCSI/MMC Unknown Feature:0x%04x",feature);
394 old_offset+=additional_length;
395 len-=4+additional_length;
397 END_TRY_SCSI_CDB_ALLOC_LEN;
402 static const value_string scsi_q_subchannel_adr_val[] = {
403 {0x0, "Q-Subchannel mode info not supplied"},
404 {0x1, "Q-Subchannel encodes current position data"},
405 {0x2, "Q-Subchannel encodes media catalog number"},
406 {0x3, "Q-Subchannel encodes ISRC"},
409 static const value_string scsi_q_subchannel_control_val[] = {
410 {0x0, "2 Audio channels without pre-emphasis (digital copy prohibited)"},
411 {0x2, "2 Audio channels without pre-emphasis (digital copy permitted)"},
412 {0x1, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
413 {0x3, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
414 {0x8, "audio channels without pre-emphasis (digital copy prohibited)"},
415 {0xa, "audio channels without pre-emphasis (digital copy permitted)"},
416 {0x9, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
417 {0xb, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
418 {0x4, "Data track, recorded uninterrupted (digital copy prohibited)"},
419 {0x6, "Data track, recorded uninterrupted (digital copy permitted)"},
420 {0x5, "Data track, recorded incremental (digital copy prohibited)"},
421 {0x7, "Data track, recorded incremental (digital copy permitted)"},
426 dissect_mmc4_readtocpmaatip (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
427 guint offset, gboolean isreq, gboolean iscdb,
428 guint payload_len _U_, scsi_task_data_t *cdata _U_)
431 guint8 flags, format;
434 if (tree && isreq && iscdb) {
435 format=tvb_get_guint8(tvb, offset+1)&0x0f;
436 /* save format so we can decode the response */
437 cdata->itlq->flags=format;
442 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_time, tvb, offset, 1, 0);
443 /* save time so we can pick it up in the response */
444 if(tvb_get_guint8(tvb, offset)&0x02){
445 cdata->itlq->flags|=0x0100;
449 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_format, tvb, offset+1, 1, 0);
453 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset+5, 1, 0);
454 /* save track so we can pick it up in the response */
455 cdata->itlq->flags|=0x0200;
458 proto_tree_add_item (tree, hf_scsi_mmc_session, tvb, offset+5, 1, 0);
459 /* save session so we can pick it up in the response */
460 cdata->itlq->flags|=0x0400;
464 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
466 flags = tvb_get_guint8 (tvb, offset+8);
467 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
469 "Vendor Unique = %u, NACA = %u, Link = %u",
470 flags & 0xC0, flags & 0x4, flags & 0x1);
473 if(tree && (!isreq)) {
474 len=tvb_get_ntohs(tvb, offset);
475 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, 0);
476 if(cdata->itlq->flags&0x0200){
477 proto_tree_add_item (tree, hf_scsi_mmc_first_track, tvb, offset+2, 1, 0);
478 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_last_track, tvb, offset+3, 1, 0);
480 if(cdata->itlq->flags&0x0400){
481 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_first_session, tvb, offset+2, 1, 0);
482 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_last_session, tvb, offset+3, 1, 0);
486 switch(cdata->itlq->flags&0x000f){
489 proto_tree_add_item (tree, hf_scsi_mmc_q_subchannel_adr, tvb, offset+1, 1, 0);
490 proto_tree_add_item (tree, hf_scsi_mmc_q_subchannel_control, tvb, offset+1, 1, 0);
491 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset+2, 1, 0);
492 if(cdata->itlq->flags&0x0100){
493 proto_tree_add_item (tree, hf_scsi_mmc_track_start_time, tvb, offset+4, 4, 0);
495 proto_tree_add_item (tree, hf_scsi_mmc_track_start_address, tvb, offset+4, 4, 0);
502 proto_tree_add_text (tree, tvb, offset, len,
503 "SCSI/MMC Unknown READ TOC Format:0x%04x",cdata->itlq->flags&0x000f);
509 static const value_string scsi_disc_info_sols_val[] = {
510 {0x00, "Empty Session"},
511 {0x01, "Incomplete Session"},
512 {0x02, "Reserved/Damaged Session"},
513 {0x03, "Complete Session"},
517 static const value_string scsi_disc_info_disc_status_val[] = {
518 {0x00, "Empty Disc"},
519 {0x01, "Incomplete Disc"},
520 {0x02, "Finalized Disc"},
525 static const value_string scsi_disc_info_bgfs_val[] = {
526 {0x00, "Blank or not CD-RW/DVD-RW"},
527 {0x01, "Background Format started but is not running nor complete"},
528 {0x02, "Backgroung Format in progress"},
529 {0x03, "Backgroung Format has completed"},
533 static const value_string scsi_disc_info_disc_type_val[] = {
534 {0x00, "CD-DA or CD-ROM Disc"},
536 {0x20, "CD-ROM XA Disc or DDCD"},
542 dissect_mmc4_readdiscinformation (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
543 guint offset, gboolean isreq, gboolean iscdb,
544 guint payload_len _U_, scsi_task_data_t *cdata _U_)
549 if (tree && isreq && iscdb) {
550 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
552 flags = tvb_get_guint8 (tvb, offset+8);
553 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
555 "Vendor Unique = %u, NACA = %u, Link = %u",
556 flags & 0xC0, flags & 0x4, flags & 0x1);
559 if(tree && (!isreq)) {
560 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, 0, 2, 0);
561 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_erasable, tvb, 2, 1, 0);
562 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_state_of_last_session, tvb, 2, 1, 0);
563 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disk_status, tvb, 2, 1, 0);
564 proto_tree_add_item (tree, hf_scsi_mmc_first_track, tvb, offset+3, 1, 0);
565 /* number of session offset+4 and offset+9 */
566 proto_tree_add_uint (tree, hf_scsi_mmc_disc_info_number_of_sessions, tvb, 4, 1, (tvb_get_guint8(tvb, offset+9)<<8)|tvb_get_guint8(tvb, offset+4));
567 /* first track in last session offset+5 and offset+10 */
568 proto_tree_add_uint (tree, hf_scsi_mmc_disc_info_first_track_in_last_session, tvb, 5, 1, (tvb_get_guint8(tvb, offset+10)<<8)|tvb_get_guint8(tvb, offset+5));
569 /* last track in last session offset+6 and offset+11 */
570 proto_tree_add_uint (tree, hf_scsi_mmc_disc_info_last_track_in_last_session, tvb, 6, 1, (tvb_get_guint8(tvb, offset+11)<<8)|tvb_get_guint8(tvb, offset+6));
571 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_did_v, tvb, offset+7, 1, 0);
572 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_dbc_v, tvb, offset+7, 1, 0);
573 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_uru, tvb, offset+7, 1, 0);
574 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_dac_v, tvb, offset+7, 1, 0);
575 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_dbit, tvb, offset+7, 1, 0);
576 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_bgfs, tvb, offset+7, 1, 0);
577 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disc_type, tvb, offset+8, 1, 0);
578 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disc_identification, tvb, offset+12, 4, 0);
579 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_last_session_lead_in_start_address, tvb, offset+16, 4, 0);
580 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_last_possible_lead_out_start_address, tvb, offset+20, 4, 0);
581 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disc_bar_code, tvb, offset+24, 8, 0);
582 /* XXX should add OPC table decoding here ... */
587 dissect_mmc4_readdiscstructure (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
588 guint offset, gboolean isreq, gboolean iscdb,
589 guint payload_len _U_, scsi_task_data_t *cdata _U_)
594 if (tree && isreq && iscdb) {
595 proto_tree_add_text (tree, tvb, offset+1, 4,
597 tvb_get_ntohl (tvb, offset+1));
599 proto_tree_add_text (tree, tvb, offset+5, 1,
601 tvb_get_guint8 (tvb, offset+5));
603 proto_tree_add_text (tree, tvb, offset+6, 1,
605 tvb_get_guint8 (tvb, offset+6));
607 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+7, 2, 0);
609 flags = tvb_get_guint8 (tvb, offset+9);
610 proto_tree_add_text (tree, tvb, offset+9, 1,
614 flags = tvb_get_guint8 (tvb, offset+10);
615 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
617 "Vendor Unique = %u, NACA = %u, Link = %u",
618 flags & 0xC0, flags & 0x4, flags & 0x1);
623 dissect_mmc4_getperformance (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
624 guint offset, gboolean isreq, gboolean iscdb,
625 guint payload_len _U_, scsi_task_data_t *cdata _U_)
630 if (tree && isreq && iscdb) {
631 flags = tvb_get_guint8 (tvb, offset);
632 proto_tree_add_text (tree, tvb, offset, 1,
636 proto_tree_add_text (tree, tvb, offset+1, 4,
638 tvb_get_ntohl (tvb, offset+1));
640 proto_tree_add_text (tree, tvb, offset+7, 2,
641 "Maximum Number of Descriptors: %u",
642 tvb_get_ntohs (tvb, offset+7));
644 flags = tvb_get_guint8 (tvb, offset+9);
645 proto_tree_add_text (tree, tvb, offset+9, 1,
649 flags = tvb_get_guint8 (tvb, offset+10);
650 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
652 "Vendor Unique = %u, NACA = %u, Link = %u",
653 flags & 0xC0, flags & 0x4, flags & 0x1);
659 dissect_mmc4_synchronizecache (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
660 guint offset, gboolean isreq, gboolean iscdb,
661 guint payload_len _U_, scsi_task_data_t *cdata _U_)
666 if (tree && isreq && iscdb) {
667 proto_tree_add_item (tree, hf_scsi_mmc_synccache_immed, tvb, offset, 1, 0);
668 proto_tree_add_item (tree, hf_scsi_mmc_synccache_reladr, tvb, offset, 1, 0);
669 proto_tree_add_item (tree, hf_scsi_mmc_lba, tvb, offset+1, 4, 0);
670 proto_tree_add_item (tree, hf_scsi_mmc_num_blocks, tvb, offset+6, 2, 0);
672 flags = tvb_get_guint8 (tvb, offset+8);
673 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
675 "Vendor Unique = %u, NACA = %u, Link = %u",
676 flags & 0xC0, flags & 0x4, flags & 0x1);
681 static const value_string scsi_key_class_val[] = {
682 {0x00, "DVD CSS/CPPM or CPRM"},
683 {0x01, "ReWriteable Security Service - A"},
686 static const value_string scsi_key_format_val[] = {
687 {0x00, "AGID for CSS/CPPM"},
688 {0x01, "Challenge Key"},
691 {0x05, "Authentication Success Flag"},
693 {0x11, "AGID for CPRM"},
697 static const value_string scsi_report_key_type_code_val[] = {
700 {0x02, "LAST CHANCE"},
704 static const value_string scsi_report_key_rpc_scheme_val[] = {
705 {0x00, "Unknown (RPC not enforced)"},
706 {0x01, "RPC Phase II"},
711 dissect_mmc4_reportkey (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
712 guint offset, gboolean isreq, gboolean iscdb,
713 guint payload_len _U_, scsi_task_data_t *cdata _U_)
716 guint8 flags, agid, key_format, key_class;
719 if (tree && isreq && iscdb) {
720 proto_tree_add_item (tree, hf_scsi_mmc_lba, tvb, offset+1,
722 key_class=tvb_get_guint8(tvb, offset+6);
723 proto_tree_add_item (tree, hf_scsi_mmc_key_class, tvb, offset+6,
725 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+7, 2, 0);
727 agid=tvb_get_guint8(tvb, offset+9)&0xc0;
728 key_format=tvb_get_guint8(tvb, offset+9)&0x3f;
734 /* agid is only valid for some formats */
735 proto_tree_add_uint (tree, hf_scsi_mmc_agid, tvb, offset+9, 1, agid);
738 proto_tree_add_uint (tree, hf_scsi_mmc_key_format, tvb, offset+9, 1, key_format);
739 /* save key_class/key_format so we can decode the response */
740 cdata->itlq->flags=(key_format<<8)|key_class;
742 flags = tvb_get_guint8 (tvb, offset+14);
743 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
745 "Vendor Unique = %u, NACA = %u, Link = %u",
746 flags & 0xC0, flags & 0x4, flags & 0x1);
748 if(tree && (!isreq)) {
749 switch(cdata->itlq->flags){
750 case 0x0800: /* format:RPC State class:00 */
751 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, 0);
752 proto_tree_add_item (tree, hf_scsi_mmc_report_key_type_code, tvb, offset+4, 1, 0);
753 proto_tree_add_item (tree, hf_scsi_mmc_report_key_vendor_resets, tvb, offset+4, 1, 0);
754 proto_tree_add_item (tree, hf_scsi_mmc_report_key_user_changes, tvb, offset+4, 1, 0);
755 proto_tree_add_item (tree, hf_scsi_mmc_report_key_region_mask, tvb, offset+5, 1, 0);
756 proto_tree_add_item (tree, hf_scsi_mmc_report_key_rpc_scheme, tvb, offset+6, 1, 0);
759 ti = proto_tree_add_text (tree, tvb, 0, 0,
760 "SCSI/MMC Unknown Format:0x%02x/Class:0x%02x combination",
761 cdata->itlq->flags>>8,cdata->itlq->flags&0xff);
762 PROTO_ITEM_SET_GENERATED(ti);
768 static const value_string scsi_rti_address_type_val[] = {
769 {0x00, "Logical Block Address"},
770 {0x01, "Logical Track Number"},
771 {0x02, "Session Number"},
776 dissect_mmc4_readtrackinformation (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
777 guint offset, gboolean isreq, gboolean iscdb,
778 guint payload_len _U_, scsi_task_data_t *cdata _U_)
781 guint8 flags, addresstype;
783 if (tree && isreq && iscdb) {
784 addresstype=tvb_get_guint8(tvb, offset)&0x03;
785 proto_tree_add_item (tree, hf_scsi_mmc_rti_address_type, tvb, offset+0, 1, 0);
787 case 0x00: /* logical block address */
788 proto_tree_add_item (tree, hf_scsi_mmc_lba, tvb, offset+1,
791 case 0x01: /* logical track number */
792 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset+1,
795 case 0x02: /* logical session number */
796 proto_tree_add_item (tree, hf_scsi_mmc_session, tvb, offset+1,
801 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
803 flags = tvb_get_guint8 (tvb, offset+8);
804 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
806 "Vendor Unique = %u, NACA = %u, Link = %u",
807 flags & 0xC0, flags & 0x4, flags & 0x1);
810 if(tree && (!isreq)) {
811 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, 0, 2, 0);
812 /* track offset+2 and offset+32 */
813 proto_tree_add_uint (tree, hf_scsi_mmc_track, tvb, 2, 1, (tvb_get_guint8(tvb, offset+32)<<8)|tvb_get_guint8(tvb, offset+2));
814 /* session offset+3 and offset+33 */
815 proto_tree_add_uint (tree, hf_scsi_mmc_session, tvb, 3, 1, (tvb_get_guint8(tvb, offset+33)<<8)|tvb_get_guint8(tvb, offset+3));
816 proto_tree_add_item (tree, hf_scsi_mmc_rti_damage, tvb, 5, 1, 0);
817 proto_tree_add_item (tree, hf_scsi_mmc_rti_copy, tvb, 5, 1, 0);
818 proto_tree_add_item (tree, hf_scsi_mmc_rti_track_mode, tvb, 5, 1, 0);
819 proto_tree_add_item (tree, hf_scsi_mmc_rti_rt, tvb, 6, 1, 0);
820 proto_tree_add_item (tree, hf_scsi_mmc_rti_blank, tvb, 6, 1, 0);
821 proto_tree_add_item (tree, hf_scsi_mmc_rti_packet, tvb, 6, 1, 0);
822 proto_tree_add_item (tree, hf_scsi_mmc_rti_fp, tvb, 6, 1, 0);
823 proto_tree_add_item (tree, hf_scsi_mmc_rti_data_mode, tvb, 6, 1, 0);
824 proto_tree_add_item (tree, hf_scsi_mmc_rti_lra_v, tvb, 7, 1, 0);
825 proto_tree_add_item (tree, hf_scsi_mmc_rti_nwa_v, tvb, 7, 1, 0);
826 proto_tree_add_item (tree, hf_scsi_mmc_track_start_address, tvb, offset+8, 4, 0);
827 proto_tree_add_item (tree, hf_scsi_mmc_next_writable_address, tvb, offset+12, 4, 0);
828 proto_tree_add_item (tree, hf_scsi_mmc_free_blocks, tvb, offset+16, 4, 0);
829 proto_tree_add_item (tree, hf_scsi_mmc_fixed_packet_size, tvb, offset+20, 4, 0);
830 proto_tree_add_item (tree, hf_scsi_mmc_track_size, tvb, offset+24, 4, 0);
831 proto_tree_add_item (tree, hf_scsi_mmc_last_recorded_address, tvb, offset+28, 4, 0);
832 proto_tree_add_item (tree, hf_scsi_mmc_read_compatibility_lba, tvb, offset+36, 4, 0);
837 dissect_mmc4_geteventstatusnotification (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
838 guint offset, gboolean isreq, gboolean iscdb,
839 guint payload_len _U_, scsi_task_data_t *cdata _U_)
844 if (tree && isreq && iscdb) {
845 flags = tvb_get_guint8 (tvb, offset);
846 proto_tree_add_text (tree, tvb, offset, 1,
850 flags = tvb_get_guint8 (tvb, offset+3);
851 proto_tree_add_text (tree, tvb, offset+3, 1,
852 "Notification Class Request: %u",
855 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
857 flags = tvb_get_guint8 (tvb, offset+8);
858 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
860 "Vendor Unique = %u, NACA = %u, Link = %u",
861 flags & 0xC0, flags & 0x4, flags & 0x1);
867 dissect_mmc4_reservetrack (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
868 guint offset, gboolean isreq, gboolean iscdb,
869 guint payload_len _U_, scsi_task_data_t *cdata _U_)
874 if (tree && isreq && iscdb) {
875 proto_tree_add_item (tree, hf_scsi_mmc_reservation_size, tvb, offset+4, 4, 0);
877 flags = tvb_get_guint8 (tvb, offset+8);
878 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
880 "Vendor Unique = %u, NACA = %u, Link = %u",
881 flags & 0xC0, flags & 0x4, flags & 0x1);
888 dissect_mmc4_readbuffercapacity (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
889 guint offset, gboolean isreq, gboolean iscdb,
890 guint payload_len _U_, scsi_task_data_t *cdata _U_)
896 if (tree && isreq && iscdb) {
897 cdata->itlq->flags=0;
898 proto_tree_add_item (tree, hf_scsi_mmc_rbc_block, tvb, offset, 1, 0);
899 if(tvb_get_guint8(tvb, offset)&0x01){
900 cdata->itlq->flags=1;
903 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
905 flags = tvb_get_guint8 (tvb, offset+8);
906 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
908 "Vendor Unique = %u, NACA = %u, Link = %u",
909 flags & 0xC0, flags & 0x4, flags & 0x1);
912 if(tree && (!isreq)) {
913 len=tvb_get_ntohs(tvb, offset);
914 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, 0);
915 if(cdata->itlq->flags){
916 proto_tree_add_item (tree, hf_scsi_mmc_rbc_lob_blocks, tvb, offset+4, 4, 0);
917 proto_tree_add_item (tree, hf_scsi_mmc_rbc_alob_blocks, tvb, offset+8, 4, 0);
919 proto_tree_add_item (tree, hf_scsi_mmc_rbc_lob_bytes, tvb, offset+4, 4, 0);
920 proto_tree_add_item (tree, hf_scsi_mmc_rbc_alob_bytes, tvb, offset+8, 4, 0);
926 static const value_string scsi_setcdspeed_rc_val[] = {
927 {0x00, "CLV and none-pure CAV"},
935 dissect_mmc4_setcdspeed (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
936 guint offset, gboolean isreq, gboolean iscdb,
937 guint payload_len _U_, scsi_task_data_t *cdata _U_)
942 if (tree && isreq && iscdb) {
943 proto_tree_add_item (tree, hf_scsi_mmc_setcdspeed_rc, tvb, offset+0, 1, 0);
945 proto_tree_add_text (tree, tvb, offset+1, 2,
946 "Logical Unit Read Speed(bytes/sec): %u",
947 tvb_get_ntohs (tvb, offset+1));
948 proto_tree_add_text (tree, tvb, offset+3, 2,
949 "Logical Unit Write Speed(bytes/sec): %u",
950 tvb_get_ntohs (tvb, offset+3));
952 flags = tvb_get_guint8 (tvb, offset+10);
953 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
955 "Vendor Unique = %u, NACA = %u, Link = %u",
956 flags & 0xC0, flags & 0x4, flags & 0x1);
961 static const value_string scsi_setstreaming_type_val[] = {
962 {0x00, "Performance Descriptor"},
963 {0x05, "DBI cache zone descriptor"},
968 dissect_mmc4_setstreaming (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
969 guint offset, gboolean isreq, gboolean iscdb,
970 guint payload_len _U_, scsi_task_data_t *cdata _U_)
976 if (tree && isreq && iscdb) {
977 type=tvb_get_guint8(tvb, offset+7);
978 cdata->itlq->flags=type;
979 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_type, tvb, offset+7, 1, 0);
980 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_param_len, tvb, offset+8, 2, 0);
982 flags = tvb_get_guint8 (tvb, offset+10);
983 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
985 "Vendor Unique = %u, NACA = %u, Link = %u",
986 flags & 0xC0, flags & 0x4, flags & 0x1);
988 if(tree && isreq && (!iscdb)) {
989 switch(cdata->itlq->flags){
990 case 0x00: /* performance descriptor */
991 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_wrc, tvb, offset+0, 1, 0);
992 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_rdd, tvb, offset+0, 1, 0);
993 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_exact, tvb, offset+0, 1, 0);
994 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_ra, tvb, offset+0, 1, 0);
995 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_start_lba, tvb, offset+4, 4, 0);
996 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_end_lba, tvb, offset+8, 4, 0);
997 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_read_size, tvb, offset+12, 4, 0);
998 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_read_time, tvb, offset+16, 4, 0);
999 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_write_size, tvb, offset+20, 4, 0);
1000 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_write_time, tvb, offset+24, 4, 0);
1003 ti = proto_tree_add_text (tree, tvb, 0, 0,
1004 "SCSI/MMC Unknown SetStreaming Type:0x%02x",cdata->itlq->flags);
1005 PROTO_ITEM_SET_GENERATED(ti);
1013 #define SCSI_MMC4_READCAPACITY10 0x25
1014 #define SCSI_MMC4_READ10 0x28
1015 #define SCSI_MMC4_WRITE10 0x2a
1016 #define SCSI_MMC4_SYNCHRONIZECACHE 0x35
1017 #define SCSI_MMC4_READTOCPMAATIP 0x43
1018 #define SCSI_MMC4_GETCONFIGURATION 0x46
1019 #define SCSI_MMC4_GETEVENTSTATUSNOTIFY 0x4a
1020 #define SCSI_MMC4_READDISCINFORMATION 0x51
1021 #define SCSI_MMC4_READTRACKINFORMATION 0x52
1022 #define SCSI_MMC4_RESERVETRACK 0x53
1023 #define SCSI_MMC4_READBUFFERCAPACITY 0x5c
1024 #define SCSI_MMC4_REPORTKEY 0xa4
1025 #define SCSI_MMC4_READ12 0xa8
1026 #define SCSI_MMC4_WRITE12 0xaa
1027 #define SCSI_MMC4_GETPERFORMANCE 0xac
1028 #define SCSI_MMC4_READDISCSTRUCTURE 0xad
1029 #define SCSI_MMC4_SETSTREAMING 0xb6
1030 #define SCSI_MMC4_SETCDSPEED 0xbb
1031 const value_string scsi_mmc_vals[] = {
1032 {SCSI_MMC4_GETCONFIGURATION , "Get Configuraion"},
1033 {SCSI_MMC4_GETEVENTSTATUSNOTIFY , "Get Event Status Notification"},
1034 {SCSI_MMC4_GETPERFORMANCE , "Get Performance"},
1035 {SCSI_SPC_INQUIRY , "Inquiry"},
1036 {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
1037 {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
1038 {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
1039 {SCSI_MMC4_READ10 , "Read(10)"},
1040 {SCSI_MMC4_READ12 , "Read(12)"},
1041 {SCSI_MMC4_READBUFFERCAPACITY , "Read Buffer Capacity"},
1042 {SCSI_MMC4_READCAPACITY10 , "Read Capacity(10)"},
1043 {SCSI_MMC4_READDISCINFORMATION , "Read Disc Information"},
1044 {SCSI_MMC4_READDISCSTRUCTURE , "Read DISC Structure"},
1045 {SCSI_MMC4_READTOCPMAATIP , "Read TOC/PMA/ATIP"},
1046 {SCSI_MMC4_READTRACKINFORMATION , "Read Track Information"},
1047 {SCSI_MMC4_REPORTKEY , "Report Key"},
1048 {SCSI_SPC_REPORTLUNS , "Report LUNs"},
1049 {SCSI_SPC_REQSENSE , "Request Sense"},
1050 {SCSI_MMC4_RESERVETRACK , "Reserve Track"},
1051 {SCSI_MMC4_SETCDSPEED , "Set CD Speed"},
1052 {SCSI_MMC4_SETSTREAMING , "Set Streaming"},
1053 {SCSI_SBC_STARTSTOPUNIT , "Start Stop Unit"},
1054 {SCSI_MMC4_SYNCHRONIZECACHE , "Synchronize Cache"},
1055 {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
1056 {SCSI_MMC4_WRITE10 , "Write(10)"},
1057 {SCSI_MMC4_WRITE12 , "Write(12)"},
1058 {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
1063 scsi_cdb_table_t scsi_mmc_table[256] = {
1064 /*SPC 0x00*/{dissect_spc_testunitready},
1067 /*SPC 0x03*/{dissect_spc_requestsense},
1082 /*SPC 0x12*/{dissect_spc_inquiry},
1091 /*MMC 0x1b*/{dissect_sbc_startstopunit},
1094 /*MMC 0x1e*/{dissect_spc_preventallowmediaremoval},
1101 /*MMC 0x25*/{dissect_sbc_readcapacity10},
1104 /*MMC 0x28*/{dissect_sbc_read10},
1106 /*MMC 0x2a*/{dissect_sbc_write10},
1117 /*MMC 0x35*/{dissect_mmc4_synchronizecache},
1123 /*SPC 0x3b*/{dissect_spc_writebuffer},
1131 /*MMC 0x43*/{dissect_mmc4_readtocpmaatip},
1134 /*MMC 0x46*/{dissect_mmc4_getconfiguration},
1138 /*MMC 0x4a*/{dissect_mmc4_geteventstatusnotification},
1145 /*MMC 0x51*/{dissect_mmc4_readdiscinformation},
1146 /*MMC 0x52*/{dissect_mmc4_readtrackinformation},
1147 /*MMC 0x53*/{dissect_mmc4_reservetrack},
1149 /*SPC 0x55*/{dissect_spc_modeselect10},
1154 /*SPC 0x5a*/{dissect_spc_modesense10},
1156 /*MMC 0x5c*/{dissect_mmc4_readbuffercapacity},
1224 /*SPC 0xa0*/{dissect_spc_reportluns},
1228 /*MMC 0xa4*/{dissect_mmc4_reportkey},
1232 /*MMC 0xa8*/{dissect_sbc_read12},
1234 /*MMC 0xaa*/{dissect_sbc_write12},
1236 /*MMC 0xac*/{dissect_mmc4_getperformance},
1237 /*MMC 0xad*/{dissect_mmc4_readdiscstructure},
1246 /*MMC 0xb6*/{dissect_mmc4_setstreaming},
1251 /*MMC 0xbb*/{dissect_mmc4_setcdspeed},
1324 proto_register_scsi_mmc(void)
1326 static hf_register_info hf[] = {
1327 { &hf_scsi_mmc_opcode,
1328 {"MMC Opcode", "scsi.mmc.opcode", FT_UINT8, BASE_HEX,
1329 VALS (scsi_mmc_vals), 0x0, "", HFILL}},
1330 { &hf_scsi_mmc_setstreaming_type,
1331 {"Type", "scsi.mmc.setstreaming.type", FT_UINT8, BASE_DEC,
1332 VALS(scsi_setstreaming_type_val), 0, "", HFILL}},
1333 { &hf_scsi_mmc_setstreaming_param_len,
1334 {"Parameter Length", "scsi.mmc.setstreaming.param_len", FT_UINT16, BASE_DEC,
1335 NULL, 0, "", HFILL}},
1336 { &hf_scsi_mmc_setstreaming_wrc,
1337 {"WRC", "scsi.mmc.setstreaming.wrc", FT_UINT8, BASE_HEX,
1338 NULL, 0x18, "", HFILL}},
1339 { &hf_scsi_mmc_setstreaming_rdd,
1340 {"RDD", "scsi.mmc.setstreaming.rdd", FT_BOOLEAN, 8,
1341 NULL, 0x04, "", HFILL}},
1342 { &hf_scsi_mmc_setstreaming_exact,
1343 {"Exact", "scsi.mmc.setstreaming.exact", FT_BOOLEAN, 8,
1344 NULL, 0x02, "", HFILL}},
1345 { &hf_scsi_mmc_setstreaming_ra,
1346 {"RA", "scsi.mmc.setstreaming.ra", FT_BOOLEAN, 8,
1347 NULL, 0x01, "", HFILL}},
1348 { &hf_scsi_mmc_setstreaming_start_lba,
1349 {"Start LBA", "scsi.mmc.setstreaming.start_lbs", FT_UINT32, BASE_DEC,
1350 NULL, 0, "", HFILL}},
1351 { &hf_scsi_mmc_setstreaming_end_lba,
1352 {"End LBA", "scsi.mmc.setstreaming.end_lba", FT_UINT32, BASE_DEC,
1353 NULL, 0, "", HFILL}},
1354 { &hf_scsi_mmc_setstreaming_read_size,
1355 {"Read Size", "scsi.mmc.setstreaming.read_size", FT_UINT32, BASE_DEC,
1356 NULL, 0, "", HFILL}},
1357 { &hf_scsi_mmc_setstreaming_read_time,
1358 {"Read Time", "scsi.mmc.setstreaming.read_time", FT_UINT32, BASE_DEC,
1359 NULL, 0, "", HFILL}},
1360 { &hf_scsi_mmc_setstreaming_write_size,
1361 {"Write Size", "scsi.mmc.setstreaming.write_size", FT_UINT32, BASE_DEC,
1362 NULL, 0, "", HFILL}},
1363 { &hf_scsi_mmc_setstreaming_write_time,
1364 {"Write Time", "scsi.mmc.setstreaming.write_time", FT_UINT32, BASE_DEC,
1365 NULL, 0, "", HFILL}},
1366 { &hf_scsi_mmc_setcdspeed_rc,
1367 {"Rotational Control", "scsi.mmc.setcdspeed.rc", FT_UINT8, BASE_HEX,
1368 VALS(scsi_setcdspeed_rc_val), 0x03, "", HFILL}},
1369 { &hf_scsi_mmc_rbc_block,
1370 {"BLOCK", "scsi.mmc.rbc.block", FT_BOOLEAN, 8,
1371 NULL, 0x01, "", HFILL}},
1372 { &hf_scsi_mmc_rbc_lob_blocks,
1373 {"Buffer Len (blocks)", "scsi.mmc.rbc.lob_blocks", FT_UINT32, BASE_DEC,
1374 NULL, 0, "", HFILL}},
1375 { &hf_scsi_mmc_rbc_alob_blocks,
1376 {"Available Buffer Len (blocks)", "scsi.mmc.rbc.alob_blocks", FT_UINT32, BASE_DEC,
1377 NULL, 0, "", HFILL}},
1378 { &hf_scsi_mmc_rbc_lob_bytes,
1379 {"Buffer Len (bytes)", "scsi.mmc.rbc.lob_bytes", FT_UINT32, BASE_DEC,
1380 NULL, 0, "", HFILL}},
1381 { &hf_scsi_mmc_rbc_alob_bytes,
1382 {"Available Buffer Len (bytes)", "scsi.mmc.rbc.alob_bytes", FT_UINT32, BASE_DEC,
1383 NULL, 0, "", HFILL}},
1384 { &hf_scsi_mmc_rti_address_type,
1385 {"Address Type", "scsi.mmc.rti.address_type", FT_UINT8, BASE_HEX,
1386 VALS(scsi_rti_address_type_val), 0x03, "", HFILL}},
1387 { &hf_scsi_mmc_rti_damage,
1388 {"Damage", "scsi.mmc.rti.damage", FT_BOOLEAN, 8,
1389 NULL, 0x20, "", HFILL}},
1390 { &hf_scsi_mmc_rti_copy,
1391 {"Copy", "scsi.mmc.rti.copy", FT_BOOLEAN, 8,
1392 NULL, 0x10, "", HFILL}},
1393 { &hf_scsi_mmc_rti_track_mode,
1394 {"Track Mode", "scsi.mmc.rti.track_mode", FT_UINT8, BASE_HEX,
1395 NULL, 0x0f, "", HFILL}},
1396 { &hf_scsi_mmc_rti_rt,
1397 {"RT", "scsi.mmc.rti.rt", FT_BOOLEAN, 8,
1398 NULL, 0x80, "", HFILL}},
1399 { &hf_scsi_mmc_rti_blank,
1400 {"Blank", "scsi.mmc.rti.blank", FT_BOOLEAN, 8,
1401 NULL, 0x40, "", HFILL}},
1402 { &hf_scsi_mmc_rti_packet,
1403 {"Packet/Inc", "scsi.mmc.rti.packet", FT_BOOLEAN, 8,
1404 NULL, 0x20, "", HFILL}},
1405 { &hf_scsi_mmc_rti_fp,
1406 {"FP", "scsi.mmc.rti.fp", FT_BOOLEAN, 8,
1407 NULL, 0x10, "", HFILL}},
1408 { &hf_scsi_mmc_rti_data_mode,
1409 {"Data Mode", "scsi.mmc.rti.data_mode", FT_UINT8, BASE_HEX,
1410 NULL, 0x0f, "", HFILL}},
1411 { &hf_scsi_mmc_rti_lra_v,
1412 {"LRA_V", "scsi.mmc.rti.lra_v", FT_BOOLEAN, 8,
1413 NULL, 0x02, "", HFILL}},
1414 { &hf_scsi_mmc_rti_nwa_v,
1415 {"NWA_V", "scsi.mmc.rti.nwa_v", FT_BOOLEAN, 8,
1416 NULL, 0x01, "", HFILL}},
1417 { &hf_scsi_mmc_report_key_type_code,
1418 {"Type Code", "scsi.mmc.report_key.type_code", FT_UINT8, BASE_HEX,
1419 VALS(scsi_report_key_type_code_val), 0xc0, "", HFILL}},
1420 { &hf_scsi_mmc_report_key_vendor_resets,
1421 {"Vendor Resets", "scsi.mmc.report_key.vendor_resets", FT_UINT8, BASE_HEX,
1422 NULL, 0x38, "", HFILL}},
1423 { &hf_scsi_mmc_report_key_user_changes,
1424 {"User Changes", "scsi.mmc.report_key.user_changes", FT_UINT8, BASE_HEX,
1425 NULL, 0x07, "", HFILL}},
1426 { &hf_scsi_mmc_report_key_region_mask,
1427 {"Region Mask", "scsi.mmc.report_key.region_mask", FT_UINT8, BASE_HEX,
1428 NULL, 0xff, "", HFILL}},
1429 { &hf_scsi_mmc_report_key_rpc_scheme,
1430 {"RPC Scheme", "scsi.mmc.report_key.rpc_scheme", FT_UINT8, BASE_HEX,
1431 VALS(scsi_report_key_rpc_scheme_val), 0, "", HFILL}},
1432 { &hf_scsi_mmc_key_class,
1433 {"Key Class", "scsi.mmc.key_class", FT_UINT8, BASE_HEX,
1434 VALS (scsi_key_class_val), 0x00, "", HFILL}},
1435 { &hf_scsi_mmc_key_format,
1436 {"Key Format", "scsi.mmc.key_format", FT_UINT8, BASE_HEX,
1437 VALS (scsi_key_format_val), 0x3f, "", HFILL}},
1438 { &hf_scsi_mmc_disc_info_erasable,
1439 {"Erasable", "scsi.mmc.disc_info.erasable", FT_BOOLEAN, 8,
1440 NULL, 0x10, "", HFILL}},
1441 { &hf_scsi_mmc_disc_info_state_of_last_session,
1442 {"State Of Last Session", "scsi.mmc.disc_info.state_of_last_session", FT_UINT8, BASE_HEX,
1443 VALS(scsi_disc_info_sols_val), 0x0c, "", HFILL}},
1444 { &hf_scsi_mmc_disc_info_disk_status,
1445 {"Disk Status", "scsi.mmc.disc_info.disk_status", FT_UINT8, BASE_HEX,
1446 VALS(scsi_disc_info_disc_status_val), 0x03, "", HFILL}},
1447 { &hf_scsi_mmc_disc_info_number_of_sessions,
1448 {"Number Of Sessions", "scsi.mmc.disc_info.number_of_sessions", FT_UINT16, BASE_DEC,
1449 NULL, 0, "", HFILL}},
1450 { &hf_scsi_mmc_disc_info_first_track_in_last_session,
1451 {"First Track In Last Session", "scsi.mmc.disc_info.first_track_in_last_session", FT_UINT16, BASE_DEC,
1452 NULL, 0, "", HFILL}},
1453 { &hf_scsi_mmc_disc_info_last_track_in_last_session,
1454 {"Last Track In Last Session", "scsi.mmc.disc_info.last_track_in_last_session", FT_UINT16, BASE_DEC,
1455 NULL, 0, "", HFILL}},
1456 { &hf_scsi_mmc_disc_info_did_v,
1457 {"DID_V", "scsi.mmc.disc_info.did_v", FT_BOOLEAN, 8,
1458 NULL, 0x80, "", HFILL}},
1459 { &hf_scsi_mmc_disc_info_dbc_v,
1460 {"DBC_V", "scsi.mmc.disc_info.dbc_v", FT_BOOLEAN, 8,
1461 NULL, 0x40, "", HFILL}},
1462 { &hf_scsi_mmc_disc_info_uru,
1463 {"URU", "scsi.mmc.disc_info.uru", FT_BOOLEAN, 8,
1464 NULL, 0x20, "", HFILL}},
1465 { &hf_scsi_mmc_disc_info_dac_v,
1466 {"DAC_V", "scsi.mmc.disc_info.dac_v", FT_BOOLEAN, 8,
1467 NULL, 0x10, "", HFILL}},
1468 { &hf_scsi_mmc_disc_info_dbit,
1469 {"Dbit", "scsi.mmc.disc_info.dbit", FT_BOOLEAN, 8,
1470 NULL, 0x04, "", HFILL}},
1471 { &hf_scsi_mmc_disc_info_bgfs,
1472 {"BG Format Status", "scsi.mmc.disc_info.bgfs", FT_UINT8, BASE_HEX,
1473 VALS(scsi_disc_info_bgfs_val), 0x03, "", HFILL}},
1474 { &hf_scsi_mmc_disc_info_disc_type,
1475 {"Disc Type", "scsi.mmc.disc_info.disc_type", FT_UINT8, BASE_HEX,
1476 VALS(scsi_disc_info_disc_type_val), 0, "", HFILL}},
1477 { &hf_scsi_mmc_disc_info_disc_identification,
1478 {"Disc Identification", "scsi.mmc.disc_info.disc_identification", FT_UINT32, BASE_HEX,
1479 NULL, 0, "", HFILL}},
1480 { &hf_scsi_mmc_disc_info_last_session_lead_in_start_address,
1481 {"Last Session Lead-In Start Address", "scsi.mmc.disc_info.last_session_lead_in_start_address", FT_UINT32, BASE_DEC,
1482 NULL, 0, "", HFILL}},
1483 { &hf_scsi_mmc_disc_info_last_possible_lead_out_start_address,
1484 {"Last Possible Lead-Out Start Address", "scsi.mmc.disc_info.last_possible_lead_out_start_address", FT_UINT32, BASE_DEC,
1485 NULL, 0, "", HFILL}},
1486 { &hf_scsi_mmc_disc_info_disc_bar_code,
1487 {"Disc Bar Code", "scsi.mmc.disc_info.disc_bar_code", FT_UINT64, BASE_HEX,
1488 NULL, 0, "", HFILL}},
1489 { &hf_scsi_mmc_readtoc_time,
1490 {"Time", "scsi.mmc.readtoc.time", FT_BOOLEAN, 8,
1491 NULL, 0x02, "", HFILL}},
1492 { &hf_scsi_mmc_readtoc_format,
1493 {"Format", "scsi.mmc.readtoc.format", FT_UINT8, BASE_HEX,
1494 NULL, 0x0f, "", HFILL}},
1495 { &hf_scsi_mmc_readtoc_first_session,
1496 {"First Session", "scsi.mmc.readtoc.first_session", FT_UINT8, BASE_DEC,
1497 NULL, 0, "", HFILL}},
1498 { &hf_scsi_mmc_readtoc_last_track,
1499 {"Last Track", "scsi.mmc.readtoc.last_track", FT_UINT8, BASE_DEC,
1500 NULL, 0, "", HFILL}},
1501 { &hf_scsi_mmc_readtoc_last_session,
1502 {"Last Session", "scsi.mmc.readtoc.last_session", FT_UINT8, BASE_DEC,
1503 NULL, 0, "", HFILL}},
1504 { &hf_scsi_mmc_q_subchannel_adr,
1505 {"Q Subchannel ADR", "scsi.mmc.q.subchannel.adr", FT_UINT8, BASE_HEX,
1506 VALS(scsi_q_subchannel_adr_val), 0xf0, "", HFILL}},
1507 { &hf_scsi_mmc_q_subchannel_control,
1508 {"Q Subchannel Control", "scsi.mmc.q.subchannel.control", FT_UINT8, BASE_HEX,
1509 VALS(scsi_q_subchannel_control_val), 0x0f, "", HFILL}},
1510 { &hf_scsi_mmc_agid,
1511 {"AGID", "scsi.mmc.agid", FT_UINT8, BASE_HEX,
1512 NULL, 0xc0, "", HFILL}},
1513 { &hf_scsi_mmc_track,
1514 {"Track", "scsi.mmc.track", FT_UINT32, BASE_DEC,
1515 NULL, 0, "", HFILL}},
1516 { &hf_scsi_mmc_track_size,
1517 {"Track Size", "scsi.mmc.track_size", FT_UINT32, BASE_DEC,
1518 NULL, 0, "", HFILL}},
1519 { &hf_scsi_mmc_track_start_address,
1520 {"Track Start Address", "scsi.mmc.track_start_address", FT_UINT32, BASE_DEC,
1521 NULL, 0, "", HFILL}},
1522 { &hf_scsi_mmc_track_start_time,
1523 {"Track Start Time", "scsi.mmc.track_start_time", FT_UINT32, BASE_DEC,
1524 NULL, 0, "", HFILL}},
1526 {"Logical Block Address", "scsi.mmc.lba", FT_UINT32, BASE_DEC,
1527 NULL, 0x0, "", HFILL}},
1528 { &hf_scsi_mmc_session,
1529 {"Session", "scsi.mmc.session", FT_UINT32, BASE_DEC,
1530 NULL, 0, "", HFILL}},
1531 { &hf_scsi_mmc_data_length,
1532 {"Data Length", "scsi.mmc.data_length", FT_UINT32, BASE_DEC,
1533 NULL, 0x0, "", HFILL}},
1534 { &hf_scsi_mmc_getconf_rt,
1535 {"RT", "scsi.mmc.getconf.rt", FT_UINT8, BASE_HEX,
1536 VALS(scsi_getconf_rt_val), 0x03, "", HFILL}},
1537 { &hf_scsi_mmc_getconf_current_profile,
1538 {"Current Profile", "scsi.mmc.getconf.current_profile", FT_UINT16, BASE_HEX,
1539 VALS(scsi_getconf_current_profile_val), 0, "", HFILL}},
1540 { &hf_scsi_mmc_getconf_starting_feature,
1541 {"Starting Feature", "scsi.mmc.getconf.starting_feature", FT_UINT16, BASE_HEX,
1542 VALS(scsi_feature_val), 0, "", HFILL}},
1543 { &hf_scsi_mmc_feature,
1544 {"Feature", "scsi.mmc.feature", FT_UINT16, BASE_HEX,
1545 VALS(scsi_feature_val), 0, "", HFILL}},
1546 { &hf_scsi_mmc_feature_version,
1547 {"Version", "scsi.mmc.feature.version", FT_UINT8, BASE_DEC,
1548 NULL, 0x3c, "", HFILL}},
1549 { &hf_scsi_mmc_feature_persistent,
1550 {"Persistent", "scsi.mmc.feature.persistent", FT_UINT8, BASE_HEX,
1551 NULL, 0x02, "", HFILL}},
1552 { &hf_scsi_mmc_feature_current,
1553 {"Current", "scsi.mmc.feature.current", FT_UINT8, BASE_HEX,
1554 NULL, 001, "", HFILL}},
1555 { &hf_scsi_mmc_feature_additional_length,
1556 {"Additional Length", "scsi.mmc.feature.additional_length", FT_UINT8, BASE_DEC,
1557 NULL, 0, "", HFILL}},
1558 { &hf_scsi_mmc_feature_lun_sn,
1559 {"LUN Serial Number", "scsi.mmc.feature.lun_sn", FT_STRING, BASE_NONE,
1560 NULL, 0, "", HFILL}},
1561 { &hf_scsi_mmc_feature_cdread_dap,
1562 {"DAP", "scsi.mmc.feature.cdread.dap", FT_BOOLEAN, 8,
1563 NULL, 0x80, "", HFILL}},
1564 { &hf_scsi_mmc_feature_cdread_c2flag,
1565 {"C2 Flag", "scsi.mmc.feature.cdread.c2flag", FT_BOOLEAN, 8,
1566 NULL, 0x02, "", HFILL}},
1567 { &hf_scsi_mmc_feature_cdread_cdtext,
1568 {"CD-Text", "scsi.mmc.feature.cdread.cdtext", FT_BOOLEAN, 8,
1569 NULL, 0x01, "", HFILL}},
1570 { &hf_scsi_mmc_feature_dvdrw_write,
1571 {"Write", "scsi.mmc.feature.dvdrw.write", FT_BOOLEAN, 8,
1572 NULL, 0x01, "", HFILL}},
1573 { &hf_scsi_mmc_feature_dvdrw_quickstart,
1574 {"Quick Start", "scsi.mmc.feature.dvdrw.quickstart", FT_BOOLEAN, 8,
1575 NULL, 0x02, "", HFILL}},
1576 { &hf_scsi_mmc_feature_dvdrw_closeonly,
1577 {"Close Only", "scsi.mmc.feature.dvdrw.closeonly", FT_BOOLEAN, 8,
1578 NULL, 0x01, "", HFILL}},
1579 { &hf_scsi_mmc_feature_dvdr_write,
1580 {"Write", "scsi.mmc.feature.dvdr.write", FT_BOOLEAN, 8,
1581 NULL, 0x01, "", HFILL}},
1582 { &hf_scsi_mmc_feature_tao_buf,
1583 {"BUF", "scsi.mmc.feature.tao.buf", FT_BOOLEAN, 8,
1584 NULL, 0x40, "", HFILL}},
1585 { &hf_scsi_mmc_feature_tao_rwraw,
1586 {"R-W Raw", "scsi.mmc.feature.tao.rwraw", FT_BOOLEAN, 8,
1587 NULL, 0x10, "", HFILL}},
1588 { &hf_scsi_mmc_feature_tao_rwpack,
1589 {"R-W Pack", "scsi.mmc.feature.tao.rwpack", FT_BOOLEAN, 8,
1590 NULL, 0x08, "", HFILL}},
1591 { &hf_scsi_mmc_feature_tao_testwrite,
1592 {"Test Write", "scsi.mmc.feature.tao.testwrite", FT_BOOLEAN, 8,
1593 NULL, 0x04, "", HFILL}},
1594 { &hf_scsi_mmc_feature_tao_cdrw,
1595 {"CD-RW", "scsi.mmc.feature.tao.cdrw", FT_BOOLEAN, 8,
1596 NULL, 0x02, "", HFILL}},
1597 { &hf_scsi_mmc_feature_tao_rwsubcode,
1598 {"R-W Subcode", "scsi.mmc.feature.tao.rwsubcode", FT_BOOLEAN, 8,
1599 NULL, 0x01, "", HFILL}},
1600 { &hf_scsi_mmc_feature_dts,
1601 {"Data Type Supported", "scsi.mmc.feature.dts", FT_UINT16, BASE_HEX,
1602 NULL, 0xffff, "", HFILL}},
1603 { &hf_scsi_mmc_feature_sao_buf,
1604 {"BUF", "scsi.mmc.feature.sao.buf", FT_BOOLEAN, 8,
1605 NULL, 0x40, "", HFILL}},
1606 { &hf_scsi_mmc_feature_sao_sao,
1607 {"SAO", "scsi.mmc.feature.sao.sao", FT_BOOLEAN, 8,
1608 NULL, 0x20, "", HFILL}},
1609 { &hf_scsi_mmc_feature_sao_rawms,
1610 {"Raw MS", "scsi.mmc.feature.sao.rawms", FT_BOOLEAN, 8,
1611 NULL, 0x10, "", HFILL}},
1612 { &hf_scsi_mmc_feature_sao_raw,
1613 {"Raw", "scsi.mmc.feature.sao.raw", FT_BOOLEAN, 8,
1614 NULL, 0x08, "", HFILL}},
1615 { &hf_scsi_mmc_feature_sao_testwrite,
1616 {"Test Write", "scsi.mmc.feature.sao.testwrite", FT_BOOLEAN, 8,
1617 NULL, 0x04, "", HFILL}},
1618 { &hf_scsi_mmc_feature_sao_cdrw,
1619 {"CD-RW", "scsi.mmc.feature.sao.cdrw", FT_BOOLEAN, 8,
1620 NULL, 0x02, "", HFILL}},
1621 { &hf_scsi_mmc_feature_sao_rw,
1622 {"R-W", "scsi.mmc.feature.sao.rw", FT_BOOLEAN, 8,
1623 NULL, 0x01, "", HFILL}},
1624 { &hf_scsi_mmc_feature_sao_mcsl,
1625 {"Maximum Cue Sheet Length", "scsi.mmc.feature.sao.mcsl", FT_UINT24, BASE_DEC,
1626 NULL, 0, "", HFILL}},
1627 { &hf_scsi_mmc_feature_dvdr_buf,
1628 {"BUF", "scsi.mmc.feature.dvdr.buf", FT_BOOLEAN, 8,
1629 NULL, 0x40, "", HFILL}},
1630 { &hf_scsi_mmc_feature_dvdr_testwrite,
1631 {"Test Write", "scsi.mmc.feature.dvdr.testwrite", FT_BOOLEAN, 8,
1632 NULL, 0x04, "", HFILL}},
1633 { &hf_scsi_mmc_feature_dvdr_dvdrw,
1634 {"DVD-RW", "scsi.mmc.feature.dvdr.dvdrw", FT_BOOLEAN, 8,
1635 NULL, 0x02, "", HFILL}},
1636 { &hf_scsi_mmc_feature_profile,
1637 {"Profile", "scsi.mmc.feature.profile", FT_UINT16, BASE_HEX,
1638 VALS(scsi_getconf_current_profile_val), 0, "", HFILL}},
1639 { &hf_scsi_mmc_feature_profile_current,
1640 {"Current", "scsi.mmc.feature.profile.current", FT_BOOLEAN, 8,
1641 NULL, 0x01, "", HFILL}},
1642 { &hf_scsi_mmc_feature_isw_buf,
1643 {"BUF", "scsi.mmc.feature.isw.buf", FT_BOOLEAN, 8,
1644 NULL, 0x01, "", HFILL}},
1645 { &hf_scsi_mmc_feature_isw_num_linksize,
1646 {"Number of Link Sizes", "scsi.mmc.feature.isw.num_linksize", FT_UINT8, BASE_DEC,
1647 NULL, 0, "", HFILL}},
1648 { &hf_scsi_mmc_feature_isw_linksize,
1649 {"Link Size", "scsi.mmc.feature.isw.linksize", FT_UINT8, BASE_DEC,
1650 NULL, 0, "", HFILL}},
1651 { &hf_scsi_mmc_read_compatibility_lba,
1652 {"Read Compatibility LBA", "scsi.mmc.read_compatibility_lba", FT_UINT32, BASE_DEC,
1653 NULL, 0, "", HFILL}},
1654 { &hf_scsi_mmc_reservation_size,
1655 {"Reservation Size", "scsi.mmc.reservation_size", FT_UINT32, BASE_DEC,
1656 NULL, 0, "", HFILL}},
1657 { &hf_scsi_mmc_last_recorded_address,
1658 {"Last Recorded Address", "scsi.mmc.last_recorded_address", FT_UINT32, BASE_DEC,
1659 NULL, 0, "", HFILL}},
1660 { &hf_scsi_mmc_first_track,
1661 {"First Track", "scsi.mmc.first_track", FT_UINT8, BASE_DEC,
1662 NULL, 0, "", HFILL}},
1663 { &hf_scsi_mmc_fixed_packet_size,
1664 {"Fixed Packet Size", "scsi.mmc.fixed_packet_size", FT_UINT32, BASE_DEC,
1665 NULL, 0, "", HFILL}},
1666 { &hf_scsi_mmc_synccache_immed,
1667 {"IMMED", "scsi.mmc.synccache.immed", FT_BOOLEAN, 8,
1668 NULL, 0x02, "", HFILL}},
1669 { &hf_scsi_mmc_synccache_reladr,
1670 {"RelAdr", "scsi.mmc.synccache.reladr", FT_BOOLEAN, 8,
1671 NULL, 0x01, "", HFILL}},
1672 { &hf_scsi_mmc_num_blocks,
1673 {"Number of Blocks", "scsi.mmc.num_blocks", FT_UINT32, BASE_DEC,
1674 NULL, 0x0, "", HFILL}},
1675 { &hf_scsi_mmc_next_writable_address,
1676 {"Next Writable Address", "scsi.mmc.next_writable_address", FT_UINT32, BASE_DEC,
1677 NULL, 0, "", HFILL}},
1678 { &hf_scsi_mmc_free_blocks,
1679 {"Free Blocks", "scsi.mmc.free_blocks", FT_UINT32, BASE_DEC,
1680 NULL, 0, "", HFILL}},
1683 /* Setup protocol subtree array */
1684 static gint *ett[] = {
1685 &ett_scsi_mmc_profile,
1688 /* Register the protocol name and description */
1689 proto_scsi_mmc = proto_register_protocol("SCSI_MMC", "SCSI_MMC", "scsi_mmc");
1691 /* Required function calls to register the header fields and subtrees used */
1692 proto_register_field_array(proto_scsi_mmc, hf, array_length(hf));
1693 proto_register_subtree_array(ett, array_length(ett));
1697 proto_reg_handoff_scsi_mmc(void)