HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-scsi-mmc.c
blobb03b9235d02e908b02a2aba7c0a1c23b93df8e56
1 /* packet-scsi-mmc.c
2 * Ronnie Sahlberg 2006
3 * copied from packet-scsi.c
5 * $Id$
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include "config.h"
28 #include <glib.h>
30 #include <epan/packet.h>
31 #include <epan/conversation.h>
32 #include <epan/tap.h>
33 #include "packet-scsi.h"
34 #include "packet-fc.h"
35 #include "packet-scsi-mmc.h"
36 #include "packet-scsi-sbc.h"
39 static int proto_scsi_mmc = -1;
40 int hf_scsi_mmc_opcode = -1;
41 static int hf_scsi_mmc_setstreaming_type = -1;
42 static int hf_scsi_mmc_setstreaming_param_len = -1;
43 static int hf_scsi_mmc_setstreaming_wrc = -1;
44 static int hf_scsi_mmc_setstreaming_rdd = -1;
45 static int hf_scsi_mmc_setstreaming_exact = -1;
46 static int hf_scsi_mmc_setstreaming_ra = -1;
47 static int hf_scsi_mmc_setstreaming_start_lba = -1;
48 static int hf_scsi_mmc_setstreaming_end_lba = -1;
49 static int hf_scsi_mmc_setstreaming_read_size = -1;
50 static int hf_scsi_mmc_setstreaming_read_time = -1;
51 static int hf_scsi_mmc_setstreaming_write_size = -1;
52 static int hf_scsi_mmc_setstreaming_write_time = -1;
53 static int hf_scsi_mmc_setcdspeed_rc = -1;
54 static int hf_scsi_mmc_rbc_block = -1;
55 static int hf_scsi_mmc_rbc_lob_blocks = -1;
56 static int hf_scsi_mmc_rbc_alob_blocks = -1;
57 static int hf_scsi_mmc_rbc_lob_bytes = -1;
58 static int hf_scsi_mmc_rbc_alob_bytes = -1;
59 static int hf_scsi_mmc_rti_address_type = -1;
60 static int hf_scsi_mmc_rti_damage = -1;
61 static int hf_scsi_mmc_rti_copy = -1;
62 static int hf_scsi_mmc_rti_track_mode = -1;
63 static int hf_scsi_mmc_rti_rt = -1;
64 static int hf_scsi_mmc_rti_blank = -1;
65 static int hf_scsi_mmc_rti_packet = -1;
66 static int hf_scsi_mmc_rti_fp = -1;
67 static int hf_scsi_mmc_rti_data_mode = -1;
68 static int hf_scsi_mmc_rti_lra_v = -1;
69 static int hf_scsi_mmc_rti_nwa_v = -1;
70 static int hf_scsi_mmc_report_key_type_code = -1;
71 static int hf_scsi_mmc_report_key_vendor_resets = -1;
72 static int hf_scsi_mmc_report_key_user_changes = -1;
73 static int hf_scsi_mmc_report_key_region_mask = -1;
74 static int hf_scsi_mmc_report_key_rpc_scheme = -1;
75 static int hf_scsi_mmc_key_class = -1;
76 static int hf_scsi_mmc_key_format = -1;
77 static int hf_scsi_mmc_disc_info_erasable = -1;
78 static int hf_scsi_mmc_disc_info_state_of_last_session = -1;
79 static int hf_scsi_mmc_disc_info_disk_status = -1;
80 static int hf_scsi_mmc_disc_info_number_of_sessions = -1;
81 static int hf_scsi_mmc_disc_info_first_track_in_last_session = -1;
82 static int hf_scsi_mmc_disc_info_last_track_in_last_session = -1;
83 static int hf_scsi_mmc_disc_info_did_v = -1;
84 static int hf_scsi_mmc_disc_info_dbc_v = -1;
85 static int hf_scsi_mmc_disc_info_uru = -1;
86 static int hf_scsi_mmc_disc_info_dac_v = -1;
87 static int hf_scsi_mmc_disc_info_dbit = -1;
88 static int hf_scsi_mmc_disc_info_bgfs = -1;
89 static int hf_scsi_mmc_disc_info_disc_type = -1;
90 static int hf_scsi_mmc_disc_info_disc_identification = -1;
91 static int hf_scsi_mmc_disc_info_last_session_lead_in_start_address = -1;
92 static int hf_scsi_mmc_disc_info_last_possible_lead_out_start_address = -1;
93 static int hf_scsi_mmc_disc_info_disc_bar_code = -1;
94 static int hf_scsi_mmc_readtoc_time = -1;
95 static int hf_scsi_mmc_readtoc_format = -1;
96 static int hf_scsi_mmc_readtoc_first_session = -1;
97 static int hf_scsi_mmc_readtoc_last_track = -1;
98 static int hf_scsi_mmc_readtoc_last_session = -1;
99 static int hf_scsi_mmc_q_subchannel_adr = -1;
100 static int hf_scsi_mmc_q_subchannel_control = -1;
101 static int hf_scsi_mmc_agid = -1;
102 static int hf_scsi_mmc_track = -1;
103 static int hf_scsi_mmc_track_size = -1;
104 static int hf_scsi_mmc_track_start_address = -1;
105 static int hf_scsi_mmc_track_start_time = -1;
106 static int hf_scsi_mmc_lba = -1;
107 static int hf_scsi_mmc_session = -1;
108 static int hf_scsi_mmc_data_length = -1;
109 static int hf_scsi_mmc_getconf_rt = -1;
110 static int hf_scsi_mmc_getconf_starting_feature = -1;
111 static int hf_scsi_mmc_getconf_current_profile = -1;
112 static int hf_scsi_mmc_feature = -1;
113 static int hf_scsi_mmc_feature_version = -1;
114 static int hf_scsi_mmc_feature_persistent = -1;
115 static int hf_scsi_mmc_feature_current = -1;
116 static int hf_scsi_mmc_feature_additional_length = -1;
117 static int hf_scsi_mmc_feature_lun_sn = -1;
118 static int hf_scsi_mmc_feature_cdread_dap = -1;
119 static int hf_scsi_mmc_feature_cdread_c2flag = -1;
120 static int hf_scsi_mmc_feature_cdread_cdtext = -1;
121 static int hf_scsi_mmc_feature_dvdrw_write = -1;
122 static int hf_scsi_mmc_feature_dvdrw_quickstart = -1;
123 static int hf_scsi_mmc_feature_dvdrw_closeonly = -1;
124 static int hf_scsi_mmc_feature_dvdr_write = -1;
125 static int hf_scsi_mmc_feature_tao_buf = -1;
126 static int hf_scsi_mmc_feature_tao_rwraw = -1;
127 static int hf_scsi_mmc_feature_tao_rwpack = -1;
128 static int hf_scsi_mmc_feature_tao_testwrite = -1;
129 static int hf_scsi_mmc_feature_tao_cdrw = -1;
130 static int hf_scsi_mmc_feature_tao_rwsubcode = -1;
131 static int hf_scsi_mmc_feature_dts = -1;
132 static int hf_scsi_mmc_feature_sao_buf = -1;
133 static int hf_scsi_mmc_feature_sao_sao = -1;
134 static int hf_scsi_mmc_feature_sao_rawms = -1;
135 static int hf_scsi_mmc_feature_sao_raw = -1;
136 static int hf_scsi_mmc_feature_sao_testwrite = -1;
137 static int hf_scsi_mmc_feature_sao_cdrw = -1;
138 static int hf_scsi_mmc_feature_sao_rw = -1;
139 static int hf_scsi_mmc_feature_sao_mcsl = -1;
140 static int hf_scsi_mmc_feature_dvdr_buf = -1;
141 static int hf_scsi_mmc_feature_dvdr_testwrite = -1;
142 static int hf_scsi_mmc_feature_dvdr_dvdrw = -1;
143 static int hf_scsi_mmc_feature_profile = -1;
144 static int hf_scsi_mmc_feature_profile_current = -1;
145 static int hf_scsi_mmc_feature_isw_buf = -1;
146 static int hf_scsi_mmc_feature_isw_num_linksize = -1;
147 static int hf_scsi_mmc_feature_isw_linksize = -1;
148 static int hf_scsi_mmc_read_compatibility_lba = -1;
149 static int hf_scsi_mmc_reservation_size = -1;
150 static int hf_scsi_mmc_last_recorded_address = -1;
151 static int hf_scsi_mmc_first_track = -1;
152 static int hf_scsi_mmc_fixed_packet_size = -1;
153 static int hf_scsi_mmc_closetrack_immed = -1;
154 static int hf_scsi_mmc_closetrack_func = -1;
155 static int hf_scsi_mmc_synccache_immed = -1;
156 static int hf_scsi_mmc_synccache_reladr = -1;
157 static int hf_scsi_mmc_num_blocks = -1;
158 static int hf_scsi_mmc_next_writable_address = -1;
159 static int hf_scsi_mmc_free_blocks = -1;
160 static int hf_scsi_mmc_read_dvd_format = -1;
161 static int hf_scsi_mmc_disc_book_type = -1;
162 static int hf_scsi_mmc_disc_book_version = -1;
163 static int hf_scsi_mmc_disc_size_size = -1;
164 static int hf_scsi_mmc_disc_size_rate = -1;
165 static int hf_scsi_mmc_disc_num_layers = -1;
166 static int hf_scsi_mmc_disc_track_path = -1;
167 static int hf_scsi_mmc_disc_structure_layer = -1;
168 static int hf_scsi_mmc_disc_density_length = -1;
169 static int hf_scsi_mmc_disc_density_pitch = -1;
170 static int hf_scsi_mmc_disc_first_physical = -1;
171 static int hf_scsi_mmc_disc_last_physical = -1;
172 static int hf_scsi_mmc_disc_last_physical_layer0 = -1;
173 static int hf_scsi_mmc_disc_extended_format_info = -1;
174 static int hf_scsi_mmc_disc_application_code = -1;
175 static int hf_scsi_mmc_adip_eib0 = -1;
176 static int hf_scsi_mmc_adip_eib1 = -1;
177 static int hf_scsi_mmc_adip_eib2 = -1;
178 static int hf_scsi_mmc_adip_eib3 = -1;
179 static int hf_scsi_mmc_adip_eib4 = -1;
180 static int hf_scsi_mmc_adip_eib5 = -1;
181 static int hf_scsi_mmc_adip_device_manuf_id = -1;
182 static int hf_scsi_mmc_adip_media_type_id = -1;
183 static int hf_scsi_mmc_adip_product_revision_number = -1;
184 static int hf_scsi_mmc_adip_number_of_physical_info = -1;
185 static int hf_scsi_mmc_gesn_polled = -1;
186 static int hf_scsi_mmc_notification_flags = -1;
187 static int hf_scsi_mmc_gesn_device_busy = -1;
188 static int hf_scsi_mmc_gesn_multi_initiator = -1;
189 static int hf_scsi_mmc_gesn_media = -1;
190 static int hf_scsi_mmc_gesn_external_request = -1;
191 static int hf_scsi_mmc_gesn_power_mgmt = -1;
192 static int hf_scsi_mmc_gesn_operational_change = -1;
193 static int hf_scsi_mmc_prevent_allow_flags = -1;
194 static int hf_scsi_mmc_prevent_allow_persistent = -1;
195 static int hf_scsi_mmc_prevent_allow_prevent = -1;
196 static int hf_scsi_mmc_disk_flags = -1;
197 static int hf_scsi_mmc_format_flags = -1;
198 static int hf_scsi_mmc_track_flags = -1;
199 static int hf_scsi_mmc_data_flags = -1;
201 static gint ett_scsi_mmc_profile = -1;
202 static gint ett_scsi_notifications = -1;
203 static gint ett_scsi_prevent_allow = -1;
204 static gint ett_scsi_disk_flags = -1;
205 static gint ett_scsi_format_flags = -1;
206 static gint ett_scsi_track_flags = -1;
207 static gint ett_scsi_data_flags = -1;
209 static const true_false_string scsi_gesn_path = {
210 "POLLED operation requested",
211 "ASYNCHRONOUS operation requested"
213 static const true_false_string scsi_track_path = {
214 "Opposite Track Path",
215 "Parallel Track Path"
217 static const true_false_string scsi_adip_extended_format_info = {
218 "Data zone contains extended format info for VPCS",
219 "Data zone does NOT contain extended format info"
221 static const value_string scsi_disk_application_code[] = {
222 {0x0, "General Purpose Use"},
223 {0,NULL}
225 static const value_string scsi_density_length[] = {
226 {0x0, "0.133um"},
227 {0,NULL}
229 static const value_string scsi_density_pitch[] = {
230 {0x0, "0.74um"},
231 {0x1, "0.80um"},
232 {0x2, "0.615um"},
233 {0,NULL}
235 static const value_string scsi_disc_structure[] = {
236 {0x0, "Embossed layer"},
237 {0x2, "Write-once recording layer"},
238 {0x4, "Rewriteable recording layer"},
239 {0,NULL}
241 static const value_string scsi_num_layers[] = {
242 {0x0, "1 layer"},
243 {0x1, "2 layers"},
244 {0x2, "3 layers"},
245 {0x3, "4 layers"},
246 {0,NULL}
248 static const value_string scsi_disc_size[] = {
249 {0x0, "120mm"},
250 {0x1, "80mm"},
251 {0,NULL}
253 static const value_string scsi_disc_rate[] = {
254 {0x0, "2.52Mbps"},
255 {0x1, "5.04Mbps"},
256 {0x2, "10.08Mbps"},
257 {0xf, "No maximum transfer rate specified"},
258 {0,NULL}
260 static const value_string scsi_disc_category_type[] = {
261 {0x0, "DVD-ROM"},
262 {0x1, "DVD-RAM"},
263 {0x2, "DVD-R"},
264 {0x3, "DVD-RW"},
265 {0x9, "DVD+RW"},
266 {0xa, "DVD+R"},
267 {0,NULL}
270 static const value_string scsi_read_dvd_formats[] = {
271 {0x00, "Physical Information"},
272 {0x01, "Copyright Information"},
273 {0x02, "Disk Key obfuscated by a Bus Key"},
274 {0x03, "Burst Cutting Area information"},
275 {0x04, "Disk Manufacturing Information"},
276 {0x05, "copyright Management Information"},
277 {0x06, "Media Identifier protected by a Bus Key"},
278 {0x07, "Media Key block protected by a Bus Key"},
279 {0x08, "DDS information"},
280 {0x09, "DVD-RAM Medium status"},
281 {0x0a, "DVD-RAM Spare Area information"},
282 {0x0b, "DVD-RAM Recording Type information"},
283 {0x0c, "DVD-R/-RW RMD"},
284 {0x0d, "Specified RMD"},
285 {0x0e, "Pre-recorded information"},
286 {0x0f, "DVD-R/-RW Media Identifier"},
287 {0x10, "DVD-R/-RW Physical Format Information"},
288 {0x11, "ADIP information"},
289 {0x30, "Disc Control Block"},
290 {0x31, "Read MTA ECC Block"},
291 {0xc0, "Write Protection Status"},
292 {0xff, "READ/SEND DVD STRUCTURE capability"},
293 {0,NULL}
296 static const value_string scsi_data_mode_vals[] = {
297 {0x01, "Mode 1 (ISO/IEC 10149)"},
298 {0x02, "Mode 2 (ISO/IEC 10149 or CD-ROM XA) DDCD"},
299 {0x0f, "Data Block Type unknown (no track descriptor block)"},
300 {0,NULL}
302 static const value_string scsi_getconf_rt_val[] = {
303 {0x00, "Return all features"},
304 {0x01, "Return all current features"},
305 {0x02, "Return all identified by Starting Feature"},
306 {0,NULL}
308 static const value_string scsi_getconf_current_profile_val[] = {
309 {0x0000, "Reserved"},
310 {0x0001, "Non-removable disk"},
311 {0x0002, "Removable disk"},
312 {0x0003, "MO Erasable"},
313 {0x0004, "Optical Write Once"},
314 {0x0005, "AS-MO"},
315 {0x0008, "CD-ROM"},
316 {0x0009, "CD-R"},
317 {0x000a, "CD-RW"},
318 {0x0010, "DVD-ROM"},
319 {0x0011, "DVD-R"},
320 {0x0012, "DVD-RAM"},
321 {0x0013, "DVD-RW Restricted Overwrite"},
322 {0x0014, "DVD-RW Sequential recording"},
323 {0x001a, "DVD+RW"},
324 {0x001b, "DVD+R"},
325 {0x0020, "DDCD-ROM"},
326 {0x0021, "DDCD-R"},
327 {0x0022, "DDCD-RW"},
328 {0xffff, "Logical unit not conforming to a standard profile"},
329 {0,NULL}
332 static const value_string scsi_feature_val[] = {
333 {0x0000, "Profile List"},
334 {0x0001, "Core"},
335 {0x0002, "Morphing"},
336 {0x0003, "Removable Medium"},
337 {0x0004, "Write Protect"},
338 {0x0010, "Random Readable"},
339 {0x001d, "Multi-read"},
340 {0x001e, "CD Read"},
341 {0x001f, "DVD Read"},
342 {0x0020, "Random Writeable"},
343 {0x0021, "Incremental Streaming Writeable"},
344 {0x0022, "Sector Erasable"},
345 {0x0023, "Formattable"},
346 {0x0024, "Defect Management"},
347 {0x0025, "Write Once"},
348 {0x0026, "Restricted Overwrite"},
349 {0x0027, "CD-RW CAV Write"},
350 {0x0028, "MRW"},
351 {0x0029, "Enhanced Defect Reporting"},
352 {0x002a, "DVD+RW"},
353 {0x002b, "DVD+R"},
354 {0x002c, "Rigid Restricted Overwrite"},
355 {0x002d, "CD Track At Once"},
356 {0x002e, "CD Mastering"},
357 {0x002f, "DVD-R/-RW Write"},
358 {0x0030, "DDCD Read"},
359 {0x0031, "DDCD-R Write"},
360 {0x0032, "DDCD-RW Write"},
361 {0x0037, "CD-RW Media Write Support"},
362 {0x0100, "Power Management"},
363 {0x0101, "SMART"},
364 {0x0102, "Embedded Changer"},
365 {0x0103, "CD Audio analog play"},
366 {0x0104, "Microcode Upgrade"},
367 {0x0105, "Timeout"},
368 {0x0106, "DVD-CSS"},
369 {0x0107, "Real Time Streaming"},
370 {0x0108, "Logical Unit serial number"},
371 {0x010a, "Disc control Block"},
372 {0x010b, "DVD CPRM"},
373 {0x010c, "Firmware Information"},
374 {0,NULL}
377 static void
378 dissect_mmc4_getconfiguration (tvbuff_t *tvb, packet_info *pinfo,
379 proto_tree *tree, guint offset,
380 gboolean isreq, gboolean iscdb,
381 guint payload_len _U_,
382 scsi_task_data_t *cdata)
385 gint32 len;
386 guint old_offset;
387 tvbuff_t *volatile tvb_v = tvb;
388 volatile guint offset_v = offset;
390 if (tree && isreq && iscdb) {
391 proto_tree_add_item (tree, hf_scsi_mmc_getconf_rt, tvb_v, offset_v+0, 1, ENC_BIG_ENDIAN);
392 proto_tree_add_item (tree, hf_scsi_mmc_getconf_starting_feature, tvb_v, offset_v+1, 2, ENC_BIG_ENDIAN);
393 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb_v, offset_v+6, 2, ENC_BIG_ENDIAN);
394 /* we need the alloc_len in the response */
395 if(cdata){
396 cdata->itlq->alloc_len=tvb_get_ntohs(tvb_v, offset_v+6);
398 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
399 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
401 if(!isreq) {
402 if(!cdata){
403 return;
406 TRY_SCSI_CDB_ALLOC_LEN(pinfo, tvb_v, offset_v, cdata->itlq->alloc_len);
408 len=tvb_get_ntohl(tvb_v, offset_v+0);
409 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb_v, offset_v, 4, ENC_BIG_ENDIAN);
410 proto_tree_add_item (tree, hf_scsi_mmc_getconf_current_profile, tvb_v, offset_v+6, 2, ENC_BIG_ENDIAN);
411 offset_v+=8;
412 len-=4;
413 while(len>0){
414 guint16 feature;
415 guint8 additional_length;
416 guint8 num_linksize;
418 feature=tvb_get_ntohs(tvb_v, offset_v);
419 proto_tree_add_item (tree, hf_scsi_mmc_feature, tvb_v, offset_v, 2, ENC_BIG_ENDIAN);
420 offset_v+=2;
421 proto_tree_add_item (tree, hf_scsi_mmc_feature_version, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
422 proto_tree_add_item (tree, hf_scsi_mmc_feature_persistent, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
423 proto_tree_add_item (tree, hf_scsi_mmc_feature_current, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
424 offset_v+=1;
425 additional_length=tvb_get_guint8(tvb_v, offset_v);
426 proto_tree_add_item (tree, hf_scsi_mmc_feature_additional_length, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
427 offset_v+=1;
428 old_offset=offset_v;
429 switch(feature){
430 case 0x0000: /* profile list */
431 while(offset_v<(old_offset+additional_length)){
432 proto_item *it=NULL;
433 proto_tree *tr=NULL;
434 guint16 profile;
435 guint8 cur_profile;
437 if(tree){
438 it=proto_tree_add_text(tree, tvb_v, offset_v, 4, "Profile:");
439 tr=proto_item_add_subtree(it, ett_scsi_mmc_profile);
442 profile=tvb_get_ntohs(tvb_v, offset_v);
443 proto_tree_add_item (tr, hf_scsi_mmc_feature_profile, tvb_v, offset_v, 2, ENC_BIG_ENDIAN);
444 proto_item_append_text(it, "%s", val_to_str(profile, scsi_getconf_current_profile_val, "Unknown 0x%04x"));
446 cur_profile=tvb_get_guint8(tvb_v, offset_v+2);
447 proto_tree_add_item (tr, hf_scsi_mmc_feature_profile_current, tvb_v, offset_v+2, 1, ENC_BIG_ENDIAN);
448 if(cur_profile&0x01){
449 proto_item_append_text(it, " [CURRENT PROFILE]");
452 offset_v+=4;
454 break;
455 case 0x001d: /* multi-read */
456 case 0x001f: /* dvd read feature */
457 /* no data for this one */
458 break;
459 case 0x001e: /* cd read */
460 proto_tree_add_item (tree, hf_scsi_mmc_feature_cdread_dap, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
461 proto_tree_add_item (tree, hf_scsi_mmc_feature_cdread_c2flag, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
462 proto_tree_add_item (tree, hf_scsi_mmc_feature_cdread_cdtext, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
463 break;
464 case 0x0021: /* incremental streaming writeable */
465 proto_tree_add_item (tree, hf_scsi_mmc_feature_dts, tvb_v, offset_v, 2, ENC_BIG_ENDIAN);
466 offset_v+=2;
467 proto_tree_add_item (tree, hf_scsi_mmc_feature_isw_buf, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
468 offset_v+=1;
469 num_linksize=tvb_get_guint8(tvb_v, offset_v);
470 proto_tree_add_item (tree, hf_scsi_mmc_feature_isw_num_linksize, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
471 offset_v+=1;
472 while(num_linksize--){
473 proto_tree_add_item (tree, hf_scsi_mmc_feature_isw_linksize, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
474 offset_v+=1;
476 break;
477 case 0x002a: /* dvd-rw */
478 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdrw_write, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
479 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdrw_quickstart, tvb_v, offset_v, 2, ENC_BIG_ENDIAN);
480 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdrw_closeonly, tvb_v, offset_v, 2, ENC_BIG_ENDIAN);
481 break;
482 case 0x002b: /* dvd-r */
483 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_write, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
484 break;
485 case 0x002d: /* track at once */
486 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_buf, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
487 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_rwraw, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
488 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_rwpack, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
489 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_testwrite, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
490 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_cdrw, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
491 proto_tree_add_item (tree, hf_scsi_mmc_feature_tao_rwsubcode, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
492 proto_tree_add_item (tree, hf_scsi_mmc_feature_dts, tvb_v, offset_v+2, 2, ENC_BIG_ENDIAN);
493 break;
494 case 0x002e: /* session at once */
495 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_buf, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
496 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_sao, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
497 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_rawms, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
498 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_raw, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
499 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_testwrite, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
500 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_cdrw, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
501 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_rw, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
502 proto_tree_add_item (tree, hf_scsi_mmc_feature_sao_mcsl, tvb_v, offset_v+1, 3, ENC_BIG_ENDIAN);
503 break;
504 case 0x002f: /* dvd-r/-rw*/
505 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_buf, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
506 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_testwrite, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
507 proto_tree_add_item (tree, hf_scsi_mmc_feature_dvdr_dvdrw, tvb_v, offset_v, 1, ENC_BIG_ENDIAN);
508 break;
509 case 0x0108: /* logical unit serial number */
510 proto_tree_add_item (tree, hf_scsi_mmc_feature_lun_sn, tvb_v, offset_v, additional_length, ENC_ASCII|ENC_NA);
511 break;
512 default:
513 proto_tree_add_text (tree, tvb_v, offset_v, additional_length,
514 "SCSI/MMC Unknown Feature data");
515 break;
517 offset_v=old_offset+additional_length;
518 len-=4+additional_length;
520 END_TRY_SCSI_CDB_ALLOC_LEN;
525 static const value_string scsi_q_subchannel_adr_val[] = {
526 {0x0, "Q-Subchannel mode info not supplied"},
527 {0x1, "Q-Subchannel encodes current position data"},
528 {0x2, "Q-Subchannel encodes media catalog number"},
529 {0x3, "Q-Subchannel encodes ISRC"},
530 {0,NULL}
532 static const value_string scsi_q_subchannel_control_val[] = {
533 {0x0, "2 Audio channels without pre-emphasis (digital copy prohibited)"},
534 {0x2, "2 Audio channels without pre-emphasis (digital copy permitted)"},
535 {0x1, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
536 {0x3, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
537 {0x8, "audio channels without pre-emphasis (digital copy prohibited)"},
538 {0xa, "audio channels without pre-emphasis (digital copy permitted)"},
539 {0x9, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
540 {0xb, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
541 {0x4, "Data track, recorded uninterrupted (digital copy prohibited)"},
542 {0x6, "Data track, recorded uninterrupted (digital copy permitted)"},
543 {0x5, "Data track, recorded incremental (digital copy prohibited)"},
544 {0x7, "Data track, recorded incremental (digital copy permitted)"},
545 {0,NULL}
548 static void
549 dissect_mmc4_readtocpmaatip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
550 guint offset, gboolean isreq, gboolean iscdb,
551 guint payload_len _U_, scsi_task_data_t *cdata)
554 guint8 format;
555 gint16 len;
557 if (isreq && iscdb) {
558 format=tvb_get_guint8(tvb, offset+1)&0x0f;
559 /* save format so we can decode the response */
560 cdata->itlq->flags=format;
562 switch(format){
563 case 0x00:
564 case 0x01:
565 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_time, tvb, offset, 1, ENC_BIG_ENDIAN);
566 /* save time so we can pick it up in the response */
567 if(tvb_get_guint8(tvb, offset)&0x02){
568 cdata->itlq->flags|=0x0100;
570 break;
572 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_format, tvb, offset+1, 1, ENC_BIG_ENDIAN);
574 switch(format){
575 case 0x00:
576 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset+5, 1, ENC_BIG_ENDIAN);
577 /* save track so we can pick it up in the response */
578 cdata->itlq->flags|=0x0200;
579 break;
580 case 0x02:
581 proto_tree_add_item (tree, hf_scsi_mmc_session, tvb, offset+5, 1, ENC_BIG_ENDIAN);
582 /* save session so we can pick it up in the response */
583 cdata->itlq->flags|=0x0400;
584 break;
587 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
588 cdata->itlq->alloc_len = tvb_get_ntohs(tvb, offset + 6);
590 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
591 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
593 if(!isreq) {
594 TRY_SCSI_CDB_ALLOC_LEN(pinfo, tvb, offset, cdata->itlq->alloc_len);
595 len=tvb_get_ntohs(tvb, offset);
596 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, ENC_BIG_ENDIAN);
597 if(cdata->itlq->flags&0x0200){
598 proto_tree_add_item (tree, hf_scsi_mmc_first_track, tvb, offset+2, 1, ENC_BIG_ENDIAN);
599 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_last_track, tvb, offset+3, 1, ENC_BIG_ENDIAN);
601 if(cdata->itlq->flags&0x0400){
602 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_first_session, tvb, offset+2, 1, ENC_BIG_ENDIAN);
603 proto_tree_add_item (tree, hf_scsi_mmc_readtoc_last_session, tvb, offset+3, 1, ENC_BIG_ENDIAN);
605 offset+=4;
606 len-=2;
607 switch(cdata->itlq->flags&0x000f){
608 case 0x0:
609 while(len>0){
610 proto_tree_add_item (tree, hf_scsi_mmc_q_subchannel_adr, tvb, offset+1, 1, ENC_BIG_ENDIAN);
611 proto_tree_add_item (tree, hf_scsi_mmc_q_subchannel_control, tvb, offset+1, 1, ENC_BIG_ENDIAN);
612 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset+2, 1, ENC_BIG_ENDIAN);
613 if(cdata->itlq->flags&0x0100){
614 proto_tree_add_item (tree, hf_scsi_mmc_track_start_time, tvb, offset+4, 4, ENC_BIG_ENDIAN);
615 } else {
616 proto_tree_add_item (tree, hf_scsi_mmc_track_start_address, tvb, offset+4, 4, ENC_BIG_ENDIAN);
618 offset+=8;
619 len-=8;
621 break;
622 default:
623 proto_tree_add_text (tree, tvb, offset, len,
624 "SCSI/MMC Unknown READ TOC Format:0x%04x",cdata->itlq->flags&0x000f);
625 break;
627 END_TRY_SCSI_CDB_ALLOC_LEN;
631 static const value_string scsi_disc_info_sols_val[] = {
632 {0x00, "Empty Session"},
633 {0x01, "Incomplete Session"},
634 {0x02, "Reserved/Damaged Session"},
635 {0x03, "Complete Session"},
636 {0,NULL}
639 static const value_string scsi_disc_info_disc_status_val[] = {
640 {0x00, "Empty Disc"},
641 {0x01, "Incomplete Disc"},
642 {0x02, "Finalized Disc"},
643 {0x03, "Others"},
644 {0,NULL}
647 static const value_string scsi_disc_info_bgfs_val[] = {
648 {0x00, "Blank or not CD-RW/DVD-RW"},
649 {0x01, "Background Format started but is not running nor complete"},
650 {0x02, "Background Format in progress"},
651 {0x03, "Background Format has completed"},
652 {0,NULL}
655 static const value_string scsi_disc_info_disc_type_val[] = {
656 {0x00, "CD-DA or CD-ROM Disc"},
657 {0x10, "CD-I Disc"},
658 {0x20, "CD-ROM XA Disc or DDCD"},
659 {0xff, "Undefined"},
660 {0,NULL}
663 static void
664 dissect_mmc4_readdiscinformation (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
665 guint offset, gboolean isreq, gboolean iscdb,
666 guint payload_len _U_, scsi_task_data_t *cdata)
668 if (iscdb) {
669 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
670 if (cdata && cdata->itlq) {
671 cdata->itlq->alloc_len = tvb_get_ntohs(tvb, offset + 6);
673 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
674 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
676 if (!isreq) {
677 static const int *disk_fields[] = {
678 &hf_scsi_mmc_disc_info_erasable,
679 &hf_scsi_mmc_disc_info_state_of_last_session,
680 &hf_scsi_mmc_disc_info_disk_status,
681 NULL
683 static const int *format_fields[] = {
684 &hf_scsi_mmc_disc_info_did_v,
685 &hf_scsi_mmc_disc_info_dbc_v,
686 &hf_scsi_mmc_disc_info_uru,
687 &hf_scsi_mmc_disc_info_dac_v,
688 &hf_scsi_mmc_disc_info_dbit,
689 &hf_scsi_mmc_disc_info_bgfs,
690 NULL
693 TRY_SCSI_CDB_ALLOC_LEN(pinfo, tvb, offset, (cdata && cdata->itlq) ? cdata->itlq->alloc_len : 0);
694 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, 0, 2, ENC_BIG_ENDIAN);
696 proto_tree_add_bitmask(tree, tvb, offset + 2, hf_scsi_mmc_disk_flags,
697 ett_scsi_disk_flags, disk_fields, ENC_BIG_ENDIAN);
699 proto_tree_add_item (tree, hf_scsi_mmc_first_track, tvb, offset+3, 1, ENC_BIG_ENDIAN);
701 /* number of session offset+4 and offset+9 */
702 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));
704 /* first track in last session offset+5 and offset+10 */
705 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));
707 /* last track in last session offset+6 and offset+11 */
708 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));
710 proto_tree_add_bitmask(tree, tvb, offset + 7, hf_scsi_mmc_format_flags,
711 ett_scsi_format_flags, format_fields, ENC_BIG_ENDIAN);
713 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disc_type, tvb, offset+8, 1, ENC_BIG_ENDIAN);
715 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disc_identification, tvb, offset+12, 4, ENC_BIG_ENDIAN);
717 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_last_session_lead_in_start_address, tvb, offset+16, 4, ENC_BIG_ENDIAN);
719 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_last_possible_lead_out_start_address, tvb, offset+20, 4, ENC_BIG_ENDIAN);
721 proto_tree_add_item (tree, hf_scsi_mmc_disc_info_disc_bar_code, tvb, offset+24, 8, ENC_BIG_ENDIAN);
722 /* XXX should add OPC table decoding here ... */
723 END_TRY_SCSI_CDB_ALLOC_LEN;
727 static void
728 dissect_mmc4_readdiscstructure (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
729 guint offset, gboolean isreq, gboolean iscdb,
730 guint payload_len _U_, scsi_task_data_t *cdata)
733 guint8 flags;
735 if (tree && isreq && iscdb) {
736 proto_tree_add_text (tree, tvb, offset+1, 4,
737 "Address: %u",
738 tvb_get_ntohl (tvb, offset+1));
739 proto_tree_add_text (tree, tvb, offset+5, 1,
740 "Layer Number: %u",
741 tvb_get_guint8 (tvb, offset+5));
743 cdata->itlq->flags=tvb_get_guint8 (tvb, offset+6);
744 proto_tree_add_uint (tree, hf_scsi_mmc_read_dvd_format, tvb, offset+6, 1, cdata->itlq->flags);
746 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+7, 2, ENC_BIG_ENDIAN);
748 flags = tvb_get_guint8 (tvb, offset+9);
749 proto_tree_add_text (tree, tvb, offset+9, 1,
750 "AGID: %u",
751 flags & 0xc0);
753 proto_tree_add_bitmask(tree, tvb, offset+10, hf_scsi_control,
754 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
756 if(tree && (!isreq)) {
757 proto_item *ti;
759 ti = proto_tree_add_uint (tree, hf_scsi_mmc_read_dvd_format, tvb, 0, 0, cdata->itlq->flags);
760 PROTO_ITEM_SET_GENERATED(ti);
762 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, ENC_BIG_ENDIAN);
763 offset += 4;
766 switch(cdata->itlq->flags) {
767 case 0x00: /* Physical Format information */
768 case 0x11: /* ADIP Information */
770 /* disc category */
771 proto_tree_add_item (tree, hf_scsi_mmc_disc_book_type, tvb, offset, 1, ENC_BIG_ENDIAN);
772 proto_tree_add_item (tree, hf_scsi_mmc_disc_book_version, tvb, offset, 1, ENC_BIG_ENDIAN);
774 /* disc size */
775 proto_tree_add_item (tree, hf_scsi_mmc_disc_size_size, tvb, offset+1, 1, ENC_BIG_ENDIAN);
776 proto_tree_add_item (tree, hf_scsi_mmc_disc_size_rate, tvb, offset+1, 1, ENC_BIG_ENDIAN);
778 /* number of layers */
779 proto_tree_add_item (tree, hf_scsi_mmc_disc_num_layers, tvb, offset+2, 1, ENC_BIG_ENDIAN);
781 /* track path */
782 proto_tree_add_item (tree, hf_scsi_mmc_disc_track_path, tvb, offset+2, 1, ENC_BIG_ENDIAN);
784 /* disc structure */
785 proto_tree_add_item (tree, hf_scsi_mmc_disc_structure_layer, tvb, offset+2, 1, ENC_BIG_ENDIAN);
787 /* recording density */
788 proto_tree_add_item (tree, hf_scsi_mmc_disc_density_length, tvb, offset+3, 1, ENC_BIG_ENDIAN);
789 proto_tree_add_item (tree, hf_scsi_mmc_disc_density_pitch, tvb, offset+3, 1, ENC_BIG_ENDIAN);
791 /* first physical sector of data zone */
792 proto_tree_add_item (tree, hf_scsi_mmc_disc_first_physical, tvb, offset+5, 3, ENC_BIG_ENDIAN);
794 /* last physical sector of data zone */
795 proto_tree_add_item (tree, hf_scsi_mmc_disc_last_physical, tvb, offset+9, 3, ENC_BIG_ENDIAN);
797 if (cdata->itlq->flags == 0x00) {
798 /* last physical sector of layer 0 */
799 proto_tree_add_item (tree, hf_scsi_mmc_disc_last_physical_layer0, tvb, offset+13, 3, ENC_BIG_ENDIAN);
802 /* extended format info */
803 proto_tree_add_item (tree, hf_scsi_mmc_disc_extended_format_info, tvb, offset+16, 1, ENC_BIG_ENDIAN);
805 /* disk application code */
806 proto_tree_add_item (tree, hf_scsi_mmc_disc_application_code, tvb, offset+17, 1, ENC_BIG_ENDIAN);
808 /* extended information blocks */
809 proto_tree_add_item (tree, hf_scsi_mmc_adip_eib5, tvb, offset+18, 1, ENC_BIG_ENDIAN);
810 proto_tree_add_item (tree, hf_scsi_mmc_adip_eib4, tvb, offset+18, 1, ENC_BIG_ENDIAN);
811 proto_tree_add_item (tree, hf_scsi_mmc_adip_eib3, tvb, offset+18, 1, ENC_BIG_ENDIAN);
812 proto_tree_add_item (tree, hf_scsi_mmc_adip_eib2, tvb, offset+18, 1, ENC_BIG_ENDIAN);
813 proto_tree_add_item (tree, hf_scsi_mmc_adip_eib1, tvb, offset+18, 1, ENC_BIG_ENDIAN);
814 proto_tree_add_item (tree, hf_scsi_mmc_adip_eib0, tvb, offset+18, 1, ENC_BIG_ENDIAN);
816 /* disk manufacturer id */
817 proto_tree_add_item (tree, hf_scsi_mmc_adip_device_manuf_id, tvb, offset+19, 8, ENC_ASCII|ENC_NA);
819 /* media type id */
820 proto_tree_add_item (tree, hf_scsi_mmc_adip_media_type_id, tvb, offset+27, 3, ENC_ASCII|ENC_NA);
822 /* product revision number */
823 proto_tree_add_item (tree, hf_scsi_mmc_adip_product_revision_number, tvb, offset+30, 1, ENC_BIG_ENDIAN);
825 /* number of bytes of physical info */
826 proto_tree_add_item (tree, hf_scsi_mmc_adip_number_of_physical_info, tvb, offset+31, 1, ENC_BIG_ENDIAN);
829 break;
830 default:
831 ti = proto_tree_add_text (tree, tvb, 0, 0,
832 "SCSI/MMC Unknown Read DVD Format:0x%02x",
833 cdata->itlq->flags);
834 PROTO_ITEM_SET_GENERATED(ti);
839 static void
840 dissect_mmc4_getperformance (tvbuff_t *tvb, packet_info *pinfo _U_,
841 proto_tree *tree,
842 guint offset, gboolean isreq, gboolean iscdb,
843 guint payload_len _U_, scsi_task_data_t *cdata _U_)
846 guint8 flags;
848 if (tree && isreq && iscdb) {
849 flags = tvb_get_guint8 (tvb, offset);
850 proto_tree_add_text (tree, tvb, offset, 1,
851 "Data Type: %u",
852 flags & 0x1f);
853 proto_tree_add_text (tree, tvb, offset+1, 4,
854 "Starting LBA: %u",
855 tvb_get_ntohl (tvb, offset+1));
856 proto_tree_add_text (tree, tvb, offset+7, 2,
857 "Maximum Number of Descriptors: %u",
858 tvb_get_ntohs (tvb, offset+7));
860 flags = tvb_get_guint8 (tvb, offset+9);
861 proto_tree_add_text (tree, tvb, offset+9, 1,
862 "Type: %u",
863 flags);
865 proto_tree_add_bitmask(tree, tvb, offset+10, hf_scsi_control,
866 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
870 static void
871 dissect_mmc4_synchronizecache (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
872 guint offset, gboolean isreq, gboolean iscdb,
873 guint payload_len _U_, scsi_task_data_t *cdata _U_)
876 if (tree && isreq && iscdb) {
877 proto_tree_add_item (tree, hf_scsi_mmc_synccache_immed, tvb, offset, 1, ENC_BIG_ENDIAN);
878 proto_tree_add_item (tree, hf_scsi_mmc_synccache_reladr, tvb, offset, 1, ENC_BIG_ENDIAN);
879 proto_tree_add_item (tree, hf_scsi_mmc_lba, tvb, offset+1, 4, ENC_BIG_ENDIAN);
880 proto_tree_add_item (tree, hf_scsi_mmc_num_blocks, tvb, offset+6, 2, ENC_BIG_ENDIAN);
881 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
882 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
886 static const value_string scsi_key_class_val[] = {
887 {0x00, "DVD CSS/CPPM or CPRM"},
888 {0x01, "ReWriteable Security Service - A"},
889 {0,NULL}
891 static const value_string scsi_key_format_val[] = {
892 {0x00, "AGID for CSS/CPPM"},
893 {0x01, "Challenge Key"},
894 {0x02, "Key 1"},
895 {0x04, "Title Key"},
896 {0x05, "Authentication Success Flag"},
897 {0x08, "RPC State"},
898 {0x11, "AGID for CPRM"},
899 {0x3f, "None"},
900 {0,NULL}
902 static const value_string scsi_report_key_type_code_val[] = {
903 {0x00, "NONE"},
904 {0x01, "SET"},
905 {0x02, "LAST CHANCE"},
906 {0x03, "PERM"},
907 {0,NULL}
909 static const value_string scsi_report_key_rpc_scheme_val[] = {
910 {0x00, "Unknown (RPC not enforced)"},
911 {0x01, "RPC Phase II"},
912 {0,NULL}
915 static void
916 dissect_mmc4_reportkey (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
917 guint offset, gboolean isreq, gboolean iscdb,
918 guint payload_len _U_, scsi_task_data_t *cdata)
921 guint8 agid, key_format, key_class;
922 proto_item *ti;
924 if (tree && isreq && iscdb) {
925 proto_tree_add_item (tree, hf_scsi_mmc_lba, tvb, offset+1,
926 4, ENC_BIG_ENDIAN);
927 key_class=tvb_get_guint8(tvb, offset+6);
928 proto_tree_add_item (tree, hf_scsi_mmc_key_class, tvb, offset+6,
929 1, ENC_BIG_ENDIAN);
930 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+7, 2, ENC_BIG_ENDIAN);
932 agid=tvb_get_guint8(tvb, offset+9)&0xc0;
933 key_format=tvb_get_guint8(tvb, offset+9)&0x3f;
934 switch(key_format){
935 case 0x01:
936 case 0x02:
937 case 0x04:
938 case 0x3f:
939 /* agid is only valid for some formats */
940 proto_tree_add_uint (tree, hf_scsi_mmc_agid, tvb, offset+9, 1, agid);
941 break;
943 proto_tree_add_uint (tree, hf_scsi_mmc_key_format, tvb, offset+9, 1, key_format);
944 /* save key_class/key_format so we can decode the response */
945 cdata->itlq->flags=(key_format<<8)|key_class;
947 proto_tree_add_bitmask(tree, tvb, offset+14, hf_scsi_control,
948 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
950 if(tree && (!isreq)) {
951 switch(cdata->itlq->flags){
952 case 0x0800: /* format:RPC State class:00 */
953 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, ENC_BIG_ENDIAN);
954 proto_tree_add_item (tree, hf_scsi_mmc_report_key_type_code, tvb, offset+4, 1, ENC_BIG_ENDIAN);
955 proto_tree_add_item (tree, hf_scsi_mmc_report_key_vendor_resets, tvb, offset+4, 1, ENC_BIG_ENDIAN);
956 proto_tree_add_item (tree, hf_scsi_mmc_report_key_user_changes, tvb, offset+4, 1, ENC_BIG_ENDIAN);
957 proto_tree_add_item (tree, hf_scsi_mmc_report_key_region_mask, tvb, offset+5, 1, ENC_BIG_ENDIAN);
958 proto_tree_add_item (tree, hf_scsi_mmc_report_key_rpc_scheme, tvb, offset+6, 1, ENC_BIG_ENDIAN);
959 break;
960 default:
961 ti = proto_tree_add_text (tree, tvb, 0, 0,
962 "SCSI/MMC Unknown Format:0x%02x/Class:0x%02x combination",
963 cdata->itlq->flags>>8,cdata->itlq->flags&0xff);
964 PROTO_ITEM_SET_GENERATED(ti);
965 break;
970 static const value_string scsi_rti_address_type_val[] = {
971 {0x00, "Logical Block Address"},
972 {0x01, "Logical Track Number"},
973 {0x02, "Session Number"},
974 {0,NULL}
977 static void
978 dissect_mmc4_readtrackinformation (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
979 guint offset, gboolean isreq, gboolean iscdb,
980 guint payload_len _U_, scsi_task_data_t *cdata)
983 guint8 addresstype;
985 if (isreq && iscdb) {
986 addresstype=tvb_get_guint8(tvb, offset)&0x03;
987 proto_tree_add_item (tree, hf_scsi_mmc_rti_address_type, tvb, offset+0, 1, ENC_BIG_ENDIAN);
988 switch(addresstype){
989 case 0x00: /* logical block address */
990 proto_tree_add_item (tree, hf_scsi_mmc_lba, tvb, offset+1,
991 4, ENC_BIG_ENDIAN);
992 break;
993 case 0x01: /* logical track number */
994 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset+1,
995 4, ENC_BIG_ENDIAN);
996 break;
997 case 0x02: /* logical session number */
998 proto_tree_add_item (tree, hf_scsi_mmc_session, tvb, offset+1,
999 4, ENC_BIG_ENDIAN);
1000 break;
1003 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset + 6, 2, ENC_BIG_ENDIAN);
1004 if (cdata) {
1005 cdata->itlq->alloc_len = tvb_get_ntohs(tvb, offset + 6);
1008 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
1009 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1011 if (!isreq) {
1012 static const int *track_fields[] = {
1013 &hf_scsi_mmc_rti_damage,
1014 &hf_scsi_mmc_rti_copy,
1015 &hf_scsi_mmc_rti_track_mode,
1016 NULL
1018 static const int *data_fields[] = {
1019 &hf_scsi_mmc_rti_rt,
1020 &hf_scsi_mmc_rti_blank,
1021 &hf_scsi_mmc_rti_packet,
1022 &hf_scsi_mmc_rti_fp,
1023 &hf_scsi_mmc_rti_data_mode,
1024 NULL
1028 TRY_SCSI_CDB_ALLOC_LEN(pinfo, tvb, offset, cdata->itlq->alloc_len);
1029 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, 0, 2, ENC_BIG_ENDIAN);
1030 /* track offset+2 and offset+32, only use the high byte if we have it */
1031 if (tvb_reported_length(tvb) < 33) {
1032 proto_tree_add_uint (tree, hf_scsi_mmc_track, tvb, 2, 1, tvb_get_guint8(tvb, offset + 2));
1033 } else {
1034 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));
1037 /* session offset+3 and offset+33 */
1038 if (tvb_reported_length(tvb) < 34) {
1039 proto_tree_add_uint (tree, hf_scsi_mmc_session, tvb, 3, 1, tvb_get_guint8(tvb, offset + 3));
1040 } else {
1041 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));
1044 proto_tree_add_bitmask(tree, tvb, offset + 5, hf_scsi_mmc_track_flags,
1045 ett_scsi_track_flags, track_fields, ENC_BIG_ENDIAN);
1047 proto_tree_add_bitmask(tree, tvb, offset + 6, hf_scsi_mmc_data_flags,
1048 ett_scsi_data_flags, data_fields, ENC_BIG_ENDIAN);
1050 proto_tree_add_item (tree, hf_scsi_mmc_rti_lra_v, tvb, 7, 1, ENC_BIG_ENDIAN);
1051 proto_tree_add_item (tree, hf_scsi_mmc_rti_nwa_v, tvb, 7, 1, ENC_BIG_ENDIAN);
1053 proto_tree_add_item (tree, hf_scsi_mmc_track_start_address, tvb, offset+8, 4, ENC_BIG_ENDIAN);
1055 proto_tree_add_item (tree, hf_scsi_mmc_next_writable_address, tvb, offset+12, 4, ENC_BIG_ENDIAN);
1057 proto_tree_add_item (tree, hf_scsi_mmc_free_blocks, tvb, offset+16, 4, ENC_BIG_ENDIAN);
1059 proto_tree_add_item (tree, hf_scsi_mmc_fixed_packet_size, tvb, offset+20, 4, ENC_BIG_ENDIAN);
1061 proto_tree_add_item (tree, hf_scsi_mmc_track_size, tvb, offset+24, 4, ENC_BIG_ENDIAN);
1063 proto_tree_add_item (tree, hf_scsi_mmc_last_recorded_address, tvb, offset+28, 4, ENC_BIG_ENDIAN);
1065 proto_tree_add_item (tree, hf_scsi_mmc_read_compatibility_lba, tvb, offset+36, 4, ENC_BIG_ENDIAN);
1066 END_TRY_SCSI_CDB_ALLOC_LEN;
1070 static void
1071 dissect_mmc4_geteventstatusnotification (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
1072 guint offset, gboolean isreq, gboolean iscdb,
1073 guint payload_len _U_, scsi_task_data_t *cdata _U_)
1076 if (tree && isreq && iscdb) {
1077 static const int *notification_fields[] = {
1078 &hf_scsi_mmc_gesn_device_busy,
1079 &hf_scsi_mmc_gesn_multi_initiator,
1080 &hf_scsi_mmc_gesn_media,
1081 &hf_scsi_mmc_gesn_external_request,
1082 &hf_scsi_mmc_gesn_power_mgmt,
1083 &hf_scsi_mmc_gesn_operational_change,
1084 NULL
1087 proto_tree_add_item (tree, hf_scsi_mmc_gesn_polled, tvb, offset, 1, ENC_BIG_ENDIAN);
1089 proto_tree_add_bitmask(tree, tvb, offset + 3, hf_scsi_mmc_notification_flags,
1090 ett_scsi_notifications, notification_fields, ENC_BIG_ENDIAN);
1092 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, ENC_BIG_ENDIAN);
1094 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
1095 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1100 static void
1101 dissect_mmc4_reservetrack (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
1102 guint offset, gboolean isreq, gboolean iscdb,
1103 guint payload_len _U_, scsi_task_data_t *cdata _U_)
1106 if (tree && isreq && iscdb) {
1107 proto_tree_add_item (tree, hf_scsi_mmc_reservation_size, tvb, offset+4, 4, ENC_BIG_ENDIAN);
1108 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
1109 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1114 static const value_string scsi_closetrack_func_val[] = {
1115 {0, "Stop background format"},
1116 {1, "Close track"},
1117 {2, "Close last incomplete session"},
1118 {3, "Special case close session"},
1119 {5, "Close last session and finalize disk, special case"},
1120 {6, "Close last session and finalize disk"},
1121 {0, NULL}
1124 static void
1125 dissect_mmc4_close_track (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
1126 guint offset, gboolean isreq, gboolean iscdb,
1127 guint payload_len _U_, scsi_task_data_t *cdata _U_)
1130 if (tree && isreq && iscdb) {
1131 /* immediate */
1132 proto_tree_add_item (tree, hf_scsi_mmc_closetrack_immed, tvb, offset, 1, ENC_BIG_ENDIAN);
1133 offset++;
1135 /* close function */
1136 proto_tree_add_item (tree, hf_scsi_mmc_closetrack_func, tvb, offset, 1, ENC_BIG_ENDIAN);
1137 offset++;
1139 /* reserved */
1140 offset++;
1142 /* track number */
1143 proto_tree_add_item (tree, hf_scsi_mmc_track, tvb, offset, 2, ENC_BIG_ENDIAN);
1144 offset+=2;
1146 /* reserved */
1147 offset+=3;
1149 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_control,
1150 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1155 static void
1156 dissect_mmc4_readbuffercapacity (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
1157 guint offset, gboolean isreq, gboolean iscdb,
1158 guint payload_len _U_, scsi_task_data_t *cdata)
1161 if (tree && isreq && iscdb) {
1162 cdata->itlq->flags=0;
1163 proto_tree_add_item (tree, hf_scsi_mmc_rbc_block, tvb, offset, 1, ENC_BIG_ENDIAN);
1164 if(tvb_get_guint8(tvb, offset)&0x01){
1165 cdata->itlq->flags=1;
1168 proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, ENC_BIG_ENDIAN);
1169 proto_tree_add_bitmask(tree, tvb, offset+8, hf_scsi_control,
1170 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1172 if(tree && (!isreq)) {
1173 proto_tree_add_item (tree, hf_scsi_mmc_data_length, tvb, offset, 2, ENC_BIG_ENDIAN);
1174 if(cdata->itlq->flags){
1175 proto_tree_add_item (tree, hf_scsi_mmc_rbc_lob_blocks, tvb, offset+4, 4, ENC_BIG_ENDIAN);
1176 proto_tree_add_item (tree, hf_scsi_mmc_rbc_alob_blocks, tvb, offset+8, 4, ENC_BIG_ENDIAN);
1177 } else {
1178 proto_tree_add_item (tree, hf_scsi_mmc_rbc_lob_bytes, tvb, offset+4, 4, ENC_BIG_ENDIAN);
1179 proto_tree_add_item (tree, hf_scsi_mmc_rbc_alob_bytes, tvb, offset+8, 4, ENC_BIG_ENDIAN);
1185 static const value_string scsi_setcdspeed_rc_val[] = {
1186 {0x00, "CLV and none-pure CAV"},
1187 {0x01, "Pure CAV"},
1188 {0x02, "Reserved"},
1189 {0x03, "Reserved"},
1190 {0,NULL}
1193 static void
1194 dissect_mmc4_setcdspeed (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
1195 guint offset, gboolean isreq, gboolean iscdb,
1196 guint payload_len _U_, scsi_task_data_t *cdata _U_)
1199 if (tree && isreq && iscdb) {
1200 proto_tree_add_item (tree, hf_scsi_mmc_setcdspeed_rc, tvb, offset+0, 1, ENC_BIG_ENDIAN);
1201 proto_tree_add_text (tree, tvb, offset+1, 2,
1202 "Logical Unit Read Speed(bytes/sec): %u",
1203 tvb_get_ntohs (tvb, offset+1));
1204 proto_tree_add_text (tree, tvb, offset+3, 2,
1205 "Logical Unit Write Speed(bytes/sec): %u",
1206 tvb_get_ntohs (tvb, offset+3));
1207 proto_tree_add_bitmask(tree, tvb, offset+10, hf_scsi_control,
1208 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1213 static const value_string scsi_setstreaming_type_val[] = {
1214 {0x00, "Performance Descriptor"},
1215 {0x05, "DBI cache zone descriptor"},
1216 {0,NULL}
1219 static void
1220 dissect_mmc4_setstreaming (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
1221 guint offset, gboolean isreq, gboolean iscdb,
1222 guint payload_len _U_, scsi_task_data_t *cdata)
1225 guint8 type;
1226 proto_item *ti;
1228 if (tree && isreq && iscdb) {
1229 type=tvb_get_guint8(tvb, offset+7);
1230 cdata->itlq->flags=type;
1231 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_type, tvb, offset+7, 1, ENC_BIG_ENDIAN);
1232 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_param_len, tvb, offset+8, 2, ENC_BIG_ENDIAN);
1233 proto_tree_add_bitmask(tree, tvb, offset+10, hf_scsi_control,
1234 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1236 if(tree && isreq && (!iscdb)) {
1237 switch(cdata->itlq->flags){
1238 case 0x00: /* performance descriptor */
1239 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_wrc, tvb, offset+0, 1, ENC_BIG_ENDIAN);
1240 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_rdd, tvb, offset+0, 1, ENC_BIG_ENDIAN);
1241 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_exact, tvb, offset+0, 1, ENC_BIG_ENDIAN);
1242 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_ra, tvb, offset+0, 1, ENC_BIG_ENDIAN);
1243 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_start_lba, tvb, offset+4, 4, ENC_BIG_ENDIAN);
1244 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_end_lba, tvb, offset+8, 4, ENC_BIG_ENDIAN);
1245 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_read_size, tvb, offset+12, 4, ENC_BIG_ENDIAN);
1246 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_read_time, tvb, offset+16, 4, ENC_BIG_ENDIAN);
1247 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_write_size, tvb, offset+20, 4, ENC_BIG_ENDIAN);
1248 proto_tree_add_item (tree, hf_scsi_mmc_setstreaming_write_time, tvb, offset+24, 4, ENC_BIG_ENDIAN);
1249 break;
1250 default:
1251 ti = proto_tree_add_text (tree, tvb, 0, 0,
1252 "SCSI/MMC Unknown SetStreaming Type:0x%02x",cdata->itlq->flags);
1253 PROTO_ITEM_SET_GENERATED(ti);
1254 break;
1259 static void
1260 dissect_mmc_preventallowmediaremoval(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
1261 guint offset, gboolean isreq, gboolean iscdb,
1262 guint payload_len _U_, scsi_task_data_t *cdata _U_)
1264 if (isreq && iscdb) {
1265 guint8 flags;
1266 static const int *prevent_allow_fields[] = {
1267 &hf_scsi_mmc_prevent_allow_persistent,
1268 &hf_scsi_mmc_prevent_allow_prevent,
1269 NULL
1272 proto_tree_add_bitmask(tree, tvb, offset + 3, hf_scsi_mmc_prevent_allow_flags,
1273 ett_scsi_prevent_allow, prevent_allow_fields, ENC_BIG_ENDIAN);
1275 flags = tvb_get_guint8(tvb, offset + 3);
1276 if (flags & 0x01) {
1277 col_append_str(pinfo->cinfo, COL_INFO, " PREVENT");
1278 } else {
1279 col_append_str(pinfo->cinfo, COL_INFO, " ALLOW");
1281 if (flags & 0x02) {
1282 col_append_str(pinfo->cinfo, COL_INFO, " (PERSISTENT)");
1285 proto_tree_add_bitmask(tree, tvb, offset+4, hf_scsi_control,
1286 ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
1290 /* MMC Commands */
1291 #define SCSI_MMC4_READCAPACITY10 0x25
1292 #define SCSI_MMC4_READ10 0x28
1293 #define SCSI_MMC4_WRITE10 0x2a
1294 #define SCSI_MMC4_SYNCHRONIZECACHE 0x35
1295 #define SCSI_MMC4_READTOCPMAATIP 0x43
1296 #define SCSI_MMC4_GETCONFIGURATION 0x46
1297 #define SCSI_MMC4_GETEVENTSTATUSNOTIFY 0x4a
1298 #define SCSI_MMC4_READDISCINFORMATION 0x51
1299 #define SCSI_MMC4_READTRACKINFORMATION 0x52
1300 #define SCSI_MMC4_RESERVETRACK 0x53
1301 #define SCSI_MMC4_CLOSETRACK 0x5b
1302 #define SCSI_MMC4_READBUFFERCAPACITY 0x5c
1303 #define SCSI_MMC4_REPORTKEY 0xa4
1304 #define SCSI_MMC4_READ12 0xa8
1305 #define SCSI_MMC4_WRITE12 0xaa
1306 #define SCSI_MMC4_GETPERFORMANCE 0xac
1307 #define SCSI_MMC4_READDISCSTRUCTURE 0xad
1308 #define SCSI_MMC4_SETSTREAMING 0xb6
1309 #define SCSI_MMC4_SETCDSPEED 0xbb
1310 const value_string scsi_mmc_vals[] = {
1311 {SCSI_MMC4_GETCONFIGURATION , "Get Configuration"},
1312 {SCSI_MMC4_GETEVENTSTATUSNOTIFY , "Get Event Status Notification"},
1313 {SCSI_MMC4_GETPERFORMANCE , "Get Performance"},
1314 {SCSI_SPC_INQUIRY , "Inquiry"},
1315 {SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
1316 {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
1317 {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
1318 {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
1319 {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
1320 {SCSI_MMC4_READ10 , "Read(10)"},
1321 {SCSI_MMC4_READ12 , "Read(12)"},
1322 {SCSI_MMC4_CLOSETRACK , "Close Track"},
1323 {SCSI_MMC4_READBUFFERCAPACITY , "Read Buffer Capacity"},
1324 {SCSI_MMC4_READCAPACITY10 , "Read Capacity(10)"},
1325 {SCSI_MMC4_READDISCINFORMATION , "Read Disc Information"},
1326 {SCSI_MMC4_READDISCSTRUCTURE , "Read DISC Structure"},
1327 {SCSI_MMC4_READTOCPMAATIP , "Read TOC/PMA/ATIP"},
1328 {SCSI_MMC4_READTRACKINFORMATION , "Read Track Information"},
1329 {SCSI_MMC4_REPORTKEY , "Report Key"},
1330 {SCSI_SPC_REPORTLUNS , "Report LUNs"},
1331 {SCSI_SPC_REQSENSE , "Request Sense"},
1332 {SCSI_MMC4_RESERVETRACK , "Reserve Track"},
1333 {SCSI_MMC4_SETCDSPEED , "Set CD Speed"},
1334 {SCSI_MMC4_SETSTREAMING , "Set Streaming"},
1335 {SCSI_SBC_STARTSTOPUNIT , "Start Stop Unit"},
1336 {SCSI_MMC4_SYNCHRONIZECACHE , "Synchronize Cache"},
1337 {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
1338 {SCSI_MMC4_WRITE10 , "Write(10)"},
1339 {SCSI_MMC4_WRITE12 , "Write(12)"},
1340 {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
1341 {0, NULL},
1344 const value_string scsi_track_mode_vals[] = {
1345 {0x00 , "2 audio channels without pre-emphasis, digital copy prohibited"},
1346 {0x01 , "2 audio channels with pre-emphasis of 50/15 us, digital copy prohibited"},
1347 {0x04 , "Data track, recorded uninterrupted, digital copy prohibited"},
1348 {0x05 , "Data track, recorded incremental, digital copy prohibited"},
1349 {0x08 , "audio channels without pre-emphasis, digital copy prohibited"},
1350 {0x09 , "audio channels with pre-emphasis of 50/15 us"},
1351 {0x02 , "2 audio channels without pre-emphasis, digital copy permitted"},
1352 {0x03 , "2 audio channels with pre-emphasis of 50/15 us, digital copy permitted"},
1353 {0x06 , "Data track, recorded uninterrupted, digital copy permitted"},
1354 {0x07 , "Data track, recorded incremental, digital copy permitted"},
1355 {0x0a , "audio channels without pre-emphasis, digital copy permitted"},
1356 {0x0b , "audio channels with pre-emphasis of 50/15 us, digital copy permitted"},
1357 {0, NULL},
1360 scsi_cdb_table_t scsi_mmc_table[256] = {
1361 /*SPC 0x00*/{dissect_spc_testunitready},
1362 /*MMC 0x01*/{NULL},
1363 /*MMC 0x02*/{NULL},
1364 /*SPC 0x03*/{dissect_spc_requestsense},
1365 /*MMC 0x04*/{NULL},
1366 /*MMC 0x05*/{NULL},
1367 /*MMC 0x06*/{NULL},
1368 /*MMC 0x07*/{NULL},
1369 /*MMC 0x08*/{NULL},
1370 /*MMC 0x09*/{NULL},
1371 /*MMC 0x0a*/{NULL},
1372 /*MMC 0x0b*/{NULL},
1373 /*MMC 0x0c*/{NULL},
1374 /*MMC 0x0d*/{NULL},
1375 /*MMC 0x0e*/{NULL},
1376 /*MMC 0x0f*/{NULL},
1377 /*MMC 0x10*/{NULL},
1378 /*MMC 0x11*/{NULL},
1379 /*SPC 0x12*/{dissect_spc_inquiry},
1380 /*MMC 0x13*/{NULL},
1381 /*MMC 0x14*/{NULL},
1382 /*MMC 0x15*/{NULL},
1383 /*MMC 0x16*/{NULL},
1384 /*MMC 0x17*/{NULL},
1385 /*MMC 0x18*/{NULL},
1386 /*MMC 0x19*/{NULL},
1387 /*MMC 0x1a*/{NULL},
1388 /*MMC 0x1b*/{dissect_sbc_startstopunit},
1389 /*MMC 0x1c*/{NULL},
1390 /*MMC 0x1d*/{NULL},
1391 /*MMC 0x1e*/{dissect_mmc_preventallowmediaremoval},
1392 /*MMC 0x1f*/{NULL},
1393 /*MMC 0x20*/{NULL},
1394 /*MMC 0x21*/{NULL},
1395 /*MMC 0x22*/{NULL},
1396 /*MMC 0x23*/{NULL},
1397 /*MMC 0x24*/{NULL},
1398 /*MMC 0x25*/{dissect_sbc_readcapacity10},
1399 /*MMC 0x26*/{NULL},
1400 /*MMC 0x27*/{NULL},
1401 /*MMC 0x28*/{dissect_sbc_read10},
1402 /*MMC 0x29*/{NULL},
1403 /*MMC 0x2a*/{dissect_sbc_write10},
1404 /*MMC 0x2b*/{NULL},
1405 /*MMC 0x2c*/{NULL},
1406 /*MMC 0x2d*/{NULL},
1407 /*MMC 0x2e*/{NULL},
1408 /*MMC 0x2f*/{NULL},
1409 /*MMC 0x30*/{NULL},
1410 /*MMC 0x31*/{NULL},
1411 /*MMC 0x32*/{NULL},
1412 /*MMC 0x33*/{NULL},
1413 /*MMC 0x34*/{NULL},
1414 /*MMC 0x35*/{dissect_mmc4_synchronizecache},
1415 /*MMC 0x36*/{NULL},
1416 /*MMC 0x37*/{NULL},
1417 /*MMC 0x38*/{NULL},
1418 /*MMC 0x39*/{NULL},
1419 /*MMC 0x3a*/{NULL},
1420 /*SPC 0x3b*/{dissect_spc_writebuffer},
1421 /*MMC 0x3c*/{NULL},
1422 /*MMC 0x3d*/{NULL},
1423 /*MMC 0x3e*/{NULL},
1424 /*MMC 0x3f*/{NULL},
1425 /*MMC 0x40*/{NULL},
1426 /*MMC 0x41*/{NULL},
1427 /*MMC 0x42*/{NULL},
1428 /*MMC 0x43*/{dissect_mmc4_readtocpmaatip},
1429 /*MMC 0x44*/{NULL},
1430 /*MMC 0x45*/{NULL},
1431 /*MMC 0x46*/{dissect_mmc4_getconfiguration},
1432 /*MMC 0x47*/{NULL},
1433 /*MMC 0x48*/{NULL},
1434 /*MMC 0x49*/{NULL},
1435 /*MMC 0x4a*/{dissect_mmc4_geteventstatusnotification},
1436 /*MMC 0x4b*/{NULL},
1437 /*MMC 0x4c*/{NULL},
1438 /*MMC 0x4d*/{NULL},
1439 /*MMC 0x4e*/{NULL},
1440 /*MMC 0x4f*/{NULL},
1441 /*MMC 0x50*/{NULL},
1442 /*MMC 0x51*/{dissect_mmc4_readdiscinformation},
1443 /*MMC 0x52*/{dissect_mmc4_readtrackinformation},
1444 /*MMC 0x53*/{dissect_mmc4_reservetrack},
1445 /*MMC 0x54*/{NULL},
1446 /*SPC 0x55*/{dissect_spc_modeselect10},
1447 /*MMC 0x56*/{NULL},
1448 /*MMC 0x57*/{NULL},
1449 /*MMC 0x58*/{NULL},
1450 /*MMC 0x59*/{NULL},
1451 /*SPC 0x5a*/{dissect_spc_modesense10},
1452 /*MMC 0x5b*/{dissect_mmc4_close_track},
1453 /*MMC 0x5c*/{dissect_mmc4_readbuffercapacity},
1454 /*MMC 0x5d*/{NULL},
1455 /*MMC 0x5e*/{NULL},
1456 /*MMC 0x5f*/{NULL},
1457 /*MMC 0x60*/{NULL},
1458 /*MMC 0x61*/{NULL},
1459 /*MMC 0x62*/{NULL},
1460 /*MMC 0x63*/{NULL},
1461 /*MMC 0x64*/{NULL},
1462 /*MMC 0x65*/{NULL},
1463 /*MMC 0x66*/{NULL},
1464 /*MMC 0x67*/{NULL},
1465 /*MMC 0x68*/{NULL},
1466 /*MMC 0x69*/{NULL},
1467 /*MMC 0x6a*/{NULL},
1468 /*MMC 0x6b*/{NULL},
1469 /*MMC 0x6c*/{NULL},
1470 /*MMC 0x6d*/{NULL},
1471 /*MMC 0x6e*/{NULL},
1472 /*MMC 0x6f*/{NULL},
1473 /*MMC 0x70*/{NULL},
1474 /*MMC 0x71*/{NULL},
1475 /*MMC 0x72*/{NULL},
1476 /*MMC 0x73*/{NULL},
1477 /*MMC 0x74*/{NULL},
1478 /*MMC 0x75*/{NULL},
1479 /*MMC 0x76*/{NULL},
1480 /*MMC 0x77*/{NULL},
1481 /*MMC 0x78*/{NULL},
1482 /*MMC 0x79*/{NULL},
1483 /*MMC 0x7a*/{NULL},
1484 /*MMC 0x7b*/{NULL},
1485 /*MMC 0x7c*/{NULL},
1486 /*MMC 0x7d*/{NULL},
1487 /*MMC 0x7e*/{NULL},
1488 /*MMC 0x7f*/{NULL},
1489 /*MMC 0x80*/{NULL},
1490 /*MMC 0x81*/{NULL},
1491 /*MMC 0x82*/{NULL},
1492 /*MMC 0x83*/{NULL},
1493 /*MMC 0x84*/{NULL},
1494 /*MMC 0x85*/{NULL},
1495 /*MMC 0x86*/{NULL},
1496 /*MMC 0x87*/{NULL},
1497 /*MMC 0x88*/{NULL},
1498 /*MMC 0x89*/{NULL},
1499 /*MMC 0x8a*/{NULL},
1500 /*MMC 0x8b*/{NULL},
1501 /*MMC 0x8c*/{NULL},
1502 /*MMC 0x8d*/{NULL},
1503 /*MMC 0x8e*/{NULL},
1504 /*MMC 0x8f*/{NULL},
1505 /*MMC 0x90*/{NULL},
1506 /*MMC 0x91*/{NULL},
1507 /*MMC 0x92*/{NULL},
1508 /*MMC 0x93*/{NULL},
1509 /*MMC 0x94*/{NULL},
1510 /*MMC 0x95*/{NULL},
1511 /*MMC 0x96*/{NULL},
1512 /*MMC 0x97*/{NULL},
1513 /*MMC 0x98*/{NULL},
1514 /*MMC 0x99*/{NULL},
1515 /*MMC 0x9a*/{NULL},
1516 /*MMC 0x9b*/{NULL},
1517 /*MMC 0x9c*/{NULL},
1518 /*MMC 0x9d*/{NULL},
1519 /*MMC 0x9e*/{NULL},
1520 /*MMC 0x9f*/{NULL},
1521 /*SPC 0xa0*/{dissect_spc_reportluns},
1522 /*MMC 0xa1*/{NULL},
1523 /*MMC 0xa2*/{NULL},
1524 /*SPC 0xa3*/{dissect_spc_mgmt_protocol_in},
1525 /*MMC 0xa4*/{dissect_mmc4_reportkey},
1526 /*MMC 0xa5*/{NULL},
1527 /*MMC 0xa6*/{NULL},
1528 /*MMC 0xa7*/{NULL},
1529 /*MMC 0xa8*/{dissect_sbc_read12},
1530 /*MMC 0xa9*/{NULL},
1531 /*MMC 0xaa*/{dissect_sbc_write12},
1532 /*MMC 0xab*/{NULL},
1533 /*MMC 0xac*/{dissect_mmc4_getperformance},
1534 /*MMC 0xad*/{dissect_mmc4_readdiscstructure},
1535 /*MMC 0xae*/{NULL},
1536 /*MMC 0xaf*/{NULL},
1537 /*MMC 0xb0*/{NULL},
1538 /*MMC 0xb1*/{NULL},
1539 /*MMC 0xb2*/{NULL},
1540 /*MMC 0xb3*/{NULL},
1541 /*MMC 0xb4*/{NULL},
1542 /*MMC 0xb5*/{NULL},
1543 /*MMC 0xb6*/{dissect_mmc4_setstreaming},
1544 /*MMC 0xb7*/{NULL},
1545 /*MMC 0xb8*/{NULL},
1546 /*MMC 0xb9*/{NULL},
1547 /*MMC 0xba*/{NULL},
1548 /*MMC 0xbb*/{dissect_mmc4_setcdspeed},
1549 /*MMC 0xbc*/{NULL},
1550 /*MMC 0xbd*/{NULL},
1551 /*MMC 0xbe*/{NULL},
1552 /*MMC 0xbf*/{NULL},
1553 /*MMC 0xc0*/{NULL},
1554 /*MMC 0xc1*/{NULL},
1555 /*MMC 0xc2*/{NULL},
1556 /*MMC 0xc3*/{NULL},
1557 /*MMC 0xc4*/{NULL},
1558 /*MMC 0xc5*/{NULL},
1559 /*MMC 0xc6*/{NULL},
1560 /*MMC 0xc7*/{NULL},
1561 /*MMC 0xc8*/{NULL},
1562 /*MMC 0xc9*/{NULL},
1563 /*MMC 0xca*/{NULL},
1564 /*MMC 0xcb*/{NULL},
1565 /*MMC 0xcc*/{NULL},
1566 /*MMC 0xcd*/{NULL},
1567 /*MMC 0xce*/{NULL},
1568 /*MMC 0xcf*/{NULL},
1569 /*MMC 0xd0*/{NULL},
1570 /*MMC 0xd1*/{NULL},
1571 /*MMC 0xd2*/{NULL},
1572 /*MMC 0xd3*/{NULL},
1573 /*MMC 0xd4*/{NULL},
1574 /*MMC 0xd5*/{NULL},
1575 /*MMC 0xd6*/{NULL},
1576 /*MMC 0xd7*/{NULL},
1577 /*MMC 0xd8*/{NULL},
1578 /*MMC 0xd9*/{NULL},
1579 /*MMC 0xda*/{NULL},
1580 /*MMC 0xdb*/{NULL},
1581 /*MMC 0xdc*/{NULL},
1582 /*MMC 0xdd*/{NULL},
1583 /*MMC 0xde*/{NULL},
1584 /*MMC 0xdf*/{NULL},
1585 /*MMC 0xe0*/{NULL},
1586 /*MMC 0xe1*/{NULL},
1587 /*MMC 0xe2*/{NULL},
1588 /*MMC 0xe3*/{NULL},
1589 /*MMC 0xe4*/{NULL},
1590 /*MMC 0xe5*/{NULL},
1591 /*MMC 0xe6*/{NULL},
1592 /*MMC 0xe7*/{NULL},
1593 /*MMC 0xe8*/{NULL},
1594 /*MMC 0xe9*/{NULL},
1595 /*MMC 0xea*/{NULL},
1596 /*MMC 0xeb*/{NULL},
1597 /*MMC 0xec*/{NULL},
1598 /*MMC 0xed*/{NULL},
1599 /*MMC 0xee*/{NULL},
1600 /*MMC 0xef*/{NULL},
1601 /*MMC 0xf0*/{NULL},
1602 /*MMC 0xf1*/{NULL},
1603 /*MMC 0xf2*/{NULL},
1604 /*MMC 0xf3*/{NULL},
1605 /*MMC 0xf4*/{NULL},
1606 /*MMC 0xf5*/{NULL},
1607 /*MMC 0xf6*/{NULL},
1608 /*MMC 0xf7*/{NULL},
1609 /*MMC 0xf8*/{NULL},
1610 /*MMC 0xf9*/{NULL},
1611 /*MMC 0xfa*/{NULL},
1612 /*MMC 0xfb*/{NULL},
1613 /*MMC 0xfc*/{NULL},
1614 /*MMC 0xfd*/{NULL},
1615 /*MMC 0xfe*/{NULL},
1616 /*MMC 0xff*/{NULL}
1620 void
1621 proto_register_scsi_mmc(void)
1623 static hf_register_info hf[] = {
1624 { &hf_scsi_mmc_opcode,
1625 {"MMC Opcode", "scsi_mmc.opcode", FT_UINT8, BASE_HEX,
1626 VALS (scsi_mmc_vals), 0x0, NULL, HFILL}},
1627 { &hf_scsi_mmc_setstreaming_type,
1628 {"Type", "scsi_mmc.setstreaming.type", FT_UINT8, BASE_DEC,
1629 VALS(scsi_setstreaming_type_val), 0, NULL, HFILL}},
1630 { &hf_scsi_mmc_setstreaming_param_len,
1631 {"Parameter Length", "scsi_mmc.setstreaming.param_len", FT_UINT16, BASE_DEC,
1632 NULL, 0, NULL, HFILL}},
1633 { &hf_scsi_mmc_setstreaming_wrc,
1634 {"WRC", "scsi_mmc.setstreaming.wrc", FT_UINT8, BASE_HEX,
1635 NULL, 0x18, NULL, HFILL}},
1636 { &hf_scsi_mmc_setstreaming_rdd,
1637 {"RDD", "scsi_mmc.setstreaming.rdd", FT_BOOLEAN, 8,
1638 NULL, 0x04, NULL, HFILL}},
1639 { &hf_scsi_mmc_setstreaming_exact,
1640 {"Exact", "scsi_mmc.setstreaming.exact", FT_BOOLEAN, 8,
1641 NULL, 0x02, NULL, HFILL}},
1642 { &hf_scsi_mmc_setstreaming_ra,
1643 {"RA", "scsi_mmc.setstreaming.ra", FT_BOOLEAN, 8,
1644 NULL, 0x01, NULL, HFILL}},
1645 { &hf_scsi_mmc_setstreaming_start_lba,
1646 {"Start LBA", "scsi_mmc.setstreaming.start_lbs", FT_UINT32, BASE_DEC,
1647 NULL, 0, NULL, HFILL}},
1648 { &hf_scsi_mmc_setstreaming_end_lba,
1649 {"End LBA", "scsi_mmc.setstreaming.end_lba", FT_UINT32, BASE_DEC,
1650 NULL, 0, NULL, HFILL}},
1651 { &hf_scsi_mmc_setstreaming_read_size,
1652 {"Read Size", "scsi_mmc.setstreaming.read_size", FT_UINT32, BASE_DEC,
1653 NULL, 0, NULL, HFILL}},
1654 { &hf_scsi_mmc_setstreaming_read_time,
1655 {"Read Time", "scsi_mmc.setstreaming.read_time", FT_UINT32, BASE_DEC,
1656 NULL, 0, NULL, HFILL}},
1657 { &hf_scsi_mmc_setstreaming_write_size,
1658 {"Write Size", "scsi_mmc.setstreaming.write_size", FT_UINT32, BASE_DEC,
1659 NULL, 0, NULL, HFILL}},
1660 { &hf_scsi_mmc_setstreaming_write_time,
1661 {"Write Time", "scsi_mmc.setstreaming.write_time", FT_UINT32, BASE_DEC,
1662 NULL, 0, NULL, HFILL}},
1663 { &hf_scsi_mmc_setcdspeed_rc,
1664 {"Rotational Control", "scsi_mmc.setcdspeed.rc", FT_UINT8, BASE_HEX,
1665 VALS(scsi_setcdspeed_rc_val), 0x03, NULL, HFILL}},
1666 { &hf_scsi_mmc_rbc_block,
1667 {"BLOCK", "scsi_mmc.rbc.block", FT_BOOLEAN, 8,
1668 NULL, 0x01, NULL, HFILL}},
1669 { &hf_scsi_mmc_rbc_lob_blocks,
1670 {"Buffer Len (blocks)", "scsi_mmc.rbc.lob_blocks", FT_UINT32, BASE_DEC,
1671 NULL, 0, NULL, HFILL}},
1672 { &hf_scsi_mmc_rbc_alob_blocks,
1673 {"Available Buffer Len (blocks)", "scsi_mmc.rbc.alob_blocks", FT_UINT32, BASE_DEC,
1674 NULL, 0, NULL, HFILL}},
1675 { &hf_scsi_mmc_rbc_lob_bytes,
1676 {"Buffer Len (bytes)", "scsi_mmc.rbc.lob_bytes", FT_UINT32, BASE_DEC,
1677 NULL, 0, NULL, HFILL}},
1678 { &hf_scsi_mmc_rbc_alob_bytes,
1679 {"Available Buffer Len (bytes)", "scsi_mmc.rbc.alob_bytes", FT_UINT32, BASE_DEC,
1680 NULL, 0, NULL, HFILL}},
1681 { &hf_scsi_mmc_rti_address_type,
1682 {"Address Type", "scsi_mmc.rti.address_type", FT_UINT8, BASE_HEX,
1683 VALS(scsi_rti_address_type_val), 0x03, NULL, HFILL}},
1684 { &hf_scsi_mmc_rti_damage,
1685 {"Damage", "scsi_mmc.rti.damage", FT_BOOLEAN, 8,
1686 NULL, 0x20, NULL, HFILL}},
1687 { &hf_scsi_mmc_rti_copy,
1688 {"Copy", "scsi_mmc.rti.copy", FT_BOOLEAN, 8,
1689 NULL, 0x10, NULL, HFILL}},
1690 { &hf_scsi_mmc_rti_track_mode,
1691 {"Track Mode", "scsi_mmc.rti.track_mode", FT_UINT8, BASE_HEX,
1692 VALS(scsi_track_mode_vals), 0x0f, NULL, HFILL}},
1693 { &hf_scsi_mmc_rti_rt,
1694 {"RT", "scsi_mmc.rti.rt", FT_BOOLEAN, 8,
1695 NULL, 0x80, NULL, HFILL}},
1696 { &hf_scsi_mmc_rti_blank,
1697 {"Blank", "scsi_mmc.rti.blank", FT_BOOLEAN, 8,
1698 NULL, 0x40, NULL, HFILL}},
1699 { &hf_scsi_mmc_rti_packet,
1700 {"Packet/Inc", "scsi_mmc.rti.packet", FT_BOOLEAN, 8,
1701 NULL, 0x20, NULL, HFILL}},
1702 { &hf_scsi_mmc_rti_fp,
1703 {"FP", "scsi_mmc.rti.fp", FT_BOOLEAN, 8,
1704 NULL, 0x10, NULL, HFILL}},
1705 { &hf_scsi_mmc_rti_data_mode,
1706 {"Data Mode", "scsi_mmc.rti.data_mode", FT_UINT8, BASE_HEX,
1707 VALS(scsi_data_mode_vals), 0x0f, NULL, HFILL}},
1708 { &hf_scsi_mmc_rti_lra_v,
1709 {"LRA_V", "scsi_mmc.rti.lra_v", FT_BOOLEAN, 8,
1710 NULL, 0x02, NULL, HFILL}},
1711 { &hf_scsi_mmc_rti_nwa_v,
1712 {"NWA_V", "scsi_mmc.rti.nwa_v", FT_BOOLEAN, 8,
1713 NULL, 0x01, NULL, HFILL}},
1714 { &hf_scsi_mmc_report_key_type_code,
1715 {"Type Code", "scsi_mmc.report_key.type_code", FT_UINT8, BASE_HEX,
1716 VALS(scsi_report_key_type_code_val), 0xc0, NULL, HFILL}},
1717 { &hf_scsi_mmc_report_key_vendor_resets,
1718 {"Vendor Resets", "scsi_mmc.report_key.vendor_resets", FT_UINT8, BASE_HEX,
1719 NULL, 0x38, NULL, HFILL}},
1720 { &hf_scsi_mmc_report_key_user_changes,
1721 {"User Changes", "scsi_mmc.report_key.user_changes", FT_UINT8, BASE_HEX,
1722 NULL, 0x07, NULL, HFILL}},
1723 { &hf_scsi_mmc_report_key_region_mask,
1724 {"Region Mask", "scsi_mmc.report_key.region_mask", FT_UINT8, BASE_HEX,
1725 NULL, 0xff, NULL, HFILL}},
1726 { &hf_scsi_mmc_report_key_rpc_scheme,
1727 {"RPC Scheme", "scsi_mmc.report_key.rpc_scheme", FT_UINT8, BASE_HEX,
1728 VALS(scsi_report_key_rpc_scheme_val), 0, NULL, HFILL}},
1729 { &hf_scsi_mmc_key_class,
1730 {"Key Class", "scsi_mmc.key_class", FT_UINT8, BASE_HEX,
1731 VALS (scsi_key_class_val), 0x00, NULL, HFILL}},
1732 { &hf_scsi_mmc_key_format,
1733 {"Key Format", "scsi_mmc.key_format", FT_UINT8, BASE_HEX,
1734 VALS (scsi_key_format_val), 0x3f, NULL, HFILL}},
1735 { &hf_scsi_mmc_disc_info_erasable,
1736 {"Erasable", "scsi_mmc.disc_info.erasable", FT_BOOLEAN, 8,
1737 NULL, 0x10, NULL, HFILL}},
1738 { &hf_scsi_mmc_disc_info_state_of_last_session,
1739 {"State Of Last Session", "scsi_mmc.disc_info.state_of_last_session", FT_UINT8, BASE_HEX,
1740 VALS(scsi_disc_info_sols_val), 0x0c, NULL, HFILL}},
1741 { &hf_scsi_mmc_disc_info_disk_status,
1742 {"Disk Status", "scsi_mmc.disc_info.disk_status", FT_UINT8, BASE_HEX,
1743 VALS(scsi_disc_info_disc_status_val), 0x03, NULL, HFILL}},
1744 { &hf_scsi_mmc_disc_info_number_of_sessions,
1745 {"Number Of Sessions", "scsi_mmc.disc_info.number_of_sessions", FT_UINT16, BASE_DEC,
1746 NULL, 0, NULL, HFILL}},
1747 { &hf_scsi_mmc_disc_info_first_track_in_last_session,
1748 {"First Track In Last Session", "scsi_mmc.disc_info.first_track_in_last_session", FT_UINT16, BASE_DEC,
1749 NULL, 0, NULL, HFILL}},
1750 { &hf_scsi_mmc_disc_info_last_track_in_last_session,
1751 {"Last Track In Last Session", "scsi_mmc.disc_info.last_track_in_last_session", FT_UINT16, BASE_DEC,
1752 NULL, 0, NULL, HFILL}},
1753 { &hf_scsi_mmc_disc_info_did_v,
1754 {"DID_V", "scsi_mmc.disc_info.did_v", FT_BOOLEAN, 8,
1755 NULL, 0x80, NULL, HFILL}},
1756 { &hf_scsi_mmc_disc_info_dbc_v,
1757 {"DBC_V", "scsi_mmc.disc_info.dbc_v", FT_BOOLEAN, 8,
1758 NULL, 0x40, NULL, HFILL}},
1759 { &hf_scsi_mmc_disc_info_uru,
1760 {"URU", "scsi_mmc.disc_info.uru", FT_BOOLEAN, 8,
1761 NULL, 0x20, NULL, HFILL}},
1762 { &hf_scsi_mmc_disc_info_dac_v,
1763 {"DAC_V", "scsi_mmc.disc_info.dac_v", FT_BOOLEAN, 8,
1764 NULL, 0x10, NULL, HFILL}},
1765 { &hf_scsi_mmc_disc_info_dbit,
1766 {"Dbit", "scsi_mmc.disc_info.dbit", FT_BOOLEAN, 8,
1767 NULL, 0x04, NULL, HFILL}},
1768 { &hf_scsi_mmc_disc_info_bgfs,
1769 {"BG Format Status", "scsi_mmc.disc_info.bgfs", FT_UINT8, BASE_HEX,
1770 VALS(scsi_disc_info_bgfs_val), 0x03, NULL, HFILL}},
1771 { &hf_scsi_mmc_disc_info_disc_type,
1772 {"Disc Type", "scsi_mmc.disc_info.disc_type", FT_UINT8, BASE_HEX,
1773 VALS(scsi_disc_info_disc_type_val), 0, NULL, HFILL}},
1774 { &hf_scsi_mmc_disc_info_disc_identification,
1775 {"Disc Identification", "scsi_mmc.disc_info.disc_identification", FT_UINT32, BASE_HEX,
1776 NULL, 0, NULL, HFILL}},
1777 { &hf_scsi_mmc_disc_info_last_session_lead_in_start_address,
1778 {"Last Session Lead-In Start Address", "scsi_mmc.disc_info.last_session_lead_in_start_address", FT_UINT32, BASE_DEC,
1779 NULL, 0, NULL, HFILL}},
1780 { &hf_scsi_mmc_disc_info_last_possible_lead_out_start_address,
1781 {"Last Possible Lead-Out Start Address", "scsi_mmc.disc_info.last_possible_lead_out_start_address", FT_UINT32, BASE_DEC,
1782 NULL, 0, NULL, HFILL}},
1783 { &hf_scsi_mmc_disc_info_disc_bar_code,
1784 {"Disc Bar Code", "scsi_mmc.disc_info.disc_bar_code", FT_UINT64, BASE_HEX,
1785 NULL, 0, NULL, HFILL}},
1786 { &hf_scsi_mmc_readtoc_time,
1787 {"Time", "scsi_mmc.readtoc.time", FT_BOOLEAN, 8,
1788 NULL, 0x02, NULL, HFILL}},
1789 { &hf_scsi_mmc_readtoc_format,
1790 {"Format", "scsi_mmc.readtoc.format", FT_UINT8, BASE_HEX,
1791 NULL, 0x0f, NULL, HFILL}},
1792 { &hf_scsi_mmc_readtoc_first_session,
1793 {"First Session", "scsi_mmc.readtoc.first_session", FT_UINT8, BASE_DEC,
1794 NULL, 0, NULL, HFILL}},
1795 { &hf_scsi_mmc_readtoc_last_track,
1796 {"Last Track", "scsi_mmc.readtoc.last_track", FT_UINT8, BASE_DEC,
1797 NULL, 0, NULL, HFILL}},
1798 { &hf_scsi_mmc_readtoc_last_session,
1799 {"Last Session", "scsi_mmc.readtoc.last_session", FT_UINT8, BASE_DEC,
1800 NULL, 0, NULL, HFILL}},
1801 { &hf_scsi_mmc_q_subchannel_adr,
1802 {"Q Subchannel ADR", "scsi_mmc.q.subchannel.adr", FT_UINT8, BASE_HEX,
1803 VALS(scsi_q_subchannel_adr_val), 0xf0, NULL, HFILL}},
1804 { &hf_scsi_mmc_q_subchannel_control,
1805 {"Q Subchannel Control", "scsi_mmc.q.subchannel.control", FT_UINT8, BASE_HEX,
1806 VALS(scsi_q_subchannel_control_val), 0x0f, NULL, HFILL}},
1807 { &hf_scsi_mmc_agid,
1808 {"AGID", "scsi_mmc.agid", FT_UINT8, BASE_HEX,
1809 NULL, 0xc0, NULL, HFILL}},
1810 { &hf_scsi_mmc_track,
1811 {"Track", "scsi_mmc.track", FT_UINT32, BASE_DEC,
1812 NULL, 0, NULL, HFILL}},
1813 { &hf_scsi_mmc_track_size,
1814 {"Track Size", "scsi_mmc.track_size", FT_UINT32, BASE_DEC,
1815 NULL, 0, NULL, HFILL}},
1816 { &hf_scsi_mmc_track_start_address,
1817 {"Track Start Address", "scsi_mmc.track_start_address", FT_UINT32, BASE_DEC,
1818 NULL, 0, NULL, HFILL}},
1819 { &hf_scsi_mmc_track_start_time,
1820 {"Track Start Time", "scsi_mmc.track_start_time", FT_UINT32, BASE_DEC,
1821 NULL, 0, NULL, HFILL}},
1822 { &hf_scsi_mmc_lba,
1823 {"Logical Block Address", "scsi_mmc.lba", FT_UINT32, BASE_DEC,
1824 NULL, 0x0, NULL, HFILL}},
1825 { &hf_scsi_mmc_session,
1826 {"Session", "scsi_mmc.session", FT_UINT32, BASE_DEC,
1827 NULL, 0, NULL, HFILL}},
1828 { &hf_scsi_mmc_data_length,
1829 {"Data Length", "scsi_mmc.data_length", FT_UINT32, BASE_DEC,
1830 NULL, 0x0, NULL, HFILL}},
1831 { &hf_scsi_mmc_getconf_rt,
1832 {"RT", "scsi_mmc.getconf.rt", FT_UINT8, BASE_HEX,
1833 VALS(scsi_getconf_rt_val), 0x03, NULL, HFILL}},
1834 { &hf_scsi_mmc_getconf_current_profile,
1835 {"Current Profile", "scsi_mmc.getconf.current_profile", FT_UINT16, BASE_HEX,
1836 VALS(scsi_getconf_current_profile_val), 0, NULL, HFILL}},
1837 { &hf_scsi_mmc_getconf_starting_feature,
1838 {"Starting Feature", "scsi_mmc.getconf.starting_feature", FT_UINT16, BASE_HEX,
1839 VALS(scsi_feature_val), 0, NULL, HFILL}},
1840 { &hf_scsi_mmc_feature,
1841 {"Feature", "scsi_mmc.feature", FT_UINT16, BASE_HEX,
1842 VALS(scsi_feature_val), 0, NULL, HFILL}},
1843 { &hf_scsi_mmc_feature_version,
1844 {"Version", "scsi_mmc.feature.version", FT_UINT8, BASE_DEC,
1845 NULL, 0x3c, NULL, HFILL}},
1846 { &hf_scsi_mmc_feature_persistent,
1847 {"Persistent", "scsi_mmc.feature.persistent", FT_UINT8, BASE_HEX,
1848 NULL, 0x02, NULL, HFILL}},
1849 { &hf_scsi_mmc_feature_current,
1850 {"Current", "scsi_mmc.feature.current", FT_UINT8, BASE_HEX,
1851 NULL, 001, NULL, HFILL}},
1852 { &hf_scsi_mmc_feature_additional_length,
1853 {"Additional Length", "scsi_mmc.feature.additional_length", FT_UINT8, BASE_DEC,
1854 NULL, 0, NULL, HFILL}},
1855 { &hf_scsi_mmc_feature_lun_sn,
1856 {"LUN Serial Number", "scsi_mmc.feature.lun_sn", FT_STRING, BASE_NONE,
1857 NULL, 0, NULL, HFILL}},
1858 { &hf_scsi_mmc_feature_cdread_dap,
1859 {"DAP", "scsi_mmc.feature.cdread.dap", FT_BOOLEAN, 8,
1860 NULL, 0x80, NULL, HFILL}},
1861 { &hf_scsi_mmc_feature_cdread_c2flag,
1862 {"C2 Flag", "scsi_mmc.feature.cdread.c2flag", FT_BOOLEAN, 8,
1863 NULL, 0x02, NULL, HFILL}},
1864 { &hf_scsi_mmc_feature_cdread_cdtext,
1865 {"CD-Text", "scsi_mmc.feature.cdread.cdtext", FT_BOOLEAN, 8,
1866 NULL, 0x01, NULL, HFILL}},
1867 { &hf_scsi_mmc_feature_dvdrw_write,
1868 {"Write", "scsi_mmc.feature.dvdrw.write", FT_BOOLEAN, 8,
1869 NULL, 0x01, NULL, HFILL}},
1870 { &hf_scsi_mmc_feature_dvdrw_quickstart,
1871 {"Quick Start", "scsi_mmc.feature.dvdrw.quickstart", FT_BOOLEAN, 8,
1872 NULL, 0x02, NULL, HFILL}},
1873 { &hf_scsi_mmc_feature_dvdrw_closeonly,
1874 {"Close Only", "scsi_mmc.feature.dvdrw.closeonly", FT_BOOLEAN, 8,
1875 NULL, 0x01, NULL, HFILL}},
1876 { &hf_scsi_mmc_feature_dvdr_write,
1877 {"Write", "scsi_mmc.feature.dvdr.write", FT_BOOLEAN, 8,
1878 NULL, 0x01, NULL, HFILL}},
1879 { &hf_scsi_mmc_feature_tao_buf,
1880 {"BUF", "scsi_mmc.feature.tao.buf", FT_BOOLEAN, 8,
1881 NULL, 0x40, NULL, HFILL}},
1882 { &hf_scsi_mmc_feature_tao_rwraw,
1883 {"R-W Raw", "scsi_mmc.feature.tao.rwraw", FT_BOOLEAN, 8,
1884 NULL, 0x10, NULL, HFILL}},
1885 { &hf_scsi_mmc_feature_tao_rwpack,
1886 {"R-W Pack", "scsi_mmc.feature.tao.rwpack", FT_BOOLEAN, 8,
1887 NULL, 0x08, NULL, HFILL}},
1888 { &hf_scsi_mmc_feature_tao_testwrite,
1889 {"Test Write", "scsi_mmc.feature.tao.testwrite", FT_BOOLEAN, 8,
1890 NULL, 0x04, NULL, HFILL}},
1891 { &hf_scsi_mmc_feature_tao_cdrw,
1892 {"CD-RW", "scsi_mmc.feature.tao.cdrw", FT_BOOLEAN, 8,
1893 NULL, 0x02, NULL, HFILL}},
1894 { &hf_scsi_mmc_feature_tao_rwsubcode,
1895 {"R-W Subcode", "scsi_mmc.feature.tao.rwsubcode", FT_BOOLEAN, 8,
1896 NULL, 0x01, NULL, HFILL}},
1897 { &hf_scsi_mmc_feature_dts,
1898 {"Data Type Supported", "scsi_mmc.feature.dts", FT_UINT16, BASE_HEX,
1899 NULL, 0xffff, NULL, HFILL}},
1900 { &hf_scsi_mmc_feature_sao_buf,
1901 {"BUF", "scsi_mmc.feature.sao.buf", FT_BOOLEAN, 8,
1902 NULL, 0x40, NULL, HFILL}},
1903 { &hf_scsi_mmc_feature_sao_sao,
1904 {"SAO", "scsi_mmc.feature.sao.sao", FT_BOOLEAN, 8,
1905 NULL, 0x20, NULL, HFILL}},
1906 { &hf_scsi_mmc_feature_sao_rawms,
1907 {"Raw MS", "scsi_mmc.feature.sao.rawms", FT_BOOLEAN, 8,
1908 NULL, 0x10, NULL, HFILL}},
1909 { &hf_scsi_mmc_feature_sao_raw,
1910 {"Raw", "scsi_mmc.feature.sao.raw", FT_BOOLEAN, 8,
1911 NULL, 0x08, NULL, HFILL}},
1912 { &hf_scsi_mmc_feature_sao_testwrite,
1913 {"Test Write", "scsi_mmc.feature.sao.testwrite", FT_BOOLEAN, 8,
1914 NULL, 0x04, NULL, HFILL}},
1915 { &hf_scsi_mmc_feature_sao_cdrw,
1916 {"CD-RW", "scsi_mmc.feature.sao.cdrw", FT_BOOLEAN, 8,
1917 NULL, 0x02, NULL, HFILL}},
1918 { &hf_scsi_mmc_feature_sao_rw,
1919 {"R-W", "scsi_mmc.feature.sao.rw", FT_BOOLEAN, 8,
1920 NULL, 0x01, NULL, HFILL}},
1921 { &hf_scsi_mmc_feature_sao_mcsl,
1922 {"Maximum Cue Sheet Length", "scsi_mmc.feature.sao.mcsl", FT_UINT24, BASE_DEC,
1923 NULL, 0, NULL, HFILL}},
1924 { &hf_scsi_mmc_feature_dvdr_buf,
1925 {"BUF", "scsi_mmc.feature.dvdr.buf", FT_BOOLEAN, 8,
1926 NULL, 0x40, NULL, HFILL}},
1927 { &hf_scsi_mmc_feature_dvdr_testwrite,
1928 {"Test Write", "scsi_mmc.feature.dvdr.testwrite", FT_BOOLEAN, 8,
1929 NULL, 0x04, NULL, HFILL}},
1930 { &hf_scsi_mmc_feature_dvdr_dvdrw,
1931 {"DVD-RW", "scsi_mmc.feature.dvdr.dvdrw", FT_BOOLEAN, 8,
1932 NULL, 0x02, NULL, HFILL}},
1933 { &hf_scsi_mmc_feature_profile,
1934 {"Profile", "scsi_mmc.feature.profile", FT_UINT16, BASE_HEX,
1935 VALS(scsi_getconf_current_profile_val), 0, NULL, HFILL}},
1936 { &hf_scsi_mmc_feature_profile_current,
1937 {"Current", "scsi_mmc.feature.profile.current", FT_BOOLEAN, 8,
1938 NULL, 0x01, NULL, HFILL}},
1939 { &hf_scsi_mmc_feature_isw_buf,
1940 {"BUF", "scsi_mmc.feature.isw.buf", FT_BOOLEAN, 8,
1941 NULL, 0x01, NULL, HFILL}},
1942 { &hf_scsi_mmc_feature_isw_num_linksize,
1943 {"Number of Link Sizes", "scsi_mmc.feature.isw.num_linksize", FT_UINT8, BASE_DEC,
1944 NULL, 0, NULL, HFILL}},
1945 { &hf_scsi_mmc_feature_isw_linksize,
1946 {"Link Size", "scsi_mmc.feature.isw.linksize", FT_UINT8, BASE_DEC,
1947 NULL, 0, NULL, HFILL}},
1948 { &hf_scsi_mmc_read_compatibility_lba,
1949 {"Read Compatibility LBA", "scsi_mmc.read_compatibility_lba", FT_UINT32, BASE_DEC,
1950 NULL, 0, NULL, HFILL}},
1951 { &hf_scsi_mmc_reservation_size,
1952 {"Reservation Size", "scsi_mmc.reservation_size", FT_UINT32, BASE_DEC,
1953 NULL, 0, NULL, HFILL}},
1954 { &hf_scsi_mmc_last_recorded_address,
1955 {"Last Recorded Address", "scsi_mmc.last_recorded_address", FT_UINT32, BASE_DEC,
1956 NULL, 0, NULL, HFILL}},
1957 { &hf_scsi_mmc_first_track,
1958 {"First Track", "scsi_mmc.first_track", FT_UINT8, BASE_DEC,
1959 NULL, 0, NULL, HFILL}},
1960 { &hf_scsi_mmc_fixed_packet_size,
1961 {"Fixed Packet Size", "scsi_mmc.fixed_packet_size", FT_UINT32, BASE_DEC,
1962 NULL, 0, NULL, HFILL}},
1963 { &hf_scsi_mmc_closetrack_immed,
1964 {"IMMED", "scsi_mmc.closetrack.immed", FT_BOOLEAN, 8,
1965 NULL, 0x01, NULL, HFILL}},
1966 { &hf_scsi_mmc_closetrack_func,
1967 {"Close Function", "scsi_mmc.closetrack.func", FT_UINT8, BASE_HEX,
1968 VALS(scsi_closetrack_func_val), 0x07, NULL, HFILL}},
1969 { &hf_scsi_mmc_synccache_immed,
1970 {"IMMED", "scsi_mmc.synccache.immed", FT_BOOLEAN, 8,
1971 NULL, 0x02, NULL, HFILL}},
1972 { &hf_scsi_mmc_synccache_reladr,
1973 {"RelAdr", "scsi_mmc.synccache.reladr", FT_BOOLEAN, 8,
1974 NULL, 0x01, NULL, HFILL}},
1975 { &hf_scsi_mmc_num_blocks,
1976 {"Number of Blocks", "scsi_mmc.num_blocks", FT_UINT32, BASE_DEC,
1977 NULL, 0x0, NULL, HFILL}},
1978 { &hf_scsi_mmc_next_writable_address,
1979 {"Next Writable Address", "scsi_mmc.next_writable_address", FT_UINT32, BASE_DEC,
1980 NULL, 0, NULL, HFILL}},
1981 { &hf_scsi_mmc_free_blocks,
1982 {"Free Blocks", "scsi_mmc.free_blocks", FT_UINT32, BASE_DEC,
1983 NULL, 0, NULL, HFILL}},
1984 { &hf_scsi_mmc_read_dvd_format,
1985 { "Format Code", "scsi_mmc.read_dvd.format", FT_UINT8, BASE_HEX,
1986 VALS(scsi_read_dvd_formats), 0x0, NULL, HFILL}},
1987 { &hf_scsi_mmc_disc_book_type,
1988 { "Type", "scsi_mmc.book.type", FT_UINT8, BASE_HEX,
1989 VALS(scsi_disc_category_type), 0xf0, NULL, HFILL}},
1990 { &hf_scsi_mmc_disc_book_version,
1991 { "Version", "scsi_mmc.book.version", FT_UINT8, BASE_HEX,
1992 NULL, 0x0f, NULL, HFILL}},
1993 { &hf_scsi_mmc_disc_size_size,
1994 { "Size", "scsi_mmc.disc.size", FT_UINT8, BASE_HEX,
1995 VALS(scsi_disc_size), 0xf0, NULL, HFILL}},
1996 { &hf_scsi_mmc_disc_size_rate,
1997 { "Rate", "scsi_mmc.disc.rate", FT_UINT8, BASE_HEX,
1998 VALS(scsi_disc_rate), 0x0f, NULL, HFILL}},
1999 { &hf_scsi_mmc_disc_structure_layer,
2000 { "Structure", "scsi_mmc.disc.structure", FT_UINT8, BASE_HEX,
2001 VALS(scsi_disc_structure), 0x0f, NULL, HFILL}},
2002 { &hf_scsi_mmc_disc_density_length,
2003 { "Channel bith length", "scsi_mmc.density.channel_bit_length", FT_UINT8, BASE_HEX,
2004 VALS(scsi_density_length), 0xf0, NULL, HFILL}},
2005 { &hf_scsi_mmc_disc_density_pitch,
2006 { "Average Track Pitch", "scsi_mmc.density.average_track_pitch", FT_UINT8, BASE_HEX,
2007 VALS(scsi_density_pitch), 0x0f, NULL, HFILL}},
2008 { &hf_scsi_mmc_disc_first_physical,
2009 { "First physical sector of data zone", "scsi_mmc.first_physical", FT_UINT24, BASE_HEX,
2010 NULL, 0, NULL, HFILL}},
2011 { &hf_scsi_mmc_disc_last_physical,
2012 { "Last physical sector of data zone", "scsi_mmc.last_physical", FT_UINT24, BASE_HEX,
2013 NULL, 0, NULL, HFILL}},
2014 { &hf_scsi_mmc_disc_last_physical_layer0,
2015 { "Last physical sector of layer 0", "scsi_mmc.last_physical_layer0", FT_UINT24, BASE_HEX,
2016 NULL, 0, NULL, HFILL}},
2017 { &hf_scsi_mmc_disc_extended_format_info,
2018 { "Extended Format Info", "scsi_mmc.adip.extended_format_info", FT_BOOLEAN, 8,
2019 TFS(&scsi_adip_extended_format_info), 0x40, NULL, HFILL}},
2020 { &hf_scsi_mmc_disc_application_code,
2021 { "Disk Application Code", "scsi_mmc.disk_application_code", FT_UINT8, BASE_HEX,
2022 VALS(scsi_disk_application_code), 0x0, NULL, HFILL}},
2023 { &hf_scsi_mmc_adip_eib0,
2024 { "Extended Format Block 0", "scsi_mmc.adip.extended_format_block.0", FT_BOOLEAN, 8,
2025 NULL, 0x01, NULL, HFILL}},
2026 { &hf_scsi_mmc_adip_eib1,
2027 { "Extended Format Block 1", "scsi_mmc.adip.extended_format_block.1", FT_BOOLEAN, 8,
2028 NULL, 0x02, NULL, HFILL}},
2029 { &hf_scsi_mmc_adip_eib2,
2030 { "Extended Format Block 2", "scsi_mmc.adip.extended_format_block.2", FT_BOOLEAN, 8,
2031 NULL, 0x04, NULL, HFILL}},
2032 { &hf_scsi_mmc_adip_eib3,
2033 { "Extended Format Block 3", "scsi_mmc.adip.extended_format_block.3", FT_BOOLEAN, 8,
2034 NULL, 0x08, NULL, HFILL}},
2035 { &hf_scsi_mmc_adip_eib4,
2036 { "Extended Format Block 4", "scsi_mmc.adip.extended_format_block.4", FT_BOOLEAN, 8,
2037 NULL, 0x10, NULL, HFILL}},
2038 { &hf_scsi_mmc_adip_eib5,
2039 { "Extended Format Block 5", "scsi_mmc.adip.extended_format_block.5", FT_BOOLEAN, 8,
2040 NULL, 0x20, NULL, HFILL}},
2041 { &hf_scsi_mmc_adip_device_manuf_id,
2042 { "Device Manufacturer Id", "scsi_mmc.adip.device_manufacturer_id", FT_STRING, BASE_NONE,
2043 NULL, 0x0, NULL, HFILL}},
2044 { &hf_scsi_mmc_adip_media_type_id,
2045 { "Media Type Id", "scsi_mmc.adip.media_type_id", FT_STRING, BASE_NONE,
2046 NULL, 0x0, NULL, HFILL}},
2047 { &hf_scsi_mmc_adip_product_revision_number,
2048 { "Product Revision Number", "scsi_mmc.adip.product_revision_number", FT_UINT8, BASE_HEX,
2049 NULL, 0x0, NULL, HFILL}},
2050 { &hf_scsi_mmc_adip_number_of_physical_info,
2051 { "Number of bytes of physical info", "scsi_mmc.adip.number_of_physical_info", FT_UINT8, BASE_HEX,
2052 NULL, 0x0, NULL, HFILL}},
2053 { &hf_scsi_mmc_disc_num_layers,
2054 { "Number of Layers", "scsi_mmc.disk.num_layers", FT_UINT8, BASE_DEC,
2055 VALS(scsi_num_layers), 0x60, NULL, HFILL}},
2056 { &hf_scsi_mmc_disc_track_path,
2057 { "Track Path", "scsi_mmc.disk.track_path", FT_BOOLEAN, 8,
2058 TFS(&scsi_track_path), 0x10, NULL, HFILL}},
2059 { &hf_scsi_mmc_gesn_polled,
2060 { "Polled", "scsi_mmc.gesn.polled", FT_BOOLEAN, 8,
2061 TFS(&scsi_gesn_path), 0x01, NULL, HFILL}},
2062 { &hf_scsi_mmc_notification_flags,
2063 {"Notification Class Request", "scsi_mmc.notification.flags", FT_UINT8, BASE_HEX, NULL, 0,
2064 NULL, HFILL}},
2065 { &hf_scsi_mmc_gesn_device_busy,
2066 { "DEVICE BUSY", "scsi_mmc.gesn.device_busy", FT_BOOLEAN, 8,
2067 NULL, 0x40, NULL, HFILL}},
2068 { &hf_scsi_mmc_gesn_multi_initiator,
2069 { "MULTI_INITIATOR", "scsi_mmc.gesn.multi_initiator", FT_BOOLEAN, 8,
2070 NULL, 0x20, NULL, HFILL}},
2071 { &hf_scsi_mmc_gesn_media,
2072 { "MEDIA", "scsi_mmc.gesn.media", FT_BOOLEAN, 8,
2073 NULL, 0x10, NULL, HFILL}},
2074 { &hf_scsi_mmc_gesn_external_request,
2075 { "EXTERNAL_REQUEST", "scsi_mmc.gesn.external_request", FT_BOOLEAN, 8,
2076 NULL, 0x08, NULL, HFILL}},
2077 { &hf_scsi_mmc_gesn_power_mgmt,
2078 { "POWER_MANAGEMENT", "scsi_mmc.gesn.power_management", FT_BOOLEAN, 8,
2079 NULL, 0x04, NULL, HFILL}},
2080 { &hf_scsi_mmc_gesn_operational_change,
2081 { "OPERATIONAL_CHANGE", "scsi_mmc.gesn.operational_change", FT_BOOLEAN, 8,
2082 NULL, 0x02, NULL, HFILL}},
2083 { &hf_scsi_mmc_prevent_allow_flags,
2084 {"Prevent Allow Flags", "scsi_mmc.prevent_allow.flags", FT_UINT8, BASE_HEX, NULL, 0,
2085 NULL, HFILL}},
2086 { &hf_scsi_mmc_prevent_allow_persistent,
2087 { "PERSISTENT", "scsi_mmc.prevent_allow.persistent", FT_BOOLEAN, 8,
2088 NULL, 0x02, NULL, HFILL}},
2089 { &hf_scsi_mmc_prevent_allow_prevent,
2090 { "PREVENT", "scsi_mmc.prevent_allow.prevent", FT_BOOLEAN, 8,
2091 NULL, 0x01, NULL, HFILL}},
2092 { &hf_scsi_mmc_disk_flags,
2093 {"Disk Flags", "scsi_mmc.disk.flags", FT_UINT8, BASE_HEX, NULL, 0,
2094 NULL, HFILL}},
2095 { &hf_scsi_mmc_format_flags,
2096 {"Format Flags", "scsi_mmc.format.flags", FT_UINT8, BASE_HEX, NULL, 0,
2097 NULL, HFILL}},
2098 { &hf_scsi_mmc_track_flags,
2099 {"Track Flags", "scsi_mmc.track.flags", FT_UINT8, BASE_HEX, NULL, 0,
2100 NULL, HFILL}},
2101 { &hf_scsi_mmc_data_flags,
2102 {"Data Flags", "scsi_mmc.data.flags", FT_UINT8, BASE_HEX, NULL, 0,
2103 NULL, HFILL}},
2106 /* Setup protocol subtree array */
2107 static gint *ett[] = {
2108 &ett_scsi_mmc_profile,
2109 &ett_scsi_notifications,
2110 &ett_scsi_prevent_allow,
2111 &ett_scsi_disk_flags,
2112 &ett_scsi_format_flags,
2113 &ett_scsi_track_flags,
2114 &ett_scsi_data_flags,
2117 /* Register the protocol name and description */
2118 proto_scsi_mmc = proto_register_protocol("SCSI_MMC", "SCSI_MMC", "scsi_mmc");
2120 /* Required function calls to register the header fields and subtrees used */
2121 proto_register_field_array(proto_scsi_mmc, hf, array_length(hf));
2122 proto_register_subtree_array(ett, array_length(ett));