3 * copied from packet-scsi.c
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 2002 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include <epan/packet.h>
31 #include <epan/conversation.h>
33 #include "packet-scsi.h"
34 #include "packet-fc.h"
35 #include "packet-scsi-mmc.h"
36 #include "packet-scsi-sbc.h"
39 static int proto_scsi_mmc
= -1;
40 int hf_scsi_mmc_opcode
= -1;
41 static int hf_scsi_mmc_setstreaming_type
= -1;
42 static int hf_scsi_mmc_setstreaming_param_len
= -1;
43 static int hf_scsi_mmc_setstreaming_wrc
= -1;
44 static int hf_scsi_mmc_setstreaming_rdd
= -1;
45 static int hf_scsi_mmc_setstreaming_exact
= -1;
46 static int hf_scsi_mmc_setstreaming_ra
= -1;
47 static int hf_scsi_mmc_setstreaming_start_lba
= -1;
48 static int hf_scsi_mmc_setstreaming_end_lba
= -1;
49 static int hf_scsi_mmc_setstreaming_read_size
= -1;
50 static int hf_scsi_mmc_setstreaming_read_time
= -1;
51 static int hf_scsi_mmc_setstreaming_write_size
= -1;
52 static int hf_scsi_mmc_setstreaming_write_time
= -1;
53 static int hf_scsi_mmc_setcdspeed_rc
= -1;
54 static int hf_scsi_mmc_rbc_block
= -1;
55 static int hf_scsi_mmc_rbc_lob_blocks
= -1;
56 static int hf_scsi_mmc_rbc_alob_blocks
= -1;
57 static int hf_scsi_mmc_rbc_lob_bytes
= -1;
58 static int hf_scsi_mmc_rbc_alob_bytes
= -1;
59 static int hf_scsi_mmc_rti_address_type
= -1;
60 static int hf_scsi_mmc_rti_damage
= -1;
61 static int hf_scsi_mmc_rti_copy
= -1;
62 static int hf_scsi_mmc_rti_track_mode
= -1;
63 static int hf_scsi_mmc_rti_rt
= -1;
64 static int hf_scsi_mmc_rti_blank
= -1;
65 static int hf_scsi_mmc_rti_packet
= -1;
66 static int hf_scsi_mmc_rti_fp
= -1;
67 static int hf_scsi_mmc_rti_data_mode
= -1;
68 static int hf_scsi_mmc_rti_lra_v
= -1;
69 static int hf_scsi_mmc_rti_nwa_v
= -1;
70 static int hf_scsi_mmc_report_key_type_code
= -1;
71 static int hf_scsi_mmc_report_key_vendor_resets
= -1;
72 static int hf_scsi_mmc_report_key_user_changes
= -1;
73 static int hf_scsi_mmc_report_key_region_mask
= -1;
74 static int hf_scsi_mmc_report_key_rpc_scheme
= -1;
75 static int hf_scsi_mmc_key_class
= -1;
76 static int hf_scsi_mmc_key_format
= -1;
77 static int hf_scsi_mmc_disc_info_erasable
= -1;
78 static int hf_scsi_mmc_disc_info_state_of_last_session
= -1;
79 static int hf_scsi_mmc_disc_info_disk_status
= -1;
80 static int hf_scsi_mmc_disc_info_number_of_sessions
= -1;
81 static int hf_scsi_mmc_disc_info_first_track_in_last_session
= -1;
82 static int hf_scsi_mmc_disc_info_last_track_in_last_session
= -1;
83 static int hf_scsi_mmc_disc_info_did_v
= -1;
84 static int hf_scsi_mmc_disc_info_dbc_v
= -1;
85 static int hf_scsi_mmc_disc_info_uru
= -1;
86 static int hf_scsi_mmc_disc_info_dac_v
= -1;
87 static int hf_scsi_mmc_disc_info_dbit
= -1;
88 static int hf_scsi_mmc_disc_info_bgfs
= -1;
89 static int hf_scsi_mmc_disc_info_disc_type
= -1;
90 static int hf_scsi_mmc_disc_info_disc_identification
= -1;
91 static int hf_scsi_mmc_disc_info_last_session_lead_in_start_address
= -1;
92 static int hf_scsi_mmc_disc_info_last_possible_lead_out_start_address
= -1;
93 static int hf_scsi_mmc_disc_info_disc_bar_code
= -1;
94 static int hf_scsi_mmc_readtoc_time
= -1;
95 static int hf_scsi_mmc_readtoc_format
= -1;
96 static int hf_scsi_mmc_readtoc_first_session
= -1;
97 static int hf_scsi_mmc_readtoc_last_track
= -1;
98 static int hf_scsi_mmc_readtoc_last_session
= -1;
99 static int hf_scsi_mmc_q_subchannel_adr
= -1;
100 static int hf_scsi_mmc_q_subchannel_control
= -1;
101 static int hf_scsi_mmc_agid
= -1;
102 static int hf_scsi_mmc_track
= -1;
103 static int hf_scsi_mmc_track_size
= -1;
104 static int hf_scsi_mmc_track_start_address
= -1;
105 static int hf_scsi_mmc_track_start_time
= -1;
106 static int hf_scsi_mmc_lba
= -1;
107 static int hf_scsi_mmc_session
= -1;
108 static int hf_scsi_mmc_data_length
= -1;
109 static int hf_scsi_mmc_getconf_rt
= -1;
110 static int hf_scsi_mmc_getconf_starting_feature
= -1;
111 static int hf_scsi_mmc_getconf_current_profile
= -1;
112 static int hf_scsi_mmc_feature
= -1;
113 static int hf_scsi_mmc_feature_version
= -1;
114 static int hf_scsi_mmc_feature_persistent
= -1;
115 static int hf_scsi_mmc_feature_current
= -1;
116 static int hf_scsi_mmc_feature_additional_length
= -1;
117 static int hf_scsi_mmc_feature_lun_sn
= -1;
118 static int hf_scsi_mmc_feature_cdread_dap
= -1;
119 static int hf_scsi_mmc_feature_cdread_c2flag
= -1;
120 static int hf_scsi_mmc_feature_cdread_cdtext
= -1;
121 static int hf_scsi_mmc_feature_dvdrw_write
= -1;
122 static int hf_scsi_mmc_feature_dvdrw_quickstart
= -1;
123 static int hf_scsi_mmc_feature_dvdrw_closeonly
= -1;
124 static int hf_scsi_mmc_feature_dvdr_write
= -1;
125 static int hf_scsi_mmc_feature_tao_buf
= -1;
126 static int hf_scsi_mmc_feature_tao_rwraw
= -1;
127 static int hf_scsi_mmc_feature_tao_rwpack
= -1;
128 static int hf_scsi_mmc_feature_tao_testwrite
= -1;
129 static int hf_scsi_mmc_feature_tao_cdrw
= -1;
130 static int hf_scsi_mmc_feature_tao_rwsubcode
= -1;
131 static int hf_scsi_mmc_feature_dts
= -1;
132 static int hf_scsi_mmc_feature_sao_buf
= -1;
133 static int hf_scsi_mmc_feature_sao_sao
= -1;
134 static int hf_scsi_mmc_feature_sao_rawms
= -1;
135 static int hf_scsi_mmc_feature_sao_raw
= -1;
136 static int hf_scsi_mmc_feature_sao_testwrite
= -1;
137 static int hf_scsi_mmc_feature_sao_cdrw
= -1;
138 static int hf_scsi_mmc_feature_sao_rw
= -1;
139 static int hf_scsi_mmc_feature_sao_mcsl
= -1;
140 static int hf_scsi_mmc_feature_dvdr_buf
= -1;
141 static int hf_scsi_mmc_feature_dvdr_testwrite
= -1;
142 static int hf_scsi_mmc_feature_dvdr_dvdrw
= -1;
143 static int hf_scsi_mmc_feature_profile
= -1;
144 static int hf_scsi_mmc_feature_profile_current
= -1;
145 static int hf_scsi_mmc_feature_isw_buf
= -1;
146 static int hf_scsi_mmc_feature_isw_num_linksize
= -1;
147 static int hf_scsi_mmc_feature_isw_linksize
= -1;
148 static int hf_scsi_mmc_read_compatibility_lba
= -1;
149 static int hf_scsi_mmc_reservation_size
= -1;
150 static int hf_scsi_mmc_last_recorded_address
= -1;
151 static int hf_scsi_mmc_first_track
= -1;
152 static int hf_scsi_mmc_fixed_packet_size
= -1;
153 static int hf_scsi_mmc_closetrack_immed
= -1;
154 static int hf_scsi_mmc_closetrack_func
= -1;
155 static int hf_scsi_mmc_synccache_immed
= -1;
156 static int hf_scsi_mmc_synccache_reladr
= -1;
157 static int hf_scsi_mmc_num_blocks
= -1;
158 static int hf_scsi_mmc_next_writable_address
= -1;
159 static int hf_scsi_mmc_free_blocks
= -1;
160 static int hf_scsi_mmc_read_dvd_format
= -1;
161 static int hf_scsi_mmc_disc_book_type
= -1;
162 static int hf_scsi_mmc_disc_book_version
= -1;
163 static int hf_scsi_mmc_disc_size_size
= -1;
164 static int hf_scsi_mmc_disc_size_rate
= -1;
165 static int hf_scsi_mmc_disc_num_layers
= -1;
166 static int hf_scsi_mmc_disc_track_path
= -1;
167 static int hf_scsi_mmc_disc_structure_layer
= -1;
168 static int hf_scsi_mmc_disc_density_length
= -1;
169 static int hf_scsi_mmc_disc_density_pitch
= -1;
170 static int hf_scsi_mmc_disc_first_physical
= -1;
171 static int hf_scsi_mmc_disc_last_physical
= -1;
172 static int hf_scsi_mmc_disc_last_physical_layer0
= -1;
173 static int hf_scsi_mmc_disc_extended_format_info
= -1;
174 static int hf_scsi_mmc_disc_application_code
= -1;
175 static int hf_scsi_mmc_adip_eib0
= -1;
176 static int hf_scsi_mmc_adip_eib1
= -1;
177 static int hf_scsi_mmc_adip_eib2
= -1;
178 static int hf_scsi_mmc_adip_eib3
= -1;
179 static int hf_scsi_mmc_adip_eib4
= -1;
180 static int hf_scsi_mmc_adip_eib5
= -1;
181 static int hf_scsi_mmc_adip_device_manuf_id
= -1;
182 static int hf_scsi_mmc_adip_media_type_id
= -1;
183 static int hf_scsi_mmc_adip_product_revision_number
= -1;
184 static int hf_scsi_mmc_adip_number_of_physical_info
= -1;
185 static int hf_scsi_mmc_gesn_polled
= -1;
186 static int hf_scsi_mmc_notification_flags
= -1;
187 static int hf_scsi_mmc_gesn_device_busy
= -1;
188 static int hf_scsi_mmc_gesn_multi_initiator
= -1;
189 static int hf_scsi_mmc_gesn_media
= -1;
190 static int hf_scsi_mmc_gesn_external_request
= -1;
191 static int hf_scsi_mmc_gesn_power_mgmt
= -1;
192 static int hf_scsi_mmc_gesn_operational_change
= -1;
193 static int hf_scsi_mmc_prevent_allow_flags
= -1;
194 static int hf_scsi_mmc_prevent_allow_persistent
= -1;
195 static int hf_scsi_mmc_prevent_allow_prevent
= -1;
196 static int hf_scsi_mmc_disk_flags
= -1;
197 static int hf_scsi_mmc_format_flags
= -1;
198 static int hf_scsi_mmc_track_flags
= -1;
199 static int hf_scsi_mmc_data_flags
= -1;
201 static gint ett_scsi_mmc_profile
= -1;
202 static gint ett_scsi_notifications
= -1;
203 static gint ett_scsi_prevent_allow
= -1;
204 static gint ett_scsi_disk_flags
= -1;
205 static gint ett_scsi_format_flags
= -1;
206 static gint ett_scsi_track_flags
= -1;
207 static gint ett_scsi_data_flags
= -1;
209 static const true_false_string scsi_gesn_path
= {
210 "POLLED operation requested",
211 "ASYNCHRONOUS operation requested"
213 static const true_false_string scsi_track_path
= {
214 "Opposite Track Path",
215 "Parallel Track Path"
217 static const true_false_string scsi_adip_extended_format_info
= {
218 "Data zone contains extended format info for VPCS",
219 "Data zone does NOT contain extended format info"
221 static const value_string scsi_disk_application_code
[] = {
222 {0x0, "General Purpose Use"},
225 static const value_string scsi_density_length
[] = {
229 static const value_string scsi_density_pitch
[] = {
235 static const value_string scsi_disc_structure
[] = {
236 {0x0, "Embossed layer"},
237 {0x2, "Write-once recording layer"},
238 {0x4, "Rewriteable recording layer"},
241 static const value_string scsi_num_layers
[] = {
248 static const value_string scsi_disc_size
[] = {
253 static const value_string scsi_disc_rate
[] = {
257 {0xf, "No maximum transfer rate specified"},
260 static const value_string scsi_disc_category_type
[] = {
270 static const value_string scsi_read_dvd_formats
[] = {
271 {0x00, "Physical Information"},
272 {0x01, "Copyright Information"},
273 {0x02, "Disk Key obfuscated by a Bus Key"},
274 {0x03, "Burst Cutting Area information"},
275 {0x04, "Disk Manufacturing Information"},
276 {0x05, "copyright Management Information"},
277 {0x06, "Media Identifier protected by a Bus Key"},
278 {0x07, "Media Key block protected by a Bus Key"},
279 {0x08, "DDS information"},
280 {0x09, "DVD-RAM Medium status"},
281 {0x0a, "DVD-RAM Spare Area information"},
282 {0x0b, "DVD-RAM Recording Type information"},
283 {0x0c, "DVD-R/-RW RMD"},
284 {0x0d, "Specified RMD"},
285 {0x0e, "Pre-recorded information"},
286 {0x0f, "DVD-R/-RW Media Identifier"},
287 {0x10, "DVD-R/-RW Physical Format Information"},
288 {0x11, "ADIP information"},
289 {0x30, "Disc Control Block"},
290 {0x31, "Read MTA ECC Block"},
291 {0xc0, "Write Protection Status"},
292 {0xff, "READ/SEND DVD STRUCTURE capability"},
296 static const value_string scsi_data_mode_vals
[] = {
297 {0x01, "Mode 1 (ISO/IEC 10149)"},
298 {0x02, "Mode 2 (ISO/IEC 10149 or CD-ROM XA) DDCD"},
299 {0x0f, "Data Block Type unknown (no track descriptor block)"},
302 static const value_string scsi_getconf_rt_val
[] = {
303 {0x00, "Return all features"},
304 {0x01, "Return all current features"},
305 {0x02, "Return all identified by Starting Feature"},
308 static const value_string scsi_getconf_current_profile_val
[] = {
309 {0x0000, "Reserved"},
310 {0x0001, "Non-removable disk"},
311 {0x0002, "Removable disk"},
312 {0x0003, "MO Erasable"},
313 {0x0004, "Optical Write Once"},
321 {0x0013, "DVD-RW Restricted Overwrite"},
322 {0x0014, "DVD-RW Sequential recording"},
325 {0x0020, "DDCD-ROM"},
328 {0xffff, "Logical unit not conforming to a standard profile"},
332 static const value_string scsi_feature_val
[] = {
333 {0x0000, "Profile List"},
335 {0x0002, "Morphing"},
336 {0x0003, "Removable Medium"},
337 {0x0004, "Write Protect"},
338 {0x0010, "Random Readable"},
339 {0x001d, "Multi-read"},
341 {0x001f, "DVD Read"},
342 {0x0020, "Random Writeable"},
343 {0x0021, "Incremental Streaming Writeable"},
344 {0x0022, "Sector Erasable"},
345 {0x0023, "Formattable"},
346 {0x0024, "Defect Management"},
347 {0x0025, "Write Once"},
348 {0x0026, "Restricted Overwrite"},
349 {0x0027, "CD-RW CAV Write"},
351 {0x0029, "Enhanced Defect Reporting"},
354 {0x002c, "Rigid Restricted Overwrite"},
355 {0x002d, "CD Track At Once"},
356 {0x002e, "CD Mastering"},
357 {0x002f, "DVD-R/-RW Write"},
358 {0x0030, "DDCD Read"},
359 {0x0031, "DDCD-R Write"},
360 {0x0032, "DDCD-RW Write"},
361 {0x0037, "CD-RW Media Write Support"},
362 {0x0100, "Power Management"},
364 {0x0102, "Embedded Changer"},
365 {0x0103, "CD Audio analog play"},
366 {0x0104, "Microcode Upgrade"},
369 {0x0107, "Real Time Streaming"},
370 {0x0108, "Logical Unit serial number"},
371 {0x010a, "Disc control Block"},
372 {0x010b, "DVD CPRM"},
373 {0x010c, "Firmware Information"},
378 dissect_mmc4_getconfiguration (tvbuff_t
*tvb
, packet_info
*pinfo
,
379 proto_tree
*tree
, guint offset
,
380 gboolean isreq
, gboolean iscdb
,
381 guint payload_len _U_
,
382 scsi_task_data_t
*cdata
)
387 tvbuff_t
*volatile tvb_v
= tvb
;
388 volatile guint offset_v
= offset
;
390 if (tree
&& isreq
&& iscdb
) {
391 proto_tree_add_item (tree
, hf_scsi_mmc_getconf_rt
, tvb_v
, offset_v
+0, 1, ENC_BIG_ENDIAN
);
392 proto_tree_add_item (tree
, hf_scsi_mmc_getconf_starting_feature
, tvb_v
, offset_v
+1, 2, ENC_BIG_ENDIAN
);
393 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb_v
, offset_v
+6, 2, ENC_BIG_ENDIAN
);
394 /* we need the alloc_len in the response */
396 cdata
->itlq
->alloc_len
=tvb_get_ntohs(tvb_v
, offset_v
+6);
398 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
399 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
406 TRY_SCSI_CDB_ALLOC_LEN(pinfo
, tvb_v
, offset_v
, cdata
->itlq
->alloc_len
);
408 len
=tvb_get_ntohl(tvb_v
, offset_v
+0);
409 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb_v
, offset_v
, 4, ENC_BIG_ENDIAN
);
410 proto_tree_add_item (tree
, hf_scsi_mmc_getconf_current_profile
, tvb_v
, offset_v
+6, 2, ENC_BIG_ENDIAN
);
415 guint8 additional_length
;
418 feature
=tvb_get_ntohs(tvb_v
, offset_v
);
419 proto_tree_add_item (tree
, hf_scsi_mmc_feature
, tvb_v
, offset_v
, 2, ENC_BIG_ENDIAN
);
421 proto_tree_add_item (tree
, hf_scsi_mmc_feature_version
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
422 proto_tree_add_item (tree
, hf_scsi_mmc_feature_persistent
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
423 proto_tree_add_item (tree
, hf_scsi_mmc_feature_current
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
425 additional_length
=tvb_get_guint8(tvb_v
, offset_v
);
426 proto_tree_add_item (tree
, hf_scsi_mmc_feature_additional_length
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
430 case 0x0000: /* profile list */
431 while(offset_v
<(old_offset
+additional_length
)){
438 it
=proto_tree_add_text(tree
, tvb_v
, offset_v
, 4, "Profile:");
439 tr
=proto_item_add_subtree(it
, ett_scsi_mmc_profile
);
442 profile
=tvb_get_ntohs(tvb_v
, offset_v
);
443 proto_tree_add_item (tr
, hf_scsi_mmc_feature_profile
, tvb_v
, offset_v
, 2, ENC_BIG_ENDIAN
);
444 proto_item_append_text(it
, "%s", val_to_str(profile
, scsi_getconf_current_profile_val
, "Unknown 0x%04x"));
446 cur_profile
=tvb_get_guint8(tvb_v
, offset_v
+2);
447 proto_tree_add_item (tr
, hf_scsi_mmc_feature_profile_current
, tvb_v
, offset_v
+2, 1, ENC_BIG_ENDIAN
);
448 if(cur_profile
&0x01){
449 proto_item_append_text(it
, " [CURRENT PROFILE]");
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
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
461 proto_tree_add_item (tree
, hf_scsi_mmc_feature_cdread_c2flag
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
462 proto_tree_add_item (tree
, hf_scsi_mmc_feature_cdread_cdtext
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
464 case 0x0021: /* incremental streaming writeable */
465 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dts
, tvb_v
, offset_v
, 2, ENC_BIG_ENDIAN
);
467 proto_tree_add_item (tree
, hf_scsi_mmc_feature_isw_buf
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
469 num_linksize
=tvb_get_guint8(tvb_v
, offset_v
);
470 proto_tree_add_item (tree
, hf_scsi_mmc_feature_isw_num_linksize
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
472 while(num_linksize
--){
473 proto_tree_add_item (tree
, hf_scsi_mmc_feature_isw_linksize
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
477 case 0x002a: /* dvd-rw */
478 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdrw_write
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
479 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdrw_quickstart
, tvb_v
, offset_v
, 2, ENC_BIG_ENDIAN
);
480 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdrw_closeonly
, tvb_v
, offset_v
, 2, ENC_BIG_ENDIAN
);
482 case 0x002b: /* dvd-r */
483 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdr_write
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
485 case 0x002d: /* track at once */
486 proto_tree_add_item (tree
, hf_scsi_mmc_feature_tao_buf
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
487 proto_tree_add_item (tree
, hf_scsi_mmc_feature_tao_rwraw
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
488 proto_tree_add_item (tree
, hf_scsi_mmc_feature_tao_rwpack
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
489 proto_tree_add_item (tree
, hf_scsi_mmc_feature_tao_testwrite
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
490 proto_tree_add_item (tree
, hf_scsi_mmc_feature_tao_cdrw
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
491 proto_tree_add_item (tree
, hf_scsi_mmc_feature_tao_rwsubcode
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
492 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dts
, tvb_v
, offset_v
+2, 2, ENC_BIG_ENDIAN
);
494 case 0x002e: /* session at once */
495 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_buf
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
496 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_sao
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
497 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_rawms
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
498 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_raw
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
499 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_testwrite
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
500 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_cdrw
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
501 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_rw
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
502 proto_tree_add_item (tree
, hf_scsi_mmc_feature_sao_mcsl
, tvb_v
, offset_v
+1, 3, ENC_BIG_ENDIAN
);
504 case 0x002f: /* dvd-r/-rw*/
505 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdr_buf
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
506 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdr_testwrite
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
507 proto_tree_add_item (tree
, hf_scsi_mmc_feature_dvdr_dvdrw
, tvb_v
, offset_v
, 1, ENC_BIG_ENDIAN
);
509 case 0x0108: /* logical unit serial number */
510 proto_tree_add_item (tree
, hf_scsi_mmc_feature_lun_sn
, tvb_v
, offset_v
, additional_length
, ENC_ASCII
|ENC_NA
);
513 proto_tree_add_text (tree
, tvb_v
, offset_v
, additional_length
,
514 "SCSI/MMC Unknown Feature data");
517 offset_v
=old_offset
+additional_length
;
518 len
-=4+additional_length
;
520 END_TRY_SCSI_CDB_ALLOC_LEN
;
525 static const value_string scsi_q_subchannel_adr_val
[] = {
526 {0x0, "Q-Subchannel mode info not supplied"},
527 {0x1, "Q-Subchannel encodes current position data"},
528 {0x2, "Q-Subchannel encodes media catalog number"},
529 {0x3, "Q-Subchannel encodes ISRC"},
532 static const value_string scsi_q_subchannel_control_val
[] = {
533 {0x0, "2 Audio channels without pre-emphasis (digital copy prohibited)"},
534 {0x2, "2 Audio channels without pre-emphasis (digital copy permitted)"},
535 {0x1, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
536 {0x3, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
537 {0x8, "audio channels without pre-emphasis (digital copy prohibited)"},
538 {0xa, "audio channels without pre-emphasis (digital copy permitted)"},
539 {0x9, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
540 {0xb, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
541 {0x4, "Data track, recorded uninterrupted (digital copy prohibited)"},
542 {0x6, "Data track, recorded uninterrupted (digital copy permitted)"},
543 {0x5, "Data track, recorded incremental (digital copy prohibited)"},
544 {0x7, "Data track, recorded incremental (digital copy permitted)"},
549 dissect_mmc4_readtocpmaatip (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
550 guint offset
, gboolean isreq
, gboolean iscdb
,
551 guint payload_len _U_
, scsi_task_data_t
*cdata
)
557 if (isreq
&& iscdb
) {
558 format
=tvb_get_guint8(tvb
, offset
+1)&0x0f;
559 /* save format so we can decode the response */
560 cdata
->itlq
->flags
=format
;
565 proto_tree_add_item (tree
, hf_scsi_mmc_readtoc_time
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
566 /* save time so we can pick it up in the response */
567 if(tvb_get_guint8(tvb
, offset
)&0x02){
568 cdata
->itlq
->flags
|=0x0100;
572 proto_tree_add_item (tree
, hf_scsi_mmc_readtoc_format
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
576 proto_tree_add_item (tree
, hf_scsi_mmc_track
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
577 /* save track so we can pick it up in the response */
578 cdata
->itlq
->flags
|=0x0200;
581 proto_tree_add_item (tree
, hf_scsi_mmc_session
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
582 /* save session so we can pick it up in the response */
583 cdata
->itlq
->flags
|=0x0400;
587 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+ 6, 2, ENC_BIG_ENDIAN
);
588 cdata
->itlq
->alloc_len
= tvb_get_ntohs(tvb
, offset
+ 6);
590 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
591 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
594 TRY_SCSI_CDB_ALLOC_LEN(pinfo
, tvb
, offset
, cdata
->itlq
->alloc_len
);
595 len
=tvb_get_ntohs(tvb
, offset
);
596 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
597 if(cdata
->itlq
->flags
&0x0200){
598 proto_tree_add_item (tree
, hf_scsi_mmc_first_track
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
599 proto_tree_add_item (tree
, hf_scsi_mmc_readtoc_last_track
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
601 if(cdata
->itlq
->flags
&0x0400){
602 proto_tree_add_item (tree
, hf_scsi_mmc_readtoc_first_session
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
603 proto_tree_add_item (tree
, hf_scsi_mmc_readtoc_last_session
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
607 switch(cdata
->itlq
->flags
&0x000f){
610 proto_tree_add_item (tree
, hf_scsi_mmc_q_subchannel_adr
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
611 proto_tree_add_item (tree
, hf_scsi_mmc_q_subchannel_control
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
612 proto_tree_add_item (tree
, hf_scsi_mmc_track
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
613 if(cdata
->itlq
->flags
&0x0100){
614 proto_tree_add_item (tree
, hf_scsi_mmc_track_start_time
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
616 proto_tree_add_item (tree
, hf_scsi_mmc_track_start_address
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
623 proto_tree_add_text (tree
, tvb
, offset
, len
,
624 "SCSI/MMC Unknown READ TOC Format:0x%04x",cdata
->itlq
->flags
&0x000f);
627 END_TRY_SCSI_CDB_ALLOC_LEN
;
631 static const value_string scsi_disc_info_sols_val
[] = {
632 {0x00, "Empty Session"},
633 {0x01, "Incomplete Session"},
634 {0x02, "Reserved/Damaged Session"},
635 {0x03, "Complete Session"},
639 static const value_string scsi_disc_info_disc_status_val
[] = {
640 {0x00, "Empty Disc"},
641 {0x01, "Incomplete Disc"},
642 {0x02, "Finalized Disc"},
647 static const value_string scsi_disc_info_bgfs_val
[] = {
648 {0x00, "Blank or not CD-RW/DVD-RW"},
649 {0x01, "Background Format started but is not running nor complete"},
650 {0x02, "Background Format in progress"},
651 {0x03, "Background Format has completed"},
655 static const value_string scsi_disc_info_disc_type_val
[] = {
656 {0x00, "CD-DA or CD-ROM Disc"},
658 {0x20, "CD-ROM XA Disc or DDCD"},
664 dissect_mmc4_readdiscinformation (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
665 guint offset
, gboolean isreq
, gboolean iscdb
,
666 guint payload_len _U_
, scsi_task_data_t
*cdata
)
669 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+ 6, 2, ENC_BIG_ENDIAN
);
670 if (cdata
&& cdata
->itlq
) {
671 cdata
->itlq
->alloc_len
= tvb_get_ntohs(tvb
, offset
+ 6);
673 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
674 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
677 static const int *disk_fields
[] = {
678 &hf_scsi_mmc_disc_info_erasable
,
679 &hf_scsi_mmc_disc_info_state_of_last_session
,
680 &hf_scsi_mmc_disc_info_disk_status
,
683 static const int *format_fields
[] = {
684 &hf_scsi_mmc_disc_info_did_v
,
685 &hf_scsi_mmc_disc_info_dbc_v
,
686 &hf_scsi_mmc_disc_info_uru
,
687 &hf_scsi_mmc_disc_info_dac_v
,
688 &hf_scsi_mmc_disc_info_dbit
,
689 &hf_scsi_mmc_disc_info_bgfs
,
693 TRY_SCSI_CDB_ALLOC_LEN(pinfo
, tvb
, offset
, (cdata
&& cdata
->itlq
) ? cdata
->itlq
->alloc_len
: 0);
694 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
696 proto_tree_add_bitmask(tree
, tvb
, offset
+ 2, hf_scsi_mmc_disk_flags
,
697 ett_scsi_disk_flags
, disk_fields
, ENC_BIG_ENDIAN
);
699 proto_tree_add_item (tree
, hf_scsi_mmc_first_track
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
701 /* number of session offset+4 and offset+9 */
702 proto_tree_add_uint (tree
, hf_scsi_mmc_disc_info_number_of_sessions
, tvb
, 4, 1, (tvb_get_guint8(tvb
, offset
+9)<<8)|tvb_get_guint8(tvb
, offset
+4));
704 /* first track in last session offset+5 and offset+10 */
705 proto_tree_add_uint (tree
, hf_scsi_mmc_disc_info_first_track_in_last_session
, tvb
, 5, 1, (tvb_get_guint8(tvb
, offset
+10)<<8)|tvb_get_guint8(tvb
, offset
+5));
707 /* last track in last session offset+6 and offset+11 */
708 proto_tree_add_uint (tree
, hf_scsi_mmc_disc_info_last_track_in_last_session
, tvb
, 6, 1, (tvb_get_guint8(tvb
, offset
+11)<<8)|tvb_get_guint8(tvb
, offset
+6));
710 proto_tree_add_bitmask(tree
, tvb
, offset
+ 7, hf_scsi_mmc_format_flags
,
711 ett_scsi_format_flags
, format_fields
, ENC_BIG_ENDIAN
);
713 proto_tree_add_item (tree
, hf_scsi_mmc_disc_info_disc_type
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
715 proto_tree_add_item (tree
, hf_scsi_mmc_disc_info_disc_identification
, tvb
, offset
+12, 4, ENC_BIG_ENDIAN
);
717 proto_tree_add_item (tree
, hf_scsi_mmc_disc_info_last_session_lead_in_start_address
, tvb
, offset
+16, 4, ENC_BIG_ENDIAN
);
719 proto_tree_add_item (tree
, hf_scsi_mmc_disc_info_last_possible_lead_out_start_address
, tvb
, offset
+20, 4, ENC_BIG_ENDIAN
);
721 proto_tree_add_item (tree
, hf_scsi_mmc_disc_info_disc_bar_code
, tvb
, offset
+24, 8, ENC_BIG_ENDIAN
);
722 /* XXX should add OPC table decoding here ... */
723 END_TRY_SCSI_CDB_ALLOC_LEN
;
728 dissect_mmc4_readdiscstructure (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
729 guint offset
, gboolean isreq
, gboolean iscdb
,
730 guint payload_len _U_
, scsi_task_data_t
*cdata
)
735 if (tree
&& isreq
&& iscdb
) {
736 proto_tree_add_text (tree
, tvb
, offset
+1, 4,
738 tvb_get_ntohl (tvb
, offset
+1));
739 proto_tree_add_text (tree
, tvb
, offset
+5, 1,
741 tvb_get_guint8 (tvb
, offset
+5));
743 cdata
->itlq
->flags
=tvb_get_guint8 (tvb
, offset
+6);
744 proto_tree_add_uint (tree
, hf_scsi_mmc_read_dvd_format
, tvb
, offset
+6, 1, cdata
->itlq
->flags
);
746 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+7, 2, ENC_BIG_ENDIAN
);
748 flags
= tvb_get_guint8 (tvb
, offset
+9);
749 proto_tree_add_text (tree
, tvb
, offset
+9, 1,
753 proto_tree_add_bitmask(tree
, tvb
, offset
+10, hf_scsi_control
,
754 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
756 if(tree
&& (!isreq
)) {
759 ti
= proto_tree_add_uint (tree
, hf_scsi_mmc_read_dvd_format
, tvb
, 0, 0, cdata
->itlq
->flags
);
760 PROTO_ITEM_SET_GENERATED(ti
);
762 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
766 switch(cdata
->itlq
->flags
) {
767 case 0x00: /* Physical Format information */
768 case 0x11: /* ADIP Information */
771 proto_tree_add_item (tree
, hf_scsi_mmc_disc_book_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
772 proto_tree_add_item (tree
, hf_scsi_mmc_disc_book_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
775 proto_tree_add_item (tree
, hf_scsi_mmc_disc_size_size
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
776 proto_tree_add_item (tree
, hf_scsi_mmc_disc_size_rate
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
778 /* number of layers */
779 proto_tree_add_item (tree
, hf_scsi_mmc_disc_num_layers
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
782 proto_tree_add_item (tree
, hf_scsi_mmc_disc_track_path
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
785 proto_tree_add_item (tree
, hf_scsi_mmc_disc_structure_layer
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
787 /* recording density */
788 proto_tree_add_item (tree
, hf_scsi_mmc_disc_density_length
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
789 proto_tree_add_item (tree
, hf_scsi_mmc_disc_density_pitch
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
791 /* first physical sector of data zone */
792 proto_tree_add_item (tree
, hf_scsi_mmc_disc_first_physical
, tvb
, offset
+5, 3, ENC_BIG_ENDIAN
);
794 /* last physical sector of data zone */
795 proto_tree_add_item (tree
, hf_scsi_mmc_disc_last_physical
, tvb
, offset
+9, 3, ENC_BIG_ENDIAN
);
797 if (cdata
->itlq
->flags
== 0x00) {
798 /* last physical sector of layer 0 */
799 proto_tree_add_item (tree
, hf_scsi_mmc_disc_last_physical_layer0
, tvb
, offset
+13, 3, ENC_BIG_ENDIAN
);
802 /* extended format info */
803 proto_tree_add_item (tree
, hf_scsi_mmc_disc_extended_format_info
, tvb
, offset
+16, 1, ENC_BIG_ENDIAN
);
805 /* disk application code */
806 proto_tree_add_item (tree
, hf_scsi_mmc_disc_application_code
, tvb
, offset
+17, 1, ENC_BIG_ENDIAN
);
808 /* extended information blocks */
809 proto_tree_add_item (tree
, hf_scsi_mmc_adip_eib5
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
810 proto_tree_add_item (tree
, hf_scsi_mmc_adip_eib4
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
811 proto_tree_add_item (tree
, hf_scsi_mmc_adip_eib3
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
812 proto_tree_add_item (tree
, hf_scsi_mmc_adip_eib2
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
813 proto_tree_add_item (tree
, hf_scsi_mmc_adip_eib1
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
814 proto_tree_add_item (tree
, hf_scsi_mmc_adip_eib0
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
816 /* disk manufacturer id */
817 proto_tree_add_item (tree
, hf_scsi_mmc_adip_device_manuf_id
, tvb
, offset
+19, 8, ENC_ASCII
|ENC_NA
);
820 proto_tree_add_item (tree
, hf_scsi_mmc_adip_media_type_id
, tvb
, offset
+27, 3, ENC_ASCII
|ENC_NA
);
822 /* product revision number */
823 proto_tree_add_item (tree
, hf_scsi_mmc_adip_product_revision_number
, tvb
, offset
+30, 1, ENC_BIG_ENDIAN
);
825 /* number of bytes of physical info */
826 proto_tree_add_item (tree
, hf_scsi_mmc_adip_number_of_physical_info
, tvb
, offset
+31, 1, ENC_BIG_ENDIAN
);
831 ti
= proto_tree_add_text (tree
, tvb
, 0, 0,
832 "SCSI/MMC Unknown Read DVD Format:0x%02x",
834 PROTO_ITEM_SET_GENERATED(ti
);
840 dissect_mmc4_getperformance (tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
842 guint offset
, gboolean isreq
, gboolean iscdb
,
843 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
848 if (tree
&& isreq
&& iscdb
) {
849 flags
= tvb_get_guint8 (tvb
, offset
);
850 proto_tree_add_text (tree
, tvb
, offset
, 1,
853 proto_tree_add_text (tree
, tvb
, offset
+1, 4,
855 tvb_get_ntohl (tvb
, offset
+1));
856 proto_tree_add_text (tree
, tvb
, offset
+7, 2,
857 "Maximum Number of Descriptors: %u",
858 tvb_get_ntohs (tvb
, offset
+7));
860 flags
= tvb_get_guint8 (tvb
, offset
+9);
861 proto_tree_add_text (tree
, tvb
, offset
+9, 1,
865 proto_tree_add_bitmask(tree
, tvb
, offset
+10, hf_scsi_control
,
866 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
871 dissect_mmc4_synchronizecache (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
872 guint offset
, gboolean isreq
, gboolean iscdb
,
873 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
876 if (tree
&& isreq
&& iscdb
) {
877 proto_tree_add_item (tree
, hf_scsi_mmc_synccache_immed
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
878 proto_tree_add_item (tree
, hf_scsi_mmc_synccache_reladr
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
879 proto_tree_add_item (tree
, hf_scsi_mmc_lba
, tvb
, offset
+1, 4, ENC_BIG_ENDIAN
);
880 proto_tree_add_item (tree
, hf_scsi_mmc_num_blocks
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
881 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
882 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
886 static const value_string scsi_key_class_val
[] = {
887 {0x00, "DVD CSS/CPPM or CPRM"},
888 {0x01, "ReWriteable Security Service - A"},
891 static const value_string scsi_key_format_val
[] = {
892 {0x00, "AGID for CSS/CPPM"},
893 {0x01, "Challenge Key"},
896 {0x05, "Authentication Success Flag"},
898 {0x11, "AGID for CPRM"},
902 static const value_string scsi_report_key_type_code_val
[] = {
905 {0x02, "LAST CHANCE"},
909 static const value_string scsi_report_key_rpc_scheme_val
[] = {
910 {0x00, "Unknown (RPC not enforced)"},
911 {0x01, "RPC Phase II"},
916 dissect_mmc4_reportkey (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
917 guint offset
, gboolean isreq
, gboolean iscdb
,
918 guint payload_len _U_
, scsi_task_data_t
*cdata
)
921 guint8 agid
, key_format
, key_class
;
924 if (tree
&& isreq
&& iscdb
) {
925 proto_tree_add_item (tree
, hf_scsi_mmc_lba
, tvb
, offset
+1,
927 key_class
=tvb_get_guint8(tvb
, offset
+6);
928 proto_tree_add_item (tree
, hf_scsi_mmc_key_class
, tvb
, offset
+6,
930 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+7, 2, ENC_BIG_ENDIAN
);
932 agid
=tvb_get_guint8(tvb
, offset
+9)&0xc0;
933 key_format
=tvb_get_guint8(tvb
, offset
+9)&0x3f;
939 /* agid is only valid for some formats */
940 proto_tree_add_uint (tree
, hf_scsi_mmc_agid
, tvb
, offset
+9, 1, agid
);
943 proto_tree_add_uint (tree
, hf_scsi_mmc_key_format
, tvb
, offset
+9, 1, key_format
);
944 /* save key_class/key_format so we can decode the response */
945 cdata
->itlq
->flags
=(key_format
<<8)|key_class
;
947 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
948 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
950 if(tree
&& (!isreq
)) {
951 switch(cdata
->itlq
->flags
){
952 case 0x0800: /* format:RPC State class:00 */
953 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
954 proto_tree_add_item (tree
, hf_scsi_mmc_report_key_type_code
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
955 proto_tree_add_item (tree
, hf_scsi_mmc_report_key_vendor_resets
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
956 proto_tree_add_item (tree
, hf_scsi_mmc_report_key_user_changes
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
957 proto_tree_add_item (tree
, hf_scsi_mmc_report_key_region_mask
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
958 proto_tree_add_item (tree
, hf_scsi_mmc_report_key_rpc_scheme
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
961 ti
= proto_tree_add_text (tree
, tvb
, 0, 0,
962 "SCSI/MMC Unknown Format:0x%02x/Class:0x%02x combination",
963 cdata
->itlq
->flags
>>8,cdata
->itlq
->flags
&0xff);
964 PROTO_ITEM_SET_GENERATED(ti
);
970 static const value_string scsi_rti_address_type_val
[] = {
971 {0x00, "Logical Block Address"},
972 {0x01, "Logical Track Number"},
973 {0x02, "Session Number"},
978 dissect_mmc4_readtrackinformation (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
979 guint offset
, gboolean isreq
, gboolean iscdb
,
980 guint payload_len _U_
, scsi_task_data_t
*cdata
)
985 if (isreq
&& iscdb
) {
986 addresstype
=tvb_get_guint8(tvb
, offset
)&0x03;
987 proto_tree_add_item (tree
, hf_scsi_mmc_rti_address_type
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
989 case 0x00: /* logical block address */
990 proto_tree_add_item (tree
, hf_scsi_mmc_lba
, tvb
, offset
+1,
993 case 0x01: /* logical track number */
994 proto_tree_add_item (tree
, hf_scsi_mmc_track
, tvb
, offset
+1,
997 case 0x02: /* logical session number */
998 proto_tree_add_item (tree
, hf_scsi_mmc_session
, tvb
, offset
+1,
1003 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+ 6, 2, ENC_BIG_ENDIAN
);
1005 cdata
->itlq
->alloc_len
= tvb_get_ntohs(tvb
, offset
+ 6);
1008 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
1009 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1012 static const int *track_fields
[] = {
1013 &hf_scsi_mmc_rti_damage
,
1014 &hf_scsi_mmc_rti_copy
,
1015 &hf_scsi_mmc_rti_track_mode
,
1018 static const int *data_fields
[] = {
1019 &hf_scsi_mmc_rti_rt
,
1020 &hf_scsi_mmc_rti_blank
,
1021 &hf_scsi_mmc_rti_packet
,
1022 &hf_scsi_mmc_rti_fp
,
1023 &hf_scsi_mmc_rti_data_mode
,
1028 TRY_SCSI_CDB_ALLOC_LEN(pinfo
, tvb
, offset
, cdata
->itlq
->alloc_len
);
1029 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
1030 /* track offset+2 and offset+32, only use the high byte if we have it */
1031 if (tvb_reported_length(tvb
) < 33) {
1032 proto_tree_add_uint (tree
, hf_scsi_mmc_track
, tvb
, 2, 1, tvb_get_guint8(tvb
, offset
+ 2));
1034 proto_tree_add_uint (tree
, hf_scsi_mmc_track
, tvb
, 2, 1, (tvb_get_guint8(tvb
, offset
+ 32) << 8) | tvb_get_guint8(tvb
, offset
+ 2));
1037 /* session offset+3 and offset+33 */
1038 if (tvb_reported_length(tvb
) < 34) {
1039 proto_tree_add_uint (tree
, hf_scsi_mmc_session
, tvb
, 3, 1, tvb_get_guint8(tvb
, offset
+ 3));
1041 proto_tree_add_uint (tree
, hf_scsi_mmc_session
, tvb
, 3, 1, (tvb_get_guint8(tvb
, offset
+ 33) << 8) | tvb_get_guint8(tvb
, offset
+ 3));
1044 proto_tree_add_bitmask(tree
, tvb
, offset
+ 5, hf_scsi_mmc_track_flags
,
1045 ett_scsi_track_flags
, track_fields
, ENC_BIG_ENDIAN
);
1047 proto_tree_add_bitmask(tree
, tvb
, offset
+ 6, hf_scsi_mmc_data_flags
,
1048 ett_scsi_data_flags
, data_fields
, ENC_BIG_ENDIAN
);
1050 proto_tree_add_item (tree
, hf_scsi_mmc_rti_lra_v
, tvb
, 7, 1, ENC_BIG_ENDIAN
);
1051 proto_tree_add_item (tree
, hf_scsi_mmc_rti_nwa_v
, tvb
, 7, 1, ENC_BIG_ENDIAN
);
1053 proto_tree_add_item (tree
, hf_scsi_mmc_track_start_address
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
1055 proto_tree_add_item (tree
, hf_scsi_mmc_next_writable_address
, tvb
, offset
+12, 4, ENC_BIG_ENDIAN
);
1057 proto_tree_add_item (tree
, hf_scsi_mmc_free_blocks
, tvb
, offset
+16, 4, ENC_BIG_ENDIAN
);
1059 proto_tree_add_item (tree
, hf_scsi_mmc_fixed_packet_size
, tvb
, offset
+20, 4, ENC_BIG_ENDIAN
);
1061 proto_tree_add_item (tree
, hf_scsi_mmc_track_size
, tvb
, offset
+24, 4, ENC_BIG_ENDIAN
);
1063 proto_tree_add_item (tree
, hf_scsi_mmc_last_recorded_address
, tvb
, offset
+28, 4, ENC_BIG_ENDIAN
);
1065 proto_tree_add_item (tree
, hf_scsi_mmc_read_compatibility_lba
, tvb
, offset
+36, 4, ENC_BIG_ENDIAN
);
1066 END_TRY_SCSI_CDB_ALLOC_LEN
;
1071 dissect_mmc4_geteventstatusnotification (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1072 guint offset
, gboolean isreq
, gboolean iscdb
,
1073 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
1076 if (tree
&& isreq
&& iscdb
) {
1077 static const int *notification_fields
[] = {
1078 &hf_scsi_mmc_gesn_device_busy
,
1079 &hf_scsi_mmc_gesn_multi_initiator
,
1080 &hf_scsi_mmc_gesn_media
,
1081 &hf_scsi_mmc_gesn_external_request
,
1082 &hf_scsi_mmc_gesn_power_mgmt
,
1083 &hf_scsi_mmc_gesn_operational_change
,
1087 proto_tree_add_item (tree
, hf_scsi_mmc_gesn_polled
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1089 proto_tree_add_bitmask(tree
, tvb
, offset
+ 3, hf_scsi_mmc_notification_flags
,
1090 ett_scsi_notifications
, notification_fields
, ENC_BIG_ENDIAN
);
1092 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1094 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
1095 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1101 dissect_mmc4_reservetrack (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1102 guint offset
, gboolean isreq
, gboolean iscdb
,
1103 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
1106 if (tree
&& isreq
&& iscdb
) {
1107 proto_tree_add_item (tree
, hf_scsi_mmc_reservation_size
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1108 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
1109 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1114 static const value_string scsi_closetrack_func_val
[] = {
1115 {0, "Stop background format"},
1117 {2, "Close last incomplete session"},
1118 {3, "Special case close session"},
1119 {5, "Close last session and finalize disk, special case"},
1120 {6, "Close last session and finalize disk"},
1125 dissect_mmc4_close_track (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1126 guint offset
, gboolean isreq
, gboolean iscdb
,
1127 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
1130 if (tree
&& isreq
&& iscdb
) {
1132 proto_tree_add_item (tree
, hf_scsi_mmc_closetrack_immed
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1135 /* close function */
1136 proto_tree_add_item (tree
, hf_scsi_mmc_closetrack_func
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1143 proto_tree_add_item (tree
, hf_scsi_mmc_track
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1149 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_control
,
1150 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1156 dissect_mmc4_readbuffercapacity (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1157 guint offset
, gboolean isreq
, gboolean iscdb
,
1158 guint payload_len _U_
, scsi_task_data_t
*cdata
)
1161 if (tree
&& isreq
&& iscdb
) {
1162 cdata
->itlq
->flags
=0;
1163 proto_tree_add_item (tree
, hf_scsi_mmc_rbc_block
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1164 if(tvb_get_guint8(tvb
, offset
)&0x01){
1165 cdata
->itlq
->flags
=1;
1168 proto_tree_add_item (tree
, hf_scsi_alloclen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1169 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
1170 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1172 if(tree
&& (!isreq
)) {
1173 proto_tree_add_item (tree
, hf_scsi_mmc_data_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1174 if(cdata
->itlq
->flags
){
1175 proto_tree_add_item (tree
, hf_scsi_mmc_rbc_lob_blocks
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1176 proto_tree_add_item (tree
, hf_scsi_mmc_rbc_alob_blocks
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
1178 proto_tree_add_item (tree
, hf_scsi_mmc_rbc_lob_bytes
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1179 proto_tree_add_item (tree
, hf_scsi_mmc_rbc_alob_bytes
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
1185 static const value_string scsi_setcdspeed_rc_val
[] = {
1186 {0x00, "CLV and none-pure CAV"},
1194 dissect_mmc4_setcdspeed (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1195 guint offset
, gboolean isreq
, gboolean iscdb
,
1196 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
1199 if (tree
&& isreq
&& iscdb
) {
1200 proto_tree_add_item (tree
, hf_scsi_mmc_setcdspeed_rc
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1201 proto_tree_add_text (tree
, tvb
, offset
+1, 2,
1202 "Logical Unit Read Speed(bytes/sec): %u",
1203 tvb_get_ntohs (tvb
, offset
+1));
1204 proto_tree_add_text (tree
, tvb
, offset
+3, 2,
1205 "Logical Unit Write Speed(bytes/sec): %u",
1206 tvb_get_ntohs (tvb
, offset
+3));
1207 proto_tree_add_bitmask(tree
, tvb
, offset
+10, hf_scsi_control
,
1208 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1213 static const value_string scsi_setstreaming_type_val
[] = {
1214 {0x00, "Performance Descriptor"},
1215 {0x05, "DBI cache zone descriptor"},
1220 dissect_mmc4_setstreaming (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
1221 guint offset
, gboolean isreq
, gboolean iscdb
,
1222 guint payload_len _U_
, scsi_task_data_t
*cdata
)
1228 if (tree
&& isreq
&& iscdb
) {
1229 type
=tvb_get_guint8(tvb
, offset
+7);
1230 cdata
->itlq
->flags
=type
;
1231 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_type
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
1232 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_param_len
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
1233 proto_tree_add_bitmask(tree
, tvb
, offset
+10, hf_scsi_control
,
1234 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1236 if(tree
&& isreq
&& (!iscdb
)) {
1237 switch(cdata
->itlq
->flags
){
1238 case 0x00: /* performance descriptor */
1239 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_wrc
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1240 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_rdd
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1241 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_exact
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1242 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_ra
, tvb
, offset
+0, 1, ENC_BIG_ENDIAN
);
1243 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_start_lba
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1244 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_end_lba
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
1245 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_read_size
, tvb
, offset
+12, 4, ENC_BIG_ENDIAN
);
1246 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_read_time
, tvb
, offset
+16, 4, ENC_BIG_ENDIAN
);
1247 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_write_size
, tvb
, offset
+20, 4, ENC_BIG_ENDIAN
);
1248 proto_tree_add_item (tree
, hf_scsi_mmc_setstreaming_write_time
, tvb
, offset
+24, 4, ENC_BIG_ENDIAN
);
1251 ti
= proto_tree_add_text (tree
, tvb
, 0, 0,
1252 "SCSI/MMC Unknown SetStreaming Type:0x%02x",cdata
->itlq
->flags
);
1253 PROTO_ITEM_SET_GENERATED(ti
);
1260 dissect_mmc_preventallowmediaremoval(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
1261 guint offset
, gboolean isreq
, gboolean iscdb
,
1262 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
1264 if (isreq
&& iscdb
) {
1266 static const int *prevent_allow_fields
[] = {
1267 &hf_scsi_mmc_prevent_allow_persistent
,
1268 &hf_scsi_mmc_prevent_allow_prevent
,
1272 proto_tree_add_bitmask(tree
, tvb
, offset
+ 3, hf_scsi_mmc_prevent_allow_flags
,
1273 ett_scsi_prevent_allow
, prevent_allow_fields
, ENC_BIG_ENDIAN
);
1275 flags
= tvb_get_guint8(tvb
, offset
+ 3);
1277 col_append_str(pinfo
->cinfo
, COL_INFO
, " PREVENT");
1279 col_append_str(pinfo
->cinfo
, COL_INFO
, " ALLOW");
1282 col_append_str(pinfo
->cinfo
, COL_INFO
, " (PERSISTENT)");
1285 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
1286 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
1291 #define SCSI_MMC4_READCAPACITY10 0x25
1292 #define SCSI_MMC4_READ10 0x28
1293 #define SCSI_MMC4_WRITE10 0x2a
1294 #define SCSI_MMC4_SYNCHRONIZECACHE 0x35
1295 #define SCSI_MMC4_READTOCPMAATIP 0x43
1296 #define SCSI_MMC4_GETCONFIGURATION 0x46
1297 #define SCSI_MMC4_GETEVENTSTATUSNOTIFY 0x4a
1298 #define SCSI_MMC4_READDISCINFORMATION 0x51
1299 #define SCSI_MMC4_READTRACKINFORMATION 0x52
1300 #define SCSI_MMC4_RESERVETRACK 0x53
1301 #define SCSI_MMC4_CLOSETRACK 0x5b
1302 #define SCSI_MMC4_READBUFFERCAPACITY 0x5c
1303 #define SCSI_MMC4_REPORTKEY 0xa4
1304 #define SCSI_MMC4_READ12 0xa8
1305 #define SCSI_MMC4_WRITE12 0xaa
1306 #define SCSI_MMC4_GETPERFORMANCE 0xac
1307 #define SCSI_MMC4_READDISCSTRUCTURE 0xad
1308 #define SCSI_MMC4_SETSTREAMING 0xb6
1309 #define SCSI_MMC4_SETCDSPEED 0xbb
1310 const value_string scsi_mmc_vals
[] = {
1311 {SCSI_MMC4_GETCONFIGURATION
, "Get Configuration"},
1312 {SCSI_MMC4_GETEVENTSTATUSNOTIFY
, "Get Event Status Notification"},
1313 {SCSI_MMC4_GETPERFORMANCE
, "Get Performance"},
1314 {SCSI_SPC_INQUIRY
, "Inquiry"},
1315 {SCSI_SPC_MGMT_PROTOCOL_IN
, "Mgmt Protocol In"},
1316 {SCSI_SPC_MODESELECT10
, "Mode Select(10)"},
1317 {SCSI_SPC_MODESENSE10
, "Mode Sense(10)"},
1318 {SCSI_SPC_MODESENSE6
, "Mode Sense(6)"},
1319 {SCSI_SPC_PREVMEDREMOVAL
, "Prevent/Allow Medium Removal"},
1320 {SCSI_MMC4_READ10
, "Read(10)"},
1321 {SCSI_MMC4_READ12
, "Read(12)"},
1322 {SCSI_MMC4_CLOSETRACK
, "Close Track"},
1323 {SCSI_MMC4_READBUFFERCAPACITY
, "Read Buffer Capacity"},
1324 {SCSI_MMC4_READCAPACITY10
, "Read Capacity(10)"},
1325 {SCSI_MMC4_READDISCINFORMATION
, "Read Disc Information"},
1326 {SCSI_MMC4_READDISCSTRUCTURE
, "Read DISC Structure"},
1327 {SCSI_MMC4_READTOCPMAATIP
, "Read TOC/PMA/ATIP"},
1328 {SCSI_MMC4_READTRACKINFORMATION
, "Read Track Information"},
1329 {SCSI_MMC4_REPORTKEY
, "Report Key"},
1330 {SCSI_SPC_REPORTLUNS
, "Report LUNs"},
1331 {SCSI_SPC_REQSENSE
, "Request Sense"},
1332 {SCSI_MMC4_RESERVETRACK
, "Reserve Track"},
1333 {SCSI_MMC4_SETCDSPEED
, "Set CD Speed"},
1334 {SCSI_MMC4_SETSTREAMING
, "Set Streaming"},
1335 {SCSI_SBC_STARTSTOPUNIT
, "Start Stop Unit"},
1336 {SCSI_MMC4_SYNCHRONIZECACHE
, "Synchronize Cache"},
1337 {SCSI_SPC_TESTUNITRDY
, "Test Unit Ready"},
1338 {SCSI_MMC4_WRITE10
, "Write(10)"},
1339 {SCSI_MMC4_WRITE12
, "Write(12)"},
1340 {SCSI_SPC_WRITEBUFFER
, "Write Buffer"},
1344 const value_string scsi_track_mode_vals
[] = {
1345 {0x00 , "2 audio channels without pre-emphasis, digital copy prohibited"},
1346 {0x01 , "2 audio channels with pre-emphasis of 50/15 us, digital copy prohibited"},
1347 {0x04 , "Data track, recorded uninterrupted, digital copy prohibited"},
1348 {0x05 , "Data track, recorded incremental, digital copy prohibited"},
1349 {0x08 , "audio channels without pre-emphasis, digital copy prohibited"},
1350 {0x09 , "audio channels with pre-emphasis of 50/15 us"},
1351 {0x02 , "2 audio channels without pre-emphasis, digital copy permitted"},
1352 {0x03 , "2 audio channels with pre-emphasis of 50/15 us, digital copy permitted"},
1353 {0x06 , "Data track, recorded uninterrupted, digital copy permitted"},
1354 {0x07 , "Data track, recorded incremental, digital copy permitted"},
1355 {0x0a , "audio channels without pre-emphasis, digital copy permitted"},
1356 {0x0b , "audio channels with pre-emphasis of 50/15 us, digital copy permitted"},
1360 scsi_cdb_table_t scsi_mmc_table
[256] = {
1361 /*SPC 0x00*/{dissect_spc_testunitready
},
1364 /*SPC 0x03*/{dissect_spc_requestsense
},
1379 /*SPC 0x12*/{dissect_spc_inquiry
},
1388 /*MMC 0x1b*/{dissect_sbc_startstopunit
},
1391 /*MMC 0x1e*/{dissect_mmc_preventallowmediaremoval
},
1398 /*MMC 0x25*/{dissect_sbc_readcapacity10
},
1401 /*MMC 0x28*/{dissect_sbc_read10
},
1403 /*MMC 0x2a*/{dissect_sbc_write10
},
1414 /*MMC 0x35*/{dissect_mmc4_synchronizecache
},
1420 /*SPC 0x3b*/{dissect_spc_writebuffer
},
1428 /*MMC 0x43*/{dissect_mmc4_readtocpmaatip
},
1431 /*MMC 0x46*/{dissect_mmc4_getconfiguration
},
1435 /*MMC 0x4a*/{dissect_mmc4_geteventstatusnotification
},
1442 /*MMC 0x51*/{dissect_mmc4_readdiscinformation
},
1443 /*MMC 0x52*/{dissect_mmc4_readtrackinformation
},
1444 /*MMC 0x53*/{dissect_mmc4_reservetrack
},
1446 /*SPC 0x55*/{dissect_spc_modeselect10
},
1451 /*SPC 0x5a*/{dissect_spc_modesense10
},
1452 /*MMC 0x5b*/{dissect_mmc4_close_track
},
1453 /*MMC 0x5c*/{dissect_mmc4_readbuffercapacity
},
1521 /*SPC 0xa0*/{dissect_spc_reportluns
},
1524 /*SPC 0xa3*/{dissect_spc_mgmt_protocol_in
},
1525 /*MMC 0xa4*/{dissect_mmc4_reportkey
},
1529 /*MMC 0xa8*/{dissect_sbc_read12
},
1531 /*MMC 0xaa*/{dissect_sbc_write12
},
1533 /*MMC 0xac*/{dissect_mmc4_getperformance
},
1534 /*MMC 0xad*/{dissect_mmc4_readdiscstructure
},
1543 /*MMC 0xb6*/{dissect_mmc4_setstreaming
},
1548 /*MMC 0xbb*/{dissect_mmc4_setcdspeed
},
1621 proto_register_scsi_mmc(void)
1623 static hf_register_info hf
[] = {
1624 { &hf_scsi_mmc_opcode
,
1625 {"MMC Opcode", "scsi_mmc.opcode", FT_UINT8
, BASE_HEX
,
1626 VALS (scsi_mmc_vals
), 0x0, NULL
, HFILL
}},
1627 { &hf_scsi_mmc_setstreaming_type
,
1628 {"Type", "scsi_mmc.setstreaming.type", FT_UINT8
, BASE_DEC
,
1629 VALS(scsi_setstreaming_type_val
), 0, NULL
, HFILL
}},
1630 { &hf_scsi_mmc_setstreaming_param_len
,
1631 {"Parameter Length", "scsi_mmc.setstreaming.param_len", FT_UINT16
, BASE_DEC
,
1632 NULL
, 0, NULL
, HFILL
}},
1633 { &hf_scsi_mmc_setstreaming_wrc
,
1634 {"WRC", "scsi_mmc.setstreaming.wrc", FT_UINT8
, BASE_HEX
,
1635 NULL
, 0x18, NULL
, HFILL
}},
1636 { &hf_scsi_mmc_setstreaming_rdd
,
1637 {"RDD", "scsi_mmc.setstreaming.rdd", FT_BOOLEAN
, 8,
1638 NULL
, 0x04, NULL
, HFILL
}},
1639 { &hf_scsi_mmc_setstreaming_exact
,
1640 {"Exact", "scsi_mmc.setstreaming.exact", FT_BOOLEAN
, 8,
1641 NULL
, 0x02, NULL
, HFILL
}},
1642 { &hf_scsi_mmc_setstreaming_ra
,
1643 {"RA", "scsi_mmc.setstreaming.ra", FT_BOOLEAN
, 8,
1644 NULL
, 0x01, NULL
, HFILL
}},
1645 { &hf_scsi_mmc_setstreaming_start_lba
,
1646 {"Start LBA", "scsi_mmc.setstreaming.start_lbs", FT_UINT32
, BASE_DEC
,
1647 NULL
, 0, NULL
, HFILL
}},
1648 { &hf_scsi_mmc_setstreaming_end_lba
,
1649 {"End LBA", "scsi_mmc.setstreaming.end_lba", FT_UINT32
, BASE_DEC
,
1650 NULL
, 0, NULL
, HFILL
}},
1651 { &hf_scsi_mmc_setstreaming_read_size
,
1652 {"Read Size", "scsi_mmc.setstreaming.read_size", FT_UINT32
, BASE_DEC
,
1653 NULL
, 0, NULL
, HFILL
}},
1654 { &hf_scsi_mmc_setstreaming_read_time
,
1655 {"Read Time", "scsi_mmc.setstreaming.read_time", FT_UINT32
, BASE_DEC
,
1656 NULL
, 0, NULL
, HFILL
}},
1657 { &hf_scsi_mmc_setstreaming_write_size
,
1658 {"Write Size", "scsi_mmc.setstreaming.write_size", FT_UINT32
, BASE_DEC
,
1659 NULL
, 0, NULL
, HFILL
}},
1660 { &hf_scsi_mmc_setstreaming_write_time
,
1661 {"Write Time", "scsi_mmc.setstreaming.write_time", FT_UINT32
, BASE_DEC
,
1662 NULL
, 0, NULL
, HFILL
}},
1663 { &hf_scsi_mmc_setcdspeed_rc
,
1664 {"Rotational Control", "scsi_mmc.setcdspeed.rc", FT_UINT8
, BASE_HEX
,
1665 VALS(scsi_setcdspeed_rc_val
), 0x03, NULL
, HFILL
}},
1666 { &hf_scsi_mmc_rbc_block
,
1667 {"BLOCK", "scsi_mmc.rbc.block", FT_BOOLEAN
, 8,
1668 NULL
, 0x01, NULL
, HFILL
}},
1669 { &hf_scsi_mmc_rbc_lob_blocks
,
1670 {"Buffer Len (blocks)", "scsi_mmc.rbc.lob_blocks", FT_UINT32
, BASE_DEC
,
1671 NULL
, 0, NULL
, HFILL
}},
1672 { &hf_scsi_mmc_rbc_alob_blocks
,
1673 {"Available Buffer Len (blocks)", "scsi_mmc.rbc.alob_blocks", FT_UINT32
, BASE_DEC
,
1674 NULL
, 0, NULL
, HFILL
}},
1675 { &hf_scsi_mmc_rbc_lob_bytes
,
1676 {"Buffer Len (bytes)", "scsi_mmc.rbc.lob_bytes", FT_UINT32
, BASE_DEC
,
1677 NULL
, 0, NULL
, HFILL
}},
1678 { &hf_scsi_mmc_rbc_alob_bytes
,
1679 {"Available Buffer Len (bytes)", "scsi_mmc.rbc.alob_bytes", FT_UINT32
, BASE_DEC
,
1680 NULL
, 0, NULL
, HFILL
}},
1681 { &hf_scsi_mmc_rti_address_type
,
1682 {"Address Type", "scsi_mmc.rti.address_type", FT_UINT8
, BASE_HEX
,
1683 VALS(scsi_rti_address_type_val
), 0x03, NULL
, HFILL
}},
1684 { &hf_scsi_mmc_rti_damage
,
1685 {"Damage", "scsi_mmc.rti.damage", FT_BOOLEAN
, 8,
1686 NULL
, 0x20, NULL
, HFILL
}},
1687 { &hf_scsi_mmc_rti_copy
,
1688 {"Copy", "scsi_mmc.rti.copy", FT_BOOLEAN
, 8,
1689 NULL
, 0x10, NULL
, HFILL
}},
1690 { &hf_scsi_mmc_rti_track_mode
,
1691 {"Track Mode", "scsi_mmc.rti.track_mode", FT_UINT8
, BASE_HEX
,
1692 VALS(scsi_track_mode_vals
), 0x0f, NULL
, HFILL
}},
1693 { &hf_scsi_mmc_rti_rt
,
1694 {"RT", "scsi_mmc.rti.rt", FT_BOOLEAN
, 8,
1695 NULL
, 0x80, NULL
, HFILL
}},
1696 { &hf_scsi_mmc_rti_blank
,
1697 {"Blank", "scsi_mmc.rti.blank", FT_BOOLEAN
, 8,
1698 NULL
, 0x40, NULL
, HFILL
}},
1699 { &hf_scsi_mmc_rti_packet
,
1700 {"Packet/Inc", "scsi_mmc.rti.packet", FT_BOOLEAN
, 8,
1701 NULL
, 0x20, NULL
, HFILL
}},
1702 { &hf_scsi_mmc_rti_fp
,
1703 {"FP", "scsi_mmc.rti.fp", FT_BOOLEAN
, 8,
1704 NULL
, 0x10, NULL
, HFILL
}},
1705 { &hf_scsi_mmc_rti_data_mode
,
1706 {"Data Mode", "scsi_mmc.rti.data_mode", FT_UINT8
, BASE_HEX
,
1707 VALS(scsi_data_mode_vals
), 0x0f, NULL
, HFILL
}},
1708 { &hf_scsi_mmc_rti_lra_v
,
1709 {"LRA_V", "scsi_mmc.rti.lra_v", FT_BOOLEAN
, 8,
1710 NULL
, 0x02, NULL
, HFILL
}},
1711 { &hf_scsi_mmc_rti_nwa_v
,
1712 {"NWA_V", "scsi_mmc.rti.nwa_v", FT_BOOLEAN
, 8,
1713 NULL
, 0x01, NULL
, HFILL
}},
1714 { &hf_scsi_mmc_report_key_type_code
,
1715 {"Type Code", "scsi_mmc.report_key.type_code", FT_UINT8
, BASE_HEX
,
1716 VALS(scsi_report_key_type_code_val
), 0xc0, NULL
, HFILL
}},
1717 { &hf_scsi_mmc_report_key_vendor_resets
,
1718 {"Vendor Resets", "scsi_mmc.report_key.vendor_resets", FT_UINT8
, BASE_HEX
,
1719 NULL
, 0x38, NULL
, HFILL
}},
1720 { &hf_scsi_mmc_report_key_user_changes
,
1721 {"User Changes", "scsi_mmc.report_key.user_changes", FT_UINT8
, BASE_HEX
,
1722 NULL
, 0x07, NULL
, HFILL
}},
1723 { &hf_scsi_mmc_report_key_region_mask
,
1724 {"Region Mask", "scsi_mmc.report_key.region_mask", FT_UINT8
, BASE_HEX
,
1725 NULL
, 0xff, NULL
, HFILL
}},
1726 { &hf_scsi_mmc_report_key_rpc_scheme
,
1727 {"RPC Scheme", "scsi_mmc.report_key.rpc_scheme", FT_UINT8
, BASE_HEX
,
1728 VALS(scsi_report_key_rpc_scheme_val
), 0, NULL
, HFILL
}},
1729 { &hf_scsi_mmc_key_class
,
1730 {"Key Class", "scsi_mmc.key_class", FT_UINT8
, BASE_HEX
,
1731 VALS (scsi_key_class_val
), 0x00, NULL
, HFILL
}},
1732 { &hf_scsi_mmc_key_format
,
1733 {"Key Format", "scsi_mmc.key_format", FT_UINT8
, BASE_HEX
,
1734 VALS (scsi_key_format_val
), 0x3f, NULL
, HFILL
}},
1735 { &hf_scsi_mmc_disc_info_erasable
,
1736 {"Erasable", "scsi_mmc.disc_info.erasable", FT_BOOLEAN
, 8,
1737 NULL
, 0x10, NULL
, HFILL
}},
1738 { &hf_scsi_mmc_disc_info_state_of_last_session
,
1739 {"State Of Last Session", "scsi_mmc.disc_info.state_of_last_session", FT_UINT8
, BASE_HEX
,
1740 VALS(scsi_disc_info_sols_val
), 0x0c, NULL
, HFILL
}},
1741 { &hf_scsi_mmc_disc_info_disk_status
,
1742 {"Disk Status", "scsi_mmc.disc_info.disk_status", FT_UINT8
, BASE_HEX
,
1743 VALS(scsi_disc_info_disc_status_val
), 0x03, NULL
, HFILL
}},
1744 { &hf_scsi_mmc_disc_info_number_of_sessions
,
1745 {"Number Of Sessions", "scsi_mmc.disc_info.number_of_sessions", FT_UINT16
, BASE_DEC
,
1746 NULL
, 0, NULL
, HFILL
}},
1747 { &hf_scsi_mmc_disc_info_first_track_in_last_session
,
1748 {"First Track In Last Session", "scsi_mmc.disc_info.first_track_in_last_session", FT_UINT16
, BASE_DEC
,
1749 NULL
, 0, NULL
, HFILL
}},
1750 { &hf_scsi_mmc_disc_info_last_track_in_last_session
,
1751 {"Last Track In Last Session", "scsi_mmc.disc_info.last_track_in_last_session", FT_UINT16
, BASE_DEC
,
1752 NULL
, 0, NULL
, HFILL
}},
1753 { &hf_scsi_mmc_disc_info_did_v
,
1754 {"DID_V", "scsi_mmc.disc_info.did_v", FT_BOOLEAN
, 8,
1755 NULL
, 0x80, NULL
, HFILL
}},
1756 { &hf_scsi_mmc_disc_info_dbc_v
,
1757 {"DBC_V", "scsi_mmc.disc_info.dbc_v", FT_BOOLEAN
, 8,
1758 NULL
, 0x40, NULL
, HFILL
}},
1759 { &hf_scsi_mmc_disc_info_uru
,
1760 {"URU", "scsi_mmc.disc_info.uru", FT_BOOLEAN
, 8,
1761 NULL
, 0x20, NULL
, HFILL
}},
1762 { &hf_scsi_mmc_disc_info_dac_v
,
1763 {"DAC_V", "scsi_mmc.disc_info.dac_v", FT_BOOLEAN
, 8,
1764 NULL
, 0x10, NULL
, HFILL
}},
1765 { &hf_scsi_mmc_disc_info_dbit
,
1766 {"Dbit", "scsi_mmc.disc_info.dbit", FT_BOOLEAN
, 8,
1767 NULL
, 0x04, NULL
, HFILL
}},
1768 { &hf_scsi_mmc_disc_info_bgfs
,
1769 {"BG Format Status", "scsi_mmc.disc_info.bgfs", FT_UINT8
, BASE_HEX
,
1770 VALS(scsi_disc_info_bgfs_val
), 0x03, NULL
, HFILL
}},
1771 { &hf_scsi_mmc_disc_info_disc_type
,
1772 {"Disc Type", "scsi_mmc.disc_info.disc_type", FT_UINT8
, BASE_HEX
,
1773 VALS(scsi_disc_info_disc_type_val
), 0, NULL
, HFILL
}},
1774 { &hf_scsi_mmc_disc_info_disc_identification
,
1775 {"Disc Identification", "scsi_mmc.disc_info.disc_identification", FT_UINT32
, BASE_HEX
,
1776 NULL
, 0, NULL
, HFILL
}},
1777 { &hf_scsi_mmc_disc_info_last_session_lead_in_start_address
,
1778 {"Last Session Lead-In Start Address", "scsi_mmc.disc_info.last_session_lead_in_start_address", FT_UINT32
, BASE_DEC
,
1779 NULL
, 0, NULL
, HFILL
}},
1780 { &hf_scsi_mmc_disc_info_last_possible_lead_out_start_address
,
1781 {"Last Possible Lead-Out Start Address", "scsi_mmc.disc_info.last_possible_lead_out_start_address", FT_UINT32
, BASE_DEC
,
1782 NULL
, 0, NULL
, HFILL
}},
1783 { &hf_scsi_mmc_disc_info_disc_bar_code
,
1784 {"Disc Bar Code", "scsi_mmc.disc_info.disc_bar_code", FT_UINT64
, BASE_HEX
,
1785 NULL
, 0, NULL
, HFILL
}},
1786 { &hf_scsi_mmc_readtoc_time
,
1787 {"Time", "scsi_mmc.readtoc.time", FT_BOOLEAN
, 8,
1788 NULL
, 0x02, NULL
, HFILL
}},
1789 { &hf_scsi_mmc_readtoc_format
,
1790 {"Format", "scsi_mmc.readtoc.format", FT_UINT8
, BASE_HEX
,
1791 NULL
, 0x0f, NULL
, HFILL
}},
1792 { &hf_scsi_mmc_readtoc_first_session
,
1793 {"First Session", "scsi_mmc.readtoc.first_session", FT_UINT8
, BASE_DEC
,
1794 NULL
, 0, NULL
, HFILL
}},
1795 { &hf_scsi_mmc_readtoc_last_track
,
1796 {"Last Track", "scsi_mmc.readtoc.last_track", FT_UINT8
, BASE_DEC
,
1797 NULL
, 0, NULL
, HFILL
}},
1798 { &hf_scsi_mmc_readtoc_last_session
,
1799 {"Last Session", "scsi_mmc.readtoc.last_session", FT_UINT8
, BASE_DEC
,
1800 NULL
, 0, NULL
, HFILL
}},
1801 { &hf_scsi_mmc_q_subchannel_adr
,
1802 {"Q Subchannel ADR", "scsi_mmc.q.subchannel.adr", FT_UINT8
, BASE_HEX
,
1803 VALS(scsi_q_subchannel_adr_val
), 0xf0, NULL
, HFILL
}},
1804 { &hf_scsi_mmc_q_subchannel_control
,
1805 {"Q Subchannel Control", "scsi_mmc.q.subchannel.control", FT_UINT8
, BASE_HEX
,
1806 VALS(scsi_q_subchannel_control_val
), 0x0f, NULL
, HFILL
}},
1807 { &hf_scsi_mmc_agid
,
1808 {"AGID", "scsi_mmc.agid", FT_UINT8
, BASE_HEX
,
1809 NULL
, 0xc0, NULL
, HFILL
}},
1810 { &hf_scsi_mmc_track
,
1811 {"Track", "scsi_mmc.track", FT_UINT32
, BASE_DEC
,
1812 NULL
, 0, NULL
, HFILL
}},
1813 { &hf_scsi_mmc_track_size
,
1814 {"Track Size", "scsi_mmc.track_size", FT_UINT32
, BASE_DEC
,
1815 NULL
, 0, NULL
, HFILL
}},
1816 { &hf_scsi_mmc_track_start_address
,
1817 {"Track Start Address", "scsi_mmc.track_start_address", FT_UINT32
, BASE_DEC
,
1818 NULL
, 0, NULL
, HFILL
}},
1819 { &hf_scsi_mmc_track_start_time
,
1820 {"Track Start Time", "scsi_mmc.track_start_time", FT_UINT32
, BASE_DEC
,
1821 NULL
, 0, NULL
, HFILL
}},
1823 {"Logical Block Address", "scsi_mmc.lba", FT_UINT32
, BASE_DEC
,
1824 NULL
, 0x0, NULL
, HFILL
}},
1825 { &hf_scsi_mmc_session
,
1826 {"Session", "scsi_mmc.session", FT_UINT32
, BASE_DEC
,
1827 NULL
, 0, NULL
, HFILL
}},
1828 { &hf_scsi_mmc_data_length
,
1829 {"Data Length", "scsi_mmc.data_length", FT_UINT32
, BASE_DEC
,
1830 NULL
, 0x0, NULL
, HFILL
}},
1831 { &hf_scsi_mmc_getconf_rt
,
1832 {"RT", "scsi_mmc.getconf.rt", FT_UINT8
, BASE_HEX
,
1833 VALS(scsi_getconf_rt_val
), 0x03, NULL
, HFILL
}},
1834 { &hf_scsi_mmc_getconf_current_profile
,
1835 {"Current Profile", "scsi_mmc.getconf.current_profile", FT_UINT16
, BASE_HEX
,
1836 VALS(scsi_getconf_current_profile_val
), 0, NULL
, HFILL
}},
1837 { &hf_scsi_mmc_getconf_starting_feature
,
1838 {"Starting Feature", "scsi_mmc.getconf.starting_feature", FT_UINT16
, BASE_HEX
,
1839 VALS(scsi_feature_val
), 0, NULL
, HFILL
}},
1840 { &hf_scsi_mmc_feature
,
1841 {"Feature", "scsi_mmc.feature", FT_UINT16
, BASE_HEX
,
1842 VALS(scsi_feature_val
), 0, NULL
, HFILL
}},
1843 { &hf_scsi_mmc_feature_version
,
1844 {"Version", "scsi_mmc.feature.version", FT_UINT8
, BASE_DEC
,
1845 NULL
, 0x3c, NULL
, HFILL
}},
1846 { &hf_scsi_mmc_feature_persistent
,
1847 {"Persistent", "scsi_mmc.feature.persistent", FT_UINT8
, BASE_HEX
,
1848 NULL
, 0x02, NULL
, HFILL
}},
1849 { &hf_scsi_mmc_feature_current
,
1850 {"Current", "scsi_mmc.feature.current", FT_UINT8
, BASE_HEX
,
1851 NULL
, 001, NULL
, HFILL
}},
1852 { &hf_scsi_mmc_feature_additional_length
,
1853 {"Additional Length", "scsi_mmc.feature.additional_length", FT_UINT8
, BASE_DEC
,
1854 NULL
, 0, NULL
, HFILL
}},
1855 { &hf_scsi_mmc_feature_lun_sn
,
1856 {"LUN Serial Number", "scsi_mmc.feature.lun_sn", FT_STRING
, BASE_NONE
,
1857 NULL
, 0, NULL
, HFILL
}},
1858 { &hf_scsi_mmc_feature_cdread_dap
,
1859 {"DAP", "scsi_mmc.feature.cdread.dap", FT_BOOLEAN
, 8,
1860 NULL
, 0x80, NULL
, HFILL
}},
1861 { &hf_scsi_mmc_feature_cdread_c2flag
,
1862 {"C2 Flag", "scsi_mmc.feature.cdread.c2flag", FT_BOOLEAN
, 8,
1863 NULL
, 0x02, NULL
, HFILL
}},
1864 { &hf_scsi_mmc_feature_cdread_cdtext
,
1865 {"CD-Text", "scsi_mmc.feature.cdread.cdtext", FT_BOOLEAN
, 8,
1866 NULL
, 0x01, NULL
, HFILL
}},
1867 { &hf_scsi_mmc_feature_dvdrw_write
,
1868 {"Write", "scsi_mmc.feature.dvdrw.write", FT_BOOLEAN
, 8,
1869 NULL
, 0x01, NULL
, HFILL
}},
1870 { &hf_scsi_mmc_feature_dvdrw_quickstart
,
1871 {"Quick Start", "scsi_mmc.feature.dvdrw.quickstart", FT_BOOLEAN
, 8,
1872 NULL
, 0x02, NULL
, HFILL
}},
1873 { &hf_scsi_mmc_feature_dvdrw_closeonly
,
1874 {"Close Only", "scsi_mmc.feature.dvdrw.closeonly", FT_BOOLEAN
, 8,
1875 NULL
, 0x01, NULL
, HFILL
}},
1876 { &hf_scsi_mmc_feature_dvdr_write
,
1877 {"Write", "scsi_mmc.feature.dvdr.write", FT_BOOLEAN
, 8,
1878 NULL
, 0x01, NULL
, HFILL
}},
1879 { &hf_scsi_mmc_feature_tao_buf
,
1880 {"BUF", "scsi_mmc.feature.tao.buf", FT_BOOLEAN
, 8,
1881 NULL
, 0x40, NULL
, HFILL
}},
1882 { &hf_scsi_mmc_feature_tao_rwraw
,
1883 {"R-W Raw", "scsi_mmc.feature.tao.rwraw", FT_BOOLEAN
, 8,
1884 NULL
, 0x10, NULL
, HFILL
}},
1885 { &hf_scsi_mmc_feature_tao_rwpack
,
1886 {"R-W Pack", "scsi_mmc.feature.tao.rwpack", FT_BOOLEAN
, 8,
1887 NULL
, 0x08, NULL
, HFILL
}},
1888 { &hf_scsi_mmc_feature_tao_testwrite
,
1889 {"Test Write", "scsi_mmc.feature.tao.testwrite", FT_BOOLEAN
, 8,
1890 NULL
, 0x04, NULL
, HFILL
}},
1891 { &hf_scsi_mmc_feature_tao_cdrw
,
1892 {"CD-RW", "scsi_mmc.feature.tao.cdrw", FT_BOOLEAN
, 8,
1893 NULL
, 0x02, NULL
, HFILL
}},
1894 { &hf_scsi_mmc_feature_tao_rwsubcode
,
1895 {"R-W Subcode", "scsi_mmc.feature.tao.rwsubcode", FT_BOOLEAN
, 8,
1896 NULL
, 0x01, NULL
, HFILL
}},
1897 { &hf_scsi_mmc_feature_dts
,
1898 {"Data Type Supported", "scsi_mmc.feature.dts", FT_UINT16
, BASE_HEX
,
1899 NULL
, 0xffff, NULL
, HFILL
}},
1900 { &hf_scsi_mmc_feature_sao_buf
,
1901 {"BUF", "scsi_mmc.feature.sao.buf", FT_BOOLEAN
, 8,
1902 NULL
, 0x40, NULL
, HFILL
}},
1903 { &hf_scsi_mmc_feature_sao_sao
,
1904 {"SAO", "scsi_mmc.feature.sao.sao", FT_BOOLEAN
, 8,
1905 NULL
, 0x20, NULL
, HFILL
}},
1906 { &hf_scsi_mmc_feature_sao_rawms
,
1907 {"Raw MS", "scsi_mmc.feature.sao.rawms", FT_BOOLEAN
, 8,
1908 NULL
, 0x10, NULL
, HFILL
}},
1909 { &hf_scsi_mmc_feature_sao_raw
,
1910 {"Raw", "scsi_mmc.feature.sao.raw", FT_BOOLEAN
, 8,
1911 NULL
, 0x08, NULL
, HFILL
}},
1912 { &hf_scsi_mmc_feature_sao_testwrite
,
1913 {"Test Write", "scsi_mmc.feature.sao.testwrite", FT_BOOLEAN
, 8,
1914 NULL
, 0x04, NULL
, HFILL
}},
1915 { &hf_scsi_mmc_feature_sao_cdrw
,
1916 {"CD-RW", "scsi_mmc.feature.sao.cdrw", FT_BOOLEAN
, 8,
1917 NULL
, 0x02, NULL
, HFILL
}},
1918 { &hf_scsi_mmc_feature_sao_rw
,
1919 {"R-W", "scsi_mmc.feature.sao.rw", FT_BOOLEAN
, 8,
1920 NULL
, 0x01, NULL
, HFILL
}},
1921 { &hf_scsi_mmc_feature_sao_mcsl
,
1922 {"Maximum Cue Sheet Length", "scsi_mmc.feature.sao.mcsl", FT_UINT24
, BASE_DEC
,
1923 NULL
, 0, NULL
, HFILL
}},
1924 { &hf_scsi_mmc_feature_dvdr_buf
,
1925 {"BUF", "scsi_mmc.feature.dvdr.buf", FT_BOOLEAN
, 8,
1926 NULL
, 0x40, NULL
, HFILL
}},
1927 { &hf_scsi_mmc_feature_dvdr_testwrite
,
1928 {"Test Write", "scsi_mmc.feature.dvdr.testwrite", FT_BOOLEAN
, 8,
1929 NULL
, 0x04, NULL
, HFILL
}},
1930 { &hf_scsi_mmc_feature_dvdr_dvdrw
,
1931 {"DVD-RW", "scsi_mmc.feature.dvdr.dvdrw", FT_BOOLEAN
, 8,
1932 NULL
, 0x02, NULL
, HFILL
}},
1933 { &hf_scsi_mmc_feature_profile
,
1934 {"Profile", "scsi_mmc.feature.profile", FT_UINT16
, BASE_HEX
,
1935 VALS(scsi_getconf_current_profile_val
), 0, NULL
, HFILL
}},
1936 { &hf_scsi_mmc_feature_profile_current
,
1937 {"Current", "scsi_mmc.feature.profile.current", FT_BOOLEAN
, 8,
1938 NULL
, 0x01, NULL
, HFILL
}},
1939 { &hf_scsi_mmc_feature_isw_buf
,
1940 {"BUF", "scsi_mmc.feature.isw.buf", FT_BOOLEAN
, 8,
1941 NULL
, 0x01, NULL
, HFILL
}},
1942 { &hf_scsi_mmc_feature_isw_num_linksize
,
1943 {"Number of Link Sizes", "scsi_mmc.feature.isw.num_linksize", FT_UINT8
, BASE_DEC
,
1944 NULL
, 0, NULL
, HFILL
}},
1945 { &hf_scsi_mmc_feature_isw_linksize
,
1946 {"Link Size", "scsi_mmc.feature.isw.linksize", FT_UINT8
, BASE_DEC
,
1947 NULL
, 0, NULL
, HFILL
}},
1948 { &hf_scsi_mmc_read_compatibility_lba
,
1949 {"Read Compatibility LBA", "scsi_mmc.read_compatibility_lba", FT_UINT32
, BASE_DEC
,
1950 NULL
, 0, NULL
, HFILL
}},
1951 { &hf_scsi_mmc_reservation_size
,
1952 {"Reservation Size", "scsi_mmc.reservation_size", FT_UINT32
, BASE_DEC
,
1953 NULL
, 0, NULL
, HFILL
}},
1954 { &hf_scsi_mmc_last_recorded_address
,
1955 {"Last Recorded Address", "scsi_mmc.last_recorded_address", FT_UINT32
, BASE_DEC
,
1956 NULL
, 0, NULL
, HFILL
}},
1957 { &hf_scsi_mmc_first_track
,
1958 {"First Track", "scsi_mmc.first_track", FT_UINT8
, BASE_DEC
,
1959 NULL
, 0, NULL
, HFILL
}},
1960 { &hf_scsi_mmc_fixed_packet_size
,
1961 {"Fixed Packet Size", "scsi_mmc.fixed_packet_size", FT_UINT32
, BASE_DEC
,
1962 NULL
, 0, NULL
, HFILL
}},
1963 { &hf_scsi_mmc_closetrack_immed
,
1964 {"IMMED", "scsi_mmc.closetrack.immed", FT_BOOLEAN
, 8,
1965 NULL
, 0x01, NULL
, HFILL
}},
1966 { &hf_scsi_mmc_closetrack_func
,
1967 {"Close Function", "scsi_mmc.closetrack.func", FT_UINT8
, BASE_HEX
,
1968 VALS(scsi_closetrack_func_val
), 0x07, NULL
, HFILL
}},
1969 { &hf_scsi_mmc_synccache_immed
,
1970 {"IMMED", "scsi_mmc.synccache.immed", FT_BOOLEAN
, 8,
1971 NULL
, 0x02, NULL
, HFILL
}},
1972 { &hf_scsi_mmc_synccache_reladr
,
1973 {"RelAdr", "scsi_mmc.synccache.reladr", FT_BOOLEAN
, 8,
1974 NULL
, 0x01, NULL
, HFILL
}},
1975 { &hf_scsi_mmc_num_blocks
,
1976 {"Number of Blocks", "scsi_mmc.num_blocks", FT_UINT32
, BASE_DEC
,
1977 NULL
, 0x0, NULL
, HFILL
}},
1978 { &hf_scsi_mmc_next_writable_address
,
1979 {"Next Writable Address", "scsi_mmc.next_writable_address", FT_UINT32
, BASE_DEC
,
1980 NULL
, 0, NULL
, HFILL
}},
1981 { &hf_scsi_mmc_free_blocks
,
1982 {"Free Blocks", "scsi_mmc.free_blocks", FT_UINT32
, BASE_DEC
,
1983 NULL
, 0, NULL
, HFILL
}},
1984 { &hf_scsi_mmc_read_dvd_format
,
1985 { "Format Code", "scsi_mmc.read_dvd.format", FT_UINT8
, BASE_HEX
,
1986 VALS(scsi_read_dvd_formats
), 0x0, NULL
, HFILL
}},
1987 { &hf_scsi_mmc_disc_book_type
,
1988 { "Type", "scsi_mmc.book.type", FT_UINT8
, BASE_HEX
,
1989 VALS(scsi_disc_category_type
), 0xf0, NULL
, HFILL
}},
1990 { &hf_scsi_mmc_disc_book_version
,
1991 { "Version", "scsi_mmc.book.version", FT_UINT8
, BASE_HEX
,
1992 NULL
, 0x0f, NULL
, HFILL
}},
1993 { &hf_scsi_mmc_disc_size_size
,
1994 { "Size", "scsi_mmc.disc.size", FT_UINT8
, BASE_HEX
,
1995 VALS(scsi_disc_size
), 0xf0, NULL
, HFILL
}},
1996 { &hf_scsi_mmc_disc_size_rate
,
1997 { "Rate", "scsi_mmc.disc.rate", FT_UINT8
, BASE_HEX
,
1998 VALS(scsi_disc_rate
), 0x0f, NULL
, HFILL
}},
1999 { &hf_scsi_mmc_disc_structure_layer
,
2000 { "Structure", "scsi_mmc.disc.structure", FT_UINT8
, BASE_HEX
,
2001 VALS(scsi_disc_structure
), 0x0f, NULL
, HFILL
}},
2002 { &hf_scsi_mmc_disc_density_length
,
2003 { "Channel bith length", "scsi_mmc.density.channel_bit_length", FT_UINT8
, BASE_HEX
,
2004 VALS(scsi_density_length
), 0xf0, NULL
, HFILL
}},
2005 { &hf_scsi_mmc_disc_density_pitch
,
2006 { "Average Track Pitch", "scsi_mmc.density.average_track_pitch", FT_UINT8
, BASE_HEX
,
2007 VALS(scsi_density_pitch
), 0x0f, NULL
, HFILL
}},
2008 { &hf_scsi_mmc_disc_first_physical
,
2009 { "First physical sector of data zone", "scsi_mmc.first_physical", FT_UINT24
, BASE_HEX
,
2010 NULL
, 0, NULL
, HFILL
}},
2011 { &hf_scsi_mmc_disc_last_physical
,
2012 { "Last physical sector of data zone", "scsi_mmc.last_physical", FT_UINT24
, BASE_HEX
,
2013 NULL
, 0, NULL
, HFILL
}},
2014 { &hf_scsi_mmc_disc_last_physical_layer0
,
2015 { "Last physical sector of layer 0", "scsi_mmc.last_physical_layer0", FT_UINT24
, BASE_HEX
,
2016 NULL
, 0, NULL
, HFILL
}},
2017 { &hf_scsi_mmc_disc_extended_format_info
,
2018 { "Extended Format Info", "scsi_mmc.adip.extended_format_info", FT_BOOLEAN
, 8,
2019 TFS(&scsi_adip_extended_format_info
), 0x40, NULL
, HFILL
}},
2020 { &hf_scsi_mmc_disc_application_code
,
2021 { "Disk Application Code", "scsi_mmc.disk_application_code", FT_UINT8
, BASE_HEX
,
2022 VALS(scsi_disk_application_code
), 0x0, NULL
, HFILL
}},
2023 { &hf_scsi_mmc_adip_eib0
,
2024 { "Extended Format Block 0", "scsi_mmc.adip.extended_format_block.0", FT_BOOLEAN
, 8,
2025 NULL
, 0x01, NULL
, HFILL
}},
2026 { &hf_scsi_mmc_adip_eib1
,
2027 { "Extended Format Block 1", "scsi_mmc.adip.extended_format_block.1", FT_BOOLEAN
, 8,
2028 NULL
, 0x02, NULL
, HFILL
}},
2029 { &hf_scsi_mmc_adip_eib2
,
2030 { "Extended Format Block 2", "scsi_mmc.adip.extended_format_block.2", FT_BOOLEAN
, 8,
2031 NULL
, 0x04, NULL
, HFILL
}},
2032 { &hf_scsi_mmc_adip_eib3
,
2033 { "Extended Format Block 3", "scsi_mmc.adip.extended_format_block.3", FT_BOOLEAN
, 8,
2034 NULL
, 0x08, NULL
, HFILL
}},
2035 { &hf_scsi_mmc_adip_eib4
,
2036 { "Extended Format Block 4", "scsi_mmc.adip.extended_format_block.4", FT_BOOLEAN
, 8,
2037 NULL
, 0x10, NULL
, HFILL
}},
2038 { &hf_scsi_mmc_adip_eib5
,
2039 { "Extended Format Block 5", "scsi_mmc.adip.extended_format_block.5", FT_BOOLEAN
, 8,
2040 NULL
, 0x20, NULL
, HFILL
}},
2041 { &hf_scsi_mmc_adip_device_manuf_id
,
2042 { "Device Manufacturer Id", "scsi_mmc.adip.device_manufacturer_id", FT_STRING
, BASE_NONE
,
2043 NULL
, 0x0, NULL
, HFILL
}},
2044 { &hf_scsi_mmc_adip_media_type_id
,
2045 { "Media Type Id", "scsi_mmc.adip.media_type_id", FT_STRING
, BASE_NONE
,
2046 NULL
, 0x0, NULL
, HFILL
}},
2047 { &hf_scsi_mmc_adip_product_revision_number
,
2048 { "Product Revision Number", "scsi_mmc.adip.product_revision_number", FT_UINT8
, BASE_HEX
,
2049 NULL
, 0x0, NULL
, HFILL
}},
2050 { &hf_scsi_mmc_adip_number_of_physical_info
,
2051 { "Number of bytes of physical info", "scsi_mmc.adip.number_of_physical_info", FT_UINT8
, BASE_HEX
,
2052 NULL
, 0x0, NULL
, HFILL
}},
2053 { &hf_scsi_mmc_disc_num_layers
,
2054 { "Number of Layers", "scsi_mmc.disk.num_layers", FT_UINT8
, BASE_DEC
,
2055 VALS(scsi_num_layers
), 0x60, NULL
, HFILL
}},
2056 { &hf_scsi_mmc_disc_track_path
,
2057 { "Track Path", "scsi_mmc.disk.track_path", FT_BOOLEAN
, 8,
2058 TFS(&scsi_track_path
), 0x10, NULL
, HFILL
}},
2059 { &hf_scsi_mmc_gesn_polled
,
2060 { "Polled", "scsi_mmc.gesn.polled", FT_BOOLEAN
, 8,
2061 TFS(&scsi_gesn_path
), 0x01, NULL
, HFILL
}},
2062 { &hf_scsi_mmc_notification_flags
,
2063 {"Notification Class Request", "scsi_mmc.notification.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2065 { &hf_scsi_mmc_gesn_device_busy
,
2066 { "DEVICE BUSY", "scsi_mmc.gesn.device_busy", FT_BOOLEAN
, 8,
2067 NULL
, 0x40, NULL
, HFILL
}},
2068 { &hf_scsi_mmc_gesn_multi_initiator
,
2069 { "MULTI_INITIATOR", "scsi_mmc.gesn.multi_initiator", FT_BOOLEAN
, 8,
2070 NULL
, 0x20, NULL
, HFILL
}},
2071 { &hf_scsi_mmc_gesn_media
,
2072 { "MEDIA", "scsi_mmc.gesn.media", FT_BOOLEAN
, 8,
2073 NULL
, 0x10, NULL
, HFILL
}},
2074 { &hf_scsi_mmc_gesn_external_request
,
2075 { "EXTERNAL_REQUEST", "scsi_mmc.gesn.external_request", FT_BOOLEAN
, 8,
2076 NULL
, 0x08, NULL
, HFILL
}},
2077 { &hf_scsi_mmc_gesn_power_mgmt
,
2078 { "POWER_MANAGEMENT", "scsi_mmc.gesn.power_management", FT_BOOLEAN
, 8,
2079 NULL
, 0x04, NULL
, HFILL
}},
2080 { &hf_scsi_mmc_gesn_operational_change
,
2081 { "OPERATIONAL_CHANGE", "scsi_mmc.gesn.operational_change", FT_BOOLEAN
, 8,
2082 NULL
, 0x02, NULL
, HFILL
}},
2083 { &hf_scsi_mmc_prevent_allow_flags
,
2084 {"Prevent Allow Flags", "scsi_mmc.prevent_allow.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2086 { &hf_scsi_mmc_prevent_allow_persistent
,
2087 { "PERSISTENT", "scsi_mmc.prevent_allow.persistent", FT_BOOLEAN
, 8,
2088 NULL
, 0x02, NULL
, HFILL
}},
2089 { &hf_scsi_mmc_prevent_allow_prevent
,
2090 { "PREVENT", "scsi_mmc.prevent_allow.prevent", FT_BOOLEAN
, 8,
2091 NULL
, 0x01, NULL
, HFILL
}},
2092 { &hf_scsi_mmc_disk_flags
,
2093 {"Disk Flags", "scsi_mmc.disk.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2095 { &hf_scsi_mmc_format_flags
,
2096 {"Format Flags", "scsi_mmc.format.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2098 { &hf_scsi_mmc_track_flags
,
2099 {"Track Flags", "scsi_mmc.track.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2101 { &hf_scsi_mmc_data_flags
,
2102 {"Data Flags", "scsi_mmc.data.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
2106 /* Setup protocol subtree array */
2107 static gint
*ett
[] = {
2108 &ett_scsi_mmc_profile
,
2109 &ett_scsi_notifications
,
2110 &ett_scsi_prevent_allow
,
2111 &ett_scsi_disk_flags
,
2112 &ett_scsi_format_flags
,
2113 &ett_scsi_track_flags
,
2114 &ett_scsi_data_flags
,
2117 /* Register the protocol name and description */
2118 proto_scsi_mmc
= proto_register_protocol("SCSI_MMC", "SCSI_MMC", "scsi_mmc");
2120 /* Required function calls to register the header fields and subtrees used */
2121 proto_register_field_array(proto_scsi_mmc
, hf
, array_length(hf
));
2122 proto_register_subtree_array(ett
, array_length(ett
));