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
14 #include <epan/packet.h>
15 #include <epan/expert.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"},
227 static const value_string scsi_density_length
[] = {
231 static const value_string scsi_density_pitch
[] = {
237 static const value_string scsi_disc_structure
[] = {
238 {0x0, "Embossed layer"},
239 {0x2, "Write-once recording layer"},
240 {0x4, "Rewriteable recording layer"},
243 static const value_string scsi_num_layers
[] = {
250 static const value_string scsi_disc_size
[] = {
255 static const value_string scsi_disc_rate
[] = {
259 {0xf, "No maximum transfer rate specified"},
262 static const value_string scsi_disc_category_type
[] = {
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"},
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)"},
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"},
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"},
324 {0x0013, "DVD-RW Restricted Overwrite"},
325 {0x0014, "DVD-RW Sequential recording"},
328 {0x0020, "DDCD-ROM"},
331 {0xffff, "Logical unit not conforming to a standard profile"},
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"},
339 {0x0002, "Morphing"},
340 {0x0003, "Removable Medium"},
341 {0x0004, "Write Protect"},
342 {0x0010, "Random Readable"},
343 {0x001d, "Multi-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"},
355 {0x0029, "Enhanced Defect Reporting"},
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"},
368 {0x0102, "Embedded Changer"},
369 {0x0103, "CD Audio analog play"},
370 {0x0104, "Microcode Upgrade"},
373 {0x0107, "Real Time Streaming"},
374 {0x0108, "Logical Unit serial number"},
375 {0x010a, "Disc control Block"},
376 {0x010b, "DVD CPRM"},
377 {0x010c, "Firmware Information"},
380 static value_string_ext scsi_feature_val_ext
= VALUE_STRING_EXT_INIT(scsi_feature_val
);
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
)
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 */
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
);
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
);
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
);
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
);
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
);
431 old_offset
=try_offset
;
433 case 0x0000: /* profile list */
434 while(try_offset
<(old_offset
+additional_length
)){
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]");
455 case 0x001d: /* multi-read */
456 case 0x001f: /* dvd read feature */
457 /* no data for this one */
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
);
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
);
467 proto_tree_add_item (tree
, hf_scsi_mmc_feature_isw_buf
, try_tvb
, try_offset
, 1, ENC_BIG_ENDIAN
);
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
);
472 while(num_linksize
--){
473 proto_tree_add_item (tree
, hf_scsi_mmc_feature_isw_linksize
, try_tvb
, try_offset
, 1, ENC_BIG_ENDIAN
);
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
);
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
);
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
);
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
);
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
);
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
);
513 proto_tree_add_expert(tree
, pinfo
, &ei_scsi_mmc_unknown_feature_data
, try_tvb
, try_offset
, additional_length
);
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"},
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)"},
546 static value_string_ext scsi_q_subchannel_control_val_ext
= VALUE_STRING_EXT_INIT(scsi_q_subchannel_control_val
);
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
)
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
;
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;
572 proto_tree_add_item (tree
, hf_scsi_mmc_readtoc_format
, tvb_a
, offset_a
+1, 1, ENC_BIG_ENDIAN
);
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;
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;
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
);
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
);
607 switch(cdata
->itlq
->flags
&0x000f){
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
);
616 proto_tree_add_item (tree
, hf_scsi_mmc_track_start_address
, try_tvb
, try_offset
+4, 4, ENC_BIG_ENDIAN
);
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);
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"},
638 static const value_string scsi_disc_info_disc_status_val
[] = {
639 {0x00, "Empty Disc"},
640 {0x01, "Incomplete Disc"},
641 {0x02, "Finalized Disc"},
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"},
654 static const value_string scsi_disc_info_disc_type_val
[] = {
655 {0x00, "CD-DA or CD-ROM Disc"},
657 {0x20, "CD-ROM XA Disc or DDCD"},
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
)
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
);
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
,
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
,
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
;
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
)) {
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
);
755 switch(cdata
->itlq
->flags
) {
756 case 0x00: /* Physical Format information */
757 case 0x11: /* ADIP Information */
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
);
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
);
771 proto_tree_add_item (tree
, hf_scsi_mmc_disc_track_path
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
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
);
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
);
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
);
826 dissect_mmc4_getperformance (tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
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
);
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"},
865 static const value_string scsi_key_format_val
[] = {
866 {0x00, "AGID for CSS/CPPM"},
867 {0x01, "Challenge Key"},
870 {0x05, "Authentication Success Flag"},
872 {0x11, "AGID for CPRM"},
876 static const value_string scsi_report_key_type_code_val
[] = {
879 {0x02, "LAST CHANCE"},
883 static const value_string scsi_report_key_rpc_scheme_val
[] = {
884 {0x00, "Unknown (RPC not enforced)"},
885 {0x01, "RPC Phase II"},
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,
900 key_class
=tvb_get_uint8(tvb
, offset
+6);
901 proto_tree_add_item (tree
, hf_scsi_mmc_key_class
, tvb
, offset
+6,
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;
912 /* agid is only valid for some formats */
913 proto_tree_add_uint (tree
, hf_scsi_mmc_agid
, tvb
, offset
+9, 1, agid
);
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
);
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);
942 static const value_string scsi_rti_address_type_val
[] = {
943 {0x00, "Logical Block Address"},
944 {0x01, "Logical Track Number"},
945 {0x02, "Session Number"},
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
)
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
);
961 case 0x00: /* logical block address */
962 proto_tree_add_item (tree
, hf_scsi_mmc_lba
, tvb_a
, offset_a
+1,
965 case 0x01: /* logical track number */
966 proto_tree_add_item (tree
, hf_scsi_mmc_track
, tvb_a
, offset_a
+1,
969 case 0x02: /* logical session number */
970 proto_tree_add_item (tree
, hf_scsi_mmc_session
, tvb_a
, offset_a
+1,
975 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb_a
, offset_a
+ 6, 2, ENC_BIG_ENDIAN
);
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
);
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
,
990 static int * const data_fields
[] = {
992 &hf_scsi_mmc_rti_blank
,
993 &hf_scsi_mmc_rti_packet
,
995 &hf_scsi_mmc_rti_data_mode
,
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));
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));
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
;
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
,
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
);
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"},
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"},
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
) {
1104 proto_tree_add_item (tree
, hf_scsi_mmc_closetrack_immed
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1107 /* close function */
1108 proto_tree_add_item (tree
, hf_scsi_mmc_closetrack_func
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1115 proto_tree_add_item (tree
, hf_scsi_mmc_track
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1121 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_control
,
1122 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
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
);
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"},
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"},
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
)
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
);
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
);
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
) {
1232 static int * const prevent_allow_fields
[] = {
1233 &hf_scsi_mmc_prevent_allow_persistent
,
1234 &hf_scsi_mmc_prevent_allow_prevent
,
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);
1243 col_append_str(pinfo
->cinfo
, COL_INFO
, " PREVENT");
1245 col_append_str(pinfo
->cinfo
, COL_INFO
, " ALLOW");
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
);
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"},
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"},
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
},
1332 /*SPC 0x03*/{dissect_spc_requestsense
},
1347 /*SPC 0x12*/{dissect_spc_inquiry
},
1356 /*MMC 0x1b*/{dissect_sbc_startstopunit
},
1359 /*MMC 0x1e*/{dissect_mmc_preventallowmediaremoval
},
1366 /*MMC 0x25*/{dissect_sbc_readcapacity10
},
1369 /*MMC 0x28*/{dissect_sbc_read10
},
1371 /*MMC 0x2a*/{dissect_sbc_write10
},
1382 /*MMC 0x35*/{dissect_mmc4_synchronizecache
},
1388 /*SPC 0x3b*/{dissect_spc_writebuffer
},
1396 /*MMC 0x43*/{dissect_mmc4_readtocpmaatip
},
1399 /*MMC 0x46*/{dissect_mmc4_getconfiguration
},
1403 /*MMC 0x4a*/{dissect_mmc4_geteventstatusnotification
},
1410 /*MMC 0x51*/{dissect_mmc4_readdiscinformation
},
1411 /*MMC 0x52*/{dissect_mmc4_readtrackinformation
},
1412 /*MMC 0x53*/{dissect_mmc4_reservetrack
},
1414 /*SPC 0x55*/{dissect_spc_modeselect10
},
1419 /*SPC 0x5a*/{dissect_spc_modesense10
},
1420 /*MMC 0x5b*/{dissect_mmc4_close_track
},
1421 /*MMC 0x5c*/{dissect_mmc4_readbuffercapacity
},
1489 /*SPC 0xa0*/{dissect_spc_reportluns
},
1492 /*SPC 0xa3*/{dissect_spc_mgmt_protocol_in
},
1493 /*MMC 0xa4*/{dissect_mmc4_reportkey
},
1497 /*MMC 0xa8*/{dissect_sbc_read12
},
1499 /*MMC 0xaa*/{dissect_sbc_write12
},
1501 /*MMC 0xac*/{dissect_mmc4_getperformance
},
1502 /*MMC 0xad*/{dissect_mmc4_readdiscstructure
},
1511 /*MMC 0xb6*/{dissect_mmc4_setstreaming
},
1516 /*MMC 0xbb*/{dissect_mmc4_setcdspeed
},
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
}},
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,
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,
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,
2063 { &hf_scsi_mmc_format_flags
,
2064 {"Format Flags", "scsi_mmc.format.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2066 { &hf_scsi_mmc_track_flags
,
2067 {"Track Flags", "scsi_mmc.track.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2069 { &hf_scsi_mmc_data_flags
,
2070 {"Data Flags", "scsi_mmc.data.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
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
2123 * indent-tabs-mode: nil
2126 * vi: set shiftwidth=4 tabstop=8 expandtab:
2127 * :indentSize=4:tabSize=8:noTabs=true: