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