1 /* TODO make the contracts require that all functions be called with valid
2 * pointers for itl and itlq and remove all tests for itl/itlq being NULL
4 /* TODO audit value parameter for proto_tree_add_boolean() calls */
6 * Routines for decoding SCSI CDBs and responsess
7 * Author: Dinesh G Dutt (ddutt@cisco.com)
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 2002 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
17 * Some Notes on using the SCSI Decoder:
19 * The SCSI decoder has been built right now so that it is invoked directly by the
20 * SCSI transport layers as compared to the standard mechanism of being invoked
21 * via a dissector chain. There are multiple reasons for this:
22 * - The SCSI CDB is typically embedded inside the transport along with other
23 * header fields that have nothing to do with SCSI. So, it is required to be
25 * - Originally, Wireshark couldn't do filtering on protocol trees that were not
28 * There are four main routines that are provided:
29 * o dissect_scsi_cdb - invoked on receiving a SCSI Command
30 * void dissect_scsi_cdb(tvbuff_t *, packet_info *, proto_tree *,
31 * unsigned, itlq_nexus_t *, itl_nexus_t *);
32 * o dissect_scsi_payload - invoked to decode SCSI responses
33 * void dissect_scsi_payload(tvbuff_t *, packet_info *, proto_tree *, unsigned,
34 * bool, itlq_nexusu_t *, itl_nexus_t *,
35 * uint32_t relative_offset);
36 * The final parameter is the length of the response field that is negotiated
37 * as part of the SCSI transport layer. If this is not tracked by the
38 * transport, it can be set to 0.
39 * o dissect_scsi_rsp - invoked to dissect the scsi status code in a response
41 * void dissect_scsi_rsp(tvbuff_t *, packet_info *, proto_tree *,
42 * itlq_nexus_t *, itl_nexus_t *, uint8_t);
43 * o dissect_scsi_snsinfo - invoked to decode the sense data provided in case of
45 * void dissect_scsi_snsinfo(tvbuff_t *, packet_info *, proto_tree *, unsigned,
46 * unsigned, itlq_nexus_t *, itl_nexus_t *);
48 * In addition to this, the other requirement made from the transport is to
49 * provide ITL and ITLQ structures that are persistent.
51 * The ITL structure uniquely identifies a Initiator/Target/Lun combination
52 * and is among other things used to keep track of the device type for a
55 * The ITLQ structure uniquely identifies a specific scsi task and is used to
56 * keep track of OPCODEs between CDB/DATA/Responses and resp[onse times.
58 * This decoder attempts to track the type of SCSI device based on the response
59 * to the Inquiry command. If the trace does not contain an Inquiry command,
60 * the decoding of the commands is done as per a user preference. Currently,
61 * only SBC (disks) and SSC (tapes) are the alternatives offered. The basic
62 * SCSI command set (SPC-2/3) is decoded for all SCSI devices. If there is a
63 * mixture of devices in the trace, some with Inquiry response and some
64 * without, the user preference is used only for those devices whose type the
65 * decoder has not been able to determine.
70 #include <stdio.h> /* for sscanf() */
71 #include <epan/packet.h>
72 #include <epan/prefs.h>
74 #include <epan/reassemble.h>
75 #include <epan/expert.h>
77 #include <epan/unit_strings.h>
78 #include "packet-scsi.h"
79 #include "packet-scsi-osd.h"
80 #include "packet-scsi-mmc.h"
81 #include "packet-scsi-sbc.h"
82 #include "packet-scsi-ssc.h"
83 #include "packet-scsi-smc.h"
85 void proto_register_scsi(void);
87 static int proto_scsi
;
88 static int hf_scsi_inq_control_vendor_specific
;
89 static int hf_scsi_inq_control_reserved
;
90 static int hf_scsi_inq_control_naca
;
91 static int hf_scsi_inq_control_obs1
;
92 static int hf_scsi_inq_control_obs2
;
93 static int hf_scsi_inq_control
;
94 static int hf_scsi_control_vendor_specific
;
95 static int hf_scsi_control_reserved
;
96 static int hf_scsi_control_naca
;
97 static int hf_scsi_control_obs1
;
98 static int hf_scsi_control_obs2
;
100 int hf_scsi_alloclen16
;
101 static int hf_scsi_alloclen32
;
102 static int hf_scsi_time
;
103 static int hf_scsi_request_frame
;
104 static int hf_scsi_response_frame
;
105 static int hf_scsi_status
;
106 static int hf_scsi_spcopcode
;
107 static int hf_scsi_inquiry_flags
;
108 static int hf_scsi_inquiry_evpd_page
;
109 static int hf_scsi_inquiry_cmdt_page
;
110 static int hf_scsi_alloclen
;
111 static int hf_scsi_paramlen
;
112 static int hf_scsi_paramlen16
;
113 static int hf_scsi_modesel_flags
;
114 static int hf_scsi_modesns_pc
;
115 static int hf_scsi_modepage_ps
;
116 static int hf_scsi_modepage_spf
;
117 static int hf_scsi_modepage_plen
;
118 static int hf_scsi_modepage_tcmos
;
119 static int hf_scsi_modepage_scsip
;
120 static int hf_scsi_modepage_ialuae
;
121 static int hf_scsi_modepage_icp
;
122 static int hf_scsi_modepage_msdl
;
123 static int hf_scsi_spc_pagecode
;
124 static int hf_scsi_spc_subpagecode
;
125 static int hf_scsi_sbcpagecode
;
126 static int hf_scsi_sscpagecode
;
127 static int hf_scsi_smcpagecode
;
128 static int hf_scsi_mmcpagecode
;
129 static int hf_scsi_modesns_flags
;
130 static int hf_scsi_persresvin_svcaction
;
131 static int hf_scsi_persresvout_svcaction
;
132 static int hf_scsi_persresv_scope
;
133 static int hf_scsi_persresv_type
;
134 static int hf_scsi_persresvout_reskey
;
135 static int hf_scsi_persresvout_sareskey
;
136 static int hf_scsi_persresvout_obsolete
;
137 static int hf_scsi_persresvout_control
;
138 static int hf_scsi_persresvout_rel_tpi
;
139 static int hf_scsi_persresvout_transportid_len
;
140 static int hf_scsi_persresvout_transportid
;
141 static int hf_scsi_persresv_control_rsvd
;
142 static int hf_scsi_persresv_control_rsvd1
;
143 static int hf_scsi_persresv_control_rsvd2
;
144 static int hf_scsi_persresv_control_spec_i_pt
;
145 static int hf_scsi_persresv_control_all_tg_pt
;
146 static int hf_scsi_persresv_control_aptpl
;
147 static int hf_scsi_persresv_control_unreg
;
148 static int hf_scsi_release_flags
;
149 static int hf_scsi_release_thirdpartyid
;
150 static int hf_scsi_select_report
;
151 static int hf_scsi_inq_add_len
;
152 static int hf_scsi_inq_peripheral
;
153 static int hf_scsi_inq_qualifier
;
154 static int hf_scsi_inq_vendor_id
;
155 static int hf_scsi_inq_product_id
;
156 static int hf_scsi_inq_product_rev
;
157 static int hf_scsi_inq_vendor_specific
;
158 static int hf_scsi_inq_version_desc
;
159 static int hf_scsi_inq_devtype
;
160 static int hf_scsi_inq_rmb
;
161 static int hf_scsi_inq_version
;
162 static int hf_scsi_lun_address_mode
;
163 static int hf_scsi_lun
;
164 static int hf_scsi_lun_extended
;
165 static int hf_scsi_extended_add_method_len
;
166 static int hf_scsi_extended_add_method
;
167 static int hf_scsi_bus
;
168 static int hf_scsi_target
;
169 static int hf_scsi_modesns_errrep
;
170 static int hf_scsi_modesns_tst
;
171 static int hf_scsi_modesns_qmod
;
172 static int hf_scsi_modesns_qerr
;
173 static int hf_scsi_modesns_rac
;
174 static int hf_scsi_modesns_tas
;
175 static int hf_scsi_protocol
;
176 static int hf_scsi_sns_errtype
;
177 static int hf_scsi_snskey
;
178 static int hf_scsi_snsinfo
;
179 static int hf_scsi_addlsnslen
;
180 static int hf_scsi_asc
;
181 static int hf_scsi_ascascq
;
182 static int hf_scsi_ascq
;
183 static int hf_scsi_fru
;
184 static int hf_scsi_sksv
;
185 static int hf_scsi_sks_info
;
186 static int hf_scsi_sks_fp_cd
;
187 static int hf_scsi_sks_fp_bpv
;
188 static int hf_scsi_sks_fp_bit
;
189 static int hf_scsi_sks_fp_field
;
190 static int hf_scsi_sns_desc_type
;
191 static int hf_scsi_sns_desc_length
;
192 static int hf_scsi_sns_osd_object_not_initiated
;
193 static int hf_scsi_sns_osd_object_completed
;
194 static int hf_scsi_sns_osd_object_validation
;
195 static int hf_scsi_sns_osd_object_cmd_cap_v
;
196 static int hf_scsi_sns_osd_object_command
;
197 static int hf_scsi_sns_osd_object_imp_st_att
;
198 static int hf_scsi_sns_osd_object_sa_cap_v
;
199 static int hf_scsi_sns_osd_object_set_att
;
200 static int hf_scsi_sns_osd_object_ga_cap_v
;
201 static int hf_scsi_sns_osd_object_get_att
;
202 static int hf_scsi_sns_osd_partition_id
;
203 static int hf_scsi_sns_osd_object_id
;
204 static int hf_scsi_sns_osd_attr_page
;
205 static int hf_scsi_sns_osd_attr_number
;
206 static int hf_scsi_inq_reladrflags
;
207 static int hf_scsi_inq_reladr
;
208 static int hf_scsi_inq_linked
;
209 static int hf_scsi_inq_trandis
;
210 static int hf_scsi_inq_cmdque
;
211 static int hf_scsi_inq_bqueflags
;
212 static int hf_scsi_inq_bque
;
213 static int hf_scsi_inq_encserv
;
214 static int hf_scsi_inq_multip
;
215 static int hf_scsi_inq_mchngr
;
216 static int hf_scsi_inq_ackreqq
;
217 static int hf_scsi_inq_sccsflags
;
218 static int hf_scsi_inq_sccs
;
219 static int hf_scsi_inq_acc
;
220 static int hf_scsi_inq_tpc
;
221 static int hf_scsi_inq_protect
;
222 static int hf_scsi_inq_tpgs
;
223 static int hf_scsi_inq_acaflags
;
224 static int hf_scsi_inq_rmbflags
;
225 static int hf_scsi_inq_normaca
;
226 static int hf_scsi_inq_hisup
;
227 static int hf_scsi_inq_aerc
;
228 static int hf_scsi_inq_trmtsk
;
229 static int hf_scsi_inq_rdf
;
230 static int hf_scsi_persresv_key
;
231 static int hf_scsi_persresv_scopeaddr
;
232 static int hf_scsi_add_cdblen
;
233 static int hf_scsi_svcaction
;
234 static int hf_scsi_wb_mode
;
235 static int hf_scsi_wb_bufferid
;
236 static int hf_scsi_wb_bufoffset
;
237 static int hf_scsi_paramlen24
;
238 static int hf_scsi_senddiag_st_code
;
239 static int hf_scsi_senddiag_pf
;
240 static int hf_scsi_senddiag_st
;
241 static int hf_scsi_senddiag_devoff
;
242 static int hf_scsi_senddiag_unitoff
;
243 static int hf_scsi_fragments
;
244 static int hf_scsi_fragment
;
245 static int hf_scsi_fragment_overlap
;
246 static int hf_scsi_fragment_overlap_conflict
;
247 static int hf_scsi_fragment_multiple_tails
;
248 static int hf_scsi_fragment_too_long_fragment
;
249 static int hf_scsi_fragment_error
;
250 static int hf_scsi_fragment_count
;
251 static int hf_scsi_reassembled_in
;
252 static int hf_scsi_reassembled_length
;
253 static int hf_scsi_log_ppc_flags
;
254 static int hf_scsi_log_pc_flags
;
255 static int hf_scsi_log_parameter_ptr
;
256 static int hf_scsi_log_ppc
;
257 static int hf_scsi_log_pcr
;
258 static int hf_scsi_log_sp
;
259 static int hf_scsi_log_pagecode
;
260 static int hf_scsi_log_pc
;
261 static int hf_scsi_log_page_length
;
262 static int hf_scsi_log_parameter_code
;
263 static int hf_scsi_log_param_len
;
264 static int hf_scsi_log_param_flags
;
265 static int hf_scsi_log_param_data
;
266 static int hf_scsi_log_pf_du
;
267 static int hf_scsi_log_pf_ds
;
268 static int hf_scsi_log_pf_tsd
;
269 static int hf_scsi_log_pf_etc
;
270 static int hf_scsi_log_pf_tmc
;
271 static int hf_scsi_log_pf_lbin
;
272 static int hf_scsi_log_pf_lp
;
273 static int hf_scsi_log_ta_rw
;
274 static int hf_scsi_log_ta_ww
;
275 static int hf_scsi_log_ta_he
;
276 static int hf_scsi_log_ta_media
;
277 static int hf_scsi_log_ta_rf
;
278 static int hf_scsi_log_ta_wf
;
279 static int hf_scsi_log_ta_ml
;
280 static int hf_scsi_log_ta_ndg
;
281 static int hf_scsi_log_ta_wp
;
282 static int hf_scsi_log_ta_nr
;
283 static int hf_scsi_log_ta_cm
;
284 static int hf_scsi_log_ta_uf
;
285 static int hf_scsi_log_ta_rmcf
;
286 static int hf_scsi_log_ta_umcf
;
287 static int hf_scsi_log_ta_mcicf
;
288 static int hf_scsi_log_ta_fe
;
289 static int hf_scsi_log_ta_rof
;
290 static int hf_scsi_log_ta_tdcol
;
291 static int hf_scsi_log_ta_nml
;
292 static int hf_scsi_log_ta_cn
;
293 static int hf_scsi_log_ta_cp
;
294 static int hf_scsi_log_ta_ecm
;
295 static int hf_scsi_log_ta_ict
;
296 static int hf_scsi_log_ta_rr
;
297 static int hf_scsi_log_ta_dpie
;
298 static int hf_scsi_log_ta_cff
;
299 static int hf_scsi_log_ta_psf
;
300 static int hf_scsi_log_ta_pc
;
301 static int hf_scsi_log_ta_dm
;
302 static int hf_scsi_log_ta_hwa
;
303 static int hf_scsi_log_ta_hwb
;
304 static int hf_scsi_log_ta_if
;
305 static int hf_scsi_log_ta_em
;
306 static int hf_scsi_log_ta_dwf
;
307 static int hf_scsi_log_ta_drhu
;
308 static int hf_scsi_log_ta_drtm
;
309 static int hf_scsi_log_ta_drvo
;
310 static int hf_scsi_log_ta_pefa
;
311 static int hf_scsi_log_ta_dire
;
312 static int hf_scsi_log_ta_lost
;
313 static int hf_scsi_log_ta_tduau
;
314 static int hf_scsi_log_ta_tsawf
;
315 static int hf_scsi_log_ta_tsarf
;
316 static int hf_scsi_log_ta_nsod
;
317 static int hf_scsi_log_ta_lofa
;
318 static int hf_scsi_log_ta_uuf
;
319 static int hf_scsi_log_ta_aif
;
320 static int hf_scsi_log_ta_fwf
;
321 static int hf_scsi_log_ta_wmicf
;
322 static int hf_scsi_log_ta_wmoa
;
323 static int hf_scsi_sbc_threshold_exponent
;
324 static int hf_scsi_sbc_lbpu
;
325 static int hf_scsi_sbc_lbpws
;
326 static int hf_scsi_sbc_lbpws10
;
327 static int hf_scsi_sbc_lbprz
;
328 static int hf_scsi_sbc_anc_sup
;
329 static int hf_scsi_sbc_dp
;
330 static int hf_scsi_sbc_ptype
;
331 static int hf_scsi_block_limits_wsnz
;
332 static int hf_scsi_block_limits_mcawl
;
333 static int hf_scsi_block_limits_otlg
;
334 static int hf_scsi_block_limits_mtl
;
335 static int hf_scsi_block_limits_otl
;
336 static int hf_scsi_block_limits_mpl
;
337 static int hf_scsi_block_limits_mulc
;
338 static int hf_scsi_block_limits_mubdc
;
339 static int hf_scsi_block_limits_oug
;
340 static int hf_scsi_block_limits_ugavalid
;
341 static int hf_scsi_block_limits_uga
;
342 static int hf_scsi_block_limits_mwsl
;
343 static int hf_scsi_block_limits_matl
;
344 static int hf_scsi_block_limits_aa
;
345 static int hf_scsi_block_limits_atlg
;
346 static int hf_scsi_prevent_allow_flags
;
347 static int hf_scsi_prevent_allow_prevent
;
348 static int hf_scsi_mpi_service_action
;
349 static int hf_scsi_report_opcodes_rctd
;
350 static int hf_scsi_report_opcodes_options
;
351 static int hf_scsi_report_opcodes_requested_o
;
352 static int hf_scsi_report_opcodes_requested_sa
;
353 static int hf_scsi_report_opcodes_cdl
;
354 static int hf_scsi_report_opcodes_sa
;
355 static int hf_scsi_report_opcodes_ctdp
;
356 static int hf_scsi_report_opcodes_ctdp_one
;
357 static int hf_scsi_report_opcodes_servactv
;
358 static int hf_scsi_report_opcodes_cdb_length
;
359 static int hf_scsi_report_opcodes_support
;
360 static int hf_scsi_report_opcodes_cdb_usage_data
;
361 static int hf_scsi_report_opcodes_tdl
;
362 static int hf_scsi_report_opcodes_npt
;
363 static int hf_scsi_report_opcodes_rct
;
364 static int hf_scsi_inquiry_bdc_mrr
;
365 static int hf_scsi_inquiry_bdc_pt
;
366 static int hf_scsi_inquiry_bdc_wabereq
;
367 static int hf_scsi_inquiry_bdc_wacereq
;
368 static int hf_scsi_inquiry_bdc_nff
;
369 static int hf_scsi_inquiry_bdc_fuab
;
370 static int hf_scsi_inquiry_bdc_vbuls
;
371 /* Generated from convert_proto_tree_add_text.pl */
372 static int hf_scsi_smc_modepage_first_storage_element_address
;
373 static int hf_scsi_smc_modepage_first_medium_transport_element_address
;
374 static int hf_scsi_ssc2_modepage_dde
;
375 static int hf_scsi_inq_cmddt_version
;
376 static int hf_scsi_mmc5_modepage_number_of_volume_levels_supported
;
377 static int hf_scsi_ssc2_modepage_dce
;
378 static int hf_scsi_modesel_block_descriptor_length16
;
379 static int hf_scsi_mmc5_modepage_audio_pause_length
;
380 static int hf_scsi_spc_modepage_idle_condition_timer
;
381 static int hf_scsi_blockdescs_block_length24
;
382 static int hf_scsi_spc_modepage_report_count
;
383 static int hf_scsi_spc_modepage_ready_aer_holdoff_period
;
384 static int hf_scsi_sbc_modepage_non_cache_segment_size
;
385 static int hf_scsi_blockdescs_no_of_blocks64
;
386 static int hf_scsi_spc_modepage_gltsd
;
387 static int hf_scsi_smc_modepage_st_ne_dt
;
388 static int hf_scsi_modesel_dev_sbc_medium_type
;
389 static int hf_scsi_inq_evpd_devid_identifier_type
;
390 static int hf_scsi_inq_evpd_identifier_number
;
391 static int hf_scsi_sbc_modepage_write_retry_count
;
392 static int hf_scsi_spc_modepage_buffer_empty_ratio
;
393 static int hf_scsi_ssc2_modepage_partition_size
;
394 static int hf_scsi_mmc5_modepage_initiator_application_code
;
395 static int hf_scsi_sbc_modepage_demand_read_retention_priority
;
396 static int hf_scsi_smc_modepage_dt_dt
;
397 static int hf_scsi_sbc_modepage_ssec
;
398 static int hf_scsi_smc_modepage_number_of_medium_transport_elements
;
399 static int hf_scsi_mmc5_modepage_copy_management_revision_support
;
400 static int hf_scsi_ssc2_modepage_maximum_additional_partitions
;
401 static int hf_scsi_blockdescs_density_code
;
402 static int hf_scsi_ssc2_modepage_write_object_buffer_full_ratio
;
403 static int hf_scsi_spc_modepage_rr_tov
;
404 static int hf_scsi_inq_cmddt_support
;
405 static int hf_scsi_mmc5_modepage_packet_size
;
406 static int hf_scsi_ssc2_modepage_fdp
;
407 static int hf_scsi_spc_modepage_autoload_mode
;
408 static int hf_scsi_mmc5_modepage_rw_in_lead_in
;
409 static int hf_scsi_spc_modepage_perf
;
410 static int hf_scsi_inq_evpd_devid_association
;
411 static int hf_scsi_smc_modepage_stordt
;
412 static int hf_scsi_smc_modepage_ie_dt
;
413 static int hf_scsi_spc_modepage_disable_queuing
;
414 static int hf_scsi_sbc_modepage_maximum_pre_fetch_ceiling
;
415 static int hf_scsi_persresvin_generation_number
;
416 static int hf_scsi_ssc2_modepage_read_object_buffer_empty_ratio
;
417 static int hf_scsi_spc_modepage_extended_self_test_completion_time
;
418 static int hf_scsi_smc_modepage_number_of_import_export_elements
;
419 static int hf_scsi_smc_modepage_number_of_storage_elements
;
420 static int hf_scsi_sbc_modepage_landing_zone_cyl
;
421 static int hf_scsi_smc_modepage_mt_ne_dt
;
422 static int hf_scsi_mmc5_modepage_loading_mechanism_type
;
423 static int hf_scsi_smc_modepage_mt_dt
;
424 static int hf_scsi_smc_modepage_first_import_export_element_address
;
425 static int hf_scsi_mmc5_modepage_link_size
;
426 static int hf_scsi_ssc2_modepage_decompression_algorithm
;
427 static int hf_scsi_reportluns_lun_list_length
;
428 static int hf_scsi_spc_modepage_idle
;
429 static int hf_scsi_spc_modepage_emdp
;
430 static int hf_scsi_inq_evpd_devid_code_set
;
431 static int hf_scsi_modesel_longlba
;
432 static int hf_scsi_mmc5_modepage_bufe
;
433 static int hf_scsi_ssc2_modepage_select_data_compression_algorithm
;
434 static int hf_scsi_mmc5_modepage_rotation_control_selected
;
435 static int hf_scsi_mmc5_modepage_sub_header_byte
;
436 static int hf_scsi_spc_modepage_rr_tov_units
;
437 static int hf_scsi_mmc5_modepage_vendor_specific
;
438 static int hf_scsi_modesel_block_descriptor_length8
;
439 static int hf_scsi_smc_modepage_ie_ne_dt
;
440 static int hf_scsi_modesel_device_specific_parameter
;
441 static int hf_scsi_spc_modepage_connect_time_limit
;
442 static int hf_scsi_sbc_modepage_medium_rotation_rate
;
443 static int hf_scsi_inq_evpd_devid_identifier_length
;
444 static int hf_scsi_blockdescs_no_of_blocks32
;
445 static int hf_scsi_inq_evpd_devid_identifier_str
;
446 static int hf_scsi_sns_valid
;
447 static int hf_scsi_mmc5_modepage_dvd_ram_read
;
448 static int hf_scsi_ssc2_modepage_gap_size
;
449 static int hf_scsi_smc_modepage_first_data_transfer_element_address
;
450 static int hf_scsi_mmc5_modepage_wrparam_multi_session
;
451 static int hf_scsi_mmc5_modepage_num_write_speed_performance
;
452 static int hf_scsi_mmc5_modepage_buf
;
453 static int hf_scsi_mmc5_modepage_lba_space
;
454 static int hf_scsi_mmc5_modepage_data_block_type
;
455 static int hf_scsi_ssc2_modepage_additional_partitions_defined
;
456 static int hf_scsi_spc_modepage_dtfd
;
457 static int hf_scsi_spc_modepage_disconnect_time_limit
;
458 static int hf_scsi_sbc_modepage_read_retry_count
;
459 static int hf_scsi_mmc5_modepage_length
;
460 static int hf_scsi_sns_filemark
;
461 static int hf_scsi_sbc_modepage_alternate_tracks_per_zone
;
462 static int hf_scsi_ssc2_modepage_eod_defined
;
463 static int hf_scsi_mmc5_modepage_media_catalog_number
;
464 static int hf_scsi_mmc5_modepage_current_write_speed_selected
;
465 static int hf_scsi_inq_evpd_devid_identifier_bytes
;
466 static int hf_scsi_spc_modepage_interval_timer
;
467 static int hf_scsi_ssc2_modepage_oir
;
468 static int hf_scsi_sbc_modepage_correction_span
;
469 static int hf_scsi_mmc5_modepage_session_format
;
470 static int hf_scsi_sbc_modepage_minimum_pre_fetch
;
471 static int hf_scsi_spc_modepage_maximum_burst_size
;
472 static int hf_scsi_ssc2_modepage_partition_units
;
473 static int hf_scsi_sbc_modepage_cache_segment_size
;
474 static int hf_scsi_blockdescs_block_length32
;
475 static int hf_scsi_sbc_modepage_number_of_cylinders
;
476 static int hf_scsi_sbc_modepage_alternate_tracks_per_lu
;
477 static int hf_scsi_inq_evpd_page_length
;
478 static int hf_scsi_sbc_modepage_starting_cyl_pre_compensation
;
479 static int hf_scsi_sbc_modepage_head_offset_count
;
480 static int hf_scsi_sbc_modepage_ic
;
481 static int hf_scsi_modesel_mode_data_length16
;
482 static int hf_scsi_sbc_modepage_maximum_pre_fetch
;
483 static int hf_scsi_smc_modepage_number_of_data_transfer_elements
;
484 static int hf_scsi_ssc2_modepage_object_buffer_size_at_early_warning
;
485 static int hf_scsi_mmc5_modepage_buffer_size_supported
;
486 static int hf_scsi_persresvin_additional_length
;
487 static int hf_scsi_ssc2_modepage_obr
;
488 static int hf_scsi_spc_modepage_swp
;
489 static int hf_scsi_inq_evpd_supported_page
;
490 static int hf_scsi_sbc_modepage_awre
;
491 static int hf_scsi_smc_modepage_dt_ne_dt
;
492 static int hf_scsi_mmc5_modepage_read_bar_code
;
493 static int hf_scsi_ssc2_modepage_media_format_recognition
;
494 static int hf_scsi_sns_command_specific_information
;
495 static int hf_scsi_ssc2_modepage_write_delay_time
;
496 static int hf_scsi_sbc_modepage_track_skew_factor
;
497 static int hf_scsi_spc_modepage_standby_condition_timer
;
498 static int hf_scsi_sbc_modepage_interleave
;
499 static int hf_scsi_sbc_modepage_alternate_sectors_per_zone
;
500 static int hf_scsi_sbc_modepage_rotational_offset
;
501 static int hf_scsi_spc_modepage_buffer_full_ratio
;
502 static int hf_scsi_sbc_modepage_number_of_heads
;
503 static int hf_scsi_sbc_modepage_sectors_per_track
;
504 static int hf_scsi_sbc_modepage_recovery_time_limit
;
505 static int hf_scsi_sbc_modepage_tracks_per_zone
;
506 static int hf_scsi_spc_modepage_first_burst_size
;
507 static int hf_scsi_inq_evpd_product_serial_number
;
508 static int hf_scsi_sbc_modepage_cylinder_skew_factor
;
509 static int hf_scsi_sbc_modepage_data_bytes_per_physical_sector
;
510 static int hf_scsi_ssc2_modepage_compression_algorithm
;
511 static int hf_scsi_ssc2_modepage_caf
;
512 static int hf_scsi_sbc_modepage_starting_cyl_reduced_write_current
;
513 static int hf_scsi_inq_cmddt_cdb_size
;
514 static int hf_scsi_mmc5_modepage_international_standard_recording_code
;
515 static int hf_scsi_spc_modepage_bus_inactivity_limit
;
516 static int hf_scsi_sbc_modepage_disable_pre_fetch_xfer_len
;
517 static int hf_scsi_spc_modepage_busy_timeout_period
;
518 static int hf_scsi_sbc_modepage_fsw
;
519 static int hf_scsi_ssc2_modepage_active_partition
;
520 static int hf_scsi_modesel_mode_data_length8
;
521 static int hf_scsi_smc_modepage_st_dt
;
522 static int hf_scsi_sbc_modepage_number_of_cache_segments
;
523 static int hf_scsi_blockdescs_no_of_blocks24
;
524 static int hf_scsi_sbc_modepage_data_strobe_offset_count
;
525 static int hf_scsi_modesel_medium_type
;
526 static int hf_scsi_sbc_modepage_device_step_rate
;
527 static int hf_scsi_mmc5_modepage_dvd_ram_write
;
528 static int hf_scsi_mmc5_modepage_track_mode
;
529 static int hf_scsi_smc_modepage_mt_ne_mt
;
530 static int hf_scsi_smc_modepage_dt_mt
;
531 static int hf_scsi_mmc5_modepage_eject
;
532 static int hf_scsi_mmc5_modepage_mode_2_form2
;
533 static int hf_scsi_sbc_modepage_dra
;
534 static int hf_scsi_mmc5_modepage_dvd_rom_write
;
535 static int hf_scsi_sbc_modepage_eer
;
536 static int hf_scsi_mmc5_modepage_cd_da_cmds_supported
;
537 static int hf_scsi_smc_modepage_ie_ne_mt
;
538 static int hf_scsi_mmc5_modepage_rw_deinterleaved_corrected
;
539 static int hf_scsi_sbc_modepage_vendor_specific
;
540 static int hf_scsi_spc_modepage_report_log_exception_condition
;
541 static int hf_scsi_mmc5_modepage_c2_pointers_supported
;
542 static int hf_scsi_mmc5_modepage_ls_v
;
543 static int hf_scsi_sbc_modepage_tb
;
544 static int hf_scsi_sbc_modepage_write_retention_priority
;
545 static int hf_scsi_smc_modepage_mt_ne_ie
;
546 static int hf_scsi_ssc2_modepage_prmwp
;
547 static int hf_scsi_sbc_modepage_surf
;
548 static int hf_scsi_sns_ili
;
549 static int hf_scsi_smc_modepage_mt_ie
;
550 static int hf_scsi_sbc_modepage_rcd
;
551 static int hf_scsi_mmc5_modepage_composite
;
552 static int hf_scsi_sbc_modepage_wce
;
553 static int hf_scsi_mmc5_modepage_method_2
;
554 static int hf_scsi_ssc2_modepage_clear
;
555 static int hf_scsi_sbc_modepage_lbcss
;
556 static int hf_scsi_mmc5_modepage_cd_r_read
;
557 static int hf_scsi_spc_modepage_test
;
558 static int hf_scsi_ssc2_modepage_rsmk
;
559 static int hf_scsi_spc_modepage_rha
;
560 static int hf_scsi_mmc5_modepage_lsbf
;
561 static int hf_scsi_mmc5_modepage_cd_rw_write
;
562 static int hf_scsi_mmc5_modepage_wrparam_test_write
;
563 static int hf_scsi_ssc2_modepage_eeg
;
564 static int hf_scsi_mmc5_modepage_digital_port2
;
565 static int hf_scsi_mmc5_modepage_copy
;
566 static int hf_scsi_sbc_modepage_abpf
;
567 static int hf_scsi_spc_modepage_alwi
;
568 static int hf_scsi_mmc5_modepage_bckf
;
569 static int hf_scsi_ssc2_modepage_dsp
;
570 static int hf_scsi_mmc5_modepage_mode_2_form1
;
571 static int hf_scsi_smc_modepage_stormt
;
572 static int hf_scsi_mmc5_modepage_mmcap_test_write
;
573 static int hf_scsi_smc_modepage_st_mt
;
574 static int hf_scsi_ssc2_modepage_sew
;
575 static int hf_scsi_ssc2_modepage_psum
;
576 static int hf_scsi_mmc5_modepage_dvd_r_read
;
577 static int hf_scsi_ssc2_modepage_asocwp
;
578 static int hf_scsi_smc_modepage_st_ie
;
579 static int hf_scsi_mmc5_modepage_cd_rw_read
;
580 static int hf_scsi_spc_modepage_standby
;
581 static int hf_scsi_spc_modepage_ewasc
;
582 static int hf_scsi_sbc_modepage_arre
;
583 static int hf_scsi_smc_modepage_st_st
;
584 static int hf_scsi_ssc2_modepage_swp
;
585 static int hf_scsi_smc_modepage_storie
;
586 static int hf_scsi_mmc5_modepage_fp
;
587 static int hf_scsi_ssc2_modepage_red
;
588 static int hf_scsi_ssc2_modepage_active_format
;
589 static int hf_scsi_mmc5_modepage_mmcap_multi_session
;
590 static int hf_scsi_mmc5_modepage_lock_state
;
591 static int hf_scsi_mmc5_modepage_side_change_capable
;
592 static int hf_scsi_mmc5_modepage_dvd_rom_read
;
593 static int hf_scsi_sns_eom
;
594 static int hf_scsi_sbc_modepage_rc
;
595 static int hf_scsi_mmc5_modepage_lock
;
596 static int hf_scsi_sbc_modepage_per
;
597 static int hf_scsi_ssc2_modepage_socf
;
598 static int hf_scsi_sbc_modepage_mf
;
599 static int hf_scsi_smc_modepage_ie_st
;
600 static int hf_scsi_mmc5_modepage_digital_port1
;
601 static int hf_scsi_sbc_modepage_hsec
;
602 static int hf_scsi_sbc_modepage_cap
;
603 static int hf_scsi_smc_modepage_st_ne_ie
;
604 static int hf_scsi_spc_modepage_logerr
;
605 static int hf_scsi_sbc_modepage_rmb
;
606 static int hf_scsi_mmc5_modepage_prevent_jumper
;
607 static int hf_scsi_smc_modepage_ie_mt
;
608 static int hf_scsi_mmc5_modepage_changer_supports_disc_present
;
609 static int hf_scsi_mmc5_modepage_cd_r_write
;
610 static int hf_scsi_ssc2_modepage_addp
;
611 static int hf_scsi_mmc5_modepage_dvd_r_write
;
612 static int hf_scsi_spc_modepage_dexcpt
;
613 static int hf_scsi_spc_modepage_ebf
;
614 static int hf_scsi_mmc5_modepage_write_type
;
615 static int hf_scsi_spc_modepage_fab
;
616 static int hf_scsi_smc_modepage_ie_ne_st
;
617 static int hf_scsi_ssc2_modepage_baml
;
618 static int hf_scsi_smc_modepage_storst
;
619 static int hf_scsi_sbc_modepage_dte
;
620 static int hf_scsi_mmc5_modepage_separate_volume_levels
;
621 static int hf_scsi_mmc5_modepage_isrc
;
622 static int hf_scsi_smc_modepage_dt_ne_mt
;
623 static int hf_scsi_mmc5_modepage_audio_play
;
624 static int hf_scsi_mmc5_modepage_separate_channel_mute
;
625 static int hf_scsi_ssc2_modepage_rew
;
626 static int hf_scsi_sbc_modepage_dcr
;
627 static int hf_scsi_smc_modepage_dt_ie
;
628 static int hf_scsi_ssc2_modepage_avc
;
629 static int hf_scsi_sbc_modepage_size
;
630 static int hf_scsi_mmc5_modepage_rw_supported
;
631 static int hf_scsi_spc_modepage_dtipe
;
632 static int hf_scsi_mmc5_modepage_sw_slot_selection
;
633 static int hf_scsi_ssc2_modepage_pofm
;
634 static int hf_scsi_spc_modepage_dlm
;
635 static int hf_scsi_spc_modepage_plpb
;
636 static int hf_scsi_smc_modepage_st_ne_st
;
637 static int hf_scsi_smc_modepage_dt_ne_st
;
638 static int hf_scsi_smc_modepage_st_ne_mt
;
639 static int hf_scsi_ssc2_modepage_robo
;
640 static int hf_scsi_spc_modepage_faa
;
641 static int hf_scsi_spc_modepage_ddis
;
642 static int hf_scsi_mmc5_modepage_cd_da_stream_is_accurate
;
643 static int hf_scsi_ssc2_modepage_bam
;
644 static int hf_scsi_spc_modepage_fac
;
645 static int hf_scsi_smc_modepage_mt_st
;
646 static int hf_scsi_smc_modepage_ie_ie
;
647 static int hf_scsi_smc_modepage_dt_ne_ie
;
648 static int hf_scsi_ssc2_modepage_lois
;
649 static int hf_scsi_spc_modepage_dtoli
;
650 static int hf_scsi_sbc_modepage_disc
;
651 static int hf_scsi_smc_modepage_ie_ne_ie
;
652 static int hf_scsi_smc_modepage_mt_ne_st
;
653 static int hf_scsi_ssc2_modepage_dcc
;
654 static int hf_scsi_mmc5_modepage_rck
;
655 static int hf_scsi_smc_modepage_mt_mt
;
656 static int hf_scsi_smc_modepage_dt_st
;
657 static int hf_scsi_ssc2_modepage_rewind_on_reset
;
658 static int hf_scsi_mmc5_modepage_upc
;
659 static int hf_scsi_ssc2_modepage_idp
;
660 static int hf_scsi_ssc2_modepage_perswp
;
661 static int hf_scsi_spc_xcopy_service
;
662 static int hf_scsi_spc_recv_copy_service
;
663 static int hf_scsi_spc_xcopy_param_list_len
;
664 static int hf_scsi_spc_xcopy_param_list_format
;
665 static int hf_scsi_spc_xcopy_cscd_desc_list_len
;
666 static int hf_scsi_spc_xcopy_head_cscd_desc_list_len
;
667 static int hf_scsi_spc_xcopy_head_cscd_desc_type_code
;
668 static int hf_scsi_spc_xcopy_cscd_desc_type_code
;
669 static int hf_scsi_spc_xcopy_inline_data_len
;
670 static int hf_scsi_spc_xcopy_seg_desc_list_len
;
671 static int hf_scsi_spc_xcopy_list_id
;
672 static int hf_scsi_spc_xcopy_rel_init_port_id
;
673 static int hf_scsi_spc_xcopy_per_dev_type_byte
;
674 static int hf_scsi_spc_xcopy_per_dev_type
;
675 static int hf_scsi_spc_xcopy_lu_type
;
676 static int hf_scsi_spc_xcopy_disk_block_len
;
677 static int hf_scsi_spc_xcopy_cscd_desc_code_set
;
678 static int hf_scsi_spc_xcopy_cscd_desc_assoc
;
679 static int hf_scsi_spc_xcopy_cscd_desc_des_type
;
680 static int hf_scsi_spc_xcopy_cscd_desc_des_len
;
681 static int hf_scsi_spc_xcopy_seg_desc_type
;
682 static int hf_scsi_spc_xcopy_seg_desc_dc
;
683 static int hf_scsi_spc_xcopy_seg_desc_cat
;
684 static int hf_scsi_spc_xcopy_seg_des_src_desc_id
;
685 static int hf_scsi_spc_xcopy_seg_des_dest_desc_id
;
686 static int hf_scsi_spc_xcopy_num_of_blocks
;
687 static int hf_scsi_spc_xcopy_param_list_id_usage
;
688 static int hf_scsi_spc_xcopy_param_str
;
689 static int hf_scsi_spc_xcopy_param_priority
;
690 static int hf_scsi_spc_xcopy_param_byte
;
691 static int hf_scsi_spc_xcopy_source_lba
;
692 static int hf_scsi_spc_xcopy_dest_lba
;
693 static int hf_scsi_recv_copy_max_cscd_desc_count
;
694 static int hf_scsi_recv_copy_max_seg_desc_count
;
695 static int hf_scsi_recv_copy_max_desc_list_len
;
696 static int hf_scsi_recv_copy_max_seg_len
;
697 static int hf_scsi_recv_copy_max_inline_data_len
;
698 static int hf_scsi_recv_copy_held_data_limit
;
699 static int hf_scsi_recv_copy_max_stream_dev_trans_size
;
700 static int hf_scsi_recv_copy_snlid
;
701 static int hf_scsi_recv_copy_avail_data
;
702 static int hf_scsi_recv_copy_total_con_copies
;
703 static int hf_scsi_recv_copy_max_con_copies
;
704 static int hf_scsi_recv_copy_data_seg_gran
;
705 static int hf_scsi_recv_copy_inline_data_gran
;
706 static int hf_scsi_recv_copy_held_data_gran
;
707 static int hf_scsi_recv_copy_implemented_desc_list_len
;
708 static int hf_scsi_segment_descriptor_length
;
709 static int hf_scsi_designator
;
710 static int hf_scsi_inline_data
;
711 static int hf_scsi_reserved_8
;
712 static int hf_scsi_reserved_16
;
713 static int hf_scsi_reserved_24
;
714 static int hf_scsi_reserved_32
;
715 static int hf_scsi_reserved_64
;
716 static int hf_scsi_naa_type
;
717 static int hf_scsi_naa_locally_assigned
;
718 static int hf_scsi_naa_ieee_company_id
;
719 static int hf_scsi_naa_vendor_specific
;
720 static int hf_scsi_naa_vendor_specific_extension
;
723 static int ett_scsi_page
;
724 int ett_scsi_control
;
725 static int ett_scsi_inq_control
;
726 static int ett_scsi_inq_peripheral
;
727 static int ett_scsi_inq_acaflags
;
728 static int ett_scsi_inq_rmbflags
;
729 static int ett_scsi_inq_sccsflags
;
730 static int ett_scsi_inq_bqueflags
;
731 static int ett_scsi_inq_reladrflags
;
732 static int ett_scsi_log
;
733 static int ett_scsi_log_ppc
;
734 static int ett_scsi_log_pc
;
735 static int ett_scsi_log_param
;
736 static int ett_scsi_fragments
;
737 static int ett_scsi_fragment
;
738 static int ett_persresv_control
;
739 static int ett_scsi_lun
;
740 static int ett_scsi_lun_unit
;
741 static int ett_scsi_prevent_allow
;
742 static int ett_command_descriptor
;
743 static int ett_timeout_descriptor
;
744 static int ett_sense_descriptor
;
745 static int ett_sense_osd_not_initiated
;
746 static int ett_sense_osd_completed
;
747 static int ett_xcopy_per_dev_type
;
748 static int ett_xcopy_param_byte
;
749 static int ett_scsi_xcopy_cscds
;
750 static int ett_scsi_xcopy_cscd
;
751 static int ett_scsi_xcopy_dev_params
;
752 static int ett_scsi_xcopy_segs
;
753 static int ett_scsi_xcopy_seg
;
754 static int ett_scsi_xcopy_seg_param
;
755 static int ett_scsi_cscd_desc
;
756 static int ett_scsi_naa
;
757 static int ett_scsi_designation_descriptor
;
759 /* Generated from convert_proto_tree_add_text.pl */
760 static expert_field ei_scsi_unknown_scsi_exchange
;
761 static expert_field ei_scsi_product_data_goes_past_end_of_page
;
762 static expert_field ei_scsi_unknown_page
;
763 static expert_field ei_scsi_no_dissection_for_service_action
;
764 static expert_field ei_scsi_unknown_serv_action
;
768 /* Defragment of SCSI DATA IN/OUT */
769 static bool scsi_defragment
;
771 static reassembly_table scsi_reassembly_table
;
774 * Required by all commands
776 int * const cdb_control_fields
[6] = {
777 &hf_scsi_control_vendor_specific
,
778 &hf_scsi_control_reserved
,
779 &hf_scsi_control_naca
,
780 &hf_scsi_control_obs1
,
781 &hf_scsi_control_obs2
,
785 static const fragment_items scsi_frag_items
= {
790 &hf_scsi_fragment_overlap
,
791 &hf_scsi_fragment_overlap_conflict
,
792 &hf_scsi_fragment_multiple_tails
,
793 &hf_scsi_fragment_too_long_fragment
,
794 &hf_scsi_fragment_error
,
795 &hf_scsi_fragment_count
,
796 &hf_scsi_reassembled_in
,
797 &hf_scsi_reassembled_length
,
798 /* Reassembled data field */
804 typedef uint32_t scsi_cmnd_type
;
805 typedef uint32_t scsi_device_type
;
807 /* Valid SCSI Command Types */
808 #define SCSI_CMND_SPC 1
809 #define SCSI_CMND_SBC 2
810 #define SCSI_CMND_SSC 3
811 #define SCSI_CMND_SMC 4
812 #define SCSI_CMND_MMC 5
814 /* SPC and SPC-2 Commands */
815 static const value_string scsi_spc_vals
[] = {
816 /* 0x00 */ {SCSI_SPC_TESTUNITRDY
, "Test Unit Ready"},
817 /* 0x03 */ {SCSI_SPC_REQSENSE
, "Request Sense"},
818 /* 0x12 */ {SCSI_SPC_INQUIRY
, "Inquiry"},
819 /* 0x15 */ {SCSI_SPC_MODESELECT6
, "Mode Select(6)"},
820 /* 0x16 */ {SCSI_SPC_RESERVE6
, "Reserve(6)"},
821 /* 0x17 */ {SCSI_SPC_RELEASE6
, "Release(6)"},
822 /* 0x18 */ {SCSI_SPC_COPY
, "Copy"},
823 /* 0x1A */ {SCSI_SPC_MODESENSE6
, "Mode Sense(6)"},
824 /* 0x1C */ {SCSI_SPC_RCVDIAGRESULTS
, "Receive Diagnostics Results"},
825 /* 0x1D */ {SCSI_SPC_SENDDIAG
, "Send Diagnostic"},
826 /* 0x1E */ {SCSI_SPC_PREVMEDREMOVAL
, "Prevent/Allow Medium Removal"},
827 /* 0x39 */ {SCSI_SPC_COMPARE
, "Compare"},
828 /* 0x3A */ {SCSI_SPC_COPY_AND_VERIFY
, "Copy And Verify"},
829 /* 0x3B */ {SCSI_SPC_WRITEBUFFER
, "Write Buffer"},
830 /* 0x3C */ {SCSI_SPC_READBUFFER
, "Read Buffer"},
831 /* 0x40 */ {SCSI_SPC_CHANGE_DEFINITION
, "Change Definition"},
832 /* 0x4C */ {SCSI_SPC_LOGSELECT
, "Log Select"},
833 /* 0x4D */ {SCSI_SPC_LOGSENSE
, "Log Sense"},
834 /* 0x55 */ {SCSI_SPC_MODESELECT10
, "Mode Select(10)"},
835 /* 0x56 */ {SCSI_SPC_RESERVE10
, "Reserve(10)"},
836 /* 0x57 */ {SCSI_SPC_RELEASE10
, "Release(10)"},
837 /* 0x5A */ {SCSI_SPC_MODESENSE10
, "Mode Sense(10)"},
838 /* 0x5E */ {SCSI_SPC_PERSRESVIN
, "Persistent Reserve In"},
839 /* 0x5F */ {SCSI_SPC_PERSRESVOUT
, "Persistent Reserve Out"},
840 /* 0x7F */ {SCSI_SPC_VARLENCDB
, "Variable Length CDB"},
841 /* 0x83 */ {SCSI_SPC_EXTCOPY
, "Extended Copy"},
842 /* 0x84 */ {SCSI_SPC_RECVCOPY
, "Receive Copy"},
843 /* 0x86 */ {SCSI_SPC_ACCESS_CONTROL_IN
, "Access Control In"},
844 /* 0x87 */ {SCSI_SPC_ACCESS_CONTROL_OUT
, "Access Control Out"},
845 /* 0xA0 */ {SCSI_SPC_REPORTLUNS
, "Report LUNs"},
846 /* 0xA3 */ {SCSI_SPC_MGMT_PROTOCOL_IN
, "Mgmt Protocol In"},
849 static value_string_ext scsi_spc_vals_ext
= VALUE_STRING_EXT_INIT(scsi_spc_vals
);
851 static const value_string scsi_lun_address_mode_vals
[] = {
852 { 0, "Peripheral Device Addressing Method" },
853 { 1, "Flat Space Addressing Method" },
854 { 2, "Logical Unit Addressing Method" },
855 { 3, "Extended Logical Unit Addressing" },
859 static const value_string provisioning_vals
[] = {
860 {0, "No provisioning"},
861 {1, "Resource provisioned"},
862 {2, "Thin provisioned"},
866 static const value_string log_flags_tmc_vals
[] = {
867 {0, "Every update of the cumulative value"},
868 {1, "Cumulative value equal to threshold value"},
869 {2, "Cumulative value not equal to threshold value"},
870 {3, "Cumulative value greater than threshold value"},
874 static const value_string scsi_select_report_val
[] = {
875 {0, "Select All LUNs" },
876 {1, "Select Well-Known LUNs" },
877 {2, "Select All LUNs accessible to this I_T nexus" },
881 #define SCSI_EVPD_SUPPPG 0x00
882 #define SCSI_EVPD_DEVSERNUM 0x80
883 #define SCSI_EVPD_OPER 0x81
884 #define SCSI_EVPD_ASCIIOPER 0x82
885 #define SCSI_EVPD_DEVID 0x83
886 #define SCSI_EVPD_BLKLIMITS 0xb0
887 #define SCSI_EVPD_BLKDEVCHAR 0xb1
888 #define SCSI_EVPD_LBP 0xb2
890 static const value_string scsi_evpd_pagecode_val
[] = {
891 {SCSI_EVPD_SUPPPG
, "Supported Vital Product Data Pages"},
892 {0x01, "ASCII Information Page"},
893 {0x02, "ASCII Information Page"},
894 {0x03, "ASCII Information Page"},
895 {0x04, "ASCII Information Page"},
896 {0x05, "ASCII Information Page"},
897 {0x06, "ASCII Information Page"},
898 {0x07, "ASCII Information Page"},
899 /* XXX - 0x01 through 0x7F are all ASCII information pages */
900 {SCSI_EVPD_DEVSERNUM
, "Unit Serial Number Page"},
901 {SCSI_EVPD_OPER
, "Implemented Operating Definition Page"},
902 {SCSI_EVPD_ASCIIOPER
, "ASCII Implemented Operating Definition Page"},
903 {SCSI_EVPD_DEVID
, "Device Identification Page"},
904 {SCSI_EVPD_BLKLIMITS
, "Block Limits Page"},
905 {SCSI_EVPD_BLKDEVCHAR
,"Block Device Characteristics"},
906 {SCSI_EVPD_LBP
, "Logical Block Provisioning Page"},
910 static const value_string mrr_val
[] = {
911 {0x0, "Media rotation speed not reported"},
912 {0x1, "Non-rotating media"},
913 /* 0x2 - 0x400 - reserved */
916 {10000, "10,000 RPM"},
917 {15000, "15,000 RPM"},
920 static const value_string scsi_log_pc_val
[] = {
921 {0, "Threshold Values"},
922 {1, "Cumulative Values"},
923 {2, "Default Threshold Values"},
924 {3, "Default Cumulative Values"},
928 #define NAA_TYPE_IEEE_EXTENDED 2
929 #define NAA_TYPE_LOCALLY_ASSIGNED 3
930 #define NAA_TYPE_IEEE_REGISTERED 5
931 #define NAA_TYPE_IEEE_REGISTERED_EXTENDED 6
932 static const value_string scsi_naa_designator_type_val
[] = {
933 {2, "IEEE Extended" },
934 {3, "Locally Assigned" },
935 {5, "IEEE Registered" },
936 {6, "IEEE Registered Extended" },
940 static const unit_name_string units_100_milliseconds
= { "100ms", NULL
};
942 #define SCSI_NUM_PROCEDURES 256
943 typedef struct scsistat_tap_data
947 value_string_ext
*cdbnames_ext
;
949 } scsistat_tap_data_t
;
952 scsistat_init(struct register_srt
* srt
, GArray
* srt_array
)
954 scsistat_tap_data_t
* tap_data
= (scsistat_tap_data_t
*)get_srt_table_param_data(srt
);
955 srt_stat_table
*scsi_srt_table
;
958 DISSECTOR_ASSERT(tap_data
);
960 scsi_srt_table
= init_srt_table(tap_data
->prog
, NULL
, srt_array
, SCSI_NUM_PROCEDURES
, NULL
, tap_data
->hf_name
, tap_data
);
961 for (i
= 0; i
< SCSI_NUM_PROCEDURES
; i
++)
963 init_srt_table_row(scsi_srt_table
, i
,
964 val_to_str_ext_const(i
, tap_data
->cdbnames_ext
, "Unknown"));
968 static tap_packet_status
969 scsistat_packet(void *pss
, packet_info
*pinfo
, epan_dissect_t
*edt _U_
, const void *prv
, tap_flags_t flags _U_
)
972 srt_stat_table
*scsi_srt_table
;
973 srt_data_t
*data
= (srt_data_t
*)pss
;
974 const scsi_task_data_t
*ri
= (const scsi_task_data_t
*)prv
;
975 scsistat_tap_data_t
* tap_data
;
977 scsi_srt_table
= g_array_index(data
->srt_array
, srt_stat_table
*, i
);
978 tap_data
= (scsistat_tap_data_t
*)scsi_srt_table
->table_specific_data
;
980 /* we are only interested in response packets */
981 if (ri
->type
!= SCSI_PDU_TYPE_RSP
) {
982 return TAP_PACKET_DONT_REDRAW
;
984 /* we are only interested in a specific commandset */
985 if ( (!ri
->itl
) || ((ri
->itl
->cmdset
&SCSI_CMDSET_MASK
) != tap_data
->cmdset
) ) {
986 return TAP_PACKET_DONT_REDRAW
;
988 /* check that the opcode looks sane */
989 if ( (!ri
->itlq
) || (ri
->itlq
->scsi_opcode
> 255) ) {
990 return TAP_PACKET_DONT_REDRAW
;
993 add_srt_table_data(scsi_srt_table
, ri
->itlq
->scsi_opcode
, &ri
->itlq
->fc_time
, pinfo
);
994 return TAP_PACKET_REDRAW
;
998 scsistat_param(register_srt_t
* srt
, const char* opt_arg
, char** err
)
1002 scsistat_tap_data_t
* tap_data
;
1004 if (sscanf(opt_arg
, ",%d%n", &program
, &pos
) == 1)
1006 tap_data
= g_new0(scsistat_tap_data_t
, 1);
1007 tap_data
->cmdset
= (uint8_t)program
;
1011 tap_data
->prog
= "SBC (disk)";
1012 tap_data
->cdbnames_ext
= &scsi_sbc_vals_ext
;
1013 tap_data
->hf_name
= "scsi_sbc.opcode";
1016 tap_data
->prog
= "SSC (tape)";
1017 tap_data
->cdbnames_ext
= &scsi_ssc_vals_ext
;
1018 tap_data
->hf_name
= "scsi_ssc.opcode";
1020 case SCSI_DEV_CDROM
:
1021 tap_data
->prog
= "MMC (cd/dvd)";
1022 tap_data
->cdbnames_ext
= &scsi_mmc_vals_ext
;
1023 tap_data
->hf_name
= "scsi_mmc.opcode";
1026 tap_data
->prog
= "SMC (tape robot)";
1027 tap_data
->cdbnames_ext
= &scsi_smc_vals_ext
;
1028 tap_data
->hf_name
= "scsi_smc.opcode";
1031 tap_data
->prog
= "OSD (object based)";
1032 tap_data
->cdbnames_ext
= &scsi_osd_vals_ext
;
1033 tap_data
->hf_name
= "scsi_osd.opcode";
1037 set_srt_table_param_data(srt
, tap_data
);
1041 *err
= g_strdup("<cmdset>[,<filter>]");
1047 /* TapeAlert page : read warning flag */
1049 log_parameter_2e_0001(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1051 proto_tree_add_item(tree
, hf_scsi_log_ta_rw
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1054 /* TapeAlert page : write warning flag */
1056 log_parameter_2e_0002(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1058 proto_tree_add_item(tree
, hf_scsi_log_ta_ww
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1061 /* TapeAlert page : hard error flag */
1063 log_parameter_2e_0003(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1065 proto_tree_add_item(tree
, hf_scsi_log_ta_he
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1068 /* TapeAlert page : media flag */
1070 log_parameter_2e_0004(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1072 proto_tree_add_item(tree
, hf_scsi_log_ta_media
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1075 /* TapeAlert page : read failure flag */
1077 log_parameter_2e_0005(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1079 proto_tree_add_item(tree
, hf_scsi_log_ta_rf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1082 /* TapeAlert page : write failure flag */
1084 log_parameter_2e_0006(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1086 proto_tree_add_item(tree
, hf_scsi_log_ta_wf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1089 /* TapeAlert page : media life flag */
1091 log_parameter_2e_0007(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1093 proto_tree_add_item(tree
, hf_scsi_log_ta_ml
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1096 /* TapeAlert page : not data grade flag */
1098 log_parameter_2e_0008(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1100 proto_tree_add_item(tree
, hf_scsi_log_ta_ndg
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1103 /* TapeAlert page : write protect flag */
1105 log_parameter_2e_0009(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1107 proto_tree_add_item(tree
, hf_scsi_log_ta_wp
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1110 /* TapeAlert page : no removal flag */
1112 log_parameter_2e_000a(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1114 proto_tree_add_item(tree
, hf_scsi_log_ta_nr
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1117 /* TapeAlert page : cleaning media flag */
1119 log_parameter_2e_000b(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1121 proto_tree_add_item(tree
, hf_scsi_log_ta_cm
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1124 /* TapeAlert page : unsupported format flag */
1126 log_parameter_2e_000c(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1128 proto_tree_add_item(tree
, hf_scsi_log_ta_uf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1131 /* TapeAlert page : removable mechanical cartridge failure flag */
1133 log_parameter_2e_000d(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1135 proto_tree_add_item(tree
, hf_scsi_log_ta_rmcf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1138 /* TapeAlert page : unrecoverable mechanical cartridge failure flag */
1140 log_parameter_2e_000e(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1142 proto_tree_add_item(tree
, hf_scsi_log_ta_umcf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1145 /* TapeAlert page : memory chip in cartridge failure flag */
1147 log_parameter_2e_000f(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1149 proto_tree_add_item(tree
, hf_scsi_log_ta_mcicf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1152 /* TapeAlert page : forced eject flag */
1154 log_parameter_2e_0010(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1156 proto_tree_add_item(tree
, hf_scsi_log_ta_fe
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1159 /* TapeAlert page : read only format flag */
1161 log_parameter_2e_0011(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1163 proto_tree_add_item(tree
, hf_scsi_log_ta_rof
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1166 /* TapeAlert page : tape directory corrupted on load flag */
1168 log_parameter_2e_0012(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1170 proto_tree_add_item(tree
, hf_scsi_log_ta_tdcol
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1173 /* TapeAlert page : nearing media life flag */
1175 log_parameter_2e_0013(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1177 proto_tree_add_item(tree
, hf_scsi_log_ta_nml
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1180 /* TapeAlert page : clean now flag */
1182 log_parameter_2e_0014(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1184 proto_tree_add_item(tree
, hf_scsi_log_ta_cn
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1187 /* TapeAlert page : clean periodic flag */
1189 log_parameter_2e_0015(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1191 proto_tree_add_item(tree
, hf_scsi_log_ta_cp
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1194 /* TapeAlert page : expired cleaning media flag */
1196 log_parameter_2e_0016(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1198 proto_tree_add_item(tree
, hf_scsi_log_ta_ecm
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1201 /* TapeAlert page : invalid cleaning tape flag */
1203 log_parameter_2e_0017(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1205 proto_tree_add_item(tree
, hf_scsi_log_ta_ict
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1208 /* TapeAlert page : retention requested flag */
1210 log_parameter_2e_0018(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1212 proto_tree_add_item(tree
, hf_scsi_log_ta_rr
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1215 /* TapeAlert page : dual port interface error flag */
1217 log_parameter_2e_0019(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1219 proto_tree_add_item(tree
, hf_scsi_log_ta_dpie
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1222 /* TapeAlert page : cooling fan failure flag */
1224 log_parameter_2e_001a(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1226 proto_tree_add_item(tree
, hf_scsi_log_ta_cff
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1229 /* TapeAlert page : power supply failure flag */
1231 log_parameter_2e_001b(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1233 proto_tree_add_item(tree
, hf_scsi_log_ta_psf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1236 /* TapeAlert page : power consumption flag */
1238 log_parameter_2e_001c(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1240 proto_tree_add_item(tree
, hf_scsi_log_ta_pc
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1243 /* TapeAlert page : drive maintenance flag */
1245 log_parameter_2e_001d(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1247 proto_tree_add_item(tree
, hf_scsi_log_ta_dm
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1250 /* TapeAlert page : hardware a flag */
1252 log_parameter_2e_001e(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1254 proto_tree_add_item(tree
, hf_scsi_log_ta_hwa
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1257 /* TapeAlert page : hardware b flag */
1259 log_parameter_2e_001f(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1261 proto_tree_add_item(tree
, hf_scsi_log_ta_hwb
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1264 /* TapeAlert page : interface flag */
1266 log_parameter_2e_0020(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1268 proto_tree_add_item(tree
, hf_scsi_log_ta_if
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1271 /* TapeAlert page : eject media flag */
1273 log_parameter_2e_0021(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1275 proto_tree_add_item(tree
, hf_scsi_log_ta_em
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1278 /* TapeAlert page : download failed flag */
1280 log_parameter_2e_0022(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1282 proto_tree_add_item(tree
, hf_scsi_log_ta_dwf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1285 /* TapeAlert page : drive humidity flag */
1287 log_parameter_2e_0023(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1289 proto_tree_add_item(tree
, hf_scsi_log_ta_drhu
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1292 /* TapeAlert page : drive temperature flag */
1294 log_parameter_2e_0024(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1296 proto_tree_add_item(tree
, hf_scsi_log_ta_drtm
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1299 /* TapeAlert page : drive voltage flag */
1301 log_parameter_2e_0025(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1303 proto_tree_add_item(tree
, hf_scsi_log_ta_drvo
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1306 /* TapeAlert page : periodic failure flag */
1308 log_parameter_2e_0026(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1310 proto_tree_add_item(tree
, hf_scsi_log_ta_pefa
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1313 /* TapeAlert page : diagnostics required flag */
1315 log_parameter_2e_0027(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1317 proto_tree_add_item(tree
, hf_scsi_log_ta_dire
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1320 /* TapeAlert page : lost statistics flag */
1322 log_parameter_2e_0032(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1324 proto_tree_add_item(tree
, hf_scsi_log_ta_lost
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1327 /* TapeAlert page : tape directory invalid at unload flag */
1329 log_parameter_2e_0033(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1331 proto_tree_add_item(tree
, hf_scsi_log_ta_tduau
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1334 /* TapeAlert page : tape system area write failure flag */
1336 log_parameter_2e_0034(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1338 proto_tree_add_item(tree
, hf_scsi_log_ta_tsawf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1341 /* TapeAlert page : tape system area read failure flag */
1343 log_parameter_2e_0035(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1345 proto_tree_add_item(tree
, hf_scsi_log_ta_tsarf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1348 /* TapeAlert page : no start of data flag */
1350 log_parameter_2e_0036(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1352 proto_tree_add_item(tree
, hf_scsi_log_ta_nsod
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1355 /* TapeAlert page : loading failure flag */
1357 log_parameter_2e_0037(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1359 proto_tree_add_item(tree
, hf_scsi_log_ta_lofa
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1362 /* TapeAlert page : unrecoverable unload failure flag */
1364 log_parameter_2e_0038(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1366 proto_tree_add_item(tree
, hf_scsi_log_ta_uuf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1369 /* TapeAlert page : automatic interface failure flag */
1371 log_parameter_2e_0039(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1373 proto_tree_add_item(tree
, hf_scsi_log_ta_aif
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1376 /* TapeAlert page : firmware failure flag */
1378 log_parameter_2e_003a(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1380 proto_tree_add_item(tree
, hf_scsi_log_ta_fwf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1383 /* TapeAlert page : worm medium integrity check failed flag */
1385 log_parameter_2e_003b(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1387 proto_tree_add_item(tree
, hf_scsi_log_ta_wmicf
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1390 /* TapeAlert page : worm medium overwrite attempted flag */
1392 log_parameter_2e_003c(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1394 proto_tree_add_item(tree
, hf_scsi_log_ta_wmoa
, tvb
, 0, 1, ENC_BIG_ENDIAN
);
1398 typedef void (*log_parameter_dissector
)(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
1400 typedef struct _log_page_parameters_t
{
1403 log_parameter_dissector dissector
;
1404 } log_page_parameters_t
;
1405 static const log_page_parameters_t tape_alert_log_parameters
[] = {
1406 {0x0001, "Read Warning", log_parameter_2e_0001
},
1407 {0x0002, "write warning", log_parameter_2e_0002
},
1408 {0x0003, "hard error", log_parameter_2e_0003
},
1409 {0x0004, "media", log_parameter_2e_0004
},
1410 {0x0005, "read failure", log_parameter_2e_0005
},
1411 {0x0006, "write failure", log_parameter_2e_0006
},
1412 {0x0007, "media life", log_parameter_2e_0007
},
1413 {0x0008, "not data grade", log_parameter_2e_0008
},
1414 {0x0009, "write protect", log_parameter_2e_0009
},
1415 {0x000a, "no removal", log_parameter_2e_000a
},
1416 {0x000b, "cleaning media", log_parameter_2e_000b
},
1417 {0x000c, "unsupported format", log_parameter_2e_000c
},
1418 {0x000d, "removable mechanical cartridge failure", log_parameter_2e_000d
},
1419 {0x000e, "unrecoverable mechanical cartridge failure", log_parameter_2e_000e
},
1420 {0x000f, "memory chip in cartridge failure", log_parameter_2e_000f
},
1421 {0x0010, "forced eject", log_parameter_2e_0010
},
1422 {0x0011, "read only format", log_parameter_2e_0011
},
1423 {0x0012, "tape directory corrupted on load", log_parameter_2e_0012
},
1424 {0x0013, "nearing media life", log_parameter_2e_0013
},
1425 {0x0014, "clean now", log_parameter_2e_0014
},
1426 {0x0015, "clean periodic", log_parameter_2e_0015
},
1427 {0x0016, "expired cleaning media", log_parameter_2e_0016
},
1428 {0x0017, "invalid cleaning tape", log_parameter_2e_0017
},
1429 {0x0018, "retention requested", log_parameter_2e_0018
},
1430 {0x0019, "dual port interface error", log_parameter_2e_0019
},
1431 {0x001a, "cooling fan failure", log_parameter_2e_001a
},
1432 {0x001b, "power supply failure", log_parameter_2e_001b
},
1433 {0x001c, "power consumption", log_parameter_2e_001c
},
1434 {0x001d, "drive maintenance", log_parameter_2e_001d
},
1435 {0x001e, "hardware a", log_parameter_2e_001e
},
1436 {0x001f, "hardware b", log_parameter_2e_001f
},
1437 {0x0020, "interface", log_parameter_2e_0020
},
1438 {0x0021, "eject media", log_parameter_2e_0021
},
1439 {0x0022, "download failed", log_parameter_2e_0022
},
1440 {0x0023, "drive humidity", log_parameter_2e_0023
},
1441 {0x0024, "drive temperature", log_parameter_2e_0024
},
1442 {0x0025, "drive voltage", log_parameter_2e_0025
},
1443 {0x0026, "periodic failure", log_parameter_2e_0026
},
1444 {0x0027, "diagnostics required", log_parameter_2e_0027
},
1445 {0x0032, "lost statistics", log_parameter_2e_0032
},
1446 {0x0033, "tape directory invalid at unload", log_parameter_2e_0033
},
1447 {0x0034, "tape system area write failure", log_parameter_2e_0034
},
1448 {0x0035, "tape system area read failure", log_parameter_2e_0035
},
1449 {0x0036, "no start of data", log_parameter_2e_0036
},
1450 {0x0037, "loading failure", log_parameter_2e_0037
},
1451 {0x0038, "unrecoverable unload failure", log_parameter_2e_0038
},
1452 {0x0039, "automatic interface failure", log_parameter_2e_0039
},
1453 {0x003a, "firmware failure", log_parameter_2e_003a
},
1454 {0x003b, "worm medium integrity check failed", log_parameter_2e_003b
},
1455 {0x003c, "worm medium overwrite attempted", log_parameter_2e_003c
},
1459 typedef struct _log_pages_t
{
1461 const log_page_parameters_t
*parameters
;
1465 #define LOG_PAGE_TAPE_ALERT 0x2e
1466 static const value_string scsi_log_page_val
[] = {
1467 {0x00, "Supported Log Pages"},
1468 {0x01, "Buffer Overrun/Underrun Page"},
1469 {0x02, "Error Counter (write) Page"},
1470 {0x03, "Error Counter (read) Page"},
1471 {0x04, "Error Counter (read reverse) Page"},
1472 {0x05, "Error Counter (verify) Page"},
1473 {0x06, "Non-medium Error Page"},
1474 {0x07, "Last n Error Events Page"},
1475 {0x08, "Format Status Log Page"},
1476 {0x0B, "Last n Deferred Errors or Async Events Page"},
1477 {0x0C, "Sequential-Access Device Log Page"},
1478 {0x0D, "Temperature Page"},
1479 {0x0E, "Start-Stop Cycle Counter Page"},
1480 {0x0F, "Application Client Page"},
1481 {0x10, "Self-test Results Page"},
1482 {0x11, "DTD Status Log Page"},
1483 {LOG_PAGE_TAPE_ALERT
, "Tape-Alert Log Page (SSC)"},
1484 {0x2f, "Informational Exceptions Log Page"},
1488 static const log_pages_t log_pages
[] = {
1489 {LOG_PAGE_TAPE_ALERT
, tape_alert_log_parameters
},
1496 static const value_string scsi_modesns_pc_val
[] = {
1497 {0, "Current Values"},
1498 {1, "Changeable Values"},
1499 {2, "Default Values"},
1500 {3, "Saved Values"},
1504 #define SCSI_SPC_MODEPAGE_CTL 0x0A
1505 #define SCSI_SPC_MODEPAGE_DISCON 0x02
1506 #define SCSI_SCSI2_MODEPAGE_PERDEV 0x09 /* Obsolete in SPC-2; generic in SCSI-2 */
1507 #define SCSI_SPC_MODEPAGE_INFOEXCP 0x1C
1508 #define SCSI_SPC_MODEPAGE_PWR 0x1A
1509 #define SCSI_SPC_MODEPAGE_LUN 0x18
1510 #define SCSI_SPC_MODEPAGE_PORT 0x19
1511 #define SCSI_SPC_MODEPAGE_VEND 0x00
1513 static const value_string scsi_spc_modepage_val
[] = {
1514 {SCSI_SPC_MODEPAGE_CTL
, "Control"},
1515 {SCSI_SPC_MODEPAGE_DISCON
, "Disconnect-Reconnect"},
1516 {SCSI_SCSI2_MODEPAGE_PERDEV
, "Peripheral Device"},
1517 {SCSI_SPC_MODEPAGE_INFOEXCP
, "Informational Exceptions Control"},
1518 {SCSI_SPC_MODEPAGE_PWR
, "Power Condition"},
1519 {SCSI_SPC_MODEPAGE_LUN
, "Protocol Specific LUN"},
1520 {SCSI_SPC_MODEPAGE_PORT
, "Protocol-Specific Port"},
1521 {SCSI_SPC_MODEPAGE_VEND
, "Vendor Specific Page"},
1522 {0x3F, "Return All Mode Pages"},
1526 #define SCSI_SBC_MODEPAGE_RDWRERR 0x01
1527 #define SCSI_SBC_MODEPAGE_FMTDEV 0x03
1528 #define SCSI_SBC_MODEPAGE_DISKGEOM 0x04
1529 #define SCSI_SBC_MODEPAGE_FLEXDISK 0x05
1530 #define SCSI_SBC_MODEPAGE_VERERR 0x07
1531 #define SCSI_SBC_MODEPAGE_CACHE 0x08
1532 #define SCSI_SBC_MODEPAGE_MEDTYPE 0x0B
1533 #define SCSI_SBC_MODEPAGE_NOTPART 0x0C
1534 #define SCSI_SBC_MODEPAGE_XORCTL 0x10
1536 static const value_string scsi_sbc_modepage_val
[] = {
1537 {SCSI_SBC_MODEPAGE_RDWRERR
, "Read/Write Error Recovery"},
1538 {SCSI_SBC_MODEPAGE_FMTDEV
, "Format Device"},
1539 {SCSI_SBC_MODEPAGE_DISKGEOM
, "Rigid Disk Geometry"},
1540 {SCSI_SBC_MODEPAGE_FLEXDISK
, "Flexible Disk"},
1541 {SCSI_SBC_MODEPAGE_VERERR
, "Verify Error Recovery"},
1542 {SCSI_SBC_MODEPAGE_CACHE
, "Caching"},
1543 {SCSI_SBC_MODEPAGE_MEDTYPE
, "Medium Types Supported"},
1544 {SCSI_SBC_MODEPAGE_NOTPART
, "Notch & Partition"},
1545 {SCSI_SBC_MODEPAGE_XORCTL
, "XOR Control"},
1546 {0x3F, "Return All Mode Pages"},
1550 #define SCSI_SSC2_MODEPAGE_DATACOMP 0x0F /* data compression */
1551 #define SCSI_SSC2_MODEPAGE_DEVCONF 0x10 /* device configuration */
1552 #define SCSI_SSC2_MODEPAGE_MEDPAR1 0x11 /* medium partition (1) */
1553 #define SCSI_SSC2_MODEPAGE_MEDPAR2 0x12 /* medium partition (2) */
1554 #define SCSI_SSC2_MODEPAGE_MEDPAR3 0x13 /* medium partition (3) */
1555 #define SCSI_SSC2_MODEPAGE_MEDPAR4 0x14 /* medium partition (4) */
1557 static const value_string scsi_ssc2_modepage_val
[] = {
1558 {SCSI_SSC2_MODEPAGE_DATACOMP
, "Data Compression"},
1559 {SCSI_SSC2_MODEPAGE_DEVCONF
, "Device Configuration"},
1560 {SCSI_SSC2_MODEPAGE_MEDPAR1
, "Medium Partition (1)"},
1561 {SCSI_SSC2_MODEPAGE_MEDPAR2
, "Medium Partition (2)"},
1562 {SCSI_SSC2_MODEPAGE_MEDPAR3
, "Medium Partition (3)"},
1563 {SCSI_SSC2_MODEPAGE_MEDPAR4
, "Medium Partition (4)"},
1564 {0x3F, "Return All Mode Pages"},
1568 #define SCSI_SMC_MODEPAGE_EAA 0x1D /* element address assignment */
1569 #define SCSI_SMC_MODEPAGE_TRANGEOM 0x1E /* transport geometry parameters */
1570 #define SCSI_SMC_MODEPAGE_DEVCAP 0x1F /* device capabilities */
1572 static const value_string scsi_smc_modepage_val
[] = {
1573 {SCSI_SMC_MODEPAGE_EAA
, "Element Address Assignment"},
1574 {SCSI_SMC_MODEPAGE_TRANGEOM
, "Transport Geometry Parameters"},
1575 {SCSI_SMC_MODEPAGE_DEVCAP
, "Device Capabilities"},
1576 {0x3F, "Return All Mode Pages"},
1580 #define SCSI_MMC5_MODEPAGE_MRW 0x03 /* MRW */
1581 #define SCSI_MMC5_MODEPAGE_WRPARAM 0x05 /* Write Parameters */
1582 #define SCSI_MMC3_MODEPAGE_MMCAP 0x2A /* device capabilities */
1584 static const value_string scsi_mmc5_modepage_val
[] = {
1585 {SCSI_MMC5_MODEPAGE_MRW
, "MRW"},
1586 {SCSI_MMC5_MODEPAGE_WRPARAM
, "Write Parameters"},
1587 {SCSI_MMC3_MODEPAGE_MMCAP
, "MM Capabilities and Mechanical Status"},
1588 {0x3F, "Return All Mode Pages"},
1592 #define SCSI_SPC_RESVIN_SVCA_RDKEYS 0
1593 #define SCSI_SPC_RESVIN_SVCA_RDRESV 1
1594 #define SCSI_SPC_RESVIN_SVCA_RPTCAP 2
1595 #define SCSI_SPC_RESVIN_SVCA_FULL 3
1597 static const value_string scsi_persresvin_svcaction_val
[] = {
1598 {SCSI_SPC_RESVIN_SVCA_RDKEYS
, "Read Keys"},
1599 {SCSI_SPC_RESVIN_SVCA_RDRESV
, "Read Reservation"},
1600 {SCSI_SPC_RESVIN_SVCA_RPTCAP
, "Report Capabilities"},
1601 {SCSI_SPC_RESVIN_SVCA_FULL
, "Read Full Status"},
1605 #define SCSI_PR_REGISTER 0
1606 #define SCSI_PR_RESERVE 1
1607 #define SCSI_PR_RELEASE 2
1608 #define SCSI_PR_CLEAR 3
1609 #define SCSI_PR_PREEMPT 4
1610 #define SCSI_PR_PREEM_ABORT 5
1611 #define SCSI_PR_REG_IGNORE 6
1612 #define SCSI_PR_REG_MOVE 7
1613 #define SCSI_PR_REPLACE_LOST 8
1615 static const value_string scsi_persresvout_svcaction_val
[] = {
1616 {SCSI_PR_REGISTER
, "Register"},
1617 {SCSI_PR_RESERVE
, "Reserve"},
1618 {SCSI_PR_RELEASE
, "Release"},
1619 {SCSI_PR_CLEAR
, "Clear"},
1620 {SCSI_PR_PREEMPT
, "Preempt"},
1621 {SCSI_PR_PREEM_ABORT
, "Preempt & Abort"},
1622 {SCSI_PR_REG_IGNORE
, "Register & Ignore Existing Key"},
1623 {SCSI_PR_REG_MOVE
, "Register & Move"},
1624 {SCSI_PR_REPLACE_LOST
, "Replace Lost Reservation"},
1628 static const value_string scsi_persresv_scope_val
[] = {
1631 {2, "Element Scope"},
1635 static const value_string scsi_persresv_type_val
[] = {
1638 {5, "Write Excl, Registrants Only"},
1639 {6, "Excl Access, Registrants Only"},
1640 {7, "Write Excl, All Registrants"},
1641 {8, "Excl Access, All Registrants"},
1645 static const value_string scsi_qualifier_val
[] = {
1646 {0x0, "Device type is connected to logical unit"},
1647 {0x1, "Device type is supported by server but is not connected to logical unit"},
1648 {0x3, "Device type is not supported by server"},
1652 static const value_string scsi_devtype_val
[] = {
1653 {SCSI_DEV_SBC
, "Direct Access Device"},
1654 {SCSI_DEV_SSC
, "Sequential Access Device"},
1655 {SCSI_DEV_PRNT
, "Printer"},
1656 {SCSI_DEV_PROC
, "Processor"},
1657 {SCSI_DEV_WORM
, "WORM"},
1658 {SCSI_DEV_CDROM
, "CD-ROM"},
1659 {SCSI_DEV_SCAN
, "Scanner"},
1660 {SCSI_DEV_OPTMEM
, "Optical Memory"},
1661 {SCSI_DEV_SMC
, "Medium Changer"},
1662 {SCSI_DEV_COMM
, "Communication"},
1663 {SCSI_DEV_RAID
, "Storage Array"},
1664 {SCSI_DEV_SES
, "Enclosure Services"},
1665 {SCSI_DEV_RBC
, "Simplified Block Device"},
1666 {SCSI_DEV_OCRW
, "Optical Card Reader/Writer"},
1667 {SCSI_DEV_OSD
, "Object-based Storage Device"},
1668 {SCSI_DEV_ADC
, "Automation/Drive Interface"},
1669 {0x1E , "Well known logical unit"},
1670 {SCSI_DEV_NOLUN
, "Unknown or no device type"},
1674 static const enum_val_t scsi_devtype_options
[] = {
1675 {"block", "Block Device", SCSI_DEV_SBC
},
1676 {"sequential", "Sequential Device", SCSI_DEV_SSC
},
1677 {"objectbased", "Object Based Storage Device", SCSI_DEV_OSD
},
1678 {"mediumchanger", "Medium Changer Device", SCSI_DEV_SMC
},
1679 {"cdrom", "Multimedia Device", SCSI_DEV_CDROM
},
1683 static const value_string scsi_inquiry_vers_val
[] = {
1684 {0x00, "No Compliance to any Standard"},
1685 {0x02, "Compliance to ANSI X3.131:1994"},
1686 {0x03, "Compliance to ANSI X3.301:1997"},
1687 {0x04, "Compliance to SPC-2"},
1688 {0x05, "Compliance to SPC-3"},
1689 {0x06, "Compliance to SPC-4"},
1690 {0x80, "Compliance to ISO/IEC 9316:1995"},
1691 {0x82, "Compliance to ISO/IEC 9316:1995 and to ANSI X3.131:1994"},
1692 {0x83, "Compliance to ISO/IEC 9316:1995 and to ANSI X3.301:1997"},
1693 {0x84, "Compliance to ISO/IEC 9316:1995 and SPC-2"},
1697 static const value_string scsi_modesense_medtype_sbc_val
[] = {
1699 {0x01, "Flexible disk, single-sided; unspecified medium"},
1700 {0x02, "Flexible disk, double-sided; unspecified medium"},
1701 {0x05, "Flexible disk, single-sided, single density; 200mm/8in diameter"},
1702 {0x06, "Flexible disk, double-sided, single density; 200mm/8in diameter"},
1703 {0x09, "Flexible disk, single-sided, double density; 200mm/8in diameter"},
1704 {0x0A, "Flexible disk, double-sided, double density; 200mm/8in diameter"},
1705 {0x0D, "Flexible disk, single-sided, single density; 130mm/5.25in diameter"},
1706 {0x12, "Flexible disk, double-sided, single density; 130mm/5.25in diameter"},
1707 {0x16, "Flexible disk, single-sided, double density; 130mm/5.25in diameter"},
1708 {0x1A, "Flexible disk, double-sided, double density; 130mm/5.25in diameter"},
1709 {0x1E, "Flexible disk, double-sided; 90mm/3.5in diameter"},
1710 {0x40, "Direct-access magnetic tape, 12 tracks"},
1711 {0x44, "Direct-access magnetic tape, 24 tracks"},
1715 static const value_string scsi_verdesc_val
[] = {
1716 {0x0000, "Version Descriptor Not Supported or No Standard Identified"},
1717 {0x0020, "SAM (no version claimed)"},
1718 {0x003B, "SAM T10/0994-D revision 18"},
1719 {0x003C, "SAM ANSI INCITS 270-1996"},
1720 {0x0040, "SAM-2 (no version claimed)"},
1721 {0x0054, "SAM-2 T10/1157-D revision 23"},
1722 {0x0055, "SAM-2 T10/1157-D revision 24"},
1723 {0x005C, "SAM-2 ANSI INCITS 366-2003"},
1724 {0x005E, "SAM-2 ISO/IEC 14776-412"},
1725 {0x0060, "SAM-3 (no version claimed)"},
1726 {0x0062, "SAM-3 T10/1561-D revision 7"},
1727 {0x0075, "SAM-3 T10/1561-D revision 13"},
1728 {0x0076, "SAM-3 T10/1561-D revision 14"},
1729 {0x0077, "SAM-3 ANSI INCITS 402-2005"},
1730 {0x0080, "SAM-4 (no version claimed)"},
1731 {0x0087, "SAM-4 T10/1683-D revision 13"},
1732 {0x008B, "SAM-4 T10/1683-D revision 14"},
1733 {0x0090, "SAM-4 ANSI INCITS 447-2008"},
1734 {0x0092, "SAM-4 ISO/IEC 14776-414"},
1735 {0x00A0, "SAM-5 (no version claimed)"},
1736 {0x00A2, "SAM-5 T10/2104-D revision 4"},
1737 {0x0120, "SPC (no version claimed)"},
1738 {0x013B, "SPC T10/0995-D revision 11a"},
1739 {0x013C, "SPC ANSI INCITS 301-1997"},
1740 {0x0140, "MMC (no version claimed)"},
1741 {0x015B, "MMC T10/1048-D revision 10a"},
1742 {0x015C, "MMC ANSI INCITS 304-1997"},
1743 {0x0160, "SCC (no version claimed)"},
1744 {0x017B, "SCC T10/1047-D revision 06c"},
1745 {0x017C, "SCC ANSI INCITS 276-1997"},
1746 {0x0180, "SBC (no version claimed)"},
1747 {0x019B, "SBC T10/0996-D revision 08c"},
1748 {0x019C, "SBC ANSI INCITS 306-1998"},
1749 {0x01A0, "SMC (no version claimed)"},
1750 {0x01BB, "SMC T10/0999-D revision 10a"},
1751 {0x01BC, "SMC ANSI INCITS 314-1998"},
1752 {0x01BE, "SMC ISO/IEC 14776-351"},
1753 {0x01C0, "SES (no version claimed)"},
1754 {0x01DB, "SES T10/1212-D revision 08b"},
1755 {0x01DC, "SES ANSI INCITS 305-1998"},
1756 {0x01DD, "SES T10/1212 revision 08b w/ Amendment ANSI INCITS.305/AM1-2000"},
1757 {0x01DE, "SES ANSI INCITS 305-1998 w/ Amendment ANSI INCITS.305/AM1-2000"},
1758 {0x01E0, "SCC-2 (no version claimed)"},
1759 {0x01FB, "SCC-2 T10/1125-D revision 4"},
1760 {0x01FC, "SCC-2 ANSI INCITS 318-1998"},
1761 {0x0200, "SSC (no version claimed)"},
1762 {0x0201, "SSC T10/0997-D revision 17"},
1763 {0x0207, "SSC T10/0997-D revision 22"},
1764 {0x021C, "SSC ANSI INCITS 335-2000"},
1765 {0x0220, "RBC (no version claimed)"},
1766 {0x0238, "RBC T10/1240-D revision 10a"},
1767 {0x023C, "RBC ANSI INCITS 330-2000"},
1768 {0x0240, "MMC-2 (no version claimed)"},
1769 {0x0255, "MMC-2 T10/1228-D revision 11"},
1770 {0x025B, "MMC-2 T10/1228-D revision 11a"},
1771 {0x025C, "MMC-2 ANSI INCITS 333-2000"},
1772 {0x0260, "SPC-2 (no version claimed)"},
1773 {0x0267, "SPC-2 T10/1236-D revision 12"},
1774 {0x0269, "SPC-2 T10/1236-D revision 18"},
1775 {0x0275, "SPC-2 T10/1236-D revision 19"},
1776 {0x0276, "SPC-2 T10/1236-D revision 20"},
1777 {0x0277, "SPC-2 ANSI INCITS 351-2001"},
1778 {0x0278, "SPC-2 ISO/IEC 14776-452"},
1779 {0x0280, "OCRW (no version claimed)"},
1780 {0x029E, "OCRW ISO/IEC 14776-381"},
1781 {0x02A0, "MMC-3 (no version claimed)"},
1782 {0x02B5, "MMC-3 T10/1363-D revision 9"},
1783 {0x02B6, "MMC-3 T10/1363-D revision 10g"},
1784 {0x02B8, "MMC-3 ANSI INCITS 360-2002"},
1785 {0x02E0, "SMC-2 (no version claimed)"},
1786 {0x02F5, "SMC-2 T10/1383-D revision 5"},
1787 {0x02FC, "SMC-2 T10/1383-D revision 6"},
1788 {0x02FD, "SMC-2 T10/1383-D revision 7"},
1789 {0x02FE, "SMC-2 ANSI INCITS 382-2004"},
1790 {0x0300, "SPC-3 (no version claimed)"},
1791 {0x0301, "SPC-3 T10/1416-D revision 7"},
1792 {0x0307, "SPC-3 T10/1416-D revision 21"},
1793 {0x030F, "SPC-3 T10/1416-D revision 22"},
1794 {0x0312, "SPC-3 T10/1416-D revision 23"},
1795 {0x0314, "SPC-3 ANSI INCITS 408-2005"},
1796 {0x0316, "SPC-3 ISO/IEC 14776-453"},
1797 {0x0320, "SBC-2 (no version claimed)"},
1798 {0x0322, "SBC-2 T10/1417-D revision 5a"},
1799 {0x0324, "SBC-2 T10/1417-D revision 15"},
1800 {0x033B, "SBC-2 T10/1417-D revision 16"},
1801 {0x033D, "SBC-2 ANSI INCITS 405-2005"},
1802 {0x033E, "SBC-2 ISO/IEC 14776-322"},
1803 {0x0340, "OSD (no version claimed)"},
1804 {0x0341, "OSD T10/1355-D revision 0"},
1805 {0x0342, "OSD T10/1355-D revision 7a"},
1806 {0x0343, "OSD T10/1355-D revision 8"},
1807 {0x0344, "OSD T10/1355-D revision 9"},
1808 {0x0355, "OSD T10/1355-D revision 10"},
1809 {0x0356, "OSD ANSI INCITS 400-2004"},
1810 {0x0360, "SSC-2 (no version claimed)"},
1811 {0x0374, "SSC-2 T10/1434-D revision 7"},
1812 {0x0375, "SSC-2 T10/1434-D revision 9"},
1813 {0x037D, "SSC-2 ANSI INCITS 380-2003"},
1814 {0x0380, "BCC (no version claimed)"},
1815 {0x03A0, "MMC-4 (no version claimed)"},
1816 {0x03B0, "MMC-4 T10/1545-D revision 5"},
1817 {0x03B1, "MMC-4 T10/1545-D revision 5a"},
1818 {0x03BD, "MMC-4 T10/1545-D revision 3"},
1819 {0x03BE, "MMC-4 T10/1545-D revision 3d"},
1820 {0x03BF, "MMC-4 ANSI INCITS 401-2005"},
1821 {0x03C0, "ADC (no version claimed)"},
1822 {0x03D5, "ADC T10/1558-D revision 6"},
1823 {0x03D6, "ADC T10/1558-D revision 7"},
1824 {0x03D7, "ADC ANSI INCITS 403-2005"},
1825 {0x03E0, "SES-2 (no version claimed)"},
1826 {0x03E1, "SES-2 T10/1559-D revision 16"},
1827 {0x03E7, "SES-2 T10/1559-D revision 19"},
1828 {0x03EB, "SES-2 T10/1559-D revision 20"},
1829 {0x03F0, "SES-2 ANSI INCITS 448-2008"},
1830 {0x03F2, "SES-2 ISO/IEC 14776-372"},
1831 {0x0400, "SSC-3 (no version claimed)"},
1832 {0x0403, "SSC-3 T10/1611-D revision 04a"},
1833 {0x0407, "SSC-3 T10/1611-D revision 5"},
1834 {0x0409, "SSC-3 ANSI INCITS 467-2011"},
1835 {0x0420, "MMC-5 (no version claimed)"},
1836 {0x042F, "MMC-5 T10/1675-D revision 3"},
1837 {0x0431, "MMC-5 T10/1675-D revision 03b"},
1838 {0x0432, "MMC-5 T10/1675-D revision 4"},
1839 {0x0434, "MMC-5 ANSI INCITS 430-2007"},
1840 {0x0440, "OSD-2 (no version claimed)"},
1841 {0x0444, "OSD-2 T10/1729-D revision 4"},
1842 {0x0446, "OSD-2 T10/1729-D revision 5"},
1843 {0x0448, "OSD-2 ANSI INCITS 458-2011"},
1844 {0x0460, "SPC-4 (no version claimed)"},
1845 {0x0461, "SPC-4 T10/BSR INCITS 513 revision 16"},
1846 {0x0462, "SPC-4 T10/BSR INCITS 513 revision 18"},
1847 {0x0463, "SPC-4 T10/BSR INCITS 513 revision 23"},
1848 {0x0466, "SPC-4 T10/BSR INCITS 513 revision 36"},
1849 {0x0480, "SMC-3 (no version claimed)"},
1850 {0x0482, "SMC-3 T10/1730-D revision 15"},
1851 {0x0484, "SMC-3 T10/1730-D revision 16"},
1852 {0x0486, "SMC-3 ANSI INCITS 484-2012"},
1853 {0x04A0, "ADC-2 (no version claimed)"},
1854 {0x04A7, "ADC-2 T10/1741-D revision 7"},
1855 {0x04AA, "ADC-2 T10/1741-D revision 8"},
1856 {0x04AC, "ADC-2 ANSI INCITS 441-2008"},
1857 {0x04C0, "SBC-3 (no version claimed)"},
1858 {0x04C3, "SBC-3 T10/BSR INCITS 514 revision 35"},
1859 {0x04E0, "MMC-6 (no version claimed)"},
1860 {0x04E3, "MMC-6 T10/1836-D revision 02b"},
1861 {0x04E5, "MMC-6 T10/1836-D revision 02g"},
1862 {0x04E6, "MMC-6 ANSI INCITS 468-2010"},
1863 {0x04E7, "MMC-6 ANSI INCITS 468-2010 + MMC-6/AM1 ANSI"},
1864 {0x0500, "ADC-3 (no version claimed)"},
1865 {0x0502, "ADC-3 T10/1895-D revision 4"},
1866 {0x0504, "ADC-3 T10/1895-D revision 5"},
1867 {0x0506, "ADC-3 T10/1895-D revision 05a"},
1868 {0x050A, "ADC-3 ANSI INCITS 497-2012"},
1869 {0x0520, "SSC-4 (no version claimed)"},
1870 {0x0523, "SSC-4 T10/BSR INCITS 516 revision 2"},
1871 {0x0560, "OSD-3 (no version claimed)"},
1872 {0x0580, "SES-3 (no version claimed)"},
1873 {0x05A0, "SSC-5 (no version claimed)"},
1874 {0x05C0, "SPC-5 (no version claimed)"},
1875 {0x05E0, "SFSC (no version claimed)"},
1876 {0x0600, "SBC-4 (no version claimed)"},
1877 {0x0820, "SSA-TL2 (no version claimed)"},
1878 {0x083B, "SSA-TL2 T10.1/1147-D revision 05b"},
1879 {0x083C, "SSA-TL2 ANSI INCITS 308-1998"},
1880 {0x0840, "SSA-TL1 (no version claimed)"},
1881 {0x085B, "SSA-TL1 T10.1/0989-D revision 10b"},
1882 {0x085C, "SSA-TL1 ANSI INCITS 295-1996"},
1883 {0x0860, "SSA-S3P (no version claimed)"},
1884 {0x087B, "SSA-S3P T10.1/1051-D revision 05b"},
1885 {0x087C, "SSA-S3P ANSI INCITS 309-1998"},
1886 {0x0880, "SSA-S2P (no version claimed)"},
1887 {0x089B, "SSA-S2P T10.1/1121-D revision 07b"},
1888 {0x089C, "SSA-S2P ANSI INCITS 294-1996"},
1889 {0x08A0, "SIP (no version claimed)"},
1890 {0x08BB, "SIP T10/0856-D revision 10"},
1891 {0x08BC, "SIP ANSI INCITS 292-1997"},
1892 {0x08C0, "FCP (no version claimed)"},
1893 {0x08DB, "FCP T10/0993-D revision 12"},
1894 {0x08DC, "FCP ANSI INCITS 269-1996"},
1895 {0x08E0, "SBP-2 (no version claimed)"},
1896 {0x08FB, "SBP-2 T10/1155-D revision 4"},
1897 {0x08FC, "SBP-2 ANSI INCITS 325-1998"},
1898 {0x0900, "FCP-2 (no version claimed)"},
1899 {0x0901, "FCP-2 T10/1144-D revision 4"},
1900 {0x0915, "FCP-2 T10/1144-D revision 7"},
1901 {0x0916, "FCP-2 T10/1144-D revision 7a"},
1902 {0x0917, "FCP-2 ANSI INCITS 350-2003"},
1903 {0x0918, "FCP-2 T10/1144-D revision 8"},
1904 {0x0920, "SST (no version claimed)"},
1905 {0x0935, "SST T10/1380-D revision 8b"},
1906 {0x0940, "SRP (no version claimed)"},
1907 {0x0954, "SRP T10/1415-D revision 10"},
1908 {0x0955, "SRP T10/1415-D revision 16a"},
1909 {0x095C, "SRP ANSI INCITS 365-2002"},
1910 {0x0960, "iSCSI (no version claimed)"},
1911 {0x0980, "SBP-3 (no version claimed)"},
1912 {0x0982, "SBP-3 T10/1467-D revision 1f"},
1913 {0x0994, "SBP-3 T10/1467-D revision 3"},
1914 {0x099A, "SBP-3 T10/1467-D revision 4"},
1915 {0x099B, "SBP-3 T10/1467-D revision 5"},
1916 {0x099C, "SBP-3 ANSI INCITS 375-2004"},
1917 {0x09C0, "ADP (no version claimed)"},
1918 {0x09E0, "ADT (no version claimed)"},
1919 {0x09F9, "ADT T10/1557-D revision 11"},
1920 {0x09FA, "ADT T10/1557-D revision 14"},
1921 {0x09FD, "ADT ANSI INCITS 406-2005"},
1922 {0x0A00, "FCP-3 (no version claimed)"},
1923 {0x0A07, "FCP-3 T10/1560-D revision 3f"},
1924 {0x0A0F, "FCP-3 T10/1560-D revision 4"},
1925 {0x0A11, "FCP-3 ANSI INCITS 416-2006"},
1926 {0x0A1C, "FCP-3 ISO/IEC 14776-223"},
1927 {0x0A20, "ADT-2 (no version claimed)"},
1928 {0x0A22, "ADT-2 T10/1742-D revision 6"},
1929 {0x0A27, "ADT-2 T10/1742-D revision 8"},
1930 {0x0A28, "ADT-2 T10/1742-D revision 9"},
1931 {0x0A2B, "ADT-2 ANSI INCITS 472-2011"},
1932 {0x0A40, "FCP-4 (no version claimed)"},
1933 {0x0A42, "FCP-4 T10/1828-D revision 1"},
1934 {0x0A44, "FCP-4 T10/1828-D revision 2"},
1935 {0x0A45, "FCP-4 T10/1828-D revision 02b"},
1936 {0x0A46, "FCP-4 ANSI INCITS 481-2012"},
1937 {0x0AA0, "SPI (no version claimed)"},
1938 {0x0AB9, "SPI T10/0855-D revision 15a"},
1939 {0x0ABA, "SPI ANSI INCITS 253-1995"},
1940 {0x0ABB, "SPI T10/0855-D revision 15a with SPI Amnd revision 3a"},
1941 {0x0ABC, "SPI ANSI INCITS 253-1995 with SPI Amnd ANSI INCITS 253/AM1-1998"},
1942 {0x0AC0, "Fast-20 (no version claimed)"},
1943 {0x0ADB, "Fast-20 T10/1071 revision 6"},
1944 {0x0ADC, "Fast-20 ANSI INCITS 277-1996"},
1945 {0x0AE0, "SPI-2 (no version claimed)"},
1946 {0x0AFB, "SPI-2 T10/1142-D revision 20b"},
1947 {0x0AFC, "SPI-2 ANSI INCITS 302-1999"},
1948 {0x0B00, "SPI-3 (no version claimed)"},
1949 {0x0B18, "SPI-3 T10/1302-D revision 10"},
1950 {0x0B19, "SPI-3 T10/1302-D revision 13a"},
1951 {0x0B1A, "SPI-3 T10/1302-D revision 14"},
1952 {0x0B1C, "SPI-3 ANSI INCITS 336-2000"},
1953 {0x0B20, "EPI (no version claimed)"},
1954 {0x0B3B, "EPI T10/1134 revision 16"},
1955 {0x0B3C, "EPI ANSI INCITS TR-23 1999"},
1956 {0x0B40, "SPI-4 (no version claimed)"},
1957 {0x0B54, "SPI-4 T10/1365-D revision 7"},
1958 {0x0B55, "SPI-4 T10/1365-D revision 9"},
1959 {0x0B56, "SPI-4 ANSI INCITS 362-2002"},
1960 {0x0B59, "SPI-4 T10/1365-D revision 10"},
1961 {0x0B60, "SPI-5 (no version claimed)"},
1962 {0x0B79, "SPI-5 T10/1525-D revision 3"},
1963 {0x0B7A, "SPI-5 T10/1525-D revision 5"},
1964 {0x0B7B, "SPI-5 T10/1525-D revision 6"},
1965 {0x0B7C, "SPI-5 ANSI INCITS 367-2003"},
1966 {0x0BE0, "SAS (no version claimed)"},
1967 {0x0BE1, "SAS T10/1562-D revision 1"},
1968 {0x0BF5, "SAS T10/1562-D revision 3"},
1969 {0x0BFA, "SAS T10/1562-D revision 4"},
1970 {0x0BFB, "SAS T10/1562-D revision 4"},
1971 {0x0BFC, "SAS T10/1562-D revision 5"},
1972 {0x0BFD, "SAS ANSI INCITS 376-2003"},
1973 {0x0C00, "SAS-1.1 (no version claimed)"},
1974 {0x0C07, "SAS-1.1 T10/1601-D revision 9"},
1975 {0x0C0F, "SAS-1.1 T10/1601-D revision 10"},
1976 {0x0C11, "SAS-1.1 ANSI INCITS 417-2006"},
1977 {0x0C12, "SAS-1.1 ISO/IEC 14776-151"},
1978 {0x0C20, "SAS-2 (no version claimed)"},
1979 {0x0C23, "SAS-2 T10/1760-D revision 14"},
1980 {0x0C27, "SAS-2 T10/1760-D revision 15"},
1981 {0x0C28, "SAS-2 T10/1760-D revision 16"},
1982 {0x0C2A, "SAS-2 ANSI INCITS 457-2010"},
1983 {0x0C40, "SAS-2.1 (no version claimed)"},
1984 {0x0C48, "SAS-2.1 T10/2125-D revision 4"},
1985 {0x0C4A, "SAS-2.1 T10/2125-D revision 6"},
1986 {0x0C4B, "SAS-2.1 T10/2125-D revision 7"},
1987 {0x0C4E, "SAS-2.1 ANSI INCITS 478-2011"},
1988 {0x0C60, "SAS-3 (no version claimed)"},
1989 {0x0C63, "SAS-3 T10/BSR INCITS 519 revision 05a"},
1990 {0x0D20, "FC-PH (no version claimed)"},
1991 {0x0D3B, "FC-PH ANSI INCITS 230-1994"},
1992 {0x0D3C, "FC-PH ANSI INCITS 230-1994 with Amnd 1 ANSI INCITS 230/AM1-1996"},
1993 {0x0D40, "FC-AL (no version claimed)"},
1994 {0x0D5C, "FC-AL ANSI INCITS 272-1996"},
1995 {0x0D60, "FC-AL-2 (no version claimed)"},
1996 {0x0D61, "FC-AL-2 T11/1133-D revision 7.0"},
1997 {0x0D63, "FC-AL-2 ANSI INCITS 332-1999 with AM1-2003 & AM2-2006"},
1998 {0x0D64, "FC-AL-2 ANSI INCITS 332-1999 with Amnd 2 AM2-2006"},
1999 {0x0D65, "FC-AL-2 ISO/IEC 14165-122 with AM1 & AM2"},
2000 {0x0D7C, "FC-AL-2 ANSI INCITS 332-1999"},
2001 {0x0D7D, "FC-AL-2 ANSI INCITS 332-1999 with Amnd 1 AM1-2003"},
2002 {0x0D80, "FC-PH-3 (no version claimed)"},
2003 {0x0D9C, "FC-PH-3 ANSI INCITS 303-1998"},
2004 {0x0DA0, "FC-FS (no version claimed)"},
2005 {0x0DB7, "FC-FS T11/1331-D revision 1.2"},
2006 {0x0DB8, "FC-FS T11/1331-D revision 1.7"},
2007 {0x0DBC, "FC-FS ANSI INCITS 373-2003"},
2008 {0x0DBD, "FC-FS ISO/IEC 14165-251"},
2009 {0x0DC0, "FC-PI (no version claimed)"},
2010 {0x0DDC, "FC-PI ANSI INCITS 352-2002"},
2011 {0x0DE0, "FC-PI-2 (no version claimed)"},
2012 {0x0DE2, "FC-PI-2 T11/1506-D revision 5.0"},
2013 {0x0DE4, "FC-PI-2 ANSI INCITS 404-2006"},
2014 {0x0E00, "FC-FS-2 (no version claimed)"},
2015 {0x0E02, "FC-FS-2 ANSI INCITS 242-2007"},
2016 {0x0E03, "FC-FS-2 ANSI INCITS 242-2007 with AM1 ANSI INCITS 242/AM1-2007"},
2017 {0x0E20, "FC-LS (no version claimed)"},
2018 {0x0E21, "FC-LS T11/1620-D revision 1.62"},
2019 {0x0E29, "FC-LS ANSI INCITS 433-2007"},
2020 {0x0E40, "FC-SP (no version claimed)"},
2021 {0x0E42, "FC-SP T11/1570-D revision 1.6"},
2022 {0x0E45, "FC-SP ANSI INCITS 426-2007"},
2023 {0x0E60, "FC-PI-3 (no version claimed)"},
2024 {0x0E62, "FC-PI-3 T11/1625-D revision 2.0"},
2025 {0x0E68, "FC-PI-3 T11/1625-D revision 2.1"},
2026 {0x0E6A, "FC-PI-3 T11/1625-D revision 4.0"},
2027 {0x0E6E, "FC-PI-3 ANSI INCITS 460-2011"},
2028 {0x0E80, "FC-PI-4 (no version claimed)"},
2029 {0x0E82, "FC-PI-4 T11/1647-D revision 8.0"},
2030 {0x0E88, "FC-PI-4 ANSI INCITS 450-2009"},
2031 {0x0EA0, "FC 10GFC (no version claimed)"},
2032 {0x0EA2, "FC 10GFC ANSI INCITS 364-2003"},
2033 {0x0EA3, "FC 10GFC ISO/IEC 14165-116"},
2034 {0x0EA5, "FC 10GFC ISO/IEC 14165-116 with AM1"},
2035 {0x0EA6, "FC 10GFC ANSI INCITS 364-2003 with AM1 ANSI INCITS 364/AM1-2007"},
2036 {0x0EC0, "FC-SP-2 (no version claimed)"},
2037 {0x0EE0, "FC-FS-3 (no version claimed)"},
2038 {0x0EE2, "FC-FS-3 T11/1861-D revision 0.9"},
2039 {0x0EE7, "FC-FS-3 T11/1861-D revision 1.0"},
2040 {0x0EE9, "FC-FS-3 T11/1861-D revision 1.10"},
2041 {0x0EEB, "FC-FS-3 ANSI INCITS 470-2011"},
2042 {0x0F00, "FC-LS-2 (no version claimed)"},
2043 {0x0F03, "FC-LS-2 T11/2103-D revision 2.11"},
2044 {0x0F05, "FC-LS-2 T11/2103-D revision 2.21"},
2045 {0x0F07, "FC-LS-2 ANSI INCITS 477-2011"},
2046 {0x0F20, "FC-PI-5 (no version claimed)"},
2047 {0x0F27, "FC-PI-5 T11/2118-D revision 2.00"},
2048 {0x0F28, "FC-PI-5 T11/2118-D revision 3.00"},
2049 {0x0F2A, "FC-PI-5 T11/2118-D revision 6.00"},
2050 {0x0F2B, "FC-PI-5 T11/2118-D revision 6.10"},
2051 {0x0F2E, "FC-PI-5 ANSI INCITS 479-2011"},
2052 {0x0F40, "FC-PI-6 (no version claimed)"},
2053 {0x0F60, "FC-FS-4 (no version claimed)"},
2054 {0x0F80, "FC-LS-3 (no version claimed)"},
2055 {0x12A0, "FC-SCM (no version claimed)"},
2056 {0x12A3, "FC-SCM T11/1824DT revision 1.0"},
2057 {0x12A5, "FC-SCM T11/1824DT revision 1.1"},
2058 {0x12A7, "FC-SCM T11/1824DT revision 1.4"},
2059 {0x12AA, "FC-SCM INCITS TR-47 2012"},
2060 {0x12C0, "FC-DA-2 (no version claimed)"},
2061 {0x12C3, "FC-DA-2 T11/1870DT revision 1.04"},
2062 {0x12C5, "FC-DA-2 T11/1870DT revision 1.06"},
2063 {0x12C9, "FC-DA-2 INCITS TR-49 2012"},
2064 {0x12E0, "FC-DA (no version claimed)"},
2065 {0x12E2, "FC-DA T11/1513-DT revision 3.1"},
2066 {0x12E8, "FC-DA ANSI INCITS TR-36 2004"},
2067 {0x12E9, "FC-DA ISO/IEC 14165-341"},
2068 {0x1300, "FC-Tape (no version claimed)"},
2069 {0x1301, "FC-Tape T11/1315 revision 1.16"},
2070 {0x131B, "FC-Tape T11/1315 revision 1.17"},
2071 {0x131C, "FC-Tape ANSI INCITS TR-24 1999"},
2072 {0x1320, "FC-FLA (no version claimed)"},
2073 {0x133B, "FC-FLA T11/1235 revision 7"},
2074 {0x133C, "FC-FLA ANSI INCITS TR-20 1998"},
2075 {0x1340, "FC-PLDA (no version claimed)"},
2076 {0x135B, "FC-PLDA T11/1162 revision 2.1"},
2077 {0x135C, "FC-PLDA ANSI INCITS TR-19 1998"},
2078 {0x1360, "SSA-PH2 (no version claimed)"},
2079 {0x137B, "SSA-PH2 T10.1/1145-D revision 09c"},
2080 {0x137C, "SSA-PH2 ANSI INCITS 293-1996"},
2081 {0x1380, "SSA-PH3 (no version claimed)"},
2082 {0x139B, "SSA-PH3 T10.1/1146-D revision 05b"},
2083 {0x139C, "SSA-PH3 ANSI INCITS 307-1998"},
2084 {0x14A0, "IEEE 1394 (no version claimed)"},
2085 {0x14BD, "ANSI IEEE 1394-1995"},
2086 {0x14C0, "IEEE 1394a (no version claimed)"},
2087 {0x14E0, "IEEE 1394b (no version claimed)"},
2088 {0x15E0, "ATA/ATAPI-6 (no version claimed)"},
2089 {0x15FD, "ATA/ATAPI-6 ANSI INCITS 361-2002"},
2090 {0x1600, "ATA/ATAPI-7 (no version claimed)"},
2091 {0x1602, "ATA/ATAPI-7 T13/1532-D revision 3"},
2092 {0x161C, "ATA/ATAPI-7 ANSI INCITS 397-2005"},
2093 {0x161E, "ATA/ATAPI-7 ISO/IEC 24739"},
2094 {0x1620, "ATA/ATAPI-8 ATA8-AAM (no version claimed)"},
2095 {0x1621, "ATA/ATAPI-8 ATA8-APT Parallel Transport (no version claimed)"},
2096 {0x1622, "ATA/ATAPI-8 ATA8-AST Serial Transport (no version claimed)"},
2097 {0x1623, "ATA/ATAPI-8 ATA8-ACS ATA/ATAPI Command Set (no version claimed)"},
2098 {0x1628, "ATA/ATAPI-8 ATA8-AAM ANSI INCITS 451-2008"},
2099 {0x162A, "ATA/ATAPI-8 ATA8-ACS ANSI INCITS 452-2009 w/Amendment 1"},
2100 {0x1728, "Universal Serial Bus Specification, Revision 1.1"},
2101 {0x1729, "Universal Serial Bus Specification, Revision 2.0"},
2102 {0x1730, "USB Mass Storage Class Bulk-Only Transport, Revision 1.0"},
2103 {0x1740, "UAS (no version claimed)"},
2104 {0x1743, "UAS T10/2095-D revision 2"},
2105 {0x1747, "UAS T10/2095-D revision 4"},
2106 {0x1748, "UAS ANSI INCITS 471-2010"},
2107 {0x1761, "ACS-2 (no version claimed)"},
2108 {0x1762, "ACS-2 ANSI INCITS 482-2013"},
2109 {0x1765, "ACS-3 (no version claimed)"},
2110 {0x1780, "UAS-2 (no version claimed)"},
2111 {0x1EA0, "SAT (no version claimed)"},
2112 {0x1EA7, "SAT T10/1711-D revision 8"},
2113 {0x1EAB, "SAT T10/1711-D revision 9"},
2114 {0x1EAD, "SAT ANSI INCITS 431-2007"},
2115 {0x1EC0, "SAT-2 (no version claimed)"},
2116 {0x1EC4, "SAT-2 T10/1826-D revision 6"},
2117 {0x1EC8, "SAT-2 T10/1826-D revision 9"},
2118 {0x1ECA, "SAT-2 ANSI INCITS 465-2010"},
2119 {0x1EE0, "SAT-3 (no version claimed)"},
2120 {0x1EE2, "SAT-3 T10/BSR INCITS 517 revision 4"},
2121 {0x1F00, "SAT-4 (no version claimed)"},
2122 {0x20A0, "SPL (no version claimed)"},
2123 {0x20A3, "SPL T10/2124-D revision 6a"},
2124 {0x20A5, "SPL T10/2124-D revision 7"},
2125 {0x20A7, "SPL ANSI INCITS 476-2011"},
2126 {0x20A8, "SPL ANSI INCITS 476-2011 + SPL AM1 INCITS 476/AM1 2012"},
2127 {0x20C0, "SPL-2 (no version claimed)"},
2128 {0x20C2, "SPL-2 T10/BSR INCITS 505 revision 4"},
2129 {0x20C4, "SPL-2 T10/BSR INCITS 505 revision 5"},
2130 {0x20E0, "SPL-3 (no version claimed)"},
2131 {0x21E0, "SOP (no version claimed)"},
2132 {0x21E4, "SOP T10/BSR INCITS 489 revision 4"},
2133 {0x2200, "PQI (no version claimed)"},
2134 {0x2204, "PQI T10/BSR INCITS 490 revision 6"},
2135 {0x2220, "SOP-2 (no version claimed)"},
2136 {0x2240, "PQI-2 (no version claimed)"},
2137 {0xFFC0, "IEEE 1667 (no version claimed)"},
2138 {0xFFC1, "IEEE 1667-2006"},
2139 {0xFFC2, "IEEE 1667-2009"},
2143 static value_string_ext scsi_verdesc_val_ext
= VALUE_STRING_EXT_INIT(scsi_verdesc_val
);
2145 /* Command Support Data "Support" field definitions */
2146 static const value_string scsi_cmdt_supp_val
[] = {
2147 {0, "Data not currently available"},
2148 {1, "SCSI Command not supported"},
2150 {3, "SCSI Command supported in conformance with a SCSI standard"},
2151 {4, "Vendor Specific"},
2152 {5, "SCSI Command supported in a vendor specific manner"},
2153 {6, "Vendor Specific"},
2158 #define CODESET_BINARY 1
2159 #define CODESET_ASCII 2
2160 #define CODESET_UTF8 3
2162 const value_string scsi_devid_codeset_val
[] = {
2164 {CODESET_BINARY
, "Identifier field contains binary values"},
2165 {CODESET_ASCII
, "Identifier field contains ASCII graphic codes"},
2166 {CODESET_UTF8
, "Identifier field contains UTF-8 codes"},
2170 static const value_string scsi_devid_assoc_val
[] = {
2171 {0, "Identifier is associated with addressed logical/physical device"},
2172 {1, "Identifier is associated with the port that received the request"},
2173 {2, "Identifier is associated with the SCSI target devices that contains the logical/physical device"},
2177 #define DEVID_TYPE_VEND_ID_VEND_SPEC_ID 1
2178 #define DEVID_TYPE_NAA 3
2180 const value_string scsi_devid_idtype_val
[] = {
2181 {0, "Vendor-specific ID (non-globally unique)"},
2182 {DEVID_TYPE_VEND_ID_VEND_SPEC_ID
, "Vendor-ID + vendor-specific ID (globally unique)"},
2184 {DEVID_TYPE_NAA
, "NAA"},
2185 {4, "4-byte Binary Number/Reserved"},
2189 static const value_string scsi_modesns_mrie_val
[] = {
2190 {0, "No Reporting of Informational Exception Condition"},
2191 {1, "Asynchronous Error Reporting"},
2192 {2, "Generate Unit Attention"},
2193 {3, "Conditionally Generate Recovered Error"},
2194 {4, "Unconditionally Generate Recovered Error"},
2195 {5, "Generate No Sense"},
2196 {6, "Only Report Informational Exception Condition on Request"},
2200 static const value_string scsi_modesns_tst_val
[] = {
2201 {0, "Task Set Per LU For All Initiators"},
2202 {1, "Task Set Per Initiator Per LU"},
2206 static const value_string scsi_modesns_qmod_val
[] = {
2207 {0, "Restricted reordering"},
2208 {1, "Unrestricted reordering"},
2212 static const true_false_string scsi_modesns_qerr_val
= {
2213 "All blocked tasks shall be aborted on CHECK CONDITION",
2214 "Blocked tasks shall resume after ACA/CA is cleared",
2217 static const true_false_string scsi_spec_i_pt_tfs
= {
2218 "Specify Initiator Ports is set",
2219 "Specify Initiator Ports is not set"
2222 static const true_false_string scsi_all_tg_pt_tfs
= {
2223 "All Target Ports is set",
2224 "All Target Ports is not set"
2227 static const true_false_string scsi_aptpl_tfs
= {
2228 "Active Persist Through Power Loss is set",
2229 "Active Persist Through Power Loss is not set"
2232 static const true_false_string scsi_naca_tfs
= {
2233 "Normal ACA is set",
2234 "Normal ACA is not set"
2237 static const true_false_string normaca_tfs
= {
2238 "NormACA is SUPPORTED",
2239 "Normaca is NOT supported",
2242 static const true_false_string sccs_tfs
= {
2244 "Scc is NOT supported",
2247 static const true_false_string acc_tfs
= {
2248 "Access Control Coordinator is SUPPORTED",
2249 "Access control coordinator NOT supported",
2252 static const true_false_string bque_tfs
= {
2253 "BQUE is SUPPORTED",
2254 "Bque is NOT supported",
2257 static const true_false_string encserv_tfs
= {
2258 "Enclosed Services is SUPPORTED",
2259 "Enclosed services is NOT supported",
2262 static const true_false_string reladr_tfs
= {
2263 "Relative Addressing mode is SUPPORTED",
2264 "Relative addressing mode is NOT supported",
2268 static const true_false_string sync_tfs
= {
2269 "Synchronous data transfer is SUPPORTED",
2270 "Synchronous data transfer is NOT supported",
2274 static const true_false_string linked_tfs
= {
2275 "Linked Commands are SUPPORTED",
2276 "Linked commands are NOT supported",
2279 static const true_false_string cmdque_tfs
= {
2280 "Command queuing is SUPPORTED",
2281 "Command queuing is NOT supported",
2284 static const true_false_string multip_tfs
= {
2285 "This is a MULTIPORT device",
2286 "This is NOT a multiport device",
2289 static const true_false_string mchngr_tfs
= {
2290 "This device is attached to a MEDIUMCHANGER",
2291 "This is a normal device",
2294 static const true_false_string tpc_tfs
= {
2295 "Third Party Copy is SUPPORTED",
2296 "Third party copy is NOT supported",
2299 static const true_false_string protect_tfs
= {
2300 "Protection Information is SUPPORTED",
2301 "Protection information NOT supported",
2304 static const true_false_string hisup_tfs
= {
2305 "Hierarchical Addressing Mode is SUPPORTED",
2306 "Hierarchical addressing mode is NOT supported",
2309 static const true_false_string aerc_tfs
= {
2310 "Async Event Reporting Capability is SUPPORTED",
2311 "Async event reporting capability is NOT supported",
2314 static const true_false_string trmtsk_tfs
= {
2315 "Terminate Task management functions are SUPPORTED",
2316 "Terminate task management functions are NOT supported",
2319 static const true_false_string scsi_removable_val
= {
2320 "This is a REMOVABLE device",
2321 "This device is NOT removable",
2324 static const true_false_string scsi_modesns_tas_val
= {
2325 "Terminated tasks aborted without informing initiators",
2326 "Tasks aborted by another initiator terminated with TASK ABORTED",
2329 static const true_false_string scsi_modesns_rac_val
= {
2330 "Report a CHECK CONDITION Instead of Long Busy Condition",
2331 "Long Busy Conditions Maybe Reported",
2334 /* SCSI Transport Protocols */
2335 #define SCSI_PROTO_FCP 0
2336 #define SCSI_PROTO_iSCSI 5
2338 static const value_string scsi_proto_val
[] = {
2344 static const value_string scsi_fcp_rrtov_val
[] = {
2345 {0, "No Timer Specified"},
2352 static const value_string scsi_sensekey_val
[] = {
2354 {0x1, "Recovered Error"},
2356 {0x3, "Medium Error"},
2357 {0x4, "Hardware Error"},
2358 {0x5, "Illegal Request"},
2359 {0x6, "Unit Attention"},
2360 {0x7, "Data Protection"},
2361 {0x8, "Blank Check"},
2362 {0x9, "Vendor Specific"},
2363 {0xA, "Copy Aborted"},
2364 {0xB, "Command Aborted"},
2365 {0xC, "Obsolete Error Code"},
2366 {0xD, "Overflow Command"},
2367 {0xE, "Miscompare"},
2372 static const value_string scsi_sense_desc_type_val
[] = {
2373 {0x00, "Information"},
2374 {0x01, "Command specific information"},
2375 {0x02, "Sense key specific"},
2376 {0x03, "Field replaceable unit"},
2377 {0x04, "Stream commands"},
2378 {0x05, "Block commands"},
2379 {0x06, "OSD object identification"},
2380 {0x07, "OSD response integrity check value"},
2381 {0x08, "OSD attribute identification"},
2382 {0x09, "ATA Status"},
2383 {0x0A, "Another progress indication"},
2384 {0x0B, "User data segment referral"},
2385 {0x0C, "Forwarded sense data"},
2389 static const value_string scsi_sense_sks_fp_cd_val
[] = {
2390 {0, "illegal parameter in the Data-Out buffer"},
2391 {1, "illegal parameter in the CDB"},
2395 static const value_string scsi_sns_errtype_val
[] = {
2396 {0x70, "Current Error"},
2397 {0x71, "Deferred Error"},
2398 {0x72, "Current Error"},
2399 {0x73, "Deferred Error"},
2400 {0x7F, "Vendor Specific"},
2404 /* All can be found @ http://www.t10.org/lists/asc-alph.txt or http://www.t10.org/lists/asc-num.txt */
2405 static const value_string scsi_asc_val
[] = {
2406 {0x0000, "No Additional Sense Information"},
2407 {0x0001, "Filemark Detected"},
2408 {0x0002, "End Of Partition/Medium Detected"},
2409 {0x0003, "Setmark Detected"},
2410 {0x0004, "Beginning Of Partition Detected"},
2411 {0x0005, "End Of Data Detected"},
2412 {0x0006, "I/O Process Terminated"},
2413 {0x0016, "Operation In Progress"},
2414 {0x0017, "Cleaning Requested"},
2415 {0x0018, "Erase Operation In Progress"},
2416 {0x0019, "Locate Operation In Progress"},
2417 {0x001A, "Rewind Operation In Progress"},
2418 {0x001B, "Set Capacity Operation In Progress"},
2419 {0x001C, "Verify operation in progress"},
2420 {0x0100, "No Index/Sector Signal"},
2421 {0x0200, "No Seek Complete"},
2422 {0x0300, "Peripheral Device Write Fault"},
2423 {0x0400, "Logical Unit Not Ready, Cause Not Reportable"},
2424 {0x0401, "Logical Unit Is In Process Of Becoming Ready"},
2425 {0x0402, "Logical Unit Not Ready, Initializing Cmd. Required"},
2426 {0x0403, "Logical Unit Not Ready, Manual Intervention Required"},
2427 {0x0404, "Logical Unit Not Ready, Format In Progress"},
2428 {0x0405, "Logical Unit Not Ready, Rebuild In Progress"},
2429 {0x0406, "Logical Unit Not Ready, Recalculation In Progress"},
2430 {0x0407, "Logical Unit Not Ready, Operation In Progress"},
2431 {0x0409, "Logical Unit Not Ready, Self-Test In Progress"},
2432 {0x0500, "Logical Unit Does Not Respond To Selection"},
2433 {0x0600, "No Reference Position Found"},
2434 {0x0700, "Multiple Peripheral Devices Selected"},
2435 {0x0800, "Logical Unit Communication Failure"},
2436 {0x0801, "Logical Unit Communication Time-Out"},
2437 {0x0802, "Logical Unit Communication Parity Error"},
2438 {0x0803, "Logical Unit Communication Crc Error (Ultra-Dma/32)"},
2439 {0x0804, "Unreachable Copy Target"},
2440 {0x0900, "Track Following Error"},
2441 {0x0904, "Head Select Fault"},
2442 {0x0A00, "Error Log Overflow"},
2443 {0x0B00, "Warning"},
2444 {0x0B01, "Warning - Specified Temperature Exceeded"},
2445 {0x0B02, "Warning - Enclosure Degraded"},
2446 {0x0C02, "Write Error - Auto Reallocation Failed"},
2447 {0x0C03, "Write Error - Recommend Reassignment"},
2448 {0x0C04, "Compression Check Miscompare Error"},
2449 {0x0C05, "Data Expansion Occurred During Compression"},
2450 {0x0C06, "Block Not Compressible"},
2451 {0x0D00, "Error Detected By Third Party Temporary Initiator"},
2452 {0x0D01, "Third Party Device Failure"},
2453 {0x0D02, "Copy Target Device Not Reachable"},
2454 {0x0D03, "Incorrect Copy Target Device Type"},
2455 {0x0D04, "Copy Target Device Data Underrun"},
2456 {0x0D05, "Copy Target Device Data Overrun"},
2457 {0x1000, "Id Crc Or Ecc Error"},
2458 {0x1100, "Unrecovered Read Error"},
2459 {0x1101, "Read Retries Exhausted"},
2460 {0x1102, "Error Too Long To Correct"},
2461 {0x1103, "Multiple Read Errors"},
2462 {0x1104, "Unrecovered Read Error - Auto Reallocate Failed"},
2463 {0x110A, "Miscorrected Error"},
2464 {0x110B, "Unrecovered Read Error - Recommend Reassignment"},
2465 {0x110C, "Unrecovered Read Error - Recommend Rewrite The Data"},
2466 {0x110D, "De-Compression Crc Error"},
2467 {0x110E, "Cannot Decompress Using Declared Algorithm"},
2468 {0x1200, "Address Mark Not Found For Id Field"},
2469 {0x1300, "Address Mark Not Found For Data Field"},
2470 {0x1400, "Recorded Entity Not Found"},
2471 {0x1401, "Record Not Found"},
2472 {0x1405, "Record Not Found - Recommend Reassignment"},
2473 {0x1406, "Record Not Found - Data Auto-Reallocated"},
2474 {0x1500, "Random Positioning Error"},
2475 {0x1501, "Mechanical Positioning Error"},
2476 {0x1502, "Positioning Error Detected By Read Of Medium"},
2477 {0x1600, "Data Synchronization Mark Error"},
2478 {0x1601, "Data Sync Error - Data Rewritten"},
2479 {0x1602, "Data Sync Error - Recommend Rewrite"},
2480 {0x1603, "Data Sync Error - Data Auto-Reallocated"},
2481 {0x1604, "Data Sync Error - Recommend Reassignment"},
2482 {0x1700, "Recovered Data With No Error Correction Applied"},
2483 {0x1701, "Recovered Data With Retries"},
2484 {0x1702, "Recovered Data With Positive Head Offset"},
2485 {0x1703, "Recovered Data With Negative Head Offset"},
2486 {0x1705, "Recovered Data Using Previous Sector Id"},
2487 {0x1706, "Recovered Data Without Ecc - Data Auto-Reallocated"},
2488 {0x1707, "Recovered Data Without Ecc - Recommend Reassignment"},
2489 {0x1708, "Recovered Data Without Ecc - Recommend Rewrite"},
2490 {0x1709, "Recovered Data Without Ecc - Data Rewritten"},
2491 {0x1800, "Recovered Data With Error Correction Applied"},
2492 {0x1801, "Recovered Data With Error Corr. & Retries Applied"},
2493 {0x1802, "Recovered Data - Data Auto-Reallocated"},
2494 {0x1805, "Recovered Data - Recommend Reassignment"},
2495 {0x1806, "Recovered Data - Recommend Rewrite"},
2496 {0x1807, "Recovered Data With Ecc - Data Rewritten"},
2497 {0x1900, "List Error"},
2498 {0x1901, "List Not Available"},
2499 {0x1902, "List Error In Primary List"},
2500 {0x1903, "List Error In Grown List"},
2501 {0x1A00, "Parameter List Length Error"},
2502 {0x1B00, "Synchronous Data Transfer Error"},
2503 {0x1C00, "Defect List Not Found"},
2504 {0x1C01, "Primary Defect List Not Found"},
2505 {0x1C02, "Grown Defect List Not Found"},
2506 {0x1D00, "Miscompare During Verify Operation"},
2507 {0x1E00, "Recovered Id With Ecc Correction"},
2508 {0x1F00, "Defect List Transfer"},
2509 {0x2000, "Invalid Command Operation Code"},
2510 {0x2100, "Logical Block Address Out Of Range"},
2511 {0x2101, "Invalid Element Address"},
2512 {0x2400, "Invalid Field In Cdb"},
2513 {0x2401, "Cdb Decryption Error"},
2514 {0x2500, "Logical Unit Not Supported"},
2515 {0x2600, "Invalid Field In Parameter List"},
2516 {0x2601, "Parameter Not Supported"},
2517 {0x2602, "Parameter Value Invalid"},
2518 {0x2603, "Threshold Parameters Not Supported"},
2519 {0x2604, "Invalid Release Of Persistent Reservation"},
2520 {0x2605, "Data Decryption Error"},
2521 {0x2606, "Too Many Target Descriptors"},
2522 {0x2607, "Unsupported Target Descriptor Type Code"},
2523 {0x2608, "Too Many Segment Descriptors"},
2524 {0x2609, "Unsupported Segment Descriptor Type Code"},
2525 {0x260A, "Unexpected Inexact Segment"},
2526 {0x260B, "Inline Data Length Exceeded"},
2527 {0x260C, "Invalid Operation For Copy Source Or Destination"},
2528 {0x260D, "Copy Segment Granularity Violation"},
2529 {0x2700, "Write Protected"},
2530 {0x2701, "Hardware Write Protected"},
2531 {0x2702, "Logical Unit Software Write Protected"},
2532 {0x2800, "Not Ready To Ready Change, Medium May Have Changed"},
2533 {0x2801, "Import Or Export Element Accessed"},
2534 {0x2900, "Power On, Reset, Or Bus Device Reset Occurred"},
2535 {0x2901, "Power On Occurred"},
2536 {0x2902, "Scsi Bus Reset Occurred"},
2537 {0x2903, "Bus Device Reset Function Occurred"},
2538 {0x2904, "Device Internal Reset"},
2539 {0x2905, "Transceiver Mode Changed To Single-Ended"},
2540 {0x2906, "Transceiver Mode Changed To Lvd"},
2541 {0x2A00, "Parameters Changed"},
2542 {0x2A01, "Mode Parameters Changed"},
2543 {0x2A02, "Log Parameters Changed"},
2544 {0x2A03, "Reservations Preempted"},
2545 {0x2A04, "Reservations Released"},
2546 {0x2A05, "Registrations Preempted"},
2547 {0x2B00, "Copy Cannot Execute Since Host Cannot Disconnect"},
2548 {0x2C00, "Command Sequence Error"},
2549 {0x2C0A, "Partition or Collection Contains User Objects"},
2550 {0x2F00, "Commands Cleared By Another Initiator"},
2551 {0x3000, "Incompatible Medium Installed"},
2552 {0x3001, "Cannot Read Medium - Unknown Format"},
2553 {0x3002, "Cannot Read Medium - Incompatible Format"},
2554 {0x3003, "Cleaning Cartridge Installed"},
2555 {0x3004, "Cannot Write Medium - Unknown Format"},
2556 {0x3005, "Cannot Write Medium - Incompatible Format"},
2557 {0x3006, "Cannot Format Medium - Incompatible Medium"},
2558 {0x3007, "Cleaning Failure"},
2559 {0x3100, "Medium Format Corrupted"},
2560 {0x3101, "Format Command Failed"},
2561 {0x3200, "No Defect Spare Location Available"},
2562 {0x3201, "Defect List Update Failure"},
2563 {0x3400, "Enclosure Failure"},
2564 {0x3500, "Enclosure Services Failure"},
2565 {0x3501, "Unsupported Enclosure Function"},
2566 {0x3502, "Enclosure Services Unavailable"},
2567 {0x3503, "Enclosure Services Transfer Failure"},
2568 {0x3504, "Enclosure Services Transfer Refused"},
2569 {0x3700, "Rounded Parameter"},
2570 {0x3807, "Thin Provisioning Soft Threshold Reached"},
2571 {0x3900, "Saving Parameters Not Supported"},
2572 {0x3A00, "Medium Not Present"},
2573 {0x3A01, "Medium Not Present - Tray Closed"},
2574 {0x3A02, "Medium Not Present - Tray Open"},
2575 {0x3A03, "Medium Not Present - Loadable"},
2576 {0x3A04, "Medium Not Present - Medium Auxiliary Memory Accessible"},
2577 {0x3B0D, "Medium Destination Element Full"},
2578 {0x3B0E, "Medium Source Element Empty"},
2579 {0x3B11, "Medium Magazine Not Accessible"},
2580 {0x3B12, "Medium Magazine Removed"},
2581 {0x3B13, "Medium Magazine Inserted"},
2582 {0x3B14, "Medium Magazine Locked"},
2583 {0x3B15, "Medium Magazine Unlocked"},
2584 {0x3D00, "Invalid Bits In Identify Message"},
2585 {0x3E00, "Logical Unit Has Not Self-Configured Yet"},
2586 {0x3E01, "Logical Unit Failure"},
2587 {0x3E02, "Timeout On Logical Unit"},
2588 {0x3E03, "Logical Unit Failed Self-Test"},
2589 {0x3E04, "Logical Unit Unable To Update Self-Test Log"},
2590 {0x3F00, "Target Operating Conditions Have Changed"},
2591 {0x3F01, "Microcode Has Been Changed"},
2592 {0x3F02, "Changed Operating Definition"},
2593 {0x3F03, "Inquiry Data Has Changed"},
2594 {0x3F04, "Component Device Attached"},
2595 {0x3F05, "Device Identifier Changed"},
2596 {0x3F06, "Redundancy Group Created Or Modified"},
2597 {0x3F07, "Redundancy Group Deleted"},
2598 {0x3F08, "Spare Created Or Modified"},
2599 {0x3F09, "Spare Deleted"},
2600 {0x3F0A, "Volume Set Created Or Modified"},
2601 {0x3F0B, "Volume Set Deleted"},
2602 {0x3F0C, "Volume Set Deassigned"},
2603 {0x3F0D, "Volume Set Reassigned"},
2604 {0x3F0E, "Reported Luns Data Has Changed"},
2605 {0x3F0F, "Echo Buffer Overwritten"},
2606 {0x3F10, "Medium Loadable"},
2607 {0x3F11, "Medium Auxiliary Memory Accessible"},
2608 {0x4200, "Self-Test Failure (Should Use 40 Nn)"},
2609 {0x4300, "Message Error"},
2610 {0x4400, "Internal Target Failure"},
2611 {0x4500, "Select Or Reselect Failure"},
2612 {0x4600, "Unsuccessful Soft Reset"},
2613 {0x4700, "Scsi Parity Error"},
2614 {0x4701, "Data Phase Crc Error Detected"},
2615 {0x4702, "Scsi Parity Error Detected During St Data Phase"},
2616 {0x4703, "Information Unit Crc Error Detected"},
2617 {0x4704, "Asynchronous Information Protection Error Detected"},
2618 {0x4800, "Initiator Detected Error Message Received"},
2619 {0x4900, "Invalid Message Error"},
2620 {0x4A00, "Command Phase Error"},
2621 {0x4B00, "Data Phase Error"},
2622 {0x4C00, "Logical Unit Failed Self-Configuration"},
2623 {0x4D00, "Tagged Overlapped Commands (Nn = Queue Tag)"},
2624 {0x4E00, "Overlapped Commands Attempted"},
2625 {0x5300, "Media Load Or Eject Failed"},
2626 {0x5302, "Medium Removal Prevented"},
2627 {0x5501, "System Buffer Full"},
2628 {0x5502, "Insufficient Reservation Resources"},
2629 {0x5503, "Insufficient Resources"},
2630 {0x5504, "Insufficient Registration Resources"},
2631 {0x5A00, "Operator Request Or State Change Input"},
2632 {0x5A01, "Operator Medium Removal Request"},
2633 {0x5A02, "Operator Selected Write Protect"},
2634 {0x5A03, "Operator Selected Write Permit"},
2635 {0x5B00, "Log Exception"},
2636 {0x5B01, "Threshold Condition Met"},
2637 {0x5B02, "Log Counter At Maximum"},
2638 {0x5B03, "Log List Codes Exhausted"},
2640 {0x5C02, "Synchronized"},
2641 {0x5D00, "Failure Prediction Threshold Exceeded"},
2642 {0x5D10, "Failure General Hard Drive Failure"},
2643 {0x5D11, "Failure Drive Error Rate Too High"},
2644 {0x5D12, "Failure Data Error Rate Too High"},
2645 {0x5D13, "Failure Seek Error Rate Too High"},
2646 {0x5D14, "Failure Too Many Block Reassigns"},
2647 {0x5D15, "Failure Access Times Too High"},
2648 {0x5D16, "Failure Start Unit Times Too High"},
2649 {0x5D17, "Failure Channel Parametrics"},
2650 {0x5D18, "Failure Controller Detected"},
2651 {0x5D19, "Failure Throughput Performance"},
2652 {0x5D1A, "Failure Seek Time Performance"},
2653 {0x5D1B, "Failure Spin-Up Retry Count"},
2654 {0x5D1C, "Failure Drive Calibration Retry"},
2655 {0x5D20, "Failure General Hard Drive Failure"},
2656 {0x5D21, "Failure Drive Error Rate Too High"},
2657 {0x5D22, "Failure Data Error Rate Too High"},
2658 {0x5D23, "Failure Seek Error Rate Too High"},
2659 {0x5D24, "Failure Too Many Block Reassigns"},
2660 {0x5D25, "Failure Access Times Too High"},
2661 {0x5D26, "Failure Start Unit Times Too High"},
2662 {0x5D27, "Failure Channel Parametrics"},
2663 {0x5D28, "Failure Controller Detected"},
2664 {0x5D29, "Failure Throughput Performance"},
2665 {0x5D2A, "Failure Seek Time Performance"},
2666 {0x5D2B, "Failure Spin-Up Retry Count"},
2667 {0x5D2C, "Failure Drive Calibration Retry"},
2668 {0x5D30, "Impending Failure General Hard Drive"},
2669 {0x5D31, "Impending Failure Drive Error Rate Too High"},
2670 {0x5D32, "Impending Failure Data Error Rate Too High"},
2671 {0x5D33, "Impending Failure Seek Error Rate Too High"},
2672 {0x5D34, "Impending Failure Too Many Block Reassigns"},
2673 {0x5D35, "Impending Failure Access Times Too High"},
2674 {0x5D36, "Impending Failure Start Unit Times Too High"},
2675 {0x5D37, "Impending Failure Channel Parametrics"},
2676 {0x5D38, "Impending Failure Controller Detected"},
2677 {0x5D39, "Impending Failure Throughput Performance"},
2678 {0x5D3A, "Impending Failure Seek Time Performance"},
2679 {0x5D3B, "Impending Failure Spin-Up Retry Count"},
2680 {0x5D3C, "Impending Failure Drive Calibration Retry"},
2681 {0x5D40, "Failure General Hard Drive Failure"},
2682 {0x5D41, "Failure Drive Error Rate Too High"},
2683 {0x5D42, "Failure Data Error Rate Too High"},
2684 {0x5D43, "Failure Seek Error Rate Too High"},
2685 {0x5D44, "Failure Too Many Block Reassigns"},
2686 {0x5D45, "Failure Access Times Too High"},
2687 {0x5D46, "Failure Start Unit Times Too High"},
2688 {0x5D47, "Failure Channel Parametrics"},
2689 {0x5D48, "Failure Controller Detected"},
2690 {0x5D49, "Failure Throughput Performance"},
2691 {0x5D4A, "Failure Seek Time Performance"},
2692 {0x5D4B, "Failure Spin-Up Retry Count"},
2693 {0x5D4C, "Failure Drive Calibration Retry Count"},
2694 {0x5D50, "Failure General Hard Drive Failure"},
2695 {0x5D51, "Failure Drive Error Rate Too High"},
2696 {0x5D52, "Failure Data Error Rate Too High"},
2697 {0x5D53, "Failure Seek Error Rate Too High"},
2698 {0x5D54, "Failure Too Many Block Reassigns"},
2699 {0x5D55, "Failure Access Times Too High"},
2700 {0x5D56, "Failure Start Unit Times Too High"},
2701 {0x5D57, "Failure Channel Parametrics"},
2702 {0x5D58, "Failure Controller Detected"},
2703 {0x5D59, "Failure Throughput Performance"},
2704 {0x5D5A, "Failure Seek Time Performance"},
2705 {0x5D5B, "Failure Spin-Up Retry Count"},
2706 {0x5D5C, "Failure Drive Calibration Retry Count"},
2707 {0x5D60, "Failure General Hard Drive Failure"},
2708 {0x5D61, "Failure Drive Error Rate Too High"},
2709 {0x5D62, "Failure Data Error Rate Too High"},
2710 {0x5D63, "Failure Seek Error Rate Too High"},
2711 {0x5D64, "Failure Too Many Block Reassigns"},
2712 {0x5D65, "Failure Access Times Too High"},
2713 {0x5D66, "Failure Start Unit Times Too High"},
2714 {0x5D67, "Failure Channel Parametrics"},
2715 {0x5D68, "Failure Controller Detected"},
2716 {0x5D69, "Failure Throughput Performance"},
2717 {0x5D6A, "Failure Seek Time Performance"},
2718 {0x5D6B, "Failure Spin-Up Retry Count"},
2719 {0x5D6C, "Failure Drive Calibration Retry Count"},
2720 {0x5DFF, "Failure Prediction Threshold Exceeded (False)"},
2721 {0x5E00, "Low Power Condition On"},
2722 {0x5E01, "Idle Condition Activated By Timer"},
2723 {0x5E02, "Standby Condition Activated By Timer"},
2724 {0x5E03, "Idle Condition Activated By Command"},
2725 {0x5E04, "Standby Condition Activated By Command"},
2726 {0x6500, "Voltage Fault"},
2729 value_string_ext scsi_asc_val_ext
= VALUE_STRING_EXT_INIT(scsi_asc_val
);
2731 /* SCSI Status Codes */
2732 const value_string scsi_status_val
[] = {
2734 {0x02, "Check Condition"},
2735 {0x04, "Condition Met"},
2737 {0x10, "Intermediate"},
2738 {0x14, "Intermediate Condition Met"},
2739 {0x18, "Reservation Conflict"},
2740 {0x28, "Task Set Full"},
2741 {0x30, "ACA Active"},
2742 {0x40, "Task Aborted"},
2747 static const value_string scsi_wb_mode_val
[] = {
2748 {0x0, "Write combined header and data"},
2749 {0x1, "Vendor specific"},
2750 {0x2, "Write data"},
2752 {0x4, "Download microcode"},
2753 {0x5, "Download microcode and save"},
2754 {0x6, "Download microcode with offsets"},
2755 {0x7, "Download microcode with offsets and save"},
2758 {0xA, "Echo buffer"},
2762 static const value_string scsi_senddiag_st_code_val
[] = {
2764 {0x1, "Start short self-test in background"},
2765 {0x2, "Start extended self-test in background"},
2767 {0x4, "Abort background self-test"},
2768 {0x5, "Foreground short self-test"},
2769 {0x6, "Foreground extended self-test"},
2774 static const true_false_string scsi_senddiag_pf_val
= {
2775 "Standard Page Format",
2776 "Vendor-specific Page Format",
2779 static int scsi_def_devtype
= SCSI_DEV_SBC
;
2782 typedef struct _cmdset_t
{
2784 value_string_ext
*cdb_vals_ext
;
2785 const scsi_cdb_table_t
*cdb_table
;
2788 static cmdset_t
*get_cmdset_data(wmem_allocator_t
*pool
, itlq_nexus_t
*itlq
, itl_nexus_t
*itl
);
2791 dissect_naa_designator(proto_tree
*tree
, tvbuff_t
*tvb
, unsigned offset
, unsigned len
)
2793 proto_tree
*naa_tree
;
2797 naa_type
= tvb_get_uint8(tvb
, offset
) >> 4;
2799 naa_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, len
,
2800 ett_scsi_naa
, NULL
, "NAA Designator: %s",
2801 val_to_str(naa_type
,
2802 scsi_naa_designator_type_val
,
2803 "Unknown (0x%08x)"));
2805 proto_tree_add_item(naa_tree
, hf_scsi_naa_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2807 case NAA_TYPE_IEEE_EXTENDED
:
2808 vs
= tvb_get_uint64(tvb
, offset
, ENC_BIG_ENDIAN
);
2809 proto_tree_add_uint(naa_tree
, hf_scsi_naa_vendor_specific
, tvb
, offset
, 2, (unsigned)((vs
>> 48) & 0x0fff));
2810 proto_tree_add_item(naa_tree
, hf_scsi_naa_ieee_company_id
, tvb
, offset
+ 2, 3, ENC_BIG_ENDIAN
);
2811 proto_tree_add_uint(naa_tree
, hf_scsi_naa_vendor_specific
, tvb
, offset
+ 5, 3, (unsigned)(vs
& 0x00ffffff));
2813 case NAA_TYPE_LOCALLY_ASSIGNED
:
2814 proto_tree_add_item(naa_tree
, hf_scsi_naa_locally_assigned
, tvb
, offset
+ 1, len
- 1, ENC_NA
);
2816 case NAA_TYPE_IEEE_REGISTERED
:
2817 vs
= tvb_get_uint64(tvb
, offset
, ENC_BIG_ENDIAN
);
2818 proto_tree_add_uint(naa_tree
, hf_scsi_naa_ieee_company_id
, tvb
, offset
, 4, (unsigned)((vs
>> 36) & 0x00ffffff));
2819 proto_tree_add_uint(naa_tree
, hf_scsi_naa_vendor_specific
, tvb
, offset
+ 3, 4, (unsigned)(vs
& 0x0fffffff));
2821 case NAA_TYPE_IEEE_REGISTERED_EXTENDED
:
2822 vs
= tvb_get_uint64(tvb
, offset
, ENC_BIG_ENDIAN
);
2823 proto_tree_add_uint(naa_tree
, hf_scsi_naa_ieee_company_id
, tvb
, offset
, 4, (unsigned)((vs
>> 36) & 0x00ffffff));
2824 proto_tree_add_uint(naa_tree
, hf_scsi_naa_vendor_specific
, tvb
, offset
+ 3, 4, (unsigned)(vs
& 0x0fffffff));
2825 proto_tree_add_item(naa_tree
, hf_scsi_naa_vendor_specific_extension
, tvb
, offset
+ 8, 8, ENC_NA
);
2832 dissect_scsi_evpd(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
2833 unsigned offset
, unsigned tot_len _U_
)
2835 proto_tree
*evpd_tree
;
2837 unsigned pcode
, plen
, i
, idlen
;
2838 uint8_t codeset
, identifier_type
;
2839 proto_tree
*des_tree
;
2842 pcode
= tvb_get_uint8(tvb
, offset
+1);
2843 plen
= tvb_get_uint8(tvb
, offset
+3);
2844 evpd_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, plen
+4,
2845 ett_scsi_page
, NULL
, "Page Code: %s",
2846 val_to_str(pcode
, scsi_evpd_pagecode_val
,
2847 "Unknown (0x%08x)"));
2849 proto_tree_add_item(evpd_tree
, hf_scsi_inq_qualifier
, tvb
, offset
,
2851 proto_tree_add_item(evpd_tree
, hf_scsi_inq_devtype
, tvb
, offset
,
2853 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_evpd_page
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
2854 proto_tree_add_item(evpd_tree
, hf_scsi_inq_evpd_page_length
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
2857 case SCSI_EVPD_SUPPPG
:
2858 for (i
= 0; i
< plen
; i
++) {
2859 proto_tree_add_item(evpd_tree
, hf_scsi_inq_evpd_supported_page
, tvb
, offset
+i
, 1, ENC_BIG_ENDIAN
);
2862 case SCSI_EVPD_DEVID
:
2865 idlen
= tvb_get_uint8(tvb
, offset
+ 3);
2867 des_tree
= proto_tree_add_subtree_format(evpd_tree
,
2868 tvb
, offset
, idlen
, ett_scsi_designation_descriptor
,
2869 NULL
, "Designation Descriptor");
2872 ti
= proto_tree_add_uint(des_tree
, hf_scsi_inq_evpd_identifier_number
, tvb
, offset
, 0, i
);
2873 proto_item_set_generated(ti
);
2875 codeset
= tvb_get_uint8(tvb
, offset
) & 0x0F;
2876 ti
= proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_code_set
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2881 expert_add_info(pinfo
, ti
, &ei_scsi_product_data_goes_past_end_of_page
);
2885 proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_association
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2886 identifier_type
= tvb_get_uint8(tvb
, offset
);
2887 ti
= proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_identifier_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2891 /* Skip reserved byte */
2893 expert_add_info(pinfo
, ti
, &ei_scsi_product_data_goes_past_end_of_page
);
2900 expert_add_info(pinfo
, ti
, &ei_scsi_product_data_goes_past_end_of_page
);
2903 ti
= proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_identifier_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2909 expert_add_info(pinfo
, ti
, &ei_scsi_product_data_goes_past_end_of_page
);
2912 if (codeset
== CODESET_ASCII
) {
2913 if (identifier_type
== DEVID_TYPE_VEND_ID_VEND_SPEC_ID
) {
2914 proto_tree_add_item(des_tree
, hf_scsi_inq_vendor_id
, tvb
, offset
, 8, ENC_ASCII
);
2915 proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_identifier_str
, tvb
, offset
+ 8, idlen
- 8, ENC_NA
|ENC_ASCII
);
2917 proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_identifier_str
, tvb
, offset
, idlen
, ENC_NA
|ENC_ASCII
);
2919 } else if (codeset
== CODESET_BINARY
&& identifier_type
== DEVID_TYPE_NAA
) {
2920 dissect_naa_designator(des_tree
, tvb
, offset
, idlen
);
2923 * XXX - decode this based on the identifier type,
2924 * if the codeset is CODESET_BINARY?
2926 proto_tree_add_item(des_tree
, hf_scsi_inq_evpd_devid_identifier_bytes
, tvb
, offset
, idlen
, ENC_NA
);
2933 case SCSI_EVPD_DEVSERNUM
:
2935 proto_tree_add_item(evpd_tree
, hf_scsi_inq_evpd_product_serial_number
, tvb
, offset
, plen
, ENC_NA
|ENC_ASCII
);
2938 case SCSI_EVPD_BLKDEVCHAR
:
2939 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_mrr
, tvb
,
2940 offset
, 2, ENC_BIG_ENDIAN
);
2943 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_pt
, tvb
,
2944 offset
, 1, ENC_BIG_ENDIAN
);
2947 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_wabereq
, tvb
,
2948 offset
, 1, ENC_BIG_ENDIAN
);
2949 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_wacereq
, tvb
,
2950 offset
, 1, ENC_BIG_ENDIAN
);
2951 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_nff
, tvb
,
2952 offset
, 1, ENC_BIG_ENDIAN
);
2955 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_fuab
, tvb
,
2956 offset
, 1, ENC_BIG_ENDIAN
);
2957 proto_tree_add_item(evpd_tree
, hf_scsi_inquiry_bdc_vbuls
, tvb
,
2958 offset
, 1, ENC_BIG_ENDIAN
);
2961 case SCSI_EVPD_BLKLIMITS
:
2962 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_wsnz
, tvb
, offset
, 1, ENC_NA
);
2965 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_mcawl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2968 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_otlg
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2971 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_mtl
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2974 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_otl
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2977 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_mpl
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2980 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_mulc
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2983 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_mubdc
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2986 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_oug
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2989 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_ugavalid
, tvb
, offset
, 1, ENC_NA
);
2990 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_uga
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2993 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_mwsl
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
2996 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_matl
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2999 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_aa
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3002 proto_tree_add_item(evpd_tree
, hf_scsi_block_limits_atlg
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3007 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_threshold_exponent
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3010 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_lbpu
, tvb
, offset
, 1, ENC_NA
);
3011 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_lbpws
, tvb
, offset
, 1, ENC_NA
);
3012 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_lbpws10
, tvb
, offset
, 1, ENC_NA
);
3013 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_lbprz
, tvb
, offset
, 1, ENC_NA
);
3014 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_anc_sup
, tvb
, offset
, 1, ENC_NA
);
3015 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_dp
, tvb
, offset
, 1, ENC_NA
);
3018 proto_tree_add_item(evpd_tree
, hf_scsi_sbc_ptype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3027 dissect_scsi_cmddt(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
3028 unsigned offset
, unsigned tot_len _U_
)
3030 proto_tree
*cmdt_tree
;
3034 plen
= tvb_get_uint8(tvb
, offset
+5);
3035 cmdt_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, plen
, ett_scsi_page
, NULL
, "Command Data");
3037 proto_tree_add_item(cmdt_tree
, hf_scsi_inq_qualifier
, tvb
, offset
,
3039 proto_tree_add_item(cmdt_tree
, hf_scsi_inq_devtype
, tvb
, offset
,
3041 proto_tree_add_item(cmdt_tree
, hf_scsi_inq_cmddt_support
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
3042 proto_tree_add_item(cmdt_tree
, hf_scsi_inq_cmddt_version
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
3043 proto_tree_add_item(cmdt_tree
, hf_scsi_inq_cmddt_cdb_size
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
3048 #define SCSI_INQ_ACAFLAGS_AERC 0x80
3049 #define SCSI_INQ_ACAFLAGS_TRMTSK 0x40
3050 #define SCSI_INQ_ACAFLAGS_NORMACA 0x20
3051 #define SCSI_INQ_ACAFLAGS_HISUP 0x10
3053 static const value_string inq_rdf_vals
[] = {
3054 { 2, "SPC-2/SPC-3/SPC-4" },
3059 #define SCSI_INQ_SCCSFLAGS_SCCS 0x80
3060 #define SCSI_INQ_SCCSFLAGS_ACC 0x40
3061 #define SCSI_INQ_SCCSFLAGS_TPC 0x08
3062 #define SCSI_INQ_SCCSFLAGS_PROTECT 0x01
3064 static const value_string inq_tpgs_vals
[] = {
3065 { 0, "Asymmetric LU Access not supported" },
3066 { 1, "Implicit Asymmetric LU Access supported" },
3067 { 2, "Explicit LU Access supported" },
3068 { 3, "Both Implicit and Explicit LU Access supported" },
3072 /* This dissects byte 5 of the SPC/SPC-2/SPC-3/SPC-4 standard INQ data */
3074 dissect_spc_inq_sccsflags(tvbuff_t
*tvb
, int offset
, proto_tree
*tree
, int version
)
3076 static int * const sccs_fields_spc2
[] = {
3080 static int * const sccs_fields_spc3
[] = {
3085 &hf_scsi_inq_protect
,
3093 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_sccsflags
, ett_scsi_inq_sccsflags
, sccs_fields_spc2
, ENC_BIG_ENDIAN
);
3097 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_sccsflags
, ett_scsi_inq_sccsflags
, sccs_fields_spc3
, ENC_BIG_ENDIAN
);
3099 default: /* including version 0 : claims conformance to no standard */
3100 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_sccsflags
, ett_scsi_inq_sccsflags
, sccs_fields_spc3
, ENC_BIG_ENDIAN
);
3108 #define SCSI_INQ_BQUEFLAGS_BQUE 0x80
3109 #define SCSI_INQ_BQUEFLAGS_ENCSERV 0x40
3110 #define SCSI_INQ_BQUEFLAGS_MULTIP 0x10
3111 #define SCSI_INQ_BQUEFLAGS_MCHNGR 0x08
3112 #define SCSI_INQ_BQUEFLAGS_ACKREQQ 0x04
3114 /* This dissects byte 6 of the SPC/SPC-2/SPC-3/SPC-4 standard INQ data */
3116 dissect_spc_inq_bqueflags(tvbuff_t
*tvb
, int offset
, proto_tree
*tree
, int version
)
3118 static int * const bqe_fields_spc
[] = {
3119 &hf_scsi_inq_encserv
,
3120 &hf_scsi_inq_multip
,
3121 &hf_scsi_inq_mchngr
,
3122 &hf_scsi_inq_ackreqq
,
3125 static int * const bqe_fields_spc2
[] = {
3127 &hf_scsi_inq_encserv
,
3128 &hf_scsi_inq_multip
,
3129 &hf_scsi_inq_mchngr
,
3132 static int * const bqe_fields_spc4
[] = {
3134 &hf_scsi_inq_encserv
,
3135 &hf_scsi_inq_multip
,
3141 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_bqueflags
, ett_scsi_inq_bqueflags
, bqe_fields_spc
, ENC_BIG_ENDIAN
);
3145 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_bqueflags
, ett_scsi_inq_bqueflags
, bqe_fields_spc2
, ENC_BIG_ENDIAN
);
3148 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_bqueflags
, ett_scsi_inq_bqueflags
, bqe_fields_spc4
, ENC_BIG_ENDIAN
);
3150 default: /* including version 0 : claims conformance to no standard */
3151 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_bqueflags
, ett_scsi_inq_bqueflags
, bqe_fields_spc4
, ENC_BIG_ENDIAN
);
3159 #define SCSI_INQ_RELADRFLAGS_RELADR 0x80
3160 #define SCSI_INQ_RELADRFLAGS_LINKED 0x08
3161 #define SCSI_INQ_RELADRFLAGS_TRANDIS 0x04
3162 #define SCSI_INQ_RELADRFLAGS_CMDQUE 0x02
3164 /* This dissects byte 7 of the SPC/SPC-2/SPC-3/SPC-4 standard INQ data */
3166 dissect_spc_inq_reladrflags(tvbuff_t
*tvb
, int offset
, proto_tree
*tree
, int version
)
3168 static int * const reladr_fields_spc
[] = {
3169 &hf_scsi_inq_reladr
,
3170 &hf_scsi_inq_linked
,
3171 &hf_scsi_inq_trandis
,
3172 &hf_scsi_inq_cmdque
,
3175 static int * const reladr_fields_spc2
[] = {
3176 &hf_scsi_inq_reladr
,
3177 &hf_scsi_inq_linked
,
3178 &hf_scsi_inq_cmdque
,
3181 static int * const reladr_fields_spc3
[] = {
3182 &hf_scsi_inq_linked
,
3183 &hf_scsi_inq_cmdque
,
3186 static int * const reladr_fields_spc4
[] = {
3187 &hf_scsi_inq_cmdque
,
3194 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_reladrflags
, ett_scsi_inq_reladrflags
, reladr_fields_spc
, ENC_BIG_ENDIAN
);
3197 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_reladrflags
, ett_scsi_inq_reladrflags
, reladr_fields_spc2
, ENC_BIG_ENDIAN
);
3200 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_reladrflags
, ett_scsi_inq_reladrflags
, reladr_fields_spc3
, ENC_BIG_ENDIAN
);
3203 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_reladrflags
, ett_scsi_inq_reladrflags
, reladr_fields_spc4
, ENC_BIG_ENDIAN
);
3205 default: /* including version 0 : claims conformance to no standard */
3206 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_inq_reladrflags
, ett_scsi_inq_reladrflags
, reladr_fields_spc4
, ENC_BIG_ENDIAN
);
3213 static int * const peripheral_fields
[] = {
3214 &hf_scsi_inq_qualifier
,
3215 &hf_scsi_inq_devtype
,
3221 dissect_spc_inquiry(tvbuff_t
*tvb_a
, packet_info
*pinfo
,
3222 proto_tree
*tree
, unsigned offset_a
, bool isreq
,
3223 bool iscdb
, uint32_t payload_len
,
3224 scsi_task_data_t
*cdata
)
3226 uint8_t flags
, i
, version
;
3228 static int * const inq_control_fields
[] = {
3229 &hf_scsi_inq_control_vendor_specific
,
3230 &hf_scsi_inq_control_reserved
,
3231 &hf_scsi_inq_control_naca
,
3232 &hf_scsi_inq_control_obs1
,
3233 &hf_scsi_inq_control_obs2
,
3236 static int * const aca_fields_spc
[] = {
3237 &hf_scsi_inq_aerc
, /* obsolete in spc3 and forward */
3238 &hf_scsi_inq_trmtsk
,/* obsolete in spc2 and forward */
3239 &hf_scsi_inq_normaca
,
3244 static int * const aca_fields_spc2
[] = {
3245 &hf_scsi_inq_aerc
, /* obsolete in spc3 and forward */
3246 &hf_scsi_inq_normaca
,
3251 static int * const aca_fields_spc3
[] = {
3252 &hf_scsi_inq_normaca
,
3257 static int * const rmb_fields
[] = {
3262 if (!isreq
&& ((cdata
== NULL
) || !(cdata
->itlq
->flags
& 0x3))
3263 && (tvb_reported_length_remaining(tvb_a
, offset_a
) >= 1) ) {
3265 * INQUIRY response with device type information; add device type
3266 * to list of known devices & their types if not already known.
3268 if (cdata
&& cdata
->itl
) {
3269 cdata
->itl
->cmdset
= tvb_get_uint8(tvb_a
, offset_a
)&SCSI_DEV_BITS
;
3273 if (isreq
&& iscdb
) {
3274 flags
= tvb_get_uint8(tvb_a
, offset_a
);
3276 cdata
->itlq
->flags
= flags
;
3279 proto_tree_add_uint_format(tree
, hf_scsi_inquiry_flags
, tvb_a
, offset_a
, 1,
3280 flags
, "CMDT = %u, EVPD = %u",
3281 flags
& 0x2, flags
& 0x1);
3283 proto_tree_add_item(tree
, hf_scsi_inquiry_evpd_page
, tvb_a
, offset_a
+1,
3286 col_add_fstr(pinfo
->cinfo
, COL_INFO
, " %s ",
3287 val_to_str(tvb_get_uint8(tvb_a
, offset_a
+1),
3288 scsi_evpd_pagecode_val
,
3289 "Unknown VPD 0x%02x"));
3290 } else if (flags
& 0x2) {
3291 proto_tree_add_item(tree
, hf_scsi_inquiry_cmdt_page
, tvb_a
, offset_a
+1,
3295 proto_tree_add_item(tree
, hf_scsi_alloclen16
, tvb_a
, offset_a
+2, 2, ENC_BIG_ENDIAN
);
3296 /* we need the alloc_len in the response */
3298 cdata
->itlq
->alloc_len
= tvb_get_ntohs(tvb_a
, offset_a
+2);
3300 proto_tree_add_bitmask(tree
, tvb_a
, offset_a
+4, hf_scsi_inq_control
,
3301 ett_scsi_inq_control
, inq_control_fields
, ENC_BIG_ENDIAN
);
3302 } else if (!isreq
) {
3307 if (cdata
->itlq
->flags
& 0x1) {
3308 dissect_scsi_evpd(tvb_a
, pinfo
, tree
, offset_a
, payload_len
);
3311 if (cdata
->itlq
->flags
& 0x2) {
3312 dissect_scsi_cmddt(tvb_a
, pinfo
, tree
, offset_a
, payload_len
);
3316 /* These pdus are sometimes truncated by SCSI allocation length
3319 TRY_SCSI_CDB_ALLOC_LEN(cdata
->itlq
->alloc_len
); /* (defines/initializes try_tvb & try_offset) */
3321 /* Qualifier and DeviceType */
3322 proto_tree_add_bitmask(tree
, try_tvb
, try_offset
, hf_scsi_inq_peripheral
, ett_scsi_inq_peripheral
, peripheral_fields
, ENC_BIG_ENDIAN
);
3326 proto_tree_add_bitmask(tree
, try_tvb
, try_offset
, hf_scsi_inq_rmbflags
, ett_scsi_inq_rmbflags
, rmb_fields
, ENC_BIG_ENDIAN
);
3330 version
= tvb_get_uint8(try_tvb
, try_offset
);
3331 proto_tree_add_item(tree
, hf_scsi_inq_version
, try_tvb
, try_offset
, 1, ENC_BIG_ENDIAN
);
3337 proto_tree_add_bitmask(tree
, try_tvb
, try_offset
, hf_scsi_inq_acaflags
, ett_scsi_inq_acaflags
, aca_fields_spc
, ENC_BIG_ENDIAN
);
3340 proto_tree_add_bitmask(tree
, try_tvb
, try_offset
, hf_scsi_inq_acaflags
, ett_scsi_inq_acaflags
, aca_fields_spc2
, ENC_BIG_ENDIAN
);
3344 proto_tree_add_bitmask(tree
, try_tvb
, try_offset
, hf_scsi_inq_acaflags
, ett_scsi_inq_acaflags
, aca_fields_spc3
, ENC_BIG_ENDIAN
);
3346 default: /* including version 0 : claims conformance to no standard */
3347 proto_tree_add_bitmask(tree
, try_tvb
, try_offset
, hf_scsi_inq_acaflags
, ett_scsi_inq_acaflags
, aca_fields_spc3
, ENC_BIG_ENDIAN
);
3351 /* Additional Length */
3352 SET_SCSI_DATA_END(tvb_get_uint8(try_tvb
, try_offset
)+try_offset
);
3353 proto_tree_add_item(tree
, hf_scsi_inq_add_len
, try_tvb
, try_offset
, 1, ENC_BIG_ENDIAN
);
3357 try_offset
= dissect_spc_inq_sccsflags(try_tvb
, try_offset
, tree
, version
);
3360 try_offset
= dissect_spc_inq_bqueflags(try_tvb
, try_offset
, tree
, version
);
3363 try_offset
= dissect_spc_inq_reladrflags(try_tvb
, try_offset
, tree
, version
);
3366 proto_tree_add_item(tree
, hf_scsi_inq_vendor_id
, try_tvb
, try_offset
, 8, ENC_ASCII
);
3370 proto_tree_add_item(tree
, hf_scsi_inq_product_id
, try_tvb
, try_offset
, 16, ENC_ASCII
);
3373 /* product revision level */
3374 proto_tree_add_item(tree
, hf_scsi_inq_product_rev
, try_tvb
, try_offset
, 4, ENC_ASCII
);
3377 /* vendor specific, 20 bytes */
3378 proto_tree_add_item(tree
, hf_scsi_inq_vendor_specific
, try_tvb
, try_offset
, 20, ENC_NA
);
3384 /* version descriptors */
3385 for(i
= 0;i
<8;i
++) {
3386 proto_tree_add_item(tree
, hf_scsi_inq_version_desc
, try_tvb
, try_offset
, 2, ENC_BIG_ENDIAN
);
3390 END_TRY_SCSI_CDB_ALLOC_LEN
;
3394 #define XCOPY_LID1 0
3395 #define XCOPY_LID4 1
3396 static const value_string extcopy_service_vals
[] = {
3397 { XCOPY_LID1
, "Extended Copy (LID1)" },
3398 { XCOPY_LID4
, "Extended Copy (LID4)" },
3402 #define RECV_COPY_PARAMS 0x3
3403 static const value_string recv_copy_service_vals
[] = {
3404 { 0x6, "Receive Copy Data (LID4)" },
3405 { 0x1, "Receive Copy Data (LID1)" },
3406 { RECV_COPY_PARAMS
, "Receive Copy Parameters" },
3407 { 0x4, "Receive Copy Failure details" },
3408 { 0x5, "Receive Copy Status (LID4)" },
3409 { 0x0, "Receive Copy Status (LID1)" },
3415 static const value_string cscd_desc_type_code_vals
[] = {
3416 { 0xE0, "Fibre Channel N_Port_Name CSCD descriptor" },
3417 { 0xE1, "Fibre Channel N_Port_ID CSCD descriptor" },
3418 { 0xE2, "Fibre Channel N_Port_ID With N_Port_Name Checking CSCD descriptor" },
3419 { 0xE3, "Parallel Interface T_L CSCD descriptor" },
3420 { 0xE4, "Identification Descriptor CSCD descriptor" },
3421 { 0xFF, "Extension descriptor" },
3426 static int * const per_dev_type_bitmask_fields
[] = {
3427 &hf_scsi_spc_xcopy_lu_type
,
3428 &hf_scsi_spc_xcopy_per_dev_type
,
3432 static int * const xcopy_param_list_bits
[] = {
3433 &hf_scsi_spc_xcopy_param_str
,
3434 &hf_scsi_spc_xcopy_param_list_id_usage
,
3435 &hf_scsi_spc_xcopy_param_priority
,
3439 #define BLOCK_DEV_0 0x0
3440 #define BLOCK_DEV_4 0x4
3441 #define BLOCK_DEV_5 0x5
3442 #define BLOCK_DEV_7 0x7
3443 #define BLOCK_DEV_E 0xE
3445 static const value_string per_dev_type_vals
[] = {
3446 { BLOCK_DEV_0
, "Block devices" },
3447 { 0x1, "Sequential access devices" },
3448 { 0x3, "Processor devices" },
3449 { BLOCK_DEV_4
, "Block devices" },
3450 { BLOCK_DEV_5
, "Block devices" },
3451 { BLOCK_DEV_7
, "Block devices" },
3452 { BLOCK_DEV_E
, "Block devices" },
3456 static const value_string lu_type_vals
[] = {
3457 { 0, "Logical Unit Number" },
3458 { 1, "Proxy Token" },
3464 #define BLOCK_TO_BLOCK 2
3466 static const range_string desc_type_rval
[] = {
3467 { 0x0, 0x0, "Block to stream" },
3468 { 0x1, 0x1, "Stream to block" },
3469 { BLOCK_TO_BLOCK
, BLOCK_TO_BLOCK
, "Block to block" },
3470 { 0x3, 0x3, "Stream to stream" },
3471 { 0x4, 0x4, "Inline to stream" },
3472 { 0x5, 0x5, "Embedded to strem" },
3473 { 0x6, 0x6, "Stream to discard" },
3474 { 0x7, 0x7, "Verify CSCD" },
3475 { 0x0, 0xBF, "Segment descriptors" },
3476 { 0xC, 0xDF, "Vendor-specific descriptors" },
3477 { 0xE0, 0xE0, "Fibre Channel N_Port_Name CSCD descriptor" },
3478 { 0xE1, 0xE1, "Fibre Channel N_Port_ID CSCD descriptor" },
3479 { 0xE2, 0xE2, "Fibre Channel N_Port_ID With N_Port_Name Checking CSCD descriptor" },
3480 { 0xE3, 0xE3, "Parallel Interface T_L CSCD descriptor" },
3481 { 0xE4, 0xE4, "Identification Descriptor CSCD descriptor" },
3482 { 0xE5, 0xFE, "CSCD descriptors" },
3483 { 0xFF, 0xFF, "CSCD descriptor extension" },
3488 dissect_spc_extcopy(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
3489 proto_tree
*tree
, unsigned offset
,
3490 bool isreq
, bool iscdb
,
3491 unsigned payload_len _U_
, scsi_task_data_t
*cdata
)
3493 uint16_t serv_action
;
3494 uint8_t cscd_desc_type
, dev_type
, des_len
, code_set
, des_type
, seg_type
;
3495 uint16_t cscd_desc_list_len
, seg_desc_len
;
3496 uint32_t /*param_list_len,*/ seg_desc_list_len
, inline_data_len
, i
;
3497 proto_tree
*cscds_tree
= NULL
, *dev_tree
= NULL
, *cscd_tree
= NULL
, *segs_tree
= NULL
,
3498 *seg_tree
= NULL
, *seg_param_tree
= NULL
, *cscd_desc_tree
;
3500 if (isreq
&& iscdb
) {
3501 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_service
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3502 serv_action
= tvb_get_uint8(tvb
, offset
) & 0x1F;
3504 cdata
->itlq
->flags
= serv_action
;
3508 proto_tree_add_item(tree
, hf_scsi_reserved_64
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3510 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_param_list_len
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3511 /*param_list_len = tvb_get_ntohl(tvb, offset); */
3514 proto_tree_add_item(tree
, hf_scsi_reserved_8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3516 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_control
,
3517 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
3519 /*offset += (param_list_len - 15);*/
3522 serv_action
= cdata
->itlq
->flags
;
3527 if (serv_action
== XCOPY_LID1
){
3528 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_list_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3530 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_spc_xcopy_param_byte
, ett_xcopy_param_byte
, xcopy_param_list_bits
, ENC_NA
);
3532 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_cscd_desc_list_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3533 cscd_desc_list_len
= tvb_get_ntohs(tvb
, offset
);
3535 proto_tree_add_item(tree
, hf_scsi_reserved_32
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3537 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_seg_desc_list_len
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3538 seg_desc_list_len
= tvb_get_ntohl(tvb
, offset
);
3540 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_inline_data_len
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3541 inline_data_len
= tvb_get_ntohl(tvb
, offset
);
3543 if (cscd_desc_list_len
> 0) {
3544 cscds_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, cscd_desc_list_len
, ett_scsi_xcopy_cscds
, NULL
,
3545 "CSCD (Copy Source and Copy Destination) descriptors (%u bytes)", cscd_desc_list_len
);
3547 while(cscd_desc_list_len
> 0) {
3548 cscd_desc_type
= tvb_get_uint8(tvb
, offset
);
3549 if (cscd_desc_type
== 0xEA || cscd_desc_type
== 0xEB) { /* both types occupy 64 bytes overall, everything else is 32 bytes */
3550 cscd_tree
= proto_tree_add_subtree_format(cscds_tree
, tvb
, offset
, 64, ett_scsi_xcopy_cscd
, NULL
, "CSCD descriptor #%u", i
);
3552 cscd_tree
= proto_tree_add_subtree_format(cscds_tree
, tvb
, offset
, 32, ett_scsi_xcopy_cscd
, NULL
, "CSCD descriptor #%u", i
);
3555 proto_tree_add_item(cscd_tree
, hf_scsi_spc_xcopy_cscd_desc_type_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3557 proto_tree_add_bitmask(cscd_tree
, tvb
, offset
, hf_scsi_spc_xcopy_per_dev_type_byte
, ett_xcopy_per_dev_type
, per_dev_type_bitmask_fields
, ENC_NA
);
3558 dev_type
= tvb_get_uint8(tvb
, offset
) & 0x1F;
3560 proto_tree_add_item(cscd_tree
, hf_scsi_spc_xcopy_rel_init_port_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3562 cscd_desc_tree
= proto_tree_add_subtree(cscd_tree
, tvb
, offset
, 24, ett_scsi_cscd_desc
, NULL
, "CSCD descriptor parameters");
3563 proto_tree_add_item(cscd_desc_tree
, hf_scsi_spc_xcopy_cscd_desc_code_set
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3564 code_set
= tvb_get_uint8(tvb
, offset
) & 0x0F;
3566 proto_tree_add_item(cscd_desc_tree
, hf_scsi_spc_xcopy_cscd_desc_assoc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3567 proto_tree_add_item(cscd_desc_tree
, hf_scsi_spc_xcopy_cscd_desc_des_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3568 des_type
= tvb_get_uint8(tvb
, offset
) & 0x0F;
3570 proto_tree_add_item(cscd_desc_tree
, hf_scsi_reserved_8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3572 proto_tree_add_item(cscd_desc_tree
, hf_scsi_spc_xcopy_cscd_desc_des_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3573 des_len
= tvb_get_uint8(tvb
, offset
);
3575 proto_tree_add_bytes_format(cscd_desc_tree
, hf_scsi_designator
, tvb
, offset
, 20, NULL
, "Designator (20 bytes, zero padded, used length %u)", des_len
);
3576 if (code_set
== CODESET_BINARY
&& des_type
== DEVID_TYPE_NAA
) { /* des_type 3 = NAA */
3577 dissect_naa_designator(cscd_tree
, tvb
, offset
, des_len
);
3580 dev_tree
= proto_tree_add_subtree(cscd_tree
, tvb
, offset
, 4, ett_scsi_xcopy_dev_params
, NULL
, "Device type specific parameters");
3581 if (dev_type
== BLOCK_DEV_0
|| dev_type
== BLOCK_DEV_4
|| dev_type
== BLOCK_DEV_5
|| dev_type
== BLOCK_DEV_7
|| dev_type
== BLOCK_DEV_E
) {
3582 proto_tree_add_item(dev_tree
, hf_scsi_reserved_8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3583 offset
+= 1; /*TODO: dissect this byte */
3584 proto_tree_add_item(dev_tree
, hf_scsi_spc_xcopy_disk_block_len
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3589 cscd_desc_list_len
-= 32;
3590 if (cscd_desc_type
== 0xEA || cscd_desc_type
== 0xEB) { /* both types occupy 64 bytes overall, everything else is 32 bytes */
3592 cscd_desc_list_len
-= 32;
3596 if (seg_desc_list_len
> 0) {
3597 segs_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, seg_desc_list_len
,
3598 ett_scsi_xcopy_segs
, NULL
, "Segment descriptor list (%u bytes)", seg_desc_list_len
);
3600 while(seg_desc_list_len
> 0) {
3601 seg_desc_len
= tvb_get_ntohs(tvb
, offset
+ 2);
3602 seg_tree
= proto_tree_add_subtree_format(segs_tree
, tvb
, offset
, seg_desc_len
+ 4,
3603 ett_scsi_xcopy_seg
, NULL
, "Segment descriptor #%u", i
);
3605 proto_tree_add_item(seg_tree
, hf_scsi_spc_xcopy_seg_desc_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3606 seg_type
= tvb_get_uint8(tvb
, offset
);
3608 proto_tree_add_item(seg_tree
, hf_scsi_spc_xcopy_seg_desc_dc
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3609 proto_tree_add_item(seg_tree
, hf_scsi_spc_xcopy_seg_desc_cat
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3611 proto_tree_add_item(seg_tree
, hf_scsi_segment_descriptor_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3613 proto_tree_add_item(seg_tree
, hf_scsi_spc_xcopy_seg_des_src_desc_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3615 proto_tree_add_item(seg_tree
, hf_scsi_spc_xcopy_seg_des_dest_desc_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3617 seg_param_tree
= proto_tree_add_subtree(seg_tree
, tvb
, offset
, seg_desc_len
- 4,
3618 ett_scsi_xcopy_seg_param
, NULL
, "Segment descriptor parameters");
3619 seg_desc_list_len
-= (seg_desc_len
+ 4);
3620 if (seg_type
== BLOCK_TO_BLOCK
) {
3621 proto_tree_add_item(seg_param_tree
, hf_scsi_reserved_16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3623 proto_tree_add_item(seg_param_tree
, hf_scsi_spc_xcopy_num_of_blocks
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3625 proto_tree_add_item(seg_param_tree
, hf_scsi_spc_xcopy_source_lba
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3627 proto_tree_add_item(seg_param_tree
, hf_scsi_spc_xcopy_dest_lba
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3630 offset
+= (seg_desc_len
- 4);
3634 if (inline_data_len
> 0) {
3635 proto_tree_add_item(tree
, hf_scsi_inline_data
, tvb
, offset
, inline_data_len
, ENC_NA
);
3636 /*offset += inline_data_len;*/
3638 } else if (serv_action
== XCOPY_LID4
) {
3639 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_param_list_format
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3641 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_spc_xcopy_param_byte
, ett_xcopy_param_byte
, xcopy_param_list_bits
, ENC_NA
);
3643 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_head_cscd_desc_list_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3645 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_head_cscd_desc_type_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3652 void dissect_spc_recvcopy(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
3653 proto_tree
*tree _U_
, unsigned offset _U_
,
3654 bool isreq _U_
, bool iscdb _U_
,
3655 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
3657 uint16_t serv_action
;
3658 uint8_t imp_desc_list_len
;
3660 if (isreq
&& iscdb
) {
3661 proto_tree_add_item(tree
, hf_scsi_spc_recv_copy_service
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3662 serv_action
= tvb_get_uint8(tvb
, offset
) & 0x1F;
3664 cdata
->itlq
->flags
= serv_action
;
3667 proto_tree_add_item(tree
, hf_scsi_reserved_64
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3669 proto_tree_add_item(tree
, hf_scsi_alloclen32
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3671 proto_tree_add_item(tree
, hf_scsi_reserved_8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3673 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_control
,
3674 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
3679 serv_action
= cdata
->itlq
->flags
;
3684 if (serv_action
== RECV_COPY_PARAMS
) {
3685 proto_tree_add_item(tree
, hf_scsi_recv_copy_avail_data
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3687 proto_tree_add_item(tree
, hf_scsi_recv_copy_snlid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3689 proto_tree_add_item(tree
, hf_scsi_reserved_24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3691 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_cscd_desc_count
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3693 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_seg_desc_count
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3695 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_desc_list_len
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3697 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_seg_len
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3699 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_inline_data_len
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3701 proto_tree_add_item(tree
, hf_scsi_recv_copy_held_data_limit
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3703 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_stream_dev_trans_size
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3705 proto_tree_add_item(tree
, hf_scsi_reserved_16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3707 proto_tree_add_item(tree
, hf_scsi_recv_copy_total_con_copies
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3709 proto_tree_add_item(tree
, hf_scsi_recv_copy_max_con_copies
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3711 proto_tree_add_item(tree
, hf_scsi_recv_copy_data_seg_gran
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3713 proto_tree_add_item(tree
, hf_scsi_recv_copy_inline_data_gran
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3715 proto_tree_add_item(tree
, hf_scsi_recv_copy_held_data_gran
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3717 proto_tree_add_item(tree
, hf_scsi_reserved_24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3719 proto_tree_add_item(tree
, hf_scsi_recv_copy_implemented_desc_list_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3720 imp_desc_list_len
= tvb_get_uint8(tvb
, offset
);
3722 while (imp_desc_list_len
> 0) {
3723 proto_tree_add_item(tree
, hf_scsi_spc_xcopy_cscd_desc_type_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3725 imp_desc_list_len
--;
3728 proto_tree_add_expert_format(tree
, pinfo
, &ei_scsi_unknown_serv_action
, tvb
, offset
, 0, "Unknown serv_action %u", serv_action
);
3735 dissect_scsi_log_page(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
3738 static int * const pcflags_fields
[] = {
3739 &hf_scsi_log_pagecode
,
3742 static int * const paramflags_fields
[] = {
3745 &hf_scsi_log_pf_tsd
,
3746 &hf_scsi_log_pf_etc
,
3747 &hf_scsi_log_pf_tmc
,
3748 &hf_scsi_log_pf_lbin
,
3752 uint16_t pagelen
, pagecode
;
3754 proto_tree
*log_tree
;
3756 unsigned old_offset
= offset
;
3757 const log_pages_t
*log_page
;
3759 pagecode
= tvb_get_uint8(tvb
, offset
) & 0x3f;
3761 log_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, -1, ett_scsi_log
, &ti
,
3762 "Log Page: %s", val_to_str(pagecode
, scsi_log_page_val
, "Unknown (0x%04x)"));
3765 proto_tree_add_bitmask(log_tree
, tvb
, offset
, hf_scsi_log_pc_flags
, ett_scsi_log_pc
, pcflags_fields
, ENC_BIG_ENDIAN
);
3772 pagelen
= tvb_get_ntohs(tvb
, offset
);
3773 proto_tree_add_item(log_tree
, hf_scsi_log_page_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3777 /* find the appropriate log page */
3778 for(log_page
= log_pages
;log_page
;log_page
++) {
3779 if (log_page
->parameters
== NULL
) {
3783 if (log_page
->page
== pagecode
) {
3788 /* loop over all parameters */
3789 while( offset
<(old_offset
+4+pagelen
) ) {
3790 const log_page_parameters_t
*log_parameter
= NULL
;
3793 /* parameter code */
3794 log_param
= tvb_get_ntohs(tvb
, offset
);
3795 proto_tree_add_item(log_tree
, hf_scsi_log_parameter_code
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3799 proto_tree_add_bitmask(log_tree
, tvb
, offset
, hf_scsi_log_param_flags
, ett_scsi_log_param
, paramflags_fields
, ENC_BIG_ENDIAN
);
3802 /* parameter length */
3803 paramlen
= tvb_get_uint8(tvb
, offset
);
3804 proto_tree_add_item(log_tree
, hf_scsi_log_param_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3807 /* find the log parameter */
3809 for(log_parameter
= log_page
->parameters
;log_parameter
;log_parameter
++) {
3810 if (log_parameter
->dissector
== NULL
) {
3811 log_parameter
= NULL
;
3814 if (log_parameter
->number
== log_param
) {
3820 /* parameter data */
3822 if (log_parameter
&& log_parameter
->dissector
) {
3823 tvbuff_t
*param_tvb
;
3825 param_tvb
= tvb_new_subset_length_caplen(tvb
, offset
, MIN(tvb_reported_length_remaining(tvb
, offset
),paramlen
), paramlen
);
3826 log_parameter
->dissector(param_tvb
, pinfo
, log_tree
);
3828 /* We did not have a dissector for this page/parameter so
3829 * just display it as data.
3831 proto_tree_add_item(log_tree
, hf_scsi_log_param_data
, tvb
, offset
, paramlen
, ENC_NA
);
3837 proto_item_set_len(ti
, offset
-old_offset
);
3842 dissect_spc_logselect(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
3843 unsigned offset
, bool isreq
, bool iscdb
,
3844 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
3846 static int * const ppcflags_fields
[] = {
3851 static int * const pcflags_fields
[] = {
3859 if (isreq
&& iscdb
) {
3860 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_log_ppc_flags
,
3861 ett_scsi_log_ppc
, ppcflags_fields
, ENC_BIG_ENDIAN
);
3862 proto_tree_add_bitmask(tree
, tvb
, offset
+1, hf_scsi_log_pc_flags
, ett_scsi_log_pc
, pcflags_fields
, ENC_BIG_ENDIAN
);
3863 proto_tree_add_item(tree
, hf_scsi_paramlen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
3864 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
3865 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
3871 static const true_false_string scsi_log_pcr_tfs
= {
3872 "Reset all parameters to default values",
3873 "Do not reset log parameters"
3875 static const true_false_string scsi_log_ppc_tfs
= {
3876 "Return only parameters that have changed since last LOG SELECT/SENSE",
3877 "Return parameters even if they are unchanged"
3879 static const true_false_string scsi_log_sp_tfs
= {
3880 "Device shall save all log parameters",
3881 "Device should not save any of the logged parameters"
3885 dissect_spc_logsense(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
3886 unsigned offset
, bool isreq
, bool iscdb
,
3887 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
3889 static int * const ppcflags_fields
[] = {
3894 static int * const pcflags_fields
[] = {
3896 &hf_scsi_log_pagecode
,
3903 if (isreq
&& iscdb
) {
3904 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_log_ppc_flags
,
3905 ett_scsi_log_ppc
, ppcflags_fields
, ENC_BIG_ENDIAN
);
3906 proto_tree_add_bitmask(tree
, tvb
, offset
+1, hf_scsi_log_pc_flags
,
3907 ett_scsi_log_pc
, pcflags_fields
, ENC_BIG_ENDIAN
);
3908 proto_tree_add_item(tree
, hf_scsi_log_parameter_ptr
, tvb
, offset
+4,
3910 proto_tree_add_item(tree
, hf_scsi_alloclen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
3911 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
3912 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
3913 } else if (!isreq
) {
3917 dissect_scsi_log_page(tvb
, pinfo
, tree
, offset
);
3922 dissect_scsi_blockdescs(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
3923 proto_tree
*scsi_tree
,
3924 scsi_task_data_t
*cdata
, bool longlba
)
3928 /* without cdata there is no point in continuing */
3932 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
3934 if (tvb_reported_length_remaining(tvb
, offset
)<8)
3936 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_no_of_blocks64
, tvb
, offset
, 8, ENC_BIG_ENDIAN
);
3939 if (tvb_reported_length_remaining(tvb
, offset
)<1)
3941 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_density_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3944 /* 3 reserved bytes */
3947 if (tvb_reported_length_remaining(tvb
, offset
)<4)
3949 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_block_length32
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3952 if ((cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
) == SCSI_DEV_SBC
) {
3953 if (tvb_reported_length_remaining(tvb
, offset
)<4)
3955 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_no_of_blocks32
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
3958 offset
++; /* reserved */
3960 if (tvb_reported_length_remaining(tvb
, offset
)<3)
3962 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_block_length24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3965 if (tvb_reported_length_remaining(tvb
, offset
)<1)
3967 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_density_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3970 if (tvb_reported_length_remaining(tvb
, offset
)<3)
3972 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_no_of_blocks24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3975 offset
++; /* reserved */
3977 if (tvb_reported_length_remaining(tvb
, offset
)<3)
3979 proto_tree_add_item(scsi_tree
, hf_scsi_blockdescs_block_length24
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
3987 dissect_scsi_spc_modepage(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
3988 proto_tree
*tree
, unsigned offset
, uint8_t pcode
, uint8_t spf
, uint8_t subpcode
)
3990 uint8_t flags
, proto
;
3991 uint32_t burst_size
, condition_timer
;
3994 case SCSI_SPC_MODEPAGE_CTL
:
3996 uint32_t timeout_period
;
3998 /* standard page for control */
3999 proto_tree_add_item(tree
, hf_scsi_modesns_tst
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4000 proto_tree_add_item(tree
, hf_scsi_spc_modepage_gltsd
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4001 proto_tree_add_item(tree
, hf_scsi_spc_modepage_report_log_exception_condition
, tvb
, offset
+2, 1, ENC_NA
);
4002 proto_tree_add_item(tree
, hf_scsi_modesns_qmod
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4003 proto_tree_add_item(tree
, hf_scsi_modesns_qerr
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4004 proto_tree_add_item(tree
, hf_scsi_spc_modepage_disable_queuing
, tvb
, offset
+3, 1, ENC_NA
);
4005 proto_tree_add_item(tree
, hf_scsi_modesns_rac
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
4006 proto_tree_add_item(tree
, hf_scsi_modesns_tas
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
4007 proto_tree_add_item(tree
, hf_scsi_spc_modepage_swp
, tvb
, offset
+4, 1, ENC_NA
);
4008 proto_tree_add_item(tree
, hf_scsi_spc_modepage_autoload_mode
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
4009 proto_tree_add_item(tree
, hf_scsi_spc_modepage_ready_aer_holdoff_period
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4010 timeout_period
= tvb_get_ntohs(tvb
, offset
+8)*100;
4011 proto_tree_add_uint(tree
, hf_scsi_spc_modepage_busy_timeout_period
, tvb
, offset
+8, 2, timeout_period
);
4012 proto_tree_add_item(tree
, hf_scsi_spc_modepage_extended_self_test_completion_time
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
4016 /* control extension subpage */
4017 proto_item_append_text(tree
, " Control Extension");
4019 /* TCMOS SCSIP IALUAE */
4020 proto_tree_add_item(tree
, hf_scsi_modepage_tcmos
, tvb
, offset
+ 4, 1, ENC_BIG_ENDIAN
);
4021 proto_tree_add_item(tree
, hf_scsi_modepage_scsip
, tvb
, offset
+ 4, 1, ENC_BIG_ENDIAN
);
4022 proto_tree_add_item(tree
, hf_scsi_modepage_ialuae
, tvb
, offset
+ 4, 1, ENC_BIG_ENDIAN
);
4024 /* Initial Command Priority */
4025 proto_tree_add_item(tree
, hf_scsi_modepage_icp
, tvb
, offset
+ 5, 1, ENC_BIG_ENDIAN
);
4027 /* Maximum Sense Data Length */
4028 proto_tree_add_item(tree
, hf_scsi_modepage_msdl
, tvb
, offset
+ 6, 1, ENC_BIG_ENDIAN
);
4034 case SCSI_SPC_MODEPAGE_DISCON
:
4035 proto_tree_add_item(tree
, hf_scsi_spc_modepage_buffer_full_ratio
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4036 proto_tree_add_item(tree
, hf_scsi_spc_modepage_buffer_empty_ratio
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4037 proto_tree_add_item(tree
, hf_scsi_spc_modepage_bus_inactivity_limit
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
4038 proto_tree_add_item(tree
, hf_scsi_spc_modepage_disconnect_time_limit
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4039 proto_tree_add_item(tree
, hf_scsi_spc_modepage_connect_time_limit
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
4040 burst_size
= tvb_get_ntohs(tvb
, offset
+10)*512;
4041 proto_tree_add_uint(tree
, hf_scsi_spc_modepage_maximum_burst_size
, tvb
, offset
+10, 2, burst_size
);
4042 proto_tree_add_item(tree
, hf_scsi_spc_modepage_emdp
, tvb
, offset
+12, 1, ENC_NA
);
4043 proto_tree_add_item(tree
, hf_scsi_spc_modepage_faa
, tvb
, offset
+12, 1, ENC_NA
);
4044 proto_tree_add_item(tree
, hf_scsi_spc_modepage_fab
, tvb
, offset
+12, 1, ENC_NA
);
4045 proto_tree_add_item(tree
, hf_scsi_spc_modepage_fac
, tvb
, offset
+12, 1, ENC_NA
);
4046 burst_size
= tvb_get_ntohs(tvb
, offset
+14)*512;
4047 proto_tree_add_uint(tree
, hf_scsi_spc_modepage_first_burst_size
, tvb
, offset
+14, 2, burst_size
);
4049 case SCSI_SPC_MODEPAGE_INFOEXCP
:
4050 flags
= tvb_get_uint8(tvb
, offset
+2);
4051 proto_tree_add_item(tree
, hf_scsi_spc_modepage_perf
, tvb
, offset
+2, 1, ENC_NA
);
4052 proto_tree_add_item(tree
, hf_scsi_spc_modepage_ebf
, tvb
, offset
+2, 1, ENC_NA
);
4053 proto_tree_add_item(tree
, hf_scsi_spc_modepage_ewasc
, tvb
, offset
+2, 1, ENC_NA
);
4054 proto_tree_add_item(tree
, hf_scsi_spc_modepage_dexcpt
, tvb
, offset
+2, 1, ENC_NA
);
4055 proto_tree_add_item(tree
, hf_scsi_spc_modepage_test
, tvb
, offset
+2, 1, ENC_NA
);
4056 proto_tree_add_item(tree
, hf_scsi_spc_modepage_logerr
, tvb
, offset
+2, 1, ENC_NA
);
4057 if (!((flags
& 0x10) >> 4) && ((flags
& 0x08) >> 3)) {
4058 proto_item
*hidden_item
;
4059 hidden_item
= proto_tree_add_item(tree
, hf_scsi_modesns_errrep
, tvb
,
4060 offset
+3, 1, ENC_BIG_ENDIAN
);
4061 proto_item_set_hidden(hidden_item
);
4064 proto_tree_add_item(tree
, hf_scsi_modesns_errrep
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4066 proto_tree_add_item(tree
, hf_scsi_spc_modepage_interval_timer
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
4067 proto_tree_add_item(tree
, hf_scsi_spc_modepage_report_count
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
4069 case SCSI_SPC_MODEPAGE_PWR
:
4070 proto_tree_add_item(tree
, hf_scsi_spc_modepage_idle
, tvb
, offset
+3, 1, ENC_NA
);
4071 proto_tree_add_item(tree
, hf_scsi_spc_modepage_standby
, tvb
, offset
+3, 1, ENC_NA
);
4072 condition_timer
= tvb_get_ntohs(tvb
, offset
+4) * 100;
4073 proto_tree_add_uint(tree
, hf_scsi_spc_modepage_idle_condition_timer
, tvb
, offset
+4, 2, condition_timer
);
4074 condition_timer
= tvb_get_ntohs(tvb
, offset
+6) * 100;
4075 proto_tree_add_uint(tree
, hf_scsi_spc_modepage_standby_condition_timer
, tvb
, offset
+6, 2, condition_timer
);
4077 case SCSI_SPC_MODEPAGE_LUN
:
4079 case SCSI_SPC_MODEPAGE_PORT
:
4080 proto
= tvb_get_uint8(tvb
, offset
+2) & 0x0F;
4081 proto_tree_add_item(tree
, hf_scsi_protocol
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4082 if (proto
== SCSI_PROTO_FCP
) {
4083 proto_tree_add_item(tree
, hf_scsi_spc_modepage_dtfd
, tvb
, offset
+3, 1, ENC_NA
);
4084 proto_tree_add_item(tree
, hf_scsi_spc_modepage_plpb
, tvb
, offset
+3, 1, ENC_NA
);
4085 proto_tree_add_item(tree
, hf_scsi_spc_modepage_ddis
, tvb
, offset
+3, 1, ENC_NA
);
4086 proto_tree_add_item(tree
, hf_scsi_spc_modepage_dlm
, tvb
, offset
+3, 1, ENC_NA
);
4087 proto_tree_add_item(tree
, hf_scsi_spc_modepage_rha
, tvb
, offset
+3, 1, ENC_NA
);
4088 proto_tree_add_item(tree
, hf_scsi_spc_modepage_alwi
, tvb
, offset
+3, 1, ENC_NA
);
4089 proto_tree_add_item(tree
, hf_scsi_spc_modepage_dtipe
, tvb
, offset
+3, 1, ENC_NA
);
4090 proto_tree_add_item(tree
, hf_scsi_spc_modepage_dtoli
, tvb
, offset
+3, 1, ENC_NA
);
4091 proto_tree_add_item(tree
, hf_scsi_spc_modepage_rr_tov_units
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
4092 proto_tree_add_item(tree
, hf_scsi_spc_modepage_rr_tov
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
4094 else if (proto
== SCSI_PROTO_iSCSI
) {
4101 case SCSI_SCSI2_MODEPAGE_PERDEV
:
4110 dissect_scsi_sbc_modepage(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
4111 proto_tree
*tree
, unsigned offset
, uint8_t pcode
, uint8_t spf _U_
, uint8_t subpcode _U_
)
4114 case SCSI_SBC_MODEPAGE_FMTDEV
:
4115 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_tracks_per_zone
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
4116 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_alternate_sectors_per_zone
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
4117 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_alternate_tracks_per_zone
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4118 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_alternate_tracks_per_lu
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
4119 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_sectors_per_track
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
4120 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_data_bytes_per_physical_sector
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
4121 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_interleave
, tvb
, offset
+14, 2, ENC_BIG_ENDIAN
);
4122 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_track_skew_factor
, tvb
, offset
+16, 2, ENC_BIG_ENDIAN
);
4123 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_cylinder_skew_factor
, tvb
, offset
+18, 2, ENC_BIG_ENDIAN
);
4124 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_ssec
, tvb
, offset
+20, 1, ENC_NA
);
4125 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_hsec
, tvb
, offset
+20, 1, ENC_NA
);
4126 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_rmb
, tvb
, offset
+20, 1, ENC_NA
);
4127 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_surf
, tvb
, offset
+20, 1, ENC_NA
);
4129 case SCSI_SBC_MODEPAGE_RDWRERR
:
4130 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_awre
, tvb
, offset
+2, 1, ENC_NA
);
4131 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_arre
, tvb
, offset
+2, 1, ENC_NA
);
4132 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_tb
, tvb
, offset
+2, 1, ENC_NA
);
4133 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_rc
, tvb
, offset
+2, 1, ENC_NA
);
4134 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_eer
, tvb
, offset
+2, 1, ENC_NA
);
4135 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_per
, tvb
, offset
+2, 1, ENC_NA
);
4136 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_dte
, tvb
, offset
+2, 1, ENC_NA
);
4137 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_dcr
, tvb
, offset
+2, 1, ENC_NA
);
4138 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_read_retry_count
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4139 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_correction_span
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
4140 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_head_offset_count
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
4141 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_data_strobe_offset_count
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
4142 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_write_retry_count
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
4143 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_recovery_time_limit
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
4145 case SCSI_SBC_MODEPAGE_DISKGEOM
:
4146 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_number_of_cylinders
, tvb
, offset
+2, 3, ENC_BIG_ENDIAN
);
4147 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_number_of_heads
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
4148 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_starting_cyl_pre_compensation
, tvb
, offset
+6, 3, ENC_BIG_ENDIAN
);
4149 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_starting_cyl_reduced_write_current
, tvb
, offset
+9, 3, ENC_BIG_ENDIAN
);
4150 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_device_step_rate
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
4151 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_landing_zone_cyl
, tvb
, offset
+14, 3, ENC_BIG_ENDIAN
);
4152 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_rotational_offset
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
4153 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_medium_rotation_rate
, tvb
, offset
+20, 2, ENC_BIG_ENDIAN
);
4155 case SCSI_SBC_MODEPAGE_FLEXDISK
:
4157 case SCSI_SBC_MODEPAGE_VERERR
:
4159 case SCSI_SBC_MODEPAGE_CACHE
:
4160 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_ic
, tvb
, offset
+2, 1, ENC_NA
);
4161 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_abpf
, tvb
, offset
+2, 1, ENC_NA
);
4162 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_cap
, tvb
, offset
+2, 1, ENC_NA
);
4163 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_disc
, tvb
, offset
+2, 1, ENC_NA
);
4164 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_size
, tvb
, offset
+2, 1, ENC_NA
);
4165 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_wce
, tvb
, offset
+2, 1, ENC_NA
);
4166 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_mf
, tvb
, offset
+2, 1, ENC_NA
);
4167 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_rcd
, tvb
, offset
+2, 1, ENC_NA
);
4168 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_demand_read_retention_priority
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4169 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_write_retention_priority
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4170 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_disable_pre_fetch_xfer_len
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
4171 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_minimum_pre_fetch
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4172 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_maximum_pre_fetch
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
4173 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_maximum_pre_fetch_ceiling
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
4174 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_fsw
, tvb
, offset
+12, 1, ENC_NA
);
4175 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_lbcss
, tvb
, offset
+12, 1, ENC_NA
);
4176 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_dra
, tvb
, offset
+12, 1, ENC_NA
);
4177 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_vendor_specific
, tvb
, offset
+12, 1, ENC_BIG_ENDIAN
);
4178 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_number_of_cache_segments
, tvb
, offset
+13, 1, ENC_BIG_ENDIAN
);
4179 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_cache_segment_size
, tvb
, offset
+14, 2, ENC_BIG_ENDIAN
);
4180 proto_tree_add_item(tree
, hf_scsi_sbc_modepage_non_cache_segment_size
, tvb
, offset
+17, 3, ENC_BIG_ENDIAN
);
4182 case SCSI_SBC_MODEPAGE_MEDTYPE
:
4184 case SCSI_SBC_MODEPAGE_NOTPART
:
4186 case SCSI_SBC_MODEPAGE_XORCTL
:
4194 static const value_string compression_algorithm_vals
[] = {
4195 {0x00, "No algorithm selected"},
4196 {0x01, "Default algorithm"},
4197 {0x03, "IBM ALDC with 512-byte buffer"},
4198 {0x04, "IBM ALDC with 1024-byte buffer"},
4199 {0x05, "IBM ALDC with 2048-byte buffer"},
4202 {0xFF, "Unregistered algorithm"},
4207 dissect_scsi_ssc2_modepage(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
4208 proto_tree
*tree _U_
, unsigned offset _U_
,
4209 uint8_t pcode
, uint8_t spf _U_
, uint8_t subpcode _U_
)
4212 case SCSI_SSC2_MODEPAGE_DATACOMP
:
4213 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_dce
, tvb
, offset
+2, 1, ENC_NA
);
4214 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_dcc
, tvb
, offset
+2, 1, ENC_NA
);
4215 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_dde
, tvb
, offset
+3, 1, ENC_NA
);
4216 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_red
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4217 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_compression_algorithm
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
4218 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_decompression_algorithm
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
4220 case SCSI_SSC2_MODEPAGE_DEVCONF
:
4221 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_caf
, tvb
, offset
+2, 1, ENC_NA
);
4222 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_active_format
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4223 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_active_partition
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4224 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_write_object_buffer_full_ratio
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
4225 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_read_object_buffer_empty_ratio
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
4226 proto_tree_add_uint_format_value(tree
, hf_scsi_ssc2_modepage_write_delay_time
, tvb
, offset
+6, 2,
4227 tvb_get_ntohs(tvb
, offset
+6), "%u 100ms",
4228 tvb_get_ntohs(tvb
, offset
+6));
4229 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_obr
, tvb
, offset
+8, 1, ENC_NA
);
4230 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_lois
, tvb
, offset
+8, 1, ENC_NA
);
4231 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_rsmk
, tvb
, offset
+8, 1, ENC_NA
);
4232 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_avc
, tvb
, offset
+8, 1, ENC_NA
);
4233 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_socf
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
4234 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_robo
, tvb
, offset
+8, 1, ENC_NA
);
4235 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_rew
, tvb
, offset
+8, 1, ENC_NA
);
4236 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_gap_size
, tvb
, offset
+9, 1, ENC_BIG_ENDIAN
);
4237 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_eod_defined
, tvb
, offset
+10, 1, ENC_BIG_ENDIAN
);
4238 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_eeg
, tvb
, offset
+10, 1, ENC_NA
);
4239 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_sew
, tvb
, offset
+10, 1, ENC_NA
);
4240 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_swp
, tvb
, offset
+10, 1, ENC_NA
);
4241 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_baml
, tvb
, offset
+10, 1, ENC_NA
);
4242 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_bam
, tvb
, offset
+10, 1, ENC_NA
);
4243 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_object_buffer_size_at_early_warning
, tvb
, offset
+11, 3, ENC_BIG_ENDIAN
);
4244 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_select_data_compression_algorithm
, tvb
, offset
+14, 1, ENC_BIG_ENDIAN
);
4245 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_oir
, tvb
, offset
+15, 1, ENC_NA
);
4246 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_rewind_on_reset
, tvb
, offset
+15, 1, ENC_BIG_ENDIAN
);
4247 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_asocwp
, tvb
, offset
+15, 1, ENC_NA
);
4248 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_perswp
, tvb
, offset
+15, 1, ENC_NA
);
4249 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_prmwp
, tvb
, offset
+15, 1, ENC_NA
);
4251 case SCSI_SSC2_MODEPAGE_MEDPAR1
:
4252 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_maximum_additional_partitions
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4253 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_additional_partitions_defined
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4254 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_fdp
, tvb
, offset
+4, 1, ENC_NA
);
4255 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_dsp
, tvb
, offset
+4, 1, ENC_NA
);
4256 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_idp
, tvb
, offset
+4, 1, ENC_NA
);
4257 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_psum
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
4258 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_pofm
, tvb
, offset
+4, 1, ENC_NA
);
4259 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_clear
, tvb
, offset
+4, 1, ENC_NA
);
4260 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_addp
, tvb
, offset
+4, 1, ENC_NA
);
4261 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_media_format_recognition
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
4262 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_partition_units
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
4263 proto_tree_add_item(tree
, hf_scsi_ssc2_modepage_partition_size
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
4265 case SCSI_SSC2_MODEPAGE_MEDPAR2
:
4267 case SCSI_SSC2_MODEPAGE_MEDPAR3
:
4269 case SCSI_SSC2_MODEPAGE_MEDPAR4
:
4278 dissect_scsi_mmc5_modepage(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
4279 proto_tree
*tree _U_
, unsigned offset _U_
, uint8_t pcode
, uint8_t spf _U_
, uint8_t subpcode _U_
)
4285 case SCSI_MMC5_MODEPAGE_MRW
:
4286 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_lba_space
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4288 case SCSI_MMC5_MODEPAGE_WRPARAM
:
4289 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_bufe
, tvb
, offset
+2, 1, ENC_NA
);
4290 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_ls_v
, tvb
, offset
+2, 1, ENC_NA
);
4291 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_wrparam_test_write
, tvb
, offset
+2, 1, ENC_NA
);
4292 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_write_type
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
4293 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_wrparam_multi_session
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4294 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_fp
, tvb
, offset
+3, 1, ENC_NA
);
4295 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_copy
, tvb
, offset
+3, 1, ENC_NA
);
4296 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_track_mode
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4297 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_data_block_type
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
4298 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_link_size
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
4299 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_initiator_application_code
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
4300 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_session_format
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
4301 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_packet_size
, tvb
, offset
+10, 4, ENC_BIG_ENDIAN
);
4302 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_audio_pause_length
, tvb
, offset
+14, 2, ENC_BIG_ENDIAN
);
4303 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_media_catalog_number
, tvb
, offset
+16, 16, ENC_NA
|ENC_ASCII
);
4304 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_international_standard_recording_code
, tvb
, offset
+32, 16, ENC_NA
|ENC_ASCII
);
4305 for (i
= 0; i
< 4; i
++) {
4306 flags
= tvb_get_uint8(tvb
, offset
+48+i
);
4307 proto_tree_add_uint_format(tree
, hf_scsi_mmc5_modepage_sub_header_byte
, tvb
, offset
+48+i
, 1, flags
,
4308 "Sub-header Byte %u: %u", i
, flags
);
4310 if (0x36 == tvb_get_uint8(tvb
, offset
+1))
4311 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_vendor_specific
, tvb
, offset
+52, 4, ENC_BIG_ENDIAN
);
4313 case SCSI_MMC3_MODEPAGE_MMCAP
:
4314 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_dvd_ram_read
, tvb
, offset
+2, 1, ENC_NA
);
4315 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_dvd_r_read
, tvb
, offset
+2, 1, ENC_NA
);
4316 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_dvd_rom_read
, tvb
, offset
+2, 1, ENC_NA
);
4317 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_method_2
, tvb
, offset
+2, 1, ENC_NA
);
4318 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_cd_rw_read
, tvb
, offset
+2, 1, ENC_NA
);
4319 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_cd_r_read
, tvb
, offset
+2, 1, ENC_NA
);
4320 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_dvd_ram_write
, tvb
, offset
+3, 1, ENC_NA
);
4321 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_dvd_r_write
, tvb
, offset
+3, 1, ENC_NA
);
4322 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_dvd_rom_write
, tvb
, offset
+3, 1, ENC_NA
);
4323 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_mmcap_test_write
, tvb
, offset
+3, 1, ENC_NA
);
4324 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_cd_rw_write
, tvb
, offset
+3, 1, ENC_NA
);
4325 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_cd_r_write
, tvb
, offset
+3, 1, ENC_NA
);
4326 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_buf
, tvb
, offset
+4, 1, ENC_NA
);
4327 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_mmcap_multi_session
, tvb
, offset
+4, 1, ENC_NA
);
4328 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_mode_2_form2
, tvb
, offset
+4, 1, ENC_NA
);
4329 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_mode_2_form1
, tvb
, offset
+4, 1, ENC_NA
);
4330 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_digital_port2
, tvb
, offset
+4, 1, ENC_NA
);
4331 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_digital_port1
, tvb
, offset
+4, 1, ENC_NA
);
4332 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_composite
, tvb
, offset
+4, 1, ENC_NA
);
4333 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_audio_play
, tvb
, offset
+4, 1, ENC_NA
);
4334 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_read_bar_code
, tvb
, offset
+5, 1, ENC_NA
);
4335 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_upc
, tvb
, offset
+5, 1, ENC_NA
);
4336 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_isrc
, tvb
, offset
+5, 1, ENC_NA
);
4337 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_c2_pointers_supported
, tvb
, offset
+5, 1, ENC_NA
);
4338 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_rw_deinterleaved_corrected
, tvb
, offset
+5, 1, ENC_NA
);
4339 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_rw_supported
, tvb
, offset
+5, 1, ENC_NA
);
4340 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_cd_da_stream_is_accurate
, tvb
, offset
+5, 1, ENC_NA
);
4341 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_cd_da_cmds_supported
, tvb
, offset
+5, 1, ENC_NA
);
4342 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_loading_mechanism_type
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
4343 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_eject
, tvb
, offset
+6, 1, ENC_NA
);
4344 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_prevent_jumper
, tvb
, offset
+6, 1, ENC_NA
);
4345 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_lock_state
, tvb
, offset
+6, 1, ENC_NA
);
4346 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_lock
, tvb
, offset
+6, 1, ENC_NA
);
4347 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_rw_in_lead_in
, tvb
, offset
+7, 1, ENC_NA
);
4348 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_side_change_capable
, tvb
, offset
+7, 1, ENC_NA
);
4349 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_sw_slot_selection
, tvb
, offset
+7, 1, ENC_NA
);
4350 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_changer_supports_disc_present
, tvb
, offset
+7, 1, ENC_NA
);
4351 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_separate_channel_mute
, tvb
, offset
+7, 1, ENC_NA
);
4352 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_separate_volume_levels
, tvb
, offset
+7, 1, ENC_NA
);
4353 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_number_of_volume_levels_supported
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
4354 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_buffer_size_supported
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
4355 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_length
, tvb
, offset
+17, 1, ENC_BIG_ENDIAN
);
4356 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_lsbf
, tvb
, offset
+17, 1, ENC_BIG_ENDIAN
);
4357 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_rck
, tvb
, offset
+17, 1, ENC_NA
);
4358 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_bckf
, tvb
, offset
+17, 1, ENC_NA
);
4359 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_copy_management_revision_support
, tvb
, offset
+22, 2, ENC_BIG_ENDIAN
);
4360 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_rotation_control_selected
, tvb
, offset
+27, 1, ENC_BIG_ENDIAN
);
4361 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_current_write_speed_selected
, tvb
, offset
+28, 2, ENC_BIG_ENDIAN
);
4362 proto_tree_add_item(tree
, hf_scsi_mmc5_modepage_num_write_speed_performance
, tvb
, offset
+30, 2, ENC_BIG_ENDIAN
);
4371 dissect_scsi_smc_modepage(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
4372 proto_tree
*tree
, unsigned offset
, uint8_t pcode
, uint8_t spf _U_
, uint8_t subpcode _U_
)
4374 uint8_t param_list_len
;
4377 case SCSI_SMC_MODEPAGE_EAA
:
4378 param_list_len
= tvb_get_uint8(tvb
, offset
+1);
4379 if (param_list_len
< 2)
4381 proto_tree_add_item(tree
, hf_scsi_smc_modepage_first_medium_transport_element_address
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
4382 param_list_len
-= 2;
4383 if (param_list_len
< 2)
4385 proto_tree_add_item(tree
, hf_scsi_smc_modepage_number_of_medium_transport_elements
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
4386 param_list_len
-= 2;
4387 if (param_list_len
< 2)
4389 proto_tree_add_item(tree
, hf_scsi_smc_modepage_first_storage_element_address
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4390 param_list_len
-= 2;
4391 if (param_list_len
< 2)
4393 proto_tree_add_item(tree
, hf_scsi_smc_modepage_number_of_storage_elements
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
4394 param_list_len
-= 2;
4395 if (param_list_len
< 2)
4397 proto_tree_add_item(tree
, hf_scsi_smc_modepage_first_import_export_element_address
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
4398 param_list_len
-= 2;
4399 if (param_list_len
< 2)
4401 proto_tree_add_item(tree
, hf_scsi_smc_modepage_number_of_import_export_elements
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
4402 param_list_len
-= 2;
4403 if (param_list_len
< 2)
4405 proto_tree_add_item(tree
, hf_scsi_smc_modepage_first_data_transfer_element_address
, tvb
, offset
+14, 2, ENC_BIG_ENDIAN
);
4406 param_list_len
-= 2;
4407 if (param_list_len
< 2)
4409 proto_tree_add_item(tree
, hf_scsi_smc_modepage_number_of_data_transfer_elements
, tvb
, offset
+16, 2, ENC_BIG_ENDIAN
);
4411 case SCSI_SMC_MODEPAGE_TRANGEOM
:
4413 case SCSI_SMC_MODEPAGE_DEVCAP
:
4414 proto_tree_add_item(tree
, hf_scsi_smc_modepage_stordt
, tvb
, offset
+2, 1, ENC_NA
);
4415 proto_tree_add_item(tree
, hf_scsi_smc_modepage_storie
, tvb
, offset
+2, 1, ENC_NA
);
4416 proto_tree_add_item(tree
, hf_scsi_smc_modepage_storst
, tvb
, offset
+2, 1, ENC_NA
);
4417 proto_tree_add_item(tree
, hf_scsi_smc_modepage_stormt
, tvb
, offset
+2, 1, ENC_NA
);
4418 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_dt
, tvb
, offset
+4, 1, ENC_NA
);
4419 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_ie
, tvb
, offset
+4, 1, ENC_NA
);
4420 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_st
, tvb
, offset
+4, 1, ENC_NA
);
4421 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_mt
, tvb
, offset
+4, 1, ENC_NA
);
4422 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_dt
, tvb
, offset
+5, 1, ENC_NA
);
4423 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_ie
, tvb
, offset
+5, 1, ENC_NA
);
4424 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_st
, tvb
, offset
+5, 1, ENC_NA
);
4425 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_mt
, tvb
, offset
+5, 1, ENC_NA
);
4426 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_dt
, tvb
, offset
+6, 1, ENC_NA
);
4427 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_ie
, tvb
, offset
+6, 1, ENC_NA
);
4428 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_st
, tvb
, offset
+6, 1, ENC_NA
);
4429 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_mt
, tvb
, offset
+6, 1, ENC_NA
);
4430 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_dt
, tvb
, offset
+7, 1, ENC_NA
);
4431 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_ie
, tvb
, offset
+7, 1, ENC_NA
);
4432 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_st
, tvb
, offset
+7, 1, ENC_NA
);
4433 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_mt
, tvb
, offset
+7, 1, ENC_NA
);
4434 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_ne_dt
, tvb
, offset
+12, 1, ENC_NA
);
4435 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_ne_ie
, tvb
, offset
+12, 1, ENC_NA
);
4436 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_ne_st
, tvb
, offset
+12, 1, ENC_NA
);
4437 proto_tree_add_item(tree
, hf_scsi_smc_modepage_mt_ne_mt
, tvb
, offset
+12, 1, ENC_NA
);
4438 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_ne_dt
, tvb
, offset
+13, 1, ENC_NA
);
4439 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_ne_ie
, tvb
, offset
+13, 1, ENC_NA
);
4440 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_ne_st
, tvb
, offset
+13, 1, ENC_NA
);
4441 proto_tree_add_item(tree
, hf_scsi_smc_modepage_st_ne_mt
, tvb
, offset
+13, 1, ENC_NA
);
4442 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_ne_dt
, tvb
, offset
+14, 1, ENC_NA
);
4443 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_ne_ie
, tvb
, offset
+14, 1, ENC_NA
);
4444 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_ne_st
, tvb
, offset
+14, 1, ENC_NA
);
4445 proto_tree_add_item(tree
, hf_scsi_smc_modepage_ie_ne_mt
, tvb
, offset
+14, 1, ENC_NA
);
4446 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_ne_dt
, tvb
, offset
+15, 1, ENC_NA
);
4447 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_ne_ie
, tvb
, offset
+15, 1, ENC_NA
);
4448 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_ne_st
, tvb
, offset
+15, 1, ENC_NA
);
4449 proto_tree_add_item(tree
, hf_scsi_smc_modepage_dt_ne_mt
, tvb
, offset
+15, 1, ENC_NA
);
4458 dissect_scsi_modepage(tvbuff_t
*tvb
, packet_info
*pinfo
,
4459 proto_tree
*scsi_tree
, unsigned offset
,
4460 scsi_device_type devtype
)
4463 uint8_t pcode
, spf
, subpcode
= 0;
4465 const value_string
*modepage_val
;
4467 bool (*dissect_modepage
)(tvbuff_t
*, packet_info
*, proto_tree
*,
4468 unsigned, uint8_t, uint8_t, uint8_t);
4470 pcode
= tvb_get_uint8(tvb
, offset
) & SCSI_MS_PCODE_BITS
;
4471 spf
= tvb_get_uint8(tvb
, offset
) & 0x40;
4473 subpcode
= tvb_get_uint8(tvb
, offset
+ 1);
4474 plen
= tvb_get_ntohs(tvb
, offset
+ 2);
4476 plen
= tvb_get_uint8(tvb
, offset
+ 1);
4479 if (try_val_to_str(pcode
& SCSI_MS_PCODE_BITS
,
4480 scsi_spc_modepage_val
) == NULL
) {
4482 * This isn't a generic mode page that applies to all SCSI
4483 * device types; try to interpret it based on what we deduced,
4484 * or were told, the device type is.
4488 modepage_val
= scsi_sbc_modepage_val
;
4489 hf_pagecode
= hf_scsi_sbcpagecode
;
4490 dissect_modepage
= dissect_scsi_sbc_modepage
;
4494 modepage_val
= scsi_ssc2_modepage_val
;
4495 hf_pagecode
= hf_scsi_sscpagecode
;
4496 dissect_modepage
= dissect_scsi_ssc2_modepage
;
4500 modepage_val
= scsi_smc_modepage_val
;
4501 hf_pagecode
= hf_scsi_smcpagecode
;
4502 dissect_modepage
= dissect_scsi_smc_modepage
;
4505 case SCSI_DEV_CDROM
:
4506 modepage_val
= scsi_mmc5_modepage_val
;
4507 hf_pagecode
= hf_scsi_mmcpagecode
;
4508 dissect_modepage
= dissect_scsi_mmc5_modepage
;
4513 * The "val_to_str()" lookup will fail in this table
4514 * (it failed in "try_val_to_str()"), so it'll return
4515 * "Unknown (XXX)", which is what we want.
4517 modepage_val
= scsi_spc_modepage_val
;
4518 hf_pagecode
= hf_scsi_spc_pagecode
;
4519 dissect_modepage
= dissect_scsi_spc_modepage
;
4523 modepage_val
= scsi_spc_modepage_val
;
4524 hf_pagecode
= hf_scsi_spc_pagecode
;
4525 dissect_modepage
= dissect_scsi_spc_modepage
;
4528 tree
= proto_tree_add_subtree_format(scsi_tree
, tvb
, offset
, plen
+ (spf
? 4 : 2),
4529 ett_scsi_page
, NULL
, "%s Mode Page",
4530 val_to_str(pcode
& SCSI_MS_PCODE_BITS
,
4531 modepage_val
, "Unknown (0x%08x)"));
4532 proto_tree_add_item(tree
, hf_scsi_modepage_ps
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4533 proto_tree_add_item(tree
, hf_scsi_modepage_spf
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4534 proto_tree_add_item(tree
, hf_pagecode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4537 proto_tree_add_item(tree
, hf_scsi_spc_subpagecode
, tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4538 proto_tree_add_item(tree
, hf_scsi_modepage_plen
, tvb
, offset
+ 2, 2, ENC_BIG_ENDIAN
);
4540 proto_tree_add_item(tree
, hf_scsi_modepage_plen
, tvb
, offset
+ 1, 1, ENC_BIG_ENDIAN
);
4543 if (!tvb_bytes_exist(tvb
, offset
, plen
)) {
4544 /* XXX - why not just drive on and throw an exception? */
4548 /* XXX: We should pass plen into these, to stop the dissection
4549 * without a malformed error.
4551 if (!(*dissect_modepage
)(tvb
, pinfo
, tree
, offset
,
4552 pcode
, spf
, subpcode
)) {
4553 proto_tree_add_expert(tree
, pinfo
, &ei_scsi_unknown_page
, tvb
, offset
+2, plen
);
4559 dissect_spc_modeselect6(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
4560 unsigned offset
, bool isreq
, bool iscdb
,
4561 unsigned payload_len
, scsi_task_data_t
*cdata
)
4566 tvbuff_t
*blockdesc_tvb
;
4571 if (isreq
&& iscdb
) {
4572 flags
= tvb_get_uint8(tvb
, offset
);
4573 proto_tree_add_uint_format(tree
, hf_scsi_modesel_flags
, tvb
, offset
, 1,
4574 flags
, "PF = %u, SP = %u", flags
& 0x10,
4576 proto_tree_add_item(tree
, hf_scsi_paramlen
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4577 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
4578 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
4581 /* Mode Parameter has the following format:
4582 * Mode Parameter Header
4583 * - Mode Data Len, Medium Type, Dev Specific Parameter,
4585 * Block Descriptor (s)
4586 * - Number of blocks, density code, block length
4588 * - Page code, Page length, Page Parameters
4590 if (payload_len
< 1)
4592 proto_tree_add_item(tree
, hf_scsi_modesel_mode_data_length8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4595 /* The mode data length is reserved for MODE SELECT, so we just
4596 use the payload length. */
4598 if (payload_len
< 1)
4600 switch (cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
) {
4603 proto_tree_add_item(tree
, hf_scsi_modesel_dev_sbc_medium_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4607 proto_tree_add_item(tree
, hf_scsi_modesel_medium_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4613 if (payload_len
< 1)
4615 proto_tree_add_item(tree
, hf_scsi_modesel_device_specific_parameter
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4619 if (payload_len
< 1)
4621 desclen
= tvb_get_uint8(tvb
, offset
);
4622 proto_tree_add_item(tree
, hf_scsi_modesel_block_descriptor_length8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4626 if (tvb_reported_length_remaining(tvb
, offset
)>0) {
4627 blockdesc_tvb
= tvb_new_subset_length_caplen(tvb
, offset
, MIN(tvb_reported_length_remaining(tvb
, offset
),desclen
), desclen
);
4628 dissect_scsi_blockdescs(blockdesc_tvb
, pinfo
, tree
, cdata
, false);
4631 payload_len
-= desclen
;
4633 /* offset points to the start of the mode page */
4634 while ((payload_len
> 0) && tvb_bytes_exist(tvb
, offset
, 2)) {
4635 plen
= dissect_scsi_modepage(tvb
, pinfo
, tree
, offset
, cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
);
4637 payload_len
-= plen
;
4643 dissect_spc_modeselect10(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
4644 unsigned offset
, bool isreq
, bool iscdb
,
4645 unsigned payload_len
, scsi_task_data_t
*cdata
)
4651 tvbuff_t
*blockdesc_tvb
;
4656 if (isreq
&& iscdb
) {
4657 flags
= tvb_get_uint8(tvb
, offset
);
4658 proto_tree_add_uint_format(tree
, hf_scsi_modesel_flags
, tvb
, offset
, 1,
4659 flags
, "PF = %u, SP = %u", flags
& 0x10,
4661 proto_tree_add_item(tree
, hf_scsi_paramlen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4662 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
4663 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
4666 /* Mode Parameter has the following format:
4667 * Mode Parameter Header
4668 * - Mode Data Len, Medium Type, Dev Specific Parameter,
4670 * Block Descriptor (s)
4671 * - Number of blocks, density code, block length
4673 * - Page code, Page length, Page Parameters
4675 if (payload_len
< 1)
4677 proto_tree_add_item(tree
, hf_scsi_modesel_mode_data_length16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4680 /* The mode data length is reserved for MODE SELECT, so we just
4681 use the payload length. */
4683 if (payload_len
< 1)
4687 switch (cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
) {
4690 proto_tree_add_item(tree
, hf_scsi_modesel_dev_sbc_medium_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4694 proto_tree_add_item(tree
, hf_scsi_modesel_medium_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4700 if (payload_len
< 1)
4702 proto_tree_add_item(tree
, hf_scsi_modesel_device_specific_parameter
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4706 if (payload_len
< 1)
4708 longlba
= tvb_get_uint8(tvb
, offset
) & 0x1;
4709 proto_tree_add_item(tree
, hf_scsi_modesel_longlba
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4710 offset
+= 2; /* skip LongLBA byte and reserved byte */
4713 if (payload_len
< 1)
4715 desclen
= tvb_get_ntohs(tvb
, offset
);
4716 proto_tree_add_item(tree
, hf_scsi_modesel_block_descriptor_length16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4720 if (tvb_reported_length_remaining(tvb
, offset
)>0) {
4721 blockdesc_tvb
= tvb_new_subset_length_caplen(tvb
, offset
, MIN(tvb_reported_length_remaining(tvb
, offset
),desclen
), desclen
);
4722 dissect_scsi_blockdescs(blockdesc_tvb
, pinfo
, tree
, cdata
, longlba
);
4725 payload_len
-= desclen
;
4727 /* offset points to the start of the mode page */
4728 while ((payload_len
> 0) && tvb_bytes_exist(tvb
, offset
, 2)) {
4729 plen
= dissect_scsi_modepage(tvb
, pinfo
, tree
, offset
, cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
);
4731 payload_len
-= plen
;
4737 dissect_scsi_pagecode(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
4738 proto_tree
*tree
, unsigned offset
,
4739 scsi_task_data_t
*cdata
)
4744 /* unless we have cdata there is not much point in continuing */
4748 pcode
= tvb_get_uint8(tvb
, offset
);
4749 if (try_val_to_str(pcode
& SCSI_MS_PCODE_BITS
,
4750 scsi_spc_modepage_val
) == NULL
) {
4752 * This isn't a generic mode page that applies to all SCSI
4753 * device types; try to interpret it based on what we deduced,
4754 * or were told, the device type is.
4756 switch (cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
) {
4758 hf_pagecode
= hf_scsi_sbcpagecode
;
4762 hf_pagecode
= hf_scsi_sscpagecode
;
4766 hf_pagecode
= hf_scsi_smcpagecode
;
4769 case SCSI_DEV_CDROM
:
4770 hf_pagecode
= hf_scsi_mmcpagecode
;
4774 hf_pagecode
= hf_scsi_spc_pagecode
;
4778 hf_pagecode
= hf_scsi_spc_pagecode
;
4780 proto_tree_add_uint(tree
, hf_pagecode
, tvb
, offset
, 1, pcode
);
4784 dissect_spc_modesense6(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
4785 unsigned offset
, bool isreq
, bool iscdb
,
4786 unsigned payload_len
, scsi_task_data_t
*cdata
)
4790 int tot_len
, desclen
;
4791 tvbuff_t
*blockdesc_tvb
;
4796 if (isreq
&& iscdb
) {
4797 flags
= tvb_get_uint8(tvb
, offset
);
4798 proto_tree_add_uint_format(tree
, hf_scsi_modesns_flags
, tvb
, offset
, 1,
4799 flags
, "DBD = %u", flags
& 0x8);
4800 proto_tree_add_item(tree
, hf_scsi_modesns_pc
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4801 dissect_scsi_pagecode(tvb
, pinfo
, tree
, offset
+1, cdata
);
4802 proto_tree_add_item(tree
, hf_scsi_alloclen
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
4803 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
4804 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
4807 /* Mode sense response has the following format:
4808 * Mode Parameter Header
4809 * - Mode Data Len, Medium Type, Dev Specific Parameter,
4811 * Block Descriptor (s)
4812 * - Number of blocks, density code, block length
4814 * - Page code, Page length, Page Parameters
4816 tot_len
= tvb_get_uint8(tvb
, offset
);
4817 proto_tree_add_item(tree
, hf_scsi_modesel_mode_data_length8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4820 /* The actual payload is the min of the length in the response & the
4821 * space allocated by the initiator as specified in the request.
4823 * XXX - the payload length includes the length field, so we
4824 * really should subtract the length of the length field from
4825 * the payload length - but can it really be zero here?
4827 if (payload_len
&& (tot_len
> (int)payload_len
))
4828 tot_len
= payload_len
;
4832 proto_tree_add_item(tree
, hf_scsi_modesel_medium_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4838 proto_tree_add_item(tree
, hf_scsi_modesel_device_specific_parameter
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4844 desclen
= tvb_get_uint8(tvb
, offset
);
4845 proto_tree_add_item(tree
, hf_scsi_modesel_block_descriptor_length8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4850 if (tvb_reported_length_remaining(tvb
, offset
)>0) {
4851 blockdesc_tvb
= tvb_new_subset_length_caplen(tvb
, offset
, MIN(tvb_reported_length_remaining(tvb
, offset
),desclen
), desclen
);
4852 dissect_scsi_blockdescs(blockdesc_tvb
, pinfo
, tree
, cdata
, false);
4857 /* offset points to the start of the mode page */
4858 while ((tot_len
> 0) && tvb_bytes_exist(tvb
, offset
, 2)) {
4859 plen
= dissect_scsi_modepage(tvb
, pinfo
, tree
, offset
, cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
);
4867 dissect_spc_modesense10(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
4868 unsigned offset
, bool isreq
, bool iscdb
,
4869 unsigned payload_len
, scsi_task_data_t
*cdata
)
4873 int tot_len
, desclen
;
4875 tvbuff_t
*blockdesc_tvb
;
4880 if (isreq
&& iscdb
) {
4881 flags
= tvb_get_uint8(tvb
, offset
);
4882 proto_tree_add_uint_format(tree
, hf_scsi_modesns_flags
, tvb
, offset
, 1,
4883 flags
, "LLBAA = %u, DBD = %u", flags
& 0x10,
4885 proto_tree_add_item(tree
, hf_scsi_modesns_pc
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
4886 dissect_scsi_pagecode(tvb
, pinfo
, tree
, offset
+1, cdata
);
4887 proto_tree_add_item(tree
, hf_scsi_alloclen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4888 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
4889 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
4892 /* Mode sense response has the following format:
4893 * Mode Parameter Header
4894 * - Mode Data Len, Medium Type, Dev Specific Parameter,
4896 * Block Descriptor (s)
4897 * - Number of blocks, density code, block length
4899 * - Page code, Page length, Page Parameters
4901 tot_len
= tvb_get_ntohs(tvb
, offset
);
4902 proto_tree_add_item(tree
, hf_scsi_modesel_mode_data_length16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4904 /* The actual payload is the min of the length in the response & the
4905 * space allocated by the initiator as specified in the request.
4907 * XXX - the payload length includes the length field, so we
4908 * really should subtract the length of the length field from
4909 * the payload length - but can it really be zero here?
4911 if (payload_len
&& (tot_len
> (int)payload_len
))
4912 tot_len
= payload_len
;
4916 proto_tree_add_item(tree
, hf_scsi_modesel_medium_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4922 proto_tree_add_item(tree
, hf_scsi_modesel_device_specific_parameter
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4928 longlba
= tvb_get_uint8(tvb
, offset
) & 0x1;
4929 proto_tree_add_item(tree
, hf_scsi_modesel_longlba
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4930 offset
+= 2; /* skip LongLBA byte and reserved byte */
4935 desclen
= tvb_get_ntohs(tvb
, offset
);
4936 proto_tree_add_item(tree
, hf_scsi_modesel_block_descriptor_length16
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
4940 if (tvb_reported_length_remaining(tvb
, offset
)>0) {
4941 blockdesc_tvb
= tvb_new_subset_length_caplen(tvb
, offset
, MIN(tvb_reported_length_remaining(tvb
, offset
),desclen
), desclen
);
4942 dissect_scsi_blockdescs(blockdesc_tvb
, pinfo
, tree
, cdata
, longlba
);
4947 /* offset points to the start of the mode page */
4948 while ((tot_len
> 0) && tvb_bytes_exist(tvb
, offset
, 2)) {
4949 plen
= dissect_scsi_modepage(tvb
, pinfo
, tree
, offset
, cdata
->itl
->cmdset
&SCSI_CMDSET_MASK
);
4957 dissect_spc_preventallowmediaremoval(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
4958 unsigned offset
, bool isreq
, bool iscdb
,
4959 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
4961 if (isreq
&& iscdb
) {
4962 static int * const prevent_allow_fields
[] = {
4963 &hf_scsi_prevent_allow_prevent
,
4968 proto_tree_add_bitmask(tree
, tvb
, offset
+ 3, hf_scsi_prevent_allow_flags
,
4969 ett_scsi_prevent_allow
, prevent_allow_fields
, ENC_BIG_ENDIAN
);
4971 flags
= tvb_get_uint8(tvb
, offset
+ 3);
4973 col_append_str(pinfo
->cinfo
, COL_INFO
, " PREVENT");
4975 col_append_str(pinfo
->cinfo
, COL_INFO
, " ALLOW");
4978 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
4979 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
4984 dissect_spc_persistentreservein(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
4985 unsigned offset
, bool isreq
, bool iscdb
,
4986 unsigned payload_len
, scsi_task_data_t
*cdata
)
4995 if (isreq
&& iscdb
) {
4996 proto_tree_add_item(tree
, hf_scsi_persresvin_svcaction
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4997 proto_tree_add_item(tree
, hf_scsi_alloclen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
4998 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
4999 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5000 /* We store the service action since we want to interpret the data */
5001 cdata
->itlq
->flags
= tvb_get_uint8(tvb
, offset
);
5005 flags
= cdata
->itlq
->flags
;
5010 proto_tree_add_item(tree
, hf_scsi_persresvin_generation_number
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5011 len
= tvb_get_ntohl(tvb
, offset
+4);
5012 proto_tree_add_item(tree
, hf_scsi_persresvin_additional_length
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
5013 len
= (payload_len
> len
) ? len
: payload_len
;
5015 if ((flags
& 0x1F) == SCSI_SPC_RESVIN_SVCA_RDKEYS
) {
5016 /* XXX - what if len is < 8? That may be illegal, but
5017 that doesn't make it impossible.... */
5021 for (i
= 0; i
< numrec
; i
++) {
5022 proto_tree_add_item(tree
, hf_scsi_persresv_key
, tvb
, offset
,
5027 else if ((flags
& 0x1F) == SCSI_SPC_RESVIN_SVCA_RDRESV
&& len
) {
5028 proto_tree_add_item(tree
, hf_scsi_persresv_key
, tvb
, offset
+8,
5030 proto_tree_add_item(tree
, hf_scsi_persresv_scopeaddr
, tvb
,
5031 offset
+16, 4, ENC_NA
);
5032 proto_tree_add_item(tree
, hf_scsi_persresv_scope
, tvb
, offset
+21,
5034 proto_tree_add_item(tree
, hf_scsi_persresv_type
, tvb
, offset
+21,
5041 dissect_spc_persistentreserveout(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5042 unsigned offset
, bool isreq
, bool iscdb
,
5043 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5050 if (isreq
&& iscdb
) {
5051 svcaction
= tvb_get_uint8(tvb
, offset
) & 0x1F;
5052 proto_tree_add_item(tree
, hf_scsi_persresvout_svcaction
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5053 /* type and scope are ignored for REGISTER, REGISTER AND IGNORE EXISTING KEY, CLEAR service actions */
5054 if (svcaction
!= SCSI_PR_REGISTER
&& svcaction
!= SCSI_PR_REG_IGNORE
&& svcaction
!= SCSI_PR_CLEAR
) {
5055 proto_tree_add_item(tree
, hf_scsi_persresv_scope
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
5056 proto_tree_add_item(tree
, hf_scsi_persresv_type
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
5058 proto_tree_add_item(tree
, hf_scsi_paramlen16
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
5059 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
5060 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5061 /* We store the service action since we want to interpret the params */
5062 cdata
->itlq
->flags
= tvb_get_uint8(tvb
, offset
);
5064 else if (isreq
&& !iscdb
) {
5065 proto_tree_add_item(tree
, hf_scsi_persresvout_reskey
, tvb
, offset
,
5067 proto_tree_add_item(tree
, hf_scsi_persresvout_sareskey
, tvb
,
5068 offset
+8, 8, ENC_NA
);
5069 if (cdata
->itlq
->flags
== 0x07) {
5070 /* Service action REGISTER AND MOVE */
5071 static int * const persresv_fields
[] = {
5072 &hf_scsi_persresv_control_rsvd
,
5073 &hf_scsi_persresv_control_unreg
,
5074 &hf_scsi_persresv_control_aptpl
,
5077 uint32_t tid_len
= tvb_get_ntohl(tvb
, offset
+20);
5079 proto_tree_add_item(tree
, hf_scsi_persresvout_obsolete
, tvb
,
5080 offset
+16, 1, ENC_NA
);
5081 proto_tree_add_bitmask(tree
, tvb
, offset
+17,
5082 hf_scsi_persresvout_control
, ett_persresv_control
,
5083 persresv_fields
, ENC_BIG_ENDIAN
);
5084 proto_tree_add_item(tree
, hf_scsi_persresvout_rel_tpi
, tvb
,
5085 offset
+18, 2, ENC_BIG_ENDIAN
);
5086 proto_tree_add_item(tree
, hf_scsi_persresvout_transportid_len
, tvb
,
5087 offset
+20, 4, ENC_BIG_ENDIAN
);
5088 proto_tree_add_item(tree
, hf_scsi_persresvout_transportid
, tvb
,
5089 offset
+24, tid_len
, ENC_NA
);
5092 /* Other service actions than REGISTER AND MOVE. */
5093 static int * const persresv_fields
[] = {
5094 &hf_scsi_persresv_control_rsvd1
,
5095 &hf_scsi_persresv_control_spec_i_pt
,
5096 &hf_scsi_persresv_control_all_tg_pt
,
5097 &hf_scsi_persresv_control_rsvd2
,
5098 &hf_scsi_persresv_control_aptpl
,
5102 proto_tree_add_item(tree
, hf_scsi_persresvout_obsolete
, tvb
,
5103 offset
+16, 4, ENC_NA
);
5104 proto_tree_add_bitmask(tree
, tvb
, offset
+20,
5105 hf_scsi_persresvout_control
, ett_persresv_control
,
5106 persresv_fields
, ENC_BIG_ENDIAN
);
5114 dissect_spc_release6(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5115 unsigned offset
, bool isreq
, bool iscdb
,
5116 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5121 if (isreq
&& iscdb
) {
5122 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
5123 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5128 dissect_spc_release10(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5129 unsigned offset
, bool isreq
, bool iscdb
,
5130 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5137 if (isreq
&& iscdb
) {
5138 flags
= tvb_get_uint8(tvb
, offset
);
5139 proto_tree_add_uint_format(tree
, hf_scsi_release_flags
, tvb
, offset
, 1,
5141 "Flags: 3rd Party ID = %u, LongID = %u",
5142 flags
& 0x10, flags
& 0x2);
5143 if ((flags
& 0x12) == 0x10) {
5144 proto_tree_add_item(tree
, hf_scsi_release_thirdpartyid
, tvb
,
5145 offset
+2, 1, ENC_NA
);
5147 proto_tree_add_item(tree
, hf_scsi_paramlen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
5148 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
5149 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5154 dissect_spc_reportdeviceidentifier(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
,
5155 proto_tree
*tree _U_
,
5156 unsigned offset _U_
, bool isreq _U_
, bool iscdb _U_
,
5157 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5163 dissect_scsi_lun(proto_tree
*tree
, tvbuff_t
*tvb
, unsigned offset
) {
5165 proto_tree
*tt
, *tl
= proto_tree_add_subtree(tree
, tvb
, offset
, 8, ett_scsi_lun
, &ti
, "LUN");
5166 uint8_t address_mode
, lun_len
= 0, ea_code
= 0, len_code
= 0, lun_count
= 0, complex_lun
= 0;
5168 const char *str
= NULL
;
5170 if (tvb_get_ntoh48(tvb
, offset
) << 16) {
5171 /* Pedantically change LUN to LUNs */
5172 proto_item_append_text(tl
, "s");
5176 while (lun_len
< 8) {
5177 lun
= tvb_get_ntohs(tvb
, offset
+ lun_len
);
5178 /* Don't skip the first non-zero LUN */
5179 if (lun_len
&& !lun
)
5182 address_mode
= tvb_get_uint8(tvb
, offset
+ lun_len
);
5183 if ((address_mode
>> 6) < 0x3)
5186 len_code
= (address_mode
& 0x30) >> 4;
5187 len_code
= 2 + (len_code
* 2);
5191 /* Add lun subtrees only for complex luns */
5192 tt
= proto_tree_add_subtree(tl
, tvb
, offset
+ lun_len
, len_code
, ett_scsi_lun_unit
, &ti
, "LUN");
5193 proto_item_append_text(tt
, " %d", lun_count
++);
5197 /* Peripheral and Simple logical unit addressing share the same identifier, with bus defining the difference */
5199 proto_tree_add_uint_format_value(tt
, hf_scsi_lun_address_mode
, tvb
, offset
+ lun_len
, 1, (address_mode
>> 6),
5200 "Simple logical unit addressing (0x0%x)", address_mode
>> 6);
5202 proto_tree_add_item(tt
, hf_scsi_lun_address_mode
, tvb
, offset
+ lun_len
, 1, ENC_BIG_ENDIAN
);
5204 switch (address_mode
>> 6) {
5206 /* Simple logical unit addressing method has no bus id */
5208 proto_tree_add_bits_item(tt
, hf_scsi_bus
, tvb
, (offset
+ lun_len
) * 8 + 2, 0x6, ENC_BIG_ENDIAN
);
5209 lun
= tvb_get_uint8(tvb
, offset
+ lun_len
+ 1);
5210 proto_tree_add_uint(tt
, hf_scsi_lun
, tvb
, offset
+ lun_len
+ 1, 1, lun
);
5212 proto_tree_add_bits_item(tt
, hf_scsi_lun
, tvb
, (offset
+ lun_len
) * 8 + 2, 0xe, ENC_BIG_ENDIAN
);
5214 lun_len
+= len_code
;
5218 proto_tree_add_bits_item(tt
, hf_scsi_lun
, tvb
, (offset
+ lun_len
) * 8 + 2, 0xe, ENC_BIG_ENDIAN
);
5219 lun_len
+= len_code
;
5222 proto_tree_add_item(tt
, hf_scsi_target
, tvb
, offset
+ lun_len
, 1, ENC_BIG_ENDIAN
);
5223 proto_tree_add_bits_item(tt
, hf_scsi_bus
, tvb
, (offset
+ lun_len
+ 1) * 8, 0x3, ENC_BIG_ENDIAN
);
5224 proto_tree_add_bits_item(tt
, hf_scsi_lun
, tvb
, (offset
+ lun_len
+ 1) * 8 + 3, 0x5, ENC_BIG_ENDIAN
);
5225 lun_len
+= len_code
;
5228 ea_code
= address_mode
& 0xf;
5230 len_code
= (address_mode
& 0x30) >> 4;
5232 ti
= proto_tree_add_item(tt
, hf_scsi_extended_add_method_len
, tvb
, offset
+ lun_len
, 1, ENC_BIG_ENDIAN
);
5233 proto_item_append_text(ti
, " (%d bytes)", lun
);
5235 ti
= proto_tree_add_item(tt
, hf_scsi_extended_add_method
, tvb
, offset
+ lun_len
, 1, ENC_BIG_ENDIAN
);
5241 str
= "Well known logical unit";
5242 proto_tree_add_item(tt
, hf_scsi_lun
, tvb
, offset
+ lun_len
+ 1, 1, ENC_BIG_ENDIAN
);
5246 if (len_code
== 0x1)
5247 str
= "Extended flat space addressing";
5248 else if (len_code
== 0x2)
5249 str
= "Long extended flat space addressing";
5251 proto_tree_add_item(tt
, hf_scsi_lun_extended
, tvb
, offset
+ lun_len
+ 1, lun
- 1, ENC_BIG_ENDIAN
);
5254 if (len_code
== 0x3)
5255 str
= "Reserved for FC-SB-5";
5258 /* The contents of all hierarchical LUN structure addressing fields following a logical unit not specified addressing
5259 * method addressing field shall be ignored. [SAM5] 4.7.7.5.4 */
5260 if (len_code
== 0x3) {
5261 proto_item_append_text(ti
, " (Logical unit not specified)");
5270 len_code
= (uint8_t)lun
;
5274 proto_item_append_text(ti
, " (%s)", str
);
5275 lun_len
+= len_code
;
5285 dissect_spc_reportluns(tvbuff_t
*tvb_a
, packet_info
*pinfo _U_
,
5286 proto_tree
*tree
, unsigned offset_a
,
5287 bool isreq
, bool iscdb
, unsigned payload_len _U_
,
5288 scsi_task_data_t
*cdata _U_
)
5292 if (isreq
&& iscdb
) {
5293 proto_tree_add_item(tree
, hf_scsi_select_report
, tvb_a
, offset_a
+1, 1, ENC_BIG_ENDIAN
);
5294 proto_tree_add_item(tree
, hf_scsi_alloclen32
, tvb_a
, offset_a
+5, 4, ENC_BIG_ENDIAN
);
5296 cdata
->itlq
->alloc_len
= tvb_get_ntohl(tvb_a
, offset_a
+5);
5298 proto_tree_add_bitmask(tree
, tvb_a
, offset_a
+10, hf_scsi_control
,
5299 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5300 } else if (!isreq
) {
5305 TRY_SCSI_CDB_ALLOC_LEN(cdata
->itlq
->alloc_len
); /* (defines/initializes try_tvb & try_offset) */
5306 listlen
= tvb_get_ntohl(try_tvb
, try_offset
);
5307 proto_tree_add_item(tree
, hf_scsi_reportluns_lun_list_length
, try_tvb
, try_offset
, 4, ENC_BIG_ENDIAN
);
5311 dissect_scsi_lun(tree
, try_tvb
, try_offset
);
5315 END_TRY_SCSI_CDB_ALLOC_LEN
;
5319 static const value_string mpi_action_vals
[] = {
5320 {MPI_MANAGEMENT_PROTOCOL_IN
, "Management Protocol In"},
5321 {MPI_REPORT_SUPPORTED_OPERATION_CODES
, "Report Supported Opcodes"},
5325 static const value_string report_opcodes_options_vals
[] = {
5326 {0, "Report ALL opcodes"},
5327 {1, "Report ONE opcode, NO service action"},
5328 {2, "Report ONE opcode, WITH service action"},
5333 dissect_spc_mgmt_protocol_in(tvbuff_t
*tvb_a
, packet_info
*pinfo _U_
,
5334 proto_tree
*tree
, unsigned offset_a
,
5335 bool isreq
, bool iscdb
,
5336 unsigned payload_len _U_
,
5337 scsi_task_data_t
*cdata _U_
)
5339 uint8_t service_action
;
5341 if (isreq
&& iscdb
) {
5342 service_action
= tvb_get_uint8 (tvb_a
, offset_a
) & 0x1F;
5344 cdata
->itlq
->flags
=service_action
;
5346 col_append_str(pinfo
->cinfo
, COL_INFO
,
5347 val_to_str_const(service_action
, mpi_action_vals
, "Unknown "));
5349 proto_tree_add_item(tree
, hf_scsi_mpi_service_action
, tvb_a
,
5350 offset_a
, 1, ENC_BIG_ENDIAN
);
5352 switch(service_action
){
5353 case MPI_REPORT_SUPPORTED_OPERATION_CODES
:
5354 proto_tree_add_item(tree
, hf_scsi_report_opcodes_rctd
,
5355 tvb_a
, offset_a
+1, 1, ENC_BIG_ENDIAN
);
5356 proto_tree_add_item(tree
, hf_scsi_report_opcodes_options
,
5357 tvb_a
, offset_a
+1, 1, ENC_BIG_ENDIAN
);
5358 if (cdata
&& (tvb_get_uint8(tvb_a
, offset_a
+1) & 0x07)) {
5359 /* Need the one-command parameter format */
5360 cdata
->itlq
->flags
|=0x80;
5363 proto_tree_add_item(tree
, hf_scsi_report_opcodes_requested_o
,
5364 tvb_a
, offset_a
+2, 1, ENC_BIG_ENDIAN
);
5365 proto_tree_add_item(tree
, hf_scsi_report_opcodes_requested_sa
,
5366 tvb_a
, offset_a
+3, 2, ENC_BIG_ENDIAN
);
5368 proto_tree_add_item(tree
, hf_scsi_alloclen32
, tvb_a
,
5369 offset_a
+5, 4, ENC_BIG_ENDIAN
);
5371 cdata
->itlq
->alloc_len
= tvb_get_ntohl(tvb_a
, offset_a
+5);
5375 proto_tree_add_expert(tree
, pinfo
, &ei_scsi_no_dissection_for_service_action
, tvb_a
, offset_a
+1, 8);
5378 proto_tree_add_bitmask(tree
, tvb_a
, offset_a
+10, hf_scsi_control
,
5379 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5381 } else if (!isreq
) {
5387 if (!cdata
|| !cdata
->itlq
|| !cdata
->itl
) {
5391 csdata
= get_cmdset_data(pinfo
->pool
, cdata
->itlq
, cdata
->itl
);
5393 it
= proto_tree_add_uint(tree
, hf_scsi_mpi_service_action
, tvb_a
, 0, 0, cdata
->itlq
->flags
& 0x7f);
5394 proto_item_set_generated(it
);
5396 TRY_SCSI_CDB_ALLOC_LEN(cdata
->itlq
->alloc_len
); /* (defines/initializes try_tvb & try_offset) */
5398 switch (cdata
->itlq
->flags
& 0x7f) {
5399 case MPI_REPORT_SUPPORTED_OPERATION_CODES
:
5400 if (cdata
->itlq
->flags
& 0x80) {
5401 /* one-command format */
5402 proto_tree_add_item(tree
, hf_scsi_report_opcodes_ctdp_one
,
5403 try_tvb
, try_offset
+1, 1, ENC_BIG_ENDIAN
);
5404 ctdp
= tvb_get_uint8(try_tvb
, try_offset
+1) & 0x80;
5406 proto_tree_add_item(tree
, hf_scsi_report_opcodes_support
,
5407 try_tvb
, try_offset
+1, 1, ENC_BIG_ENDIAN
);
5409 proto_tree_add_item(tree
, hf_scsi_report_opcodes_cdb_length
,
5410 try_tvb
, try_offset
+2, 2, ENC_BIG_ENDIAN
);
5411 length
= tvb_get_ntohs(try_tvb
, try_offset
+2);
5413 proto_tree_add_item(tree
, hf_scsi_report_opcodes_cdb_usage_data
,
5414 try_tvb
, try_offset
+4, length
, ENC_NA
);
5419 tr
= proto_tree_add_subtree(tree
, try_tvb
, try_offset
,
5420 12, ett_timeout_descriptor
, NULL
, "Timeout Descriptor");
5422 proto_tree_add_item(tr
, hf_scsi_report_opcodes_tdl
,
5423 try_tvb
, try_offset
, 2, ENC_BIG_ENDIAN
);
5425 proto_tree_add_item(tr
, hf_scsi_report_opcodes_npt
,
5426 try_tvb
, try_offset
+ 4, 4, ENC_BIG_ENDIAN
);
5428 proto_tree_add_item(tr
, hf_scsi_report_opcodes_rct
,
5429 try_tvb
, try_offset
+ 8, 4, ENC_BIG_ENDIAN
);
5432 /* all commands format */
5433 proto_tree_add_item(tree
, hf_scsi_report_opcodes_cdl
,
5434 try_tvb
, try_offset
+0, 4, ENC_BIG_ENDIAN
);
5435 length
= tvb_get_ntohl(try_tvb
, try_offset
);
5438 while (length
>= 20) {
5441 tr
= proto_tree_add_subtree_format(tree
, try_tvb
, try_offset
,
5442 20, ett_command_descriptor
, NULL
, "Command Descriptor: %s",
5443 val_to_str_ext_const(tvb_get_uint8(try_tvb
, try_offset
+0), csdata
->cdb_vals_ext
, "Unknown"));
5445 proto_tree_add_item(tr
, csdata
->hf_opcode
,
5446 try_tvb
, try_offset
+0, 1, ENC_BIG_ENDIAN
);
5448 proto_tree_add_item(tr
, hf_scsi_report_opcodes_sa
,
5449 try_tvb
, try_offset
+2, 2, ENC_BIG_ENDIAN
);
5451 proto_tree_add_item(tr
, hf_scsi_report_opcodes_ctdp
,
5452 try_tvb
, try_offset
+5, 1, ENC_BIG_ENDIAN
);
5453 ctdp
= tvb_get_uint8(try_tvb
, try_offset
+5) & 0x02;
5455 proto_tree_add_item(tr
, hf_scsi_report_opcodes_servactv
,
5456 try_tvb
, try_offset
+5, 1, ENC_BIG_ENDIAN
);
5458 proto_tree_add_item(tr
, hf_scsi_report_opcodes_cdb_length
,
5459 try_tvb
, try_offset
+6, 2, ENC_BIG_ENDIAN
);
5468 tr
= proto_tree_add_subtree(tree
, try_tvb
, try_offset
,
5469 12, ett_timeout_descriptor
, NULL
, "Timeout Descriptor");
5471 proto_tree_add_item(tr
, hf_scsi_report_opcodes_tdl
,
5472 try_tvb
, try_offset
, 2, ENC_BIG_ENDIAN
);
5474 proto_tree_add_item(tr
, hf_scsi_report_opcodes_npt
,
5475 try_tvb
, try_offset
+ 4, 4, ENC_BIG_ENDIAN
);
5477 proto_tree_add_item(tr
, hf_scsi_report_opcodes_rct
,
5478 try_tvb
, try_offset
+ 8, 4, ENC_BIG_ENDIAN
);
5487 proto_tree_add_expert(tree
, pinfo
, &ei_scsi_no_dissection_for_service_action
, try_tvb
, try_offset
+1, 8);
5490 END_TRY_SCSI_CDB_ALLOC_LEN
;
5495 dissect_scsi_sns_specific_info(tvbuff_t
*tvb
, proto_tree
*sns_tree
, unsigned offset
, uint8_t sense_key
) {
5496 uint8_t valid
= tvb_get_uint8(tvb
, offset
)&0x80;
5497 proto_tree_add_item(sns_tree
, hf_scsi_sksv
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5498 proto_tree_add_item(sns_tree
, hf_scsi_sks_info
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5500 if (sense_key
==5&&valid
) {
5502 proto_tree_add_item(sns_tree
, hf_scsi_sks_fp_cd
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5503 proto_tree_add_item(sns_tree
, hf_scsi_sks_fp_bpv
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5504 proto_tree_add_item(sns_tree
, hf_scsi_sks_fp_bit
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5505 proto_tree_add_item(sns_tree
, hf_scsi_sks_fp_field
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
5510 dissect_scsi_fix_snsinfo(tvbuff_t
*tvb
, proto_tree
*sns_tree
, unsigned offset
) {
5511 proto_item
*hidden_item
;
5514 proto_tree_add_item(sns_tree
, hf_scsi_sns_valid
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5516 flags
= tvb_get_uint8(tvb
, offset
+2);
5517 proto_tree_add_item(sns_tree
, hf_scsi_sns_filemark
, tvb
, offset
+2, 1, ENC_NA
);
5518 proto_tree_add_item(sns_tree
, hf_scsi_sns_eom
, tvb
, offset
+2, 1, ENC_NA
);
5519 proto_tree_add_item(sns_tree
, hf_scsi_sns_ili
, tvb
, offset
+2, 1, ENC_NA
);
5520 proto_tree_add_item(sns_tree
, hf_scsi_snskey
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
5521 proto_tree_add_item(sns_tree
, hf_scsi_snsinfo
, tvb
, offset
+3, 4, ENC_BIG_ENDIAN
);
5522 proto_tree_add_item(sns_tree
, hf_scsi_addlsnslen
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
5523 proto_tree_add_item(sns_tree
, hf_scsi_sns_command_specific_information
, tvb
, offset
+8, 4, ENC_NA
);
5524 proto_tree_add_item(sns_tree
, hf_scsi_ascascq
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
5525 hidden_item
= proto_tree_add_item(sns_tree
, hf_scsi_asc
, tvb
, offset
+12, 1, ENC_BIG_ENDIAN
);
5526 proto_item_set_hidden(hidden_item
);
5527 hidden_item
= proto_tree_add_item(sns_tree
, hf_scsi_ascq
, tvb
, offset
+13, 1, ENC_BIG_ENDIAN
);
5528 proto_item_set_hidden(hidden_item
);
5529 proto_tree_add_item(sns_tree
, hf_scsi_fru
, tvb
, offset
+14, 1, ENC_BIG_ENDIAN
);
5530 dissect_scsi_sns_specific_info(tvb
,sns_tree
,offset
+15,flags
&0x0F);
5534 dissect_scsi_descriptor_snsinfo(tvbuff_t
*tvb
, proto_tree
*sns_tree
, unsigned offset
)
5536 uint8_t additional_length
, sense_key
;
5539 proto_tree_add_item(sns_tree
, hf_scsi_snskey
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
5540 proto_tree_add_item(sns_tree
, hf_scsi_ascascq
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
5541 proto_tree_add_item(sns_tree
, hf_scsi_addlsnslen
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
5542 sense_key
= tvb_get_uint8(tvb
, offset
+1)&0xF;
5543 additional_length
= tvb_get_uint8(tvb
, offset
+7);
5544 end
= offset
+7+additional_length
;
5546 while (offset
<end
-2) {
5547 uint8_t desc_type
, desc_length
, desc_end
;
5549 proto_tree
*desc_tree
;
5551 desc_type
= tvb_get_uint8(tvb
, offset
);
5552 desc_length
= tvb_get_uint8(tvb
, offset
+1);
5553 desc_end
= offset
+desc_length
+2;
5554 desc_tree
= proto_tree_add_subtree(sns_tree
, tvb
, offset
, desc_length
+2, ett_sense_descriptor
, NULL
,
5555 val_to_str(desc_type
, scsi_sense_desc_type_val
, "Unknown (0x%02x)"));
5556 proto_tree_add_item(desc_tree
, hf_scsi_sns_desc_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5557 proto_tree_add_item(desc_tree
, hf_scsi_sns_desc_length
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
5558 switch (desc_type
) {
5560 /*sense key specific*/
5561 if (desc_length
==6) {
5562 dissect_scsi_sns_specific_info(tvb
,desc_tree
,offset
+4,sense_key
);
5566 /*OSD object identification*/
5567 if (desc_length
==0x1e) {
5568 static int * const command_functions
[] = {
5569 &hf_scsi_sns_osd_object_validation
,
5570 &hf_scsi_sns_osd_object_cmd_cap_v
,
5571 &hf_scsi_sns_osd_object_command
,
5572 &hf_scsi_sns_osd_object_imp_st_att
,
5573 &hf_scsi_sns_osd_object_sa_cap_v
,
5574 &hf_scsi_sns_osd_object_set_att
,
5575 &hf_scsi_sns_osd_object_ga_cap_v
,
5576 &hf_scsi_sns_osd_object_get_att
,
5579 proto_tree_add_bitmask(desc_tree
, tvb
, offset
+8, hf_scsi_sns_osd_object_not_initiated
, ett_sense_osd_not_initiated
, command_functions
, ENC_BIG_ENDIAN
);
5580 proto_tree_add_bitmask(desc_tree
, tvb
, offset
+12, hf_scsi_sns_osd_object_completed
, ett_sense_osd_completed
, command_functions
, ENC_BIG_ENDIAN
);
5581 proto_tree_add_item(desc_tree
, hf_scsi_sns_osd_partition_id
, tvb
, offset
+16, 8, ENC_BIG_ENDIAN
);
5582 proto_tree_add_item(desc_tree
, hf_scsi_sns_osd_object_id
, tvb
, offset
+24, 8, ENC_BIG_ENDIAN
);
5586 /*OSD attribute identification*/
5588 while (offset
+8<=desc_end
) {
5589 const attribute_page_numbers_t
*apn
;
5590 uint32_t page
,number
;
5591 page
=tvb_get_ntohl(tvb
, offset
);
5592 proto_tree_add_item(desc_tree
, hf_scsi_sns_osd_attr_page
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5594 number
=tvb_get_ntohl(tvb
, offset
);
5595 item
=proto_tree_add_item(desc_tree
, hf_scsi_sns_osd_attr_number
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
5596 apn
=osd_lookup_attribute(page
,number
);
5599 proto_item_append_text(item
, " (%s)", apn
->name
);
5601 proto_item_append_text(item
, " (Unknown)");
5607 offset
+= desc_length
+2;
5612 dissect_scsi_sense(tvbuff_t
*tvb
, proto_tree
*sns_tree
, unsigned offset
)
5616 proto_tree_add_item(sns_tree
, hf_scsi_sns_errtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5617 sense_type
= tvb_get_uint8(tvb
, offset
) & 0x7f;
5619 switch (sense_type
) {
5622 dissect_scsi_fix_snsinfo(tvb
, sns_tree
, offset
);
5626 dissect_scsi_descriptor_snsinfo(tvb
, sns_tree
, offset
);
5632 dissect_spc_requestsense(tvbuff_t
* tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5633 unsigned offset
, bool isreq
, bool iscdb
,
5634 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5639 if (isreq
&& iscdb
) {
5640 proto_tree_add_item(tree
, hf_scsi_alloclen
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
5641 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
5642 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5643 } else if (!isreq
) {
5644 dissect_scsi_sense(tvb
, tree
, offset
);
5649 dissect_spc_reserve6(tvbuff_t
* tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5650 unsigned offset
, bool isreq
, bool iscdb
,
5651 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5656 if (isreq
&& iscdb
) {
5657 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
5658 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5663 dissect_spc_reserve10(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5664 unsigned offset
, bool isreq
, bool iscdb
,
5665 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5672 if (isreq
&& iscdb
) {
5673 flags
= tvb_get_uint8(tvb
, offset
);
5674 proto_tree_add_uint_format(tree
, hf_scsi_release_flags
, tvb
, offset
, 1,
5676 "Flags: 3rd Party ID = %u, LongID = %u",
5677 flags
& 0x10, flags
& 0x2);
5678 if ((flags
& 0x12) == 0x10) {
5679 proto_tree_add_item(tree
, hf_scsi_release_thirdpartyid
, tvb
,
5680 offset
+2, 1, ENC_NA
);
5682 proto_tree_add_item(tree
, hf_scsi_paramlen16
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
5683 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
5684 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5689 dissect_spc_testunitready(tvbuff_t
* tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5690 unsigned offset
, bool isreq
, bool iscdb
,
5691 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5697 if (isreq
&& iscdb
) {
5698 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
5699 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5709 dissect_spc_senddiagnostic(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5710 unsigned offset
, bool isreq
, bool iscdb _U_
,
5711 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5713 if (!tree
&& !isreq
)
5716 proto_tree_add_item(tree
, hf_scsi_senddiag_st_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5717 proto_tree_add_item(tree
, hf_scsi_senddiag_pf
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5718 proto_tree_add_item(tree
, hf_scsi_senddiag_st
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5719 proto_tree_add_item(tree
, hf_scsi_senddiag_devoff
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5720 proto_tree_add_item(tree
, hf_scsi_senddiag_unitoff
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5721 proto_tree_add_item(tree
, hf_scsi_paramlen16
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
5722 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
5723 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5727 dissect_spc_writebuffer(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5728 unsigned offset
, bool isreq
, bool iscdb _U_
,
5729 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5731 if (!tree
&& !isreq
)
5734 proto_tree_add_item(tree
, hf_scsi_wb_mode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5735 proto_tree_add_item(tree
, hf_scsi_wb_bufferid
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
5736 proto_tree_add_item(tree
, hf_scsi_wb_bufoffset
, tvb
, offset
+2, 3, ENC_BIG_ENDIAN
);
5737 proto_tree_add_item(tree
, hf_scsi_paramlen24
, tvb
, offset
+5, 3, ENC_BIG_ENDIAN
);
5738 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
5739 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
5743 dissect_scsi_varlencdb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
5744 unsigned offset
, bool isreq
, bool iscdb
,
5745 unsigned payload_len _U_
, scsi_task_data_t
*cdata _U_
)
5750 if (isreq
&& iscdb
) {
5751 proto_tree_add_item(tree
, hf_scsi_control
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5752 proto_tree_add_item(tree
, hf_scsi_add_cdblen
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
5753 proto_tree_add_item(tree
, hf_scsi_svcaction
, tvb
, offset
+7, 2, ENC_BIG_ENDIAN
);
5759 dissect_scsi_rsp(tvbuff_t
*tvb
, packet_info
*pinfo
,
5760 proto_tree
*tree
, itlq_nexus_t
*itlq
, itl_nexus_t
*itl
,
5761 uint8_t scsi_status
)
5764 proto_tree
*scsi_tree
= NULL
;
5766 scsi_task_data_t
*cdata
;
5768 cdata
= wmem_new(pinfo
->pool
, scsi_task_data_t
);
5771 cdata
->type
= SCSI_PDU_TYPE_RSP
;
5772 tap_queue_packet(scsi_tap
, pinfo
, cdata
);
5774 csdata
= get_cmdset_data(pinfo
->pool
, itlq
, itl
);
5776 /* Nothing really to do here, just print some stuff passed to us
5780 /* If the LUN is missing, the request is missing in which case there is literally
5781 nothing to put in the SCSI Response subtree, so just return.
5783 if (itlq
->lun
== 0xffff) {
5784 col_append_str(pinfo
->cinfo
, COL_INFO
, "<missing request>");
5788 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "SCSI Response LUN: 0x%02x %s, %u bytes (%u blocks) (%s) ",
5790 val_to_str_ext(itlq
->scsi_opcode
, csdata
->cdb_vals_ext
, "CDB:0x%02x"),
5792 itlq
->data_length
/512,
5793 val_to_str(scsi_status
, scsi_status_val
, "Unknown (0x%08x) ")
5795 col_set_fence(pinfo
->cinfo
, COL_INFO
);
5798 ti
= proto_tree_add_protocol_format(tree
, proto_scsi
, tvb
, 0,
5799 0, "SCSI Response (%s)",
5800 val_to_str_ext(itlq
->scsi_opcode
,
5801 csdata
->cdb_vals_ext
,
5803 scsi_tree
= proto_item_add_subtree(ti
, ett_scsi
);
5805 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_lun
, tvb
, 0, 0, itlq
->lun
);
5806 proto_item_set_generated(ti
);
5810 ti
= proto_tree_add_uint_format(scsi_tree
, hf_scsi_inq_devtype
, tvb
, 0, 0, itl
->cmdset
&SCSI_CMDSET_MASK
, "Command Set:%s (0x%02x) %s", val_to_str(itl
->cmdset
&SCSI_CMDSET_MASK
, scsi_devtype_val
, "Unknown (%d)"), itl
->cmdset
&SCSI_CMDSET_MASK
,itl
->cmdset
&SCSI_CMDSET_DEFAULT
?"(Using default commandset)":"");
5811 proto_item_set_generated(ti
);
5813 if (itlq
->scsi_opcode
!= 0xffff) {
5814 ti
= proto_tree_add_uint(scsi_tree
, csdata
->hf_opcode
, tvb
, 0, 0, itlq
->scsi_opcode
);
5815 proto_item_set_generated(ti
);
5819 if (itlq
->first_exchange_frame
) {
5820 nstime_t delta_time
;
5821 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_request_frame
, tvb
, 0, 0, itlq
->first_exchange_frame
);
5822 proto_item_set_generated(ti
);
5823 nstime_delta(&delta_time
, &pinfo
->abs_ts
, &itlq
->fc_time
);
5824 ti
= proto_tree_add_time(scsi_tree
, hf_scsi_time
, tvb
, 0, 0, &delta_time
);
5825 proto_item_set_generated(ti
);
5828 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_status
, tvb
, 0, 0, scsi_status
);
5829 proto_item_set_generated(ti
);
5833 dissect_scsi_snsinfo(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
5834 unsigned offset
, unsigned snslen
, itlq_nexus_t
*itlq
, itl_nexus_t
*itl
)
5837 proto_tree
*sns_tree
= NULL
;
5838 const char *old_proto
;
5839 scsi_task_data_t
*cdata
;
5841 cdata
= wmem_new(pinfo
->pool
, scsi_task_data_t
);
5844 cdata
->type
= SCSI_PDU_TYPE_SNS
;
5845 tap_queue_packet(scsi_tap
, pinfo
, cdata
);
5848 old_proto
= pinfo
->current_proto
;
5849 pinfo
->current_proto
="SCSI";
5852 ti
= proto_tree_add_protocol_format(tree
, proto_scsi
, tvb
, offset
,
5853 snslen
, "SCSI: SNS Info");
5854 sns_tree
= proto_item_add_subtree(ti
, ett_scsi
);
5858 ti
= proto_tree_add_uint(sns_tree
, hf_scsi_lun
, tvb
, 0, 0, itlq
->lun
);
5859 proto_item_set_generated(ti
);
5860 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " LUN:0x%02x ", itlq
->lun
);
5862 col_set_fence(pinfo
->cinfo
, COL_INFO
);
5864 dissect_scsi_sense(tvb
, sns_tree
, offset
);
5866 pinfo
->current_proto
= old_proto
;
5870 static const scsi_cdb_table_t spc
[256] = {
5871 /*SPC 0x00*/{dissect_spc_testunitready
},
5874 /*SPC 0x03*/{dissect_spc_requestsense
},
5889 /*SPC 0x12*/{dissect_spc_inquiry
},
5892 /*SPC 0x15*/{dissect_spc_modeselect6
},
5893 /*SPC 0x16*/{dissect_spc_reserve6
},
5894 /*SPC 0x17*/{dissect_spc_release6
},
5897 /*SPC 0x1a*/{dissect_spc_modesense6
},
5900 /*SPC 0x1d*/{dissect_spc_senddiagnostic
},
5901 /*SPC 0x1e*/{dissect_spc_preventallowmediaremoval
},
5930 /*SPC 0x3b*/{dissect_spc_writebuffer
},
5947 /*SPC 0x4c*/{dissect_spc_logselect
},
5948 /*SPC 0x4d*/{dissect_spc_logsense
},
5956 /*SPC 0x55*/{dissect_spc_modeselect10
},
5957 /*SPC 0x56*/{dissect_spc_reserve10
},
5958 /*SPC 0x57*/{dissect_spc_release10
},
5961 /*SPC 0x5a*/{dissect_spc_modesense10
},
5965 /*SPC 0x5e*/{dissect_spc_persistentreservein
},
5966 /*SPC 0x5f*/{dissect_spc_persistentreserveout
},
5998 /*SPC 0x7f*/{dissect_scsi_varlencdb
},
6002 /*SPC 0x83*/{dissect_spc_extcopy
},
6003 /*SPC 0x84*/{dissect_spc_recvcopy
},
6031 /*SPC 0xa0*/{dissect_spc_reportluns
},
6034 /*SPC 0xa3*/{dissect_spc_reportdeviceidentifier
},
6130 /* This function must be called with valid pointers for both itlq and itl */
6132 dissect_scsi_cdb(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
6133 int devtype_arg _U_
, itlq_nexus_t
*itlq
, itl_nexus_t
*itl
)
6137 proto_tree
*scsi_tree
= NULL
;
6140 scsi_device_type devtype
;
6143 scsi_task_data_t
*cdata
;
6144 const char *old_proto
;
6148 old_proto
= pinfo
->current_proto
;
6149 pinfo
->current_proto
="SCSI";
6152 DISSECTOR_ASSERT_NOT_REACHED();
6155 DISSECTOR_ASSERT_NOT_REACHED();
6158 opcode
= tvb_get_uint8(tvb
, offset
);
6159 itlq
->scsi_opcode
= opcode
;
6160 csdata
= get_cmdset_data(pinfo
->pool
, itlq
, itl
);
6162 #if 0 /* XXX: devtype never actually used ?? */
6163 if (devtype_arg
!= SCSI_DEV_UNKNOWN
) {
6164 devtype
= devtype_arg
;
6167 devtype
= itl
->cmdset
;
6169 devtype
= (scsi_device_type
)scsi_def_devtype
;
6174 if ((valstr
= try_val_to_str_ext(opcode
, &scsi_spc_vals_ext
)) == NULL
) {
6175 valstr
= try_val_to_str_ext(opcode
, csdata
->cdb_vals_ext
);
6178 if (valstr
!= NULL
) {
6179 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "SCSI %s LUN: 0x%02x ", valstr
, itlq
->lun
);
6181 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "SCSI Command: 0x%02x LUN:0x%02x ", opcode
, itlq
->lun
);
6183 /* make sure no one will overwrite this in the info column */
6184 col_set_fence(pinfo
->cinfo
, COL_INFO
);
6186 cdata
= wmem_new(pinfo
->pool
, scsi_task_data_t
);
6189 cdata
->type
= SCSI_PDU_TYPE_CDB
;
6190 tap_queue_packet(scsi_tap
, pinfo
, cdata
);
6193 ti
= proto_tree_add_protocol_format(tree
, proto_scsi
, tvb
, 0,
6195 val_to_str_ext(opcode
,
6196 csdata
->cdb_vals_ext
,
6199 scsi_tree
= proto_item_add_subtree(ti
, ett_scsi
);
6202 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_lun
, tvb
, 0, 0, itlq
->lun
);
6203 proto_item_set_generated(ti
);
6206 ti
= proto_tree_add_uint_format(scsi_tree
, hf_scsi_inq_devtype
, tvb
, 0, 0, itl
->cmdset
&SCSI_CMDSET_MASK
, "Command Set:%s (0x%02x) %s", val_to_str(itl
->cmdset
&SCSI_CMDSET_MASK
, scsi_devtype_val
, "Unknown (%d)"), itl
->cmdset
&SCSI_CMDSET_MASK
,itl
->cmdset
&SCSI_CMDSET_DEFAULT
?"(Using default commandset)":"");
6207 proto_item_set_generated(ti
);
6210 if (itlq
->last_exchange_frame
) {
6211 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_response_frame
, tvb
, 0, 0, itlq
->last_exchange_frame
);
6212 proto_item_set_generated(ti
);
6216 if (valstr
!= NULL
) {
6217 proto_tree_add_uint_format(scsi_tree
, csdata
->hf_opcode
, tvb
,
6219 tvb_get_uint8(tvb
, offset
),
6220 "Opcode: %s (0x%02x)", valstr
,
6223 proto_tree_add_item(scsi_tree
, hf_scsi_spcopcode
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
6226 if (csdata
->cdb_table
[opcode
].func
) {
6227 csdata
->cdb_table
[opcode
].func(tvb
, pinfo
, scsi_tree
, offset
+1,
6228 true, true, 0, cdata
);
6229 } else if (spc
[opcode
].func
) {
6230 spc
[opcode
].func(tvb
, pinfo
, scsi_tree
, offset
+1,
6231 true, true, 0, cdata
);
6233 call_data_dissector(tvb
, pinfo
, scsi_tree
);
6236 pinfo
->current_proto
= old_proto
;
6240 dissect_scsi_payload(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
6241 bool isreq
, itlq_nexus_t
*itlq
, itl_nexus_t
*itl
,
6242 uint32_t relative_offset
)
6246 proto_tree
*scsi_tree
= NULL
;
6248 scsi_task_data_t
*cdata
;
6250 const char *old_proto
;
6252 uint32_t expected_length
;
6253 fragment_head
*ipfd_head
;
6254 tvbuff_t
*next_tvb
= tvb
;
6255 bool update_col_info
= true;
6256 bool more_frags
= false;
6258 if (!itlq
|| !itl
) {
6259 /* we have no record of this exchange and so we can't dissect the
6262 expert_add_info(pinfo
, tree
, &ei_scsi_unknown_scsi_exchange
);
6266 payload_len
= tvb_reported_length(tvb
);
6267 cdata
= wmem_new(pinfo
->pool
, scsi_task_data_t
);
6270 cdata
->type
= SCSI_PDU_TYPE_CDB
;
6271 tap_queue_packet(scsi_tap
, pinfo
, cdata
);
6273 csdata
= get_cmdset_data(pinfo
->pool
, itlq
, itl
);
6275 old_proto
= pinfo
->current_proto
;
6276 pinfo
->current_proto
="SCSI";
6278 opcode
= (uint8_t) cdata
->itlq
->scsi_opcode
;
6281 ti
= proto_tree_add_protocol_format(tree
, proto_scsi
, tvb
, offset
,
6283 "SCSI Payload (%s %s)",
6284 val_to_str_ext(opcode
,
6285 csdata
->cdb_vals_ext
,
6287 isreq
? "Request Data" : "Response Data");
6288 scsi_tree
= proto_item_add_subtree(ti
, ett_scsi
);
6291 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_lun
, tvb
, 0, 0, itlq
->lun
);
6292 proto_item_set_generated(ti
);
6295 ti
= proto_tree_add_uint_format(scsi_tree
, hf_scsi_inq_devtype
, tvb
, 0, 0, itl
->cmdset
&SCSI_CMDSET_MASK
,
6296 "Command Set:%s (0x%02x) %s",
6297 val_to_str(itl
->cmdset
&SCSI_CMDSET_MASK
, scsi_devtype_val
, "Unknown (%d)"),
6298 itl
->cmdset
&SCSI_CMDSET_MASK
,
6299 itl
->cmdset
&SCSI_CMDSET_DEFAULT
? "(Using default commandset)" : "");
6300 proto_item_set_generated(ti
);
6302 if (itlq
&& (itlq
->scsi_opcode
!= 0xffff)) {
6303 ti
= proto_tree_add_uint(scsi_tree
, csdata
->hf_opcode
, tvb
, 0, 0, itlq
->scsi_opcode
);
6304 proto_item_set_generated(ti
);
6308 if (itlq
->first_exchange_frame
) {
6309 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_request_frame
, tvb
, 0, 0, itlq
->first_exchange_frame
);
6310 proto_item_set_generated(ti
);
6313 if (itlq
->last_exchange_frame
) {
6314 ti
= proto_tree_add_uint(scsi_tree
, hf_scsi_response_frame
, tvb
, 0, 0, itlq
->last_exchange_frame
);
6315 proto_item_set_generated(ti
);
6319 /* If we don't know the CDB opcode there is no point in trying to
6322 if ( !itlq
->first_exchange_frame
) {
6323 call_data_dissector(tvb
, pinfo
, scsi_tree
);
6324 goto end_of_payload
;
6327 /* If we are not doing data reassembly we only call the dissector
6328 * for the very first data in/out pdu in each transfer
6330 if (!scsi_defragment
) {
6331 if (relative_offset
) {
6332 call_data_dissector(tvb
, pinfo
, scsi_tree
);
6333 goto end_of_payload
;
6335 goto dissect_the_payload
;
6339 /* If we don't have the entire PDU there is no point in even trying
6342 if (tvb_captured_length_remaining(tvb
, offset
) != tvb_reported_length_remaining(tvb
, offset
)) {
6343 if (relative_offset
) {
6344 call_data_dissector(tvb
, pinfo
, scsi_tree
);
6345 goto end_of_payload
;
6347 goto dissect_the_payload
;
6352 /* What is the expected data length for this transfer */
6353 if ( (itlq
->task_flags
&(SCSI_DATA_READ
|SCSI_DATA_WRITE
)) == (SCSI_DATA_READ
|SCSI_DATA_WRITE
) ) {
6354 /* This is a bidirectional transfer */
6356 expected_length
= itlq
->data_length
;
6358 expected_length
= itlq
->bidir_data_length
;
6361 /* This is a unidirectional transfer */
6362 expected_length
= itlq
->data_length
;
6365 /* If this PDU already contains all the expected data we don't have to do
6368 if ( (!relative_offset
) && ((uint32_t)tvb_reported_length_remaining(tvb
, offset
) == expected_length
) ) {
6369 goto dissect_the_payload
;
6373 /* Start reassembly */
6375 if (tvb_reported_length_remaining(tvb
, offset
) < 0) {
6376 goto end_of_payload
;
6378 if ((tvb_reported_length_remaining(tvb
,offset
) + relative_offset
) != expected_length
) {
6381 ipfd_head
= fragment_add_check(&scsi_reassembly_table
, tvb
, offset
,
6383 itlq
->first_exchange_frame
, /* key */
6386 tvb_reported_length_remaining(tvb
, offset
),
6388 next_tvb
= process_reassembled_data(tvb
, offset
, pinfo
, "Reassembled SCSI DATA", ipfd_head
, &scsi_frag_items
, &update_col_info
, tree
);
6390 if ( ipfd_head
&& (ipfd_head
->reassembled_in
!= pinfo
->num
) ) {
6391 col_prepend_fstr(pinfo
->cinfo
, COL_INFO
, "[SCSI PDU Reassembled in #%u] ",
6392 ipfd_head
->reassembled_in
);
6396 dissect_the_payload
:
6398 /* reassembly has not yet finished so we don't have a tvb yet */
6399 goto end_of_payload
;
6403 * We have to dissect INQUIRY responses, in order to determine the
6406 * We don't bother dissecting other payload if we're not building
6409 * We assume opcode 0x12 is always INQUIRY regardless of the
6412 if (opcode
== SCSI_SPC_INQUIRY
) {
6413 dissect_spc_inquiry(next_tvb
, pinfo
, scsi_tree
, offset
, isreq
,
6414 false, payload_len
, cdata
);
6418 All commandsets support SPC?
6420 if (csdata
->cdb_table
&& (csdata
->cdb_table
)[opcode
].func
) {
6421 (csdata
->cdb_table
)[opcode
].func(next_tvb
, pinfo
, scsi_tree
, offset
,
6422 isreq
, false, payload_len
, cdata
);
6423 } else if (spc
[opcode
].func
) {
6424 spc
[opcode
].func(next_tvb
, pinfo
, scsi_tree
, offset
,
6425 isreq
, false, payload_len
, cdata
);
6426 } else { /* don't know this CDB */
6427 call_data_dissector(next_tvb
, pinfo
, scsi_tree
);
6432 pinfo
->current_proto
= old_proto
;
6436 get_cmdset_data(wmem_allocator_t
*pool
, itlq_nexus_t
*itlq
, itl_nexus_t
*itl
)
6441 /* we must have an itlq structure */
6443 DISSECTOR_ASSERT_NOT_REACHED();
6447 if (itl
->cmdset
== 0xff) {
6448 itl
->cmdset
= scsi_def_devtype
|SCSI_CMDSET_DEFAULT
;
6450 cmdset
= itl
->cmdset
;
6452 cmdset
= scsi_def_devtype
;
6455 csdata
= wmem_new(pool
, cmdset_t
);
6457 switch(cmdset
&SCSI_CMDSET_MASK
) {
6459 csdata
->hf_opcode
= hf_scsi_sbc_opcode
;
6460 csdata
->cdb_vals_ext
= &scsi_sbc_vals_ext
;
6461 csdata
->cdb_table
= scsi_sbc_table
;
6463 case SCSI_DEV_CDROM
:
6464 csdata
->hf_opcode
= hf_scsi_mmc_opcode
;
6465 csdata
->cdb_vals_ext
= &scsi_mmc_vals_ext
;
6466 csdata
->cdb_table
= scsi_mmc_table
;
6469 csdata
->hf_opcode
= hf_scsi_ssc_opcode
;
6470 csdata
->cdb_vals_ext
= &scsi_ssc_vals_ext
;
6471 csdata
->cdb_table
= scsi_ssc_table
;
6474 csdata
->hf_opcode
= hf_scsi_smc_opcode
;
6475 csdata
->cdb_vals_ext
= &scsi_smc_vals_ext
;
6476 csdata
->cdb_table
= scsi_smc_table
;
6479 csdata
->hf_opcode
= hf_scsi_osd_opcode
;
6480 csdata
->cdb_vals_ext
= &scsi_osd_vals_ext
;
6481 csdata
->cdb_table
= scsi_osd_table
;
6484 csdata
->hf_opcode
= hf_scsi_spcopcode
;
6485 csdata
->cdb_vals_ext
= &scsi_spc_vals_ext
;
6486 csdata
->cdb_table
= spc
;
6495 proto_register_scsi(void)
6497 static hf_register_info hf
[] = {
6499 { "Status", "scsi.status", FT_UINT8
, BASE_HEX
,
6500 VALS(scsi_status_val
), 0, "SCSI command status value", HFILL
}},
6501 { &hf_scsi_spcopcode
,
6502 {"SPC-2 Opcode", "scsi.spc.opcode", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
6503 &scsi_spc_vals_ext
, 0x0, NULL
, HFILL
}},
6505 {"Control", "scsi.cdb.control", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
,
6507 { &hf_scsi_control_vendor_specific
,
6508 {"Vendor specific", "scsi.cdb.control.vendorspecific", FT_UINT8
,
6509 BASE_HEX
, NULL
, 0xC0, NULL
, HFILL
}},
6510 { &hf_scsi_control_reserved
,
6511 {"Reserved", "scsi.cdb.control.reserved", FT_UINT8
, BASE_HEX
, NULL
,
6512 0x38, NULL
, HFILL
}},
6513 { &hf_scsi_control_naca
,
6514 {"NACA", "scsi.cdb.control.naca", FT_BOOLEAN
, 8,
6515 TFS(&scsi_naca_tfs
), 0x04, NULL
, HFILL
}},
6516 { &hf_scsi_control_obs1
,
6517 {"Obsolete", "scsi.cdb.control.obs1", FT_UINT8
, BASE_HEX
,
6518 NULL
, 0x02, NULL
, HFILL
}},
6519 { &hf_scsi_control_obs2
,
6520 {"Obsolete", "scsi.cdb.control.obs2", FT_UINT8
, BASE_HEX
,
6521 NULL
, 0x01, NULL
, HFILL
}},
6522 { &hf_scsi_inq_control
,
6523 {"Control", "scsi.cdb.inq.control", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
6525 { &hf_scsi_inquiry_flags
,
6526 {"Inquiry Flags", "scsi.inquiry.flags", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
,
6528 { &hf_scsi_inquiry_evpd_page
,
6529 {"EVPD Page Code", "scsi.inquiry.evpd.pagecode", FT_UINT8
, BASE_HEX
,
6530 VALS(scsi_evpd_pagecode_val
), 0x0, NULL
, HFILL
}},
6531 { &hf_scsi_inquiry_cmdt_page
,
6532 {"CMDT Page Code", "scsi.inquiry.cmdt.pagecode", FT_UINT8
, BASE_HEX
,
6533 NULL
, 0x0, NULL
, HFILL
}},
6534 { &hf_scsi_alloclen
,
6535 {"Allocation Length", "scsi.cdb.alloclen", FT_UINT8
, BASE_DEC
, NULL
,
6537 { &hf_scsi_paramlen
,
6538 {"Parameter Length", "scsi.cdb.paramlen", FT_UINT8
, BASE_DEC
, NULL
,
6541 {"Page Control", "scsi.log.pc", FT_UINT8
, BASE_DEC
,
6542 VALS(scsi_log_pc_val
), 0xC0, NULL
, HFILL
}},
6543 { &hf_scsi_log_pagecode
,
6544 {"Page Code", "scsi.log.pagecode", FT_UINT8
, BASE_HEX
,
6545 VALS(scsi_log_page_val
), 0x3F, NULL
, HFILL
}},
6546 { &hf_scsi_paramlen16
,
6547 {"Parameter Length", "scsi.cdb.paramlen16", FT_UINT16
, BASE_DEC
, NULL
,
6549 { &hf_scsi_modesel_flags
,
6550 {"Mode Sense/Select Flags", "scsi.cdb.mode.flags", FT_UINT8
, BASE_HEX
,
6551 NULL
, 0x0, NULL
, HFILL
}},
6552 { &hf_scsi_alloclen16
,
6553 {"Allocation Length", "scsi.cdb.alloclen16", FT_UINT16
, BASE_DEC
,
6554 NULL
, 0x0, NULL
, HFILL
}},
6555 { &hf_scsi_modesns_pc
,
6556 {"Page Control", "scsi.mode.pc", FT_UINT8
, BASE_DEC
,
6557 VALS(scsi_modesns_pc_val
), 0xC0, NULL
, HFILL
}},
6558 { &hf_scsi_spc_subpagecode
,
6559 {"SubPage Code", "scsi.mode.spc.subpagecode", FT_UINT8
, BASE_HEX
,
6560 NULL
, 0, NULL
, HFILL
}},
6561 { &hf_scsi_spc_pagecode
,
6562 {"SPC-2 Page Code", "scsi.mode.spc.pagecode", FT_UINT8
, BASE_HEX
,
6563 VALS(scsi_spc_modepage_val
), 0x3F, NULL
, HFILL
}},
6564 { &hf_scsi_sbcpagecode
,
6565 {"SBC-2 Page Code", "scsi.mode.sbc.pagecode", FT_UINT8
, BASE_HEX
,
6566 VALS(scsi_sbc_modepage_val
), 0x3F, NULL
, HFILL
}},
6567 { &hf_scsi_sscpagecode
,
6568 {"SSC-2 Page Code", "scsi.mode.ssc.pagecode", FT_UINT8
, BASE_HEX
,
6569 VALS(scsi_ssc2_modepage_val
), 0x3F, NULL
, HFILL
}},
6570 { &hf_scsi_mmcpagecode
,
6571 {"MMC-5 Page Code", "scsi.mode.mmc.pagecode", FT_UINT8
, BASE_HEX
,
6572 VALS(scsi_mmc5_modepage_val
), 0x3F, NULL
, HFILL
}},
6573 { &hf_scsi_smcpagecode
,
6574 {"SMC-2 Page Code", "scsi.mode.smc.pagecode", FT_UINT8
, BASE_HEX
,
6575 VALS(scsi_smc_modepage_val
), 0x3F, NULL
, HFILL
}},
6576 { &hf_scsi_modesns_flags
,
6577 {"Mode Sense Flags", "scsi.mode.flags", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
,
6579 { &hf_scsi_persresvin_svcaction
,
6580 {"Service Action", "scsi.persresvin.svcaction", FT_UINT8
, BASE_HEX
,
6581 VALS(scsi_persresvin_svcaction_val
), 0x1F, NULL
, HFILL
}},
6582 { &hf_scsi_persresvout_svcaction
,
6583 {"Service Action", "scsi.persresvout.svcaction", FT_UINT8
, BASE_HEX
,
6584 VALS(scsi_persresvout_svcaction_val
), 0x1F, NULL
, HFILL
}},
6585 { &hf_scsi_persresv_scope
,
6586 {"Reservation Scope", "scsi.persresv.scope", FT_UINT8
, BASE_HEX
,
6587 VALS(scsi_persresv_scope_val
), 0xF0, NULL
, HFILL
}},
6588 { &hf_scsi_persresv_type
,
6589 {"Reservation Type", "scsi.persresv.type", FT_UINT8
, BASE_HEX
,
6590 VALS(scsi_persresv_type_val
), 0x0F, NULL
, HFILL
}},
6591 { &hf_scsi_persresvout_reskey
,
6592 {"Reservation Key", "scsi.persresv.reskey", FT_BYTES
, BASE_NONE
,
6593 NULL
, 0x0, NULL
, HFILL
}},
6594 { &hf_scsi_persresvout_sareskey
,
6595 {"Service Action Reservation Key", "scsi.persresv.sareskey", FT_BYTES
,
6596 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6597 { &hf_scsi_persresvout_obsolete
,
6598 {"Obsolete", "scsi.presresv.obs", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6600 { &hf_scsi_persresvout_control
,
6601 {"Control", "scsi.presresv.control", FT_UINT8
, BASE_HEX
, NULL
, 0x0,
6603 /* Service action REGISTER AND MOVE */
6604 { &hf_scsi_persresv_control_rsvd
,
6605 {"Reserved", "scsi.persresv.control.reserved", FT_UINT8
, BASE_HEX
,
6606 NULL
, 0xFC, NULL
, HFILL
}},
6607 { &hf_scsi_persresv_control_unreg
,
6608 {"unreg", "scsi.persresv.control.unreg", FT_BOOLEAN
, 8,
6609 NULL
, 0x02, NULL
, HFILL
}},
6610 /* Other service actions than REGISTER AND MOVE */
6611 { &hf_scsi_persresv_control_rsvd1
,
6612 {"Reserved", "scsi.persresv.control.reserved1", FT_UINT8
, BASE_HEX
,
6613 NULL
, 0xF0, NULL
, HFILL
}},
6614 { &hf_scsi_persresv_control_rsvd2
,
6615 {"Reserved", "scsi.persresv.control.reserved2", FT_UINT8
, BASE_HEX
,
6616 NULL
, 0x02, NULL
, HFILL
}},
6617 { &hf_scsi_persresv_control_spec_i_pt
,
6618 {"SPEC_I_PT", "scsi.persresv.control.spec_i_pt", FT_BOOLEAN
, 8,
6619 TFS(&scsi_spec_i_pt_tfs
), 0x08, NULL
, HFILL
}},
6620 { &hf_scsi_persresv_control_all_tg_pt
,
6621 {"ALL_TG_PT", "scsi.persresv.control.all_tg_pt", FT_BOOLEAN
, 8,
6622 TFS(&scsi_all_tg_pt_tfs
), 0x04, NULL
, HFILL
}},
6623 { &hf_scsi_persresv_control_aptpl
,
6624 {"aptpl", "scsi.persresv.control.aptpl", FT_BOOLEAN
, 8,
6625 TFS(&scsi_aptpl_tfs
), 0x01, NULL
, HFILL
}},
6626 { &hf_scsi_persresvout_rel_tpi
,
6627 {"rel_tpi", "scsi.persresv.rel_tpi", FT_UINT16
, BASE_DEC
,
6628 NULL
, 0x0, NULL
, HFILL
}},
6629 { &hf_scsi_persresvout_transportid_len
,
6630 {"transportid_len", "scsi.persresv.transportid_len",
6631 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6632 { &hf_scsi_persresvout_transportid
,
6633 {"transportid_len", "scsi.persresv.transportid",
6634 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6635 { &hf_scsi_release_flags
,
6636 {"Release Flags", "scsi.release.flags", FT_UINT8
, BASE_HEX
, NULL
,
6638 { &hf_scsi_release_thirdpartyid
,
6639 {"Third-Party ID", "scsi.release.thirdpartyid", FT_BYTES
, BASE_NONE
,
6640 NULL
, 0x0, NULL
, HFILL
}},
6641 { &hf_scsi_alloclen32
,
6642 {"Allocation Length", "scsi.cdb.alloclen32", FT_UINT32
, BASE_DEC
,
6643 NULL
, 0x0, NULL
, HFILL
}},
6644 { &hf_scsi_inq_add_len
,
6645 {"Additional Length", "scsi.inquiry.add_len", FT_UINT8
, BASE_DEC
,
6646 NULL
, 0, NULL
, HFILL
}},
6647 { &hf_scsi_inq_qualifier
,
6648 {"Qualifier", "scsi.inquiry.qualifier", FT_UINT8
, BASE_HEX
,
6649 VALS(scsi_qualifier_val
), 0xE0, NULL
, HFILL
}},
6650 { &hf_scsi_inq_peripheral
,
6651 {"Peripheral", "scsi.inquiry.peripheral", FT_UINT8
, BASE_HEX
,
6652 NULL
, 0, NULL
, HFILL
}},
6653 { &hf_scsi_inq_vendor_id
,
6654 {"Vendor Id", "scsi.inquiry.vendor_id", FT_STRING
, BASE_NONE
,
6655 NULL
, 0, NULL
, HFILL
}},
6656 { &hf_scsi_inq_product_id
,
6657 {"Product Id", "scsi.inquiry.product_id", FT_STRING
, BASE_NONE
,
6658 NULL
, 0, NULL
, HFILL
}},
6659 { &hf_scsi_inq_product_rev
,
6660 {"Product Revision Level", "scsi.inquiry.product_rev", FT_STRING
, BASE_NONE
,
6661 NULL
, 0, NULL
, HFILL
}},
6662 { &hf_scsi_inq_vendor_specific
,
6663 {"Vendor Specific", "scsi.inquiry.vendor_specific", FT_BYTES
, BASE_NONE
,
6664 NULL
, 0, NULL
, HFILL
}},
6665 { &hf_scsi_inq_version_desc
,
6666 {"Version Description", "scsi.inquiry.version_desc", FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
,
6667 &scsi_verdesc_val_ext
, 0, NULL
, HFILL
}},
6668 { &hf_scsi_inq_devtype
,
6669 {"Device Type", "scsi.inquiry.devtype", FT_UINT8
, BASE_HEX
,
6670 VALS(scsi_devtype_val
), SCSI_DEV_BITS
, NULL
, HFILL
}},
6672 {"Removable", "scsi.inquiry.removable", FT_BOOLEAN
, 8,
6673 TFS(&scsi_removable_val
), 0x80, NULL
, HFILL
}},
6674 { &hf_scsi_inq_version
,
6675 {"Version", "scsi.inquiry.version", FT_UINT8
, BASE_HEX
,
6676 VALS(scsi_inquiry_vers_val
), 0x0, NULL
, HFILL
}},
6677 { &hf_scsi_inq_reladrflags
,
6678 {"Inquiry RelAdr Flags", "scsi.inquiry.reladrflags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6680 { &hf_scsi_inq_reladr
,
6681 {"RelAdr", "scsi.inquiry.reladr", FT_BOOLEAN
, 8, TFS(&reladr_tfs
), SCSI_INQ_RELADRFLAGS_RELADR
,
6683 { &hf_scsi_inq_linked
,
6684 {"Linked", "scsi.inquiry.linked", FT_BOOLEAN
, 8, TFS(&linked_tfs
), SCSI_INQ_RELADRFLAGS_LINKED
,
6686 { &hf_scsi_inq_trandis
,
6687 {"TranDis", "scsi.inquiry.trandis", FT_BOOLEAN
, 8, NULL
, SCSI_INQ_RELADRFLAGS_TRANDIS
,
6689 { &hf_scsi_inq_cmdque
,
6690 {"CmdQue", "scsi.inquiry.cmdque", FT_BOOLEAN
, 8, TFS(&cmdque_tfs
), SCSI_INQ_RELADRFLAGS_CMDQUE
,
6692 { &hf_scsi_inq_bqueflags
,
6693 {"Inquiry BQue Flags", "scsi.inquiry.bqueflags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6695 { &hf_scsi_inq_bque
,
6696 {"BQue", "scsi.inquiry.bque", FT_BOOLEAN
, 8, TFS(&bque_tfs
), SCSI_INQ_BQUEFLAGS_BQUE
,
6698 { &hf_scsi_inq_encserv
,
6699 {"EncServ", "scsi.inquiry.encserv", FT_BOOLEAN
, 8, TFS(&encserv_tfs
), SCSI_INQ_BQUEFLAGS_ENCSERV
,
6701 { &hf_scsi_inq_multip
,
6702 {"MultiP", "scsi.inquiry.multip", FT_BOOLEAN
, 8, TFS(&multip_tfs
), SCSI_INQ_BQUEFLAGS_MULTIP
,
6704 { &hf_scsi_inq_mchngr
,
6705 {"MChngr", "scsi.inquiry.mchngr", FT_BOOLEAN
, 8, TFS(&mchngr_tfs
), SCSI_INQ_BQUEFLAGS_MCHNGR
,
6707 { &hf_scsi_inq_ackreqq
,
6708 {"ACKREQQ", "scsi.inquiry.ackreqq", FT_BOOLEAN
, 8, NULL
, SCSI_INQ_BQUEFLAGS_ACKREQQ
,
6710 { &hf_scsi_inq_sccsflags
,
6711 {"Inquiry SCCS Flags", "scsi.inquiry.sccsflags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6713 { &hf_scsi_inq_sccs
,
6714 {"SCCS", "scsi.inquiry.sccs", FT_BOOLEAN
, 8, TFS(&sccs_tfs
), SCSI_INQ_SCCSFLAGS_SCCS
,
6717 {"ACC", "scsi.inquiry.acc", FT_BOOLEAN
, 8, TFS(&acc_tfs
), SCSI_INQ_SCCSFLAGS_ACC
,
6720 {"3PC", "scsi.inquiry.tpc", FT_BOOLEAN
, 8, TFS(&tpc_tfs
), SCSI_INQ_SCCSFLAGS_TPC
,
6722 { &hf_scsi_inq_protect
,
6723 {"Protect", "scsi.inquiry.protect", FT_BOOLEAN
, 8, TFS(&protect_tfs
), SCSI_INQ_SCCSFLAGS_PROTECT
,
6725 { &hf_scsi_inq_tpgs
,
6726 {"TPGS", "scsi.inquiry.tpgs", FT_UINT8
, BASE_DEC
, VALS(inq_tpgs_vals
), 0x30,
6728 { &hf_scsi_inq_acaflags
,
6729 {"Inquiry ACA Flags", "scsi.inquiry.acaflags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6731 { &hf_scsi_inq_control_vendor_specific
,
6732 {"Vendor specific", "scsi.inquiry.control.vendorspecific", FT_UINT8
,
6733 BASE_HEX
, NULL
, 0xC0, NULL
, HFILL
}},
6734 { &hf_scsi_inq_control_reserved
,
6735 {"Reserved", "scsi.inquiry.control.reserved", FT_UINT8
, BASE_HEX
,
6736 NULL
, 0x38, NULL
, HFILL
}},
6737 { &hf_scsi_inq_control_naca
,
6738 {"NACA", "scsi.inquiry.control.naca", FT_BOOLEAN
, 8,
6739 TFS(&scsi_naca_tfs
), 0x04, NULL
, HFILL
}},
6740 { &hf_scsi_inq_control_obs1
,
6741 {"Obsolete", "scsi.inquiry.control.obs1", FT_UINT8
, BASE_HEX
,
6742 NULL
, 0x02, NULL
, HFILL
}},
6743 { &hf_scsi_inq_control_obs2
,
6744 {"Obsolete", "scsi.inquiry.control.obs2", FT_UINT8
, BASE_HEX
,
6745 NULL
, 0x01, NULL
, HFILL
}},
6746 { &hf_scsi_inq_rmbflags
,
6747 {"Inquiry RMB Flags", "scsi.inquiry.rmbflags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6749 { &hf_scsi_inq_normaca
,
6750 {"NormACA", "scsi.inquiry.normaca", FT_BOOLEAN
, 8, TFS(&normaca_tfs
), SCSI_INQ_ACAFLAGS_NORMACA
,
6752 { &hf_scsi_inq_hisup
,
6753 {"HiSup", "scsi.inquiry.hisup", FT_BOOLEAN
, 8, TFS(&hisup_tfs
), SCSI_INQ_ACAFLAGS_HISUP
,
6755 { &hf_scsi_inq_aerc
,
6756 {"AERC", "scsi.inquiry.aerc", FT_BOOLEAN
, 8, TFS(&aerc_tfs
), SCSI_INQ_ACAFLAGS_AERC
,
6757 "AERC is obsolete from SPC-3 and forward", HFILL
}},
6758 { &hf_scsi_inq_trmtsk
,
6759 {"TrmTsk", "scsi.inquiry.trmtsk", FT_BOOLEAN
, 8, TFS(&trmtsk_tfs
), SCSI_INQ_ACAFLAGS_TRMTSK
,
6760 "TRMTSK is obsolete from SPC-2 and forward", HFILL
}},
6762 {"Response Data Format", "scsi.inquiry.rdf", FT_UINT8
, BASE_DEC
, VALS(inq_rdf_vals
), 0x0f,
6764 { &hf_scsi_modesns_errrep
,
6765 {"MRIE", "scsi.mode.mrie", FT_UINT8
, BASE_HEX
,
6766 VALS(scsi_modesns_mrie_val
), 0x0F, NULL
, HFILL
}},
6767 { &hf_scsi_modesns_tst
,
6768 {"Task Set Type", "scsi.mode.tst", FT_UINT8
, BASE_DEC
,
6769 VALS(scsi_modesns_tst_val
), 0xE0, NULL
, HFILL
}},
6770 { &hf_scsi_modesns_qmod
,
6771 {"Queue Algorithm Modifier", "scsi.mode.qmod", FT_UINT8
, BASE_HEX
,
6772 VALS(scsi_modesns_qmod_val
), 0xF0, NULL
, HFILL
}},
6773 { &hf_scsi_modesns_qerr
,
6774 {"Queue Error Management", "scsi.mode.qerr", FT_BOOLEAN
, 8,
6775 TFS(&scsi_modesns_qerr_val
), 0x2, NULL
, HFILL
}},
6776 { &hf_scsi_modesns_tas
,
6777 {"Task Aborted Status", "scsi.mode.tac", FT_BOOLEAN
, 8,
6778 TFS(&scsi_modesns_tas_val
), 0x80, NULL
, HFILL
}},
6779 { &hf_scsi_modesns_rac
,
6780 {"Report a Check", "scsi.mode.rac", FT_BOOLEAN
, 8,
6781 TFS(&scsi_modesns_rac_val
), 0x40, NULL
, HFILL
}},
6782 { &hf_scsi_protocol
,
6783 {"Protocol", "scsi.proto", FT_UINT8
, BASE_DEC
, VALS(scsi_proto_val
),
6784 0x0F, NULL
, HFILL
}},
6785 { &hf_scsi_sns_errtype
,
6786 {"SNS Error Type", "scsi.sns.errtype", FT_UINT8
, BASE_HEX
,
6787 VALS(scsi_sns_errtype_val
), 0x7F, NULL
, HFILL
}},
6789 {"Sense Key", "scsi.sns.key", FT_UINT8
, BASE_HEX
,
6790 VALS(scsi_sensekey_val
), 0x0F, NULL
, HFILL
}},
6792 {"Sense Info", "scsi.sns.info", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
,
6794 { &hf_scsi_addlsnslen
,
6795 {"Additional Sense Length", "scsi.sns.addlen", FT_UINT8
, BASE_DEC
,
6796 NULL
, 0x0, NULL
, HFILL
}},
6798 {"Additional Sense Code", "scsi.sns.asc", FT_UINT8
, BASE_HEX
, NULL
,
6801 {"Additional Sense Code Qualifier", "scsi.sns.ascq", FT_UINT8
,
6802 BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6804 {"Additional Sense Code+Qualifier", "scsi.sns.ascascq", FT_UINT16
,
6805 BASE_HEX
|BASE_EXT_STRING
, &scsi_asc_val_ext
, 0x0, NULL
, HFILL
}},
6807 {"Field Replaceable Unit Code", "scsi.sns.fru", FT_UINT8
, BASE_HEX
,
6808 NULL
, 0x0, NULL
, HFILL
}},
6810 {"SKSV", "scsi.sns.sksv", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
,
6812 { &hf_scsi_sks_info
,
6813 {"Sense Key Specific", "scsi.sns.sks_info", FT_UINT24
, BASE_HEX
, NULL
, 0x7FFFFF, NULL
, HFILL
}},
6814 { &hf_scsi_sks_fp_cd
,
6815 {"Command/Data", "scsi.sns.sks.fp.cd", FT_UINT24
, BASE_HEX
, VALS(scsi_sense_sks_fp_cd_val
), 0x400000, NULL
, HFILL
}},
6816 { &hf_scsi_sks_fp_bpv
,
6817 {"Bit pointer valid", "scsi.sns.sks.fp.bpv", FT_BOOLEAN
, 24, NULL
, 0x080000, NULL
, HFILL
}},
6818 { &hf_scsi_sks_fp_bit
,
6819 {"Bit pointer", "scsi.sns.sks.fp.bit", FT_UINT24
, BASE_DEC
, NULL
, 0x070000, NULL
, HFILL
}},
6820 { &hf_scsi_sks_fp_field
,
6821 {"Field pointer", "scsi.sns.sks.fp.field", FT_UINT24
, BASE_DEC
, NULL
, 0x00FFFF, NULL
, HFILL
}},
6822 { &hf_scsi_sns_desc_type
,
6823 {"Sense data descriptor type", "scsi.sns.desc.type", FT_UINT8
, BASE_HEX
, VALS(scsi_sense_desc_type_val
), 0, NULL
, HFILL
}},
6824 { &hf_scsi_sns_desc_length
,
6825 {"Sense data descriptor length", "scsi.sns.desc.length", FT_UINT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
6826 { &hf_scsi_sns_osd_object_not_initiated
,
6827 {"Not initiated", "scsi.sns.desc.osd_object.not_initiated", FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6828 { &hf_scsi_sns_osd_object_completed
,
6829 {"Completed", "scsi.sns.desc.osd_object.completed", FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6830 { &hf_scsi_sns_osd_object_validation
,
6831 {"VALIDATION", "scsi.sns.desc.osd_object.validation", FT_BOOLEAN
, 32, NULL
, 0x80000000, NULL
, HFILL
}},
6832 { &hf_scsi_sns_osd_object_cmd_cap_v
,
6833 {"CMD_CAP_V", "scsi.sns.desc.osd_object.cmd_cap_v", FT_BOOLEAN
, 32, NULL
, 0x20000000, NULL
, HFILL
}},
6834 { &hf_scsi_sns_osd_object_command
,
6835 {"COMMAND", "scsi.sns.desc.osd_object.command", FT_BOOLEAN
, 32, NULL
, 0x10000000, NULL
, HFILL
}},
6836 { &hf_scsi_sns_osd_object_imp_st_att
,
6837 {"IMP_ST_ATT", "scsi.sns.desc.osd_object.imp_st_att", FT_BOOLEAN
, 32, NULL
, 0x00100000, NULL
, HFILL
}},
6838 { &hf_scsi_sns_osd_object_sa_cap_v
,
6839 {"SA_CAP_V", "scsi.sns.desc.osd_object.sa_cap_v", FT_BOOLEAN
, 32, NULL
, 0x00002000, NULL
, HFILL
}},
6840 { &hf_scsi_sns_osd_object_set_att
,
6841 {"SET_ATT", "scsi.sns.desc.osd_object.set_att", FT_BOOLEAN
, 32, NULL
, 0x00001000, NULL
, HFILL
}},
6842 { &hf_scsi_sns_osd_object_ga_cap_v
,
6843 {"GA_CAP_V", "scsi.sns.desc.osd_object.ga_cap_v", FT_BOOLEAN
, 32, NULL
, 0x00000020, NULL
, HFILL
}},
6844 { &hf_scsi_sns_osd_object_get_att
,
6845 {"GET_ATT", "scsi.sns.desc.osd_object.get_att", FT_BOOLEAN
, 32, NULL
, 0x00000010, NULL
, HFILL
}},
6846 { &hf_scsi_sns_osd_partition_id
,
6847 {"Partition ID", "scsi.sns.desc.osd_object.partition_id", FT_UINT64
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6848 { &hf_scsi_sns_osd_object_id
,
6849 {"Object ID", "scsi.sns.desc.osd_object.object_id", FT_UINT64
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6850 { &hf_scsi_sns_osd_attr_page
,
6851 {"Attribute page", "scsi.sns.desc.osd_attr.page", FT_UINT32
, BASE_HEX
| BASE_EXT_STRING
, &attributes_page_vals_ext
, 0, NULL
, HFILL
}},
6852 { &hf_scsi_sns_osd_attr_number
,
6853 {"Attribute number", "scsi.sns.desc.osd_attr.number", FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
6854 { &hf_scsi_persresv_key
,
6855 {"Reservation Key", "scsi.spc.resv.key", FT_BYTES
, BASE_NONE
, NULL
,
6857 { &hf_scsi_persresv_scopeaddr
,
6858 {"Scope Address", "scsi.spc.resv.scopeaddr", FT_BYTES
, BASE_NONE
, NULL
,
6860 { &hf_scsi_add_cdblen
,
6861 {"Additional CDB Length", "scsi.spc.addcdblen", FT_UINT8
, BASE_DEC
,
6862 NULL
, 0x0, NULL
, HFILL
}},
6863 { &hf_scsi_svcaction
,
6864 {"Service Action", "scsi.spc.svcaction", FT_UINT16
, BASE_HEX
, NULL
,
6867 {"Mode", "scsi.spc.wb.mode", FT_UINT8
, BASE_HEX
,
6868 VALS(scsi_wb_mode_val
), 0xF, NULL
, HFILL
}},
6869 { &hf_scsi_wb_bufferid
,
6870 {"Buffer ID", "scsi.spc.sb.bufid", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6872 { &hf_scsi_wb_bufoffset
,
6873 {"Buffer Offset", "scsi.spc.wb.bufoff", FT_UINT24
, BASE_HEX
, NULL
,
6875 { &hf_scsi_paramlen24
,
6876 {"Parameter List Length", "scsi.cdb.paramlen24", FT_UINT24
, BASE_DEC_HEX
,
6877 NULL
, 0x0, NULL
, HFILL
}},
6878 { &hf_scsi_senddiag_st_code
,
6879 {"Self-Test Code", "scsi.spc.senddiag.code", FT_UINT8
, BASE_HEX
,
6880 VALS(scsi_senddiag_st_code_val
), 0xE0, NULL
, HFILL
}},
6881 { &hf_scsi_select_report
,
6882 {"Select Report", "scsi.spc.select_report", FT_UINT8
, BASE_HEX
,
6883 VALS(scsi_select_report_val
), 0x00, NULL
, HFILL
}},
6884 { &hf_scsi_senddiag_pf
,
6885 {"PF", "scsi.spc.senddiag.pf", FT_BOOLEAN
, 8,
6886 TFS(&scsi_senddiag_pf_val
), 0x10, NULL
, HFILL
}},
6887 { &hf_scsi_senddiag_st
,
6888 {"Self Test", "scsi.spc.senddiag.st", FT_BOOLEAN
, 8, NULL
,
6890 { &hf_scsi_senddiag_devoff
,
6891 {"Device Offline", "scsi.spc.senddiag.devoff", FT_BOOLEAN
, 8,
6892 NULL
, 0x2, NULL
, HFILL
}},
6893 { &hf_scsi_senddiag_unitoff
,
6894 {"Unit Offline", "scsi.spc.senddiag.unitoff", FT_BOOLEAN
, 8,
6895 NULL
, 0x1, NULL
, HFILL
}},
6896 { &hf_scsi_request_frame
,
6897 { "Request in", "scsi.request_frame", FT_FRAMENUM
, BASE_NONE
, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST
), 0,
6898 "Frame number of the request", HFILL
}},
6900 { "Time from request", "scsi.time", FT_RELATIVE_TIME
, BASE_NONE
, NULL
, 0,
6901 "Time between the Command and the Response", HFILL
}},
6902 { &hf_scsi_response_frame
,
6903 { "Response in", "scsi.response_frame", FT_FRAMENUM
, BASE_NONE
, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE
), 0,
6904 "Frame number of the response", HFILL
}},
6905 { &hf_scsi_fragments
,
6906 { "SCSI Fragments", "scsi.fragments", FT_NONE
, BASE_NONE
, NULL
, 0x0,
6908 { &hf_scsi_fragment_overlap
,
6909 { "Fragment overlap", "scsi.fragment.overlap", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
6910 "Fragment overlaps with other fragments", HFILL
}},
6911 { &hf_scsi_fragment_overlap_conflict
,
6912 { "Conflicting data in fragment overlap", "scsi.fragment.overlap.conflict", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
6913 "Overlapping fragments contained conflicting data", HFILL
}},
6914 { &hf_scsi_fragment_multiple_tails
,
6915 { "Multiple tail fragments found", "scsi.fragment.multipletails", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
6916 "Several tails were found when defragmenting the packet", HFILL
}},
6917 { &hf_scsi_fragment_too_long_fragment
,
6918 { "Fragment too long", "scsi.fragment.toolongfragment", FT_BOOLEAN
, BASE_NONE
, NULL
, 0x0,
6919 "Fragment contained data past end of packet", HFILL
}},
6920 { &hf_scsi_fragment_error
,
6921 { "Defragmentation error", "scsi.fragment.error", FT_FRAMENUM
, BASE_NONE
, NULL
, 0x0,
6922 "Defragmentation error due to illegal fragments", HFILL
}},
6923 { &hf_scsi_fragment_count
,
6924 { "Fragment count", "scsi.fragment.count", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
6926 { &hf_scsi_fragment
,
6927 { "SCSI DATA Fragment", "scsi.fragment", FT_FRAMENUM
, BASE_NONE
, NULL
, 0x0,
6929 { &hf_scsi_reassembled_in
,
6930 { "Reassembled SCSI DATA in frame", "scsi.reassembled_in", FT_FRAMENUM
, BASE_NONE
, NULL
, 0x0,
6931 "This SCSI DATA packet is reassembled in this frame", HFILL
}},
6932 { &hf_scsi_reassembled_length
,
6933 { "Reassembled SCSI DATA length", "scsi.reassembled.length", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
6934 "The total length of the reassembled payload", HFILL
}},
6935 { &hf_scsi_log_ppc_flags
,
6936 {"PPC Flags", "scsi.log.ppc.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6939 {"PPC", "scsi.log.ppc", FT_BOOLEAN
, 8,
6940 TFS(&scsi_log_ppc_tfs
), 0x02, NULL
, HFILL
}},
6942 {"PCR", "scsi.log.pcr", FT_BOOLEAN
, 8,
6943 TFS(&scsi_log_pcr_tfs
), 0x02, NULL
, HFILL
}},
6945 {"SP", "scsi.log.sp", FT_BOOLEAN
, 8,
6946 TFS(&scsi_log_sp_tfs
), 0x01, NULL
, HFILL
}},
6947 { &hf_scsi_log_pc_flags
,
6948 {"PC Flags", "scsi.log.pc.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6950 { &hf_scsi_log_parameter_ptr
,
6951 {"Parameter Pointer", "scsi.log.param_ptr", FT_UINT16
, BASE_HEX
, NULL
,
6953 { &hf_scsi_log_page_length
,
6954 {"Page Length", "scsi.log.page_length", FT_UINT16
, BASE_DEC
, NULL
, 0,
6956 { &hf_scsi_log_parameter_code
,
6957 {"Parameter Code", "scsi.log.parameter_code", FT_UINT16
, BASE_HEX
, NULL
, 0,
6959 { &hf_scsi_log_param_flags
,
6960 {"Param Flags", "scsi.log.param.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
6962 { &hf_scsi_log_param_len
,
6963 {"Parameter Len", "scsi.log.param_len", FT_UINT8
, BASE_DEC
, NULL
, 0,
6965 { &hf_scsi_log_param_data
,
6966 {"Parameter Data", "scsi.log.param_data", FT_BYTES
, BASE_NONE
, NULL
, 0,
6968 { &hf_scsi_log_pf_du
,
6969 {"DU", "scsi.log.pf.du", FT_BOOLEAN
, 8, NULL
, 0x80,
6971 { &hf_scsi_log_pf_ds
,
6972 {"DS", "scsi.log.pf.ds", FT_BOOLEAN
, 8, NULL
, 0x40,
6974 { &hf_scsi_log_pf_tsd
,
6975 {"TSD", "scsi.log.pf.tsd", FT_BOOLEAN
, 8, NULL
, 0x20,
6977 { &hf_scsi_log_pf_etc
,
6978 {"ETC", "scsi.log.pf.etc", FT_BOOLEAN
, 8, NULL
, 0x10,
6980 { &hf_scsi_log_pf_tmc
,
6981 {"TMC", "scsi.log.pf.tmc", FT_UINT8
, BASE_HEX
, VALS(log_flags_tmc_vals
), 0x0c,
6983 { &hf_scsi_log_pf_lbin
,
6984 {"LBIN", "scsi.log.pf.lbin", FT_BOOLEAN
, 8, NULL
, 0x02,
6986 { &hf_scsi_log_pf_lp
,
6987 {"LP", "scsi.log.pf.lp", FT_BOOLEAN
, 8, NULL
, 0x01,
6989 { &hf_scsi_log_ta_rw
,
6990 {"Read Warning", "scsi.log.ta.rw", FT_BOOLEAN
, 8, NULL
, 0x01,
6992 { &hf_scsi_log_ta_ww
,
6993 {"write warning", "scsi.log.ta.ww", FT_BOOLEAN
, 8, NULL
, 0x01,
6995 { &hf_scsi_log_ta_he
,
6996 {"hard error", "scsi.log.ta.he", FT_BOOLEAN
, 8, NULL
, 0x01,
6998 { &hf_scsi_log_ta_media
,
6999 {"media", "scsi.log.ta.media", FT_BOOLEAN
, 8, NULL
, 0x01,
7001 { &hf_scsi_log_ta_rf
,
7002 {"read failure", "scsi.log.ta.rf", FT_BOOLEAN
, 8, NULL
, 0x01,
7004 { &hf_scsi_log_ta_wf
,
7005 {"write failure", "scsi.log.ta.wf", FT_BOOLEAN
, 8, NULL
, 0x01,
7007 { &hf_scsi_log_ta_ml
,
7008 {"media life", "scsi.log.ta.ml", FT_BOOLEAN
, 8, NULL
, 0x01,
7010 { &hf_scsi_log_ta_ndg
,
7011 {"not data grade", "scsi.log.ta.ndg", FT_BOOLEAN
, 8, NULL
, 0x01,
7013 { &hf_scsi_log_ta_wp
,
7014 {"write protect", "scsi.log.ta.wp", FT_BOOLEAN
, 8, NULL
, 0x01,
7016 { &hf_scsi_log_ta_nr
,
7017 {"no removal", "scsi.log.ta.nr", FT_BOOLEAN
, 8, NULL
, 0x01,
7019 { &hf_scsi_log_ta_cm
,
7020 {"cleaning media", "scsi.log.ta.cm", FT_BOOLEAN
, 8, NULL
, 0x01,
7022 { &hf_scsi_log_ta_uf
,
7023 {"unsupported format", "scsi.log.ta.uf", FT_BOOLEAN
, 8, NULL
, 0x01,
7025 { &hf_scsi_log_ta_rmcf
,
7026 {"removable mechanical cartridge failure", "scsi.log.ta.rmcf", FT_BOOLEAN
, 8, NULL
, 0x01,
7028 { &hf_scsi_log_ta_umcf
,
7029 {"unrecoverable mechanical cartridge failure", "scsi.log.ta.umcf", FT_BOOLEAN
, 8, NULL
, 0x01,
7031 { &hf_scsi_log_ta_mcicf
,
7032 {"memory chip in cartridge failure", "scsi.log.ta.mcicf", FT_BOOLEAN
, 8, NULL
, 0x01,
7034 { &hf_scsi_log_ta_fe
,
7035 {"forced eject", "scsi.log.ta.fe", FT_BOOLEAN
, 8, NULL
, 0x01,
7037 { &hf_scsi_log_ta_rof
,
7038 {"read only format", "scsi.log.ta.rof", FT_BOOLEAN
, 8, NULL
, 0x01,
7040 { &hf_scsi_log_ta_tdcol
,
7041 {"tape directory corrupted on load", "scsi.log.ta.tdcol", FT_BOOLEAN
, 8, NULL
, 0x01,
7043 { &hf_scsi_log_ta_nml
,
7044 {"nearing media life", "scsi.log.ta.nml", FT_BOOLEAN
, 8, NULL
, 0x01,
7046 { &hf_scsi_log_ta_cn
,
7047 {"clean now", "scsi.log.ta.cn", FT_BOOLEAN
, 8, NULL
, 0x01,
7049 { &hf_scsi_log_ta_cp
,
7050 {"clean periodic", "scsi.log.ta.cp", FT_BOOLEAN
, 8, NULL
, 0x01,
7052 { &hf_scsi_log_ta_ecm
,
7053 {"expired cleaning media", "scsi.log.ta.ecm", FT_BOOLEAN
, 8, NULL
, 0x01,
7055 { &hf_scsi_log_ta_ict
,
7056 {"invalid cleaning tape", "scsi.log.ta.ict", FT_BOOLEAN
, 8, NULL
, 0x01,
7058 { &hf_scsi_log_ta_rr
,
7059 {"retention requested", "scsi.log.ta.rr", FT_BOOLEAN
, 8, NULL
, 0x01,
7061 { &hf_scsi_log_ta_dpie
,
7062 {"dual port interface error", "scsi.log.ta.dpie", FT_BOOLEAN
, 8, NULL
, 0x01,
7064 { &hf_scsi_log_ta_cff
,
7065 {"cooling fan failure", "scsi.log.ta.cff", FT_BOOLEAN
, 8, NULL
, 0x01,
7067 { &hf_scsi_log_ta_psf
,
7068 {"power supply failure", "scsi.log.ta.psf", FT_BOOLEAN
, 8, NULL
, 0x01,
7070 { &hf_scsi_log_ta_pc
,
7071 {"power consumption", "scsi.log.ta.pc", FT_BOOLEAN
, 8, NULL
, 0x01,
7073 { &hf_scsi_log_ta_dm
,
7074 {"drive maintenance", "scsi.log.ta.dm", FT_BOOLEAN
, 8, NULL
, 0x01,
7076 { &hf_scsi_log_ta_hwa
,
7077 {"hardware a", "scsi.log.ta.hwa", FT_BOOLEAN
, 8, NULL
, 0x01,
7079 { &hf_scsi_log_ta_hwb
,
7080 {"hardware b", "scsi.log.ta.hwb", FT_BOOLEAN
, 8, NULL
, 0x01,
7082 { &hf_scsi_log_ta_if
,
7083 {"interface", "scsi.log.ta.if", FT_BOOLEAN
, 8, NULL
, 0x01,
7085 { &hf_scsi_log_ta_em
,
7086 {"eject media", "scsi.log.ta.em", FT_BOOLEAN
, 8, NULL
, 0x01,
7088 { &hf_scsi_log_ta_dwf
,
7089 {"download failed", "scsi.log.ta.dwf", FT_BOOLEAN
, 8, NULL
, 0x01,
7091 { &hf_scsi_log_ta_drhu
,
7092 {"drive humidity", "scsi.log.ta.drhu", FT_BOOLEAN
, 8, NULL
, 0x01,
7094 { &hf_scsi_log_ta_drtm
,
7095 {"drive temperature", "scsi.log.ta.drtm", FT_BOOLEAN
, 8, NULL
, 0x01,
7097 { &hf_scsi_log_ta_drvo
,
7098 {"drive voltage", "scsi.log.ta.drvo", FT_BOOLEAN
, 8, NULL
, 0x01,
7100 { &hf_scsi_log_ta_pefa
,
7101 {"periodic failure", "scsi.log.ta.pefa", FT_BOOLEAN
, 8, NULL
, 0x01,
7103 { &hf_scsi_log_ta_dire
,
7104 {"diagnostics required", "scsi.log.ta.dire", FT_BOOLEAN
, 8, NULL
, 0x01,
7106 { &hf_scsi_log_ta_lost
,
7107 {"lost statistics", "scsi.log.ta.lost", FT_BOOLEAN
, 8, NULL
, 0x01,
7109 { &hf_scsi_log_ta_tduau
,
7110 {"tape directory invalid at unload", "scsi.log.ta.tduau", FT_BOOLEAN
, 8, NULL
, 0x01,
7112 { &hf_scsi_log_ta_tsawf
,
7113 {"tape system area write failure", "scsi.log.ta.tsawf", FT_BOOLEAN
, 8, NULL
, 0x01,
7115 { &hf_scsi_log_ta_tsarf
,
7116 {"tape system area read failure", "scsi.log.ta.tsarf", FT_BOOLEAN
, 8, NULL
, 0x01,
7118 { &hf_scsi_log_ta_nsod
,
7119 {"no start of data", "scsi.log.ta.nsod", FT_BOOLEAN
, 8, NULL
, 0x01,
7121 { &hf_scsi_log_ta_lofa
,
7122 {"loading failure", "scsi.log.ta.lofa", FT_BOOLEAN
, 8, NULL
, 0x01,
7124 { &hf_scsi_log_ta_uuf
,
7125 {"unrecoverable unload failure", "scsi.log.ta.uuf", FT_BOOLEAN
, 8, NULL
, 0x01,
7127 { &hf_scsi_log_ta_aif
,
7128 {"automatic interface failure", "scsi.log.ta.aif", FT_BOOLEAN
, 8, NULL
, 0x01,
7130 { &hf_scsi_log_ta_fwf
,
7131 {"firmware failure", "scsi.log.ta.fwf", FT_BOOLEAN
, 8, NULL
, 0x01,
7133 { &hf_scsi_log_ta_wmicf
,
7134 {"worm medium integrity check failed", "scsi.log.ta.wmicf", FT_BOOLEAN
, 8, NULL
, 0x01,
7136 { &hf_scsi_log_ta_wmoa
,
7137 {"worm medium overwrite attempted", "scsi.log.ta.wmoa", FT_BOOLEAN
, 8, NULL
, 0x01,
7139 { &hf_scsi_sbc_threshold_exponent
,
7140 {"Threshold Exponent", "scsi_sbc.threshold_exponent", FT_UINT8
, BASE_DEC
, NULL
, 0,
7142 { &hf_scsi_sbc_lbpu
,
7143 {"LBPU (logical block provisioning UNMAP)", "scsi_sbc.lbpu", FT_BOOLEAN
, 8, NULL
, 0x80,
7145 { &hf_scsi_sbc_lbpws
,
7146 {"LBPWS (logical block provisioning WRITE SAME)", "scsi_sbc.lbpws", FT_BOOLEAN
, 8, NULL
, 0x40,
7148 { &hf_scsi_sbc_lbpws10
,
7149 {"LBPWS10 (logical block provisioning WRITE SAME (10) )", "scsi_sbc.lbpws10", FT_BOOLEAN
, 8, NULL
, 0x20,
7151 { &hf_scsi_sbc_lbprz
,
7152 {"LBPRZ (logical block provisioning read zeros)", "scsi_sbc.lbprz", FT_BOOLEAN
, 8, NULL
, 0x04,
7154 { &hf_scsi_sbc_anc_sup
,
7155 {"ANC_SUP (anchor supported)", "scsi_sbc.anc_sup", FT_BOOLEAN
, 8, NULL
, 0x02,
7158 {"DP (descriptor present)", "scsi_sbc.dp", FT_BOOLEAN
, 8, NULL
, 0x01,
7160 { &hf_scsi_sbc_ptype
,
7161 {"Provisioning Type", "scsi_sbc.ptype", FT_UINT8
, BASE_DEC
, VALS(provisioning_vals
), 0x07,
7163 { &hf_scsi_block_limits_wsnz
,
7164 {"WSNZ (write same non-zero)", "scsi_sbc.bl.wsnz", FT_BOOLEAN
, 8, NULL
, 0x01,
7166 { &hf_scsi_block_limits_mcawl
,
7167 {"Maximum Compare And Write Length", "scsi_sbc.bl.mcawl", FT_UINT8
, BASE_DEC
, NULL
, 0,
7169 { &hf_scsi_block_limits_otlg
,
7170 {"Optimal Transfer Length Granularity", "scsi_sbc.bl.otlg", FT_UINT16
, BASE_DEC
, NULL
, 0,
7172 { &hf_scsi_block_limits_mtl
,
7173 {"Maximum Transfer Length", "scsi_sbc.bl.mtl", FT_UINT32
, BASE_DEC
, NULL
, 0,
7175 { &hf_scsi_block_limits_otl
,
7176 {"Optimal Transfer Length", "scsi_sbc.bl.otl", FT_UINT32
, BASE_DEC
, NULL
, 0,
7178 { &hf_scsi_block_limits_mpl
,
7179 {"Optimal Prefetch/Xdread/Xdwrite Transfer Length", "scsi_sbc.bl.mpl", FT_UINT32
, BASE_DEC
, NULL
, 0,
7181 { &hf_scsi_block_limits_mulc
,
7182 {"Maximum Unmap LBA Count", "scsi_sbc.bl.mulc", FT_UINT32
, BASE_DEC
, NULL
, 0,
7184 { &hf_scsi_block_limits_mubdc
,
7185 {"Maximum Unmap Block Descriptor Count", "scsi_sbc.bl.mubdc", FT_UINT32
, BASE_DEC
, NULL
, 0,
7187 { &hf_scsi_block_limits_oug
,
7188 {"Optimal Unmap Block Granularity", "scsi_sbc.bl.oug", FT_UINT32
, BASE_DEC
, NULL
, 0,
7190 { &hf_scsi_block_limits_ugavalid
,
7191 {"UGAVALID", "scsi_sbc.bl.ugavalid", FT_BOOLEAN
, 8, NULL
, 0x80,
7193 { &hf_scsi_block_limits_uga
,
7194 {"Unmap Granularity Alignment", "scsi_sbc.bl.uga", FT_UINT32
, BASE_DEC
, NULL
, 0x7fffffff,
7196 { &hf_scsi_block_limits_mwsl
,
7197 {"Maximum Write Same Length", "scsi_sbc.bl.mwsl", FT_UINT64
, BASE_DEC
, NULL
, 0,
7199 { &hf_scsi_block_limits_matl
,
7200 {"Maximum Atomic Transfer Length", "scsi_sbc.bl.matl", FT_UINT32
, BASE_DEC
, NULL
, 0,
7202 { &hf_scsi_block_limits_aa
,
7203 {"Atomic Alignment", "scsi_sbc.bl.aa", FT_UINT32
, BASE_DEC
, NULL
, 0,
7205 { &hf_scsi_block_limits_atlg
,
7206 {"Atomic Transfer Length Granularity", "scsi_sbc.bl.atlg", FT_UINT32
, BASE_DEC
, NULL
, 0,
7208 { &hf_scsi_modepage_ps
,
7209 {"PS", "scsi.spc.modepage.ps", FT_BOOLEAN
, 8, NULL
, 0x80,
7211 { &hf_scsi_modepage_spf
,
7212 {"SPF", "scsi.spc.modepage.spf", FT_BOOLEAN
, 8, NULL
, 0x40,
7214 { &hf_scsi_modepage_plen
,
7215 {"Page Length", "scsi.spc.modepage.plen", FT_UINT16
, BASE_DEC
, NULL
, 0,
7217 { &hf_scsi_modepage_tcmos
,
7218 {"TCMOS", "scsi.spc.modepage.tcmos", FT_BOOLEAN
, 8, NULL
, 0x04,
7220 { &hf_scsi_modepage_scsip
,
7221 {"SCSIP", "scsi.spc.modepage.scsip", FT_BOOLEAN
, 8, NULL
, 0x02,
7223 { &hf_scsi_modepage_ialuae
,
7224 {"IALUAE", "scsi.spc.modepage.ialuae", FT_BOOLEAN
, 8, NULL
, 0x01,
7226 { &hf_scsi_modepage_icp
,
7227 {"Initial Command Priority", "scsi.spc.modepage.icp", FT_UINT8
, BASE_DEC
,
7228 NULL
, 0x0f, NULL
, HFILL
}},
7229 { &hf_scsi_modepage_msdl
,
7230 {"Maximum Sense Data Length", "scsi.spc.modepage.msdl", FT_UINT8
, BASE_DEC
,
7231 NULL
, 0, NULL
, HFILL
}},
7233 { "LUN", "scsi.lun", FT_UINT16
, BASE_HEX
,
7234 NULL
, 0, "Logical Unit Number", HFILL
}},
7235 { &hf_scsi_lun_extended
,
7236 { "LUN", "scsi.lun_long", FT_UINT64
, BASE_HEX
,
7237 NULL
, 0, "Logical Unit Number", HFILL
}},
7238 /* hf_scsi_bus has length of 0x6 with 2bit offset, or 0x3 with no offset
7239 so we handle it with add_bits_item */
7241 { "BUS", "scsi.bus", FT_UINT8
, BASE_HEX
,
7242 NULL
, 0, NULL
, HFILL
}},
7244 { "Target", "scsi.target", FT_UINT8
, BASE_HEX
,
7245 NULL
, 0x3f, NULL
, HFILL
}},
7246 { &hf_scsi_lun_address_mode
,
7247 { "Address Mode", "scsi.lun.address_mode", FT_UINT8
, BASE_HEX
,
7248 VALS(scsi_lun_address_mode_vals
), 0xc0, "Addressing mode for the LUN", HFILL
}},
7249 { &hf_scsi_extended_add_method_len
,
7250 { "Extended Address Method Length", "scsi.lun.extended_address_method.len", FT_UINT8
, BASE_DEC_HEX
,
7251 NULL
, 0x30, "Extended Address Method Specific Field", HFILL
}},
7252 { &hf_scsi_extended_add_method
,
7253 { "Extended Address Method", "scsi.lun.extended_address_method", FT_UINT8
, BASE_HEX
,
7254 NULL
, 0xf, "Extended Logical Unit Addressing", HFILL
}},
7255 { &hf_scsi_prevent_allow_flags
,
7256 {"Prevent Allow Flags", "scsi.prevent_allow.flags", FT_UINT8
, BASE_HEX
, NULL
, 0,
7258 { &hf_scsi_prevent_allow_prevent
,
7259 { "PREVENT", "scsi.prevent_allow.prevent", FT_BOOLEAN
, 8,
7260 NULL
, 0x01, NULL
, HFILL
}},
7261 { &hf_scsi_mpi_service_action
,
7262 { "Service Action", "scsi.mpi.service_action", FT_UINT8
, BASE_HEX
,
7263 VALS(mpi_action_vals
), 0x1f, "Management Protocol In Service Action", HFILL
}},
7264 { &hf_scsi_report_opcodes_rctd
,
7265 { "RCTD", "scsi.report_opcodes.rctd", FT_BOOLEAN
, 8,
7266 NULL
, 0x80, NULL
, HFILL
}},
7267 { &hf_scsi_report_opcodes_options
,
7268 { "Reporting Options", "scsi.report_opcodes.options", FT_UINT8
, BASE_HEX
,
7269 VALS(report_opcodes_options_vals
), 0x07, NULL
, HFILL
}},
7270 { &hf_scsi_report_opcodes_requested_o
,
7271 { "Requested Operation Code", "scsi.report_opcodes.requested_operation_code", FT_UINT8
, BASE_HEX
,
7272 NULL
, 0, NULL
, HFILL
}},
7273 { &hf_scsi_report_opcodes_requested_sa
,
7274 { "Requested Service Action", "scsi.report_opcodes.requested_service_action", FT_UINT16
, BASE_HEX
,
7275 NULL
, 0, NULL
, HFILL
}},
7276 { &hf_scsi_report_opcodes_cdl
,
7277 { "Command Data Length", "scsi.report_opcodes.command_data_length", FT_UINT32
, BASE_DEC
,
7278 NULL
, 0, NULL
, HFILL
}},
7279 { &hf_scsi_report_opcodes_sa
,
7280 { "Service Action", "scsi.report_opcodes.service_action", FT_UINT16
, BASE_DEC
,
7281 NULL
, 0, NULL
, HFILL
}},
7282 { &hf_scsi_report_opcodes_ctdp
,
7283 { "CTDP", "scsi.report_opcodes.ctdp", FT_BOOLEAN
, 8,
7284 NULL
, 0x02, NULL
, HFILL
}},
7285 { &hf_scsi_report_opcodes_ctdp_one
,
7286 { "CTDP", "scsi.report_opcodes_one.ctdp", FT_BOOLEAN
, 8,
7287 NULL
, 0x80, NULL
, HFILL
}},
7288 { &hf_scsi_report_opcodes_servactv
,
7289 { "SERVACTV", "scsi.report_opcodes.servactv", FT_BOOLEAN
, 8,
7290 NULL
, 0x01, NULL
, HFILL
}},
7291 { &hf_scsi_report_opcodes_cdb_length
,
7292 { "CDB Length", "scsi.report_opcodes.cdb_length", FT_UINT16
, BASE_DEC
,
7293 NULL
, 0, NULL
, HFILL
}},
7294 { &hf_scsi_report_opcodes_support
,
7295 { "Support", "scsi.report_opcodes.support", FT_UINT8
, BASE_DEC
,
7296 NULL
, 0x07, NULL
, HFILL
}},
7297 { &hf_scsi_report_opcodes_cdb_usage_data
,
7298 {"CDB Usage Data", "scsi.report_opcodes.cdb_usage_data", FT_BYTES
, BASE_NONE
,
7299 NULL
, 0, NULL
, HFILL
}},
7300 { &hf_scsi_report_opcodes_tdl
,
7301 { "Timeout Descriptor Length", "scsi.report_opcodes.timeout_descriptor_length", FT_UINT16
, BASE_DEC
,
7302 NULL
, 0, NULL
, HFILL
}},
7303 { &hf_scsi_report_opcodes_npt
,
7304 { "Nominal Command Processing Timeout", "scsi.report_opcodes.ncpt", FT_UINT32
, BASE_DEC
,
7305 NULL
, 0, NULL
, HFILL
}},
7306 { &hf_scsi_report_opcodes_rct
,
7307 { "Recommended Command Timeout", "scsi.report_opcodes.rct", FT_UINT32
, BASE_DEC
,
7308 NULL
, 0, NULL
, HFILL
}},
7309 { &hf_scsi_inquiry_bdc_mrr
,
7310 { "Medium Rotation Rate", "scsi.inquiry.bdc.mrr", FT_UINT16
, BASE_DEC
,
7311 VALS(mrr_val
), 0, NULL
, HFILL
}},
7312 { &hf_scsi_inquiry_bdc_pt
,
7313 { "Product Type", "scsi.inquiry.bdc.pt", FT_UINT8
, BASE_DEC
,
7314 NULL
, 0, NULL
, HFILL
}},
7315 { &hf_scsi_inquiry_bdc_wabereq
,
7316 { "WABEREQ", "scsi.inquiry.bdc.wabereq", FT_UINT8
, BASE_DEC
,
7317 NULL
, 0xc0, NULL
, HFILL
}},
7318 { &hf_scsi_inquiry_bdc_wacereq
,
7319 { "WACEREQ", "scsi.inquiry.bdc.wacereq", FT_UINT8
, BASE_DEC
,
7320 NULL
, 0x30, NULL
, HFILL
}},
7321 { &hf_scsi_inquiry_bdc_nff
,
7322 { "Nominal Form factor", "scsi.inquiry.bdc.nff", FT_UINT8
, BASE_DEC
,
7323 NULL
, 0x0f, NULL
, HFILL
}},
7324 { &hf_scsi_inquiry_bdc_fuab
,
7325 { "FUAB", "scsi.inquiry.bdc.fuab", FT_BOOLEAN
, 8,
7326 NULL
, 0x02, NULL
, HFILL
}},
7327 { &hf_scsi_inquiry_bdc_vbuls
,
7328 { "VBULS", "scsi.inquiry.bdc.vbuls", FT_BOOLEAN
, 8,
7329 NULL
, 0x01, NULL
, HFILL
}},
7331 /* Generated from convert_proto_tree_add_text.pl */
7332 { &hf_scsi_inq_evpd_page_length
, { "Page Length", "scsi.inquiry.evpd.pagelength", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7333 { &hf_scsi_inq_evpd_supported_page
, { "Supported Page", "scsi.inquiry.evpd.supported_page", FT_UINT8
, BASE_HEX
, VALS(scsi_evpd_pagecode_val
), 0x0, NULL
, HFILL
}},
7334 { &hf_scsi_inq_evpd_devid_code_set
, { "Code Set", "scsi.inquiry.evpd.devid.code_set", FT_UINT8
, BASE_HEX
, VALS(scsi_devid_codeset_val
), 0x0F, NULL
, HFILL
}},
7335 { &hf_scsi_inq_evpd_devid_association
, { "Association", "scsi.inquiry.evpd.devid.association", FT_UINT8
, BASE_HEX
, VALS(scsi_devid_assoc_val
), 0x30, NULL
, HFILL
}},
7336 { &hf_scsi_inq_evpd_devid_identifier_type
, { "Identifier Type", "scsi.inquiry.evpd.devid.identifier_type", FT_UINT8
, BASE_HEX
, VALS(scsi_devid_idtype_val
), 0x0F, NULL
, HFILL
}},
7337 { &hf_scsi_inq_evpd_identifier_number
, { "Identifier Number", "scsi.inquiry.evpd.identifier_number", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7338 { &hf_scsi_inq_evpd_devid_identifier_length
, { "Identifier Length", "scsi.inquiry.evpd.devid.identifier_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7339 { &hf_scsi_inq_evpd_devid_identifier_str
, { "Identifier", "scsi.inquiry.evpd.devid.identifier_str", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7340 { &hf_scsi_inq_evpd_devid_identifier_bytes
, { "Identifier", "scsi.inquiry.evpd.devid.identifier_bytes", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7341 { &hf_scsi_inq_evpd_product_serial_number
, { "Product Serial Number", "scsi.inquiry.evpd.product_serial_number", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7342 { &hf_scsi_inq_cmddt_support
, { "Support", "scsi.inquiry.cmddt.support", FT_UINT8
, BASE_DEC
, VALS(scsi_cmdt_supp_val
), 0x07, NULL
, HFILL
}},
7343 { &hf_scsi_inq_cmddt_version
, { "Version", "scsi.inquiry.cmddt.version", FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &scsi_verdesc_val_ext
, 0x0, NULL
, HFILL
}},
7344 { &hf_scsi_inq_cmddt_cdb_size
, { "CDB Size", "scsi.inquiry.cmddt.cdb_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7345 { &hf_scsi_blockdescs_no_of_blocks64
, { "No. of Blocks", "scsi.blockdescs.no_of_blocks64", FT_UINT64
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7346 { &hf_scsi_blockdescs_density_code
, { "Density Code", "scsi.blockdescs.density_code", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7347 { &hf_scsi_blockdescs_block_length32
, { "Block Length", "scsi.blockdescs.block_length", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7348 { &hf_scsi_blockdescs_no_of_blocks32
, { "No. of Blocks", "scsi.blockdescs.no_of_blocks", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7349 { &hf_scsi_blockdescs_block_length24
, { "Block Length", "scsi.blockdescs.block_length", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7350 { &hf_scsi_blockdescs_no_of_blocks24
, { "No. of Blocks", "scsi.blockdescs.no_of_blocks", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7351 { &hf_scsi_spc_modepage_gltsd
, { "Global Logging Target Save Disable", "scsi.spc.modepage.gltsd", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7352 { &hf_scsi_spc_modepage_disable_queuing
, { "Disable Queuing", "scsi.spc.modepage.disable_queuing", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7353 { &hf_scsi_spc_modepage_swp
, { "SWP", "scsi.spc.modepage.swp", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7354 { &hf_scsi_spc_modepage_autoload_mode
, { "Autoload Mode", "scsi.spc.modepage.autoload_mode", FT_UINT8
, BASE_HEX
, NULL
, 0x07, NULL
, HFILL
}},
7355 { &hf_scsi_spc_modepage_ready_aer_holdoff_period
, { "Ready AER Holdoff Period (ms)", "scsi.spc.modepage.ready_aer_holdoff_period", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7356 { &hf_scsi_spc_modepage_busy_timeout_period
, { "Busy Timeout Period (ms)", "scsi.spc.modepage.busy_timeout_period", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7357 { &hf_scsi_spc_modepage_extended_self_test_completion_time
, { "Extended Self-Test Completion Time", "scsi.spc.modepage.extended_self_test_completion_time", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7358 { &hf_scsi_spc_modepage_buffer_full_ratio
, { "Buffer Full Ratio", "scsi.spc.modepage.buffer_full_ratio", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7359 { &hf_scsi_spc_modepage_buffer_empty_ratio
, { "Buffer Empty Ratio", "scsi.spc.modepage.buffer_empty_ratio", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7360 { &hf_scsi_spc_modepage_bus_inactivity_limit
, { "Bus Inactivity Limit", "scsi.spc.modepage.bus_inactivity_limit", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7361 { &hf_scsi_spc_modepage_disconnect_time_limit
, { "Disconnect Time Limit", "scsi.spc.modepage.disconnect_time_limit", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7362 { &hf_scsi_spc_modepage_connect_time_limit
, { "Connect Time Limit", "scsi.spc.modepage.connect_time_limit", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7363 { &hf_scsi_spc_modepage_maximum_burst_size
, { "Maximum Burst Size (bytes)", "scsi.spc.modepage.maximum_burst_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7364 { &hf_scsi_spc_modepage_emdp
, { "EMDP", "scsi.spc.modepage.emdp", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7365 { &hf_scsi_spc_modepage_first_burst_size
, { "First Burst Size (bytes)", "scsi.spc.modepage.first_burst_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7366 { &hf_scsi_spc_modepage_perf
, { "Perf", "scsi.spc.modepage.perf", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7367 { &hf_scsi_spc_modepage_interval_timer
, { "Interval Timer", "scsi.spc.modepage.interval_timer", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7368 { &hf_scsi_spc_modepage_report_count
, { "Report Count", "scsi.spc.modepage.report_count", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7369 { &hf_scsi_spc_modepage_idle
, { "Idle", "scsi.spc.modepage.idle", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7370 { &hf_scsi_spc_modepage_idle_condition_timer
, { "Idle Condition Timer (ms)", "scsi.spc.modepage.idle_condition_timer", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7371 { &hf_scsi_spc_modepage_standby_condition_timer
, { "Standby Condition Timer (ms)", "scsi.spc.modepage.standby_condition_timer", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7372 { &hf_scsi_spc_modepage_dtfd
, { "DTFD", "scsi.spc.modepage.dtfd", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7373 { &hf_scsi_spc_modepage_rr_tov_units
, { "RR_TOV Units", "scsi.spc.modepage.rr_tov_units", FT_UINT8
, BASE_DEC
, VALS(scsi_fcp_rrtov_val
), 0x07, NULL
, HFILL
}},
7374 { &hf_scsi_spc_modepage_rr_tov
, { "RR_TOV", "scsi.spc.modepage.rr_tov", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7375 { &hf_scsi_sbc_modepage_tracks_per_zone
, { "Tracks Per Zone", "scsi.sbc.modepage.tracks_per_zone", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7376 { &hf_scsi_sbc_modepage_alternate_sectors_per_zone
, { "Alternate Sectors Per Zone", "scsi.sbc.modepage.alternate_sectors_per_zone", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7377 { &hf_scsi_sbc_modepage_alternate_tracks_per_zone
, { "Alternate Tracks Per Zone", "scsi.sbc.modepage.alternate_tracks_per_zone", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7378 { &hf_scsi_sbc_modepage_alternate_tracks_per_lu
, { "Alternate Tracks Per LU", "scsi.sbc.modepage.alternate_tracks_per_lu", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7379 { &hf_scsi_sbc_modepage_sectors_per_track
, { "Sectors Per Track", "scsi.sbc.modepage.sectors_per_track", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7380 { &hf_scsi_sbc_modepage_data_bytes_per_physical_sector
, { "Data Bytes Per Physical Sector", "scsi.sbc.modepage.data_bytes_per_physical_sector", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7381 { &hf_scsi_sbc_modepage_interleave
, { "Interleave", "scsi.sbc.modepage.interleave", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7382 { &hf_scsi_sbc_modepage_track_skew_factor
, { "Track Skew Factor", "scsi.sbc.modepage.track_skew_factor", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7383 { &hf_scsi_sbc_modepage_cylinder_skew_factor
, { "Cylinder Skew Factor", "scsi.sbc.modepage.cylinder_skew_factor", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7384 { &hf_scsi_sbc_modepage_ssec
, { "SSEC", "scsi.sbc.modepage.ssec", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7385 { &hf_scsi_sbc_modepage_awre
, { "AWRE", "scsi.sbc.modepage.awre", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7386 { &hf_scsi_sbc_modepage_read_retry_count
, { "Read Retry Count", "scsi.sbc.modepage.read_retry_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7387 { &hf_scsi_sbc_modepage_correction_span
, { "Correction Span", "scsi.sbc.modepage.correction_span", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7388 { &hf_scsi_sbc_modepage_head_offset_count
, { "Head Offset Count", "scsi.sbc.modepage.head_offset_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7389 { &hf_scsi_sbc_modepage_data_strobe_offset_count
, { "Data Strobe Offset Count", "scsi.sbc.modepage.data_strobe_offset_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7390 { &hf_scsi_sbc_modepage_write_retry_count
, { "Write Retry Count", "scsi.sbc.modepage.write_retry_count", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7391 { &hf_scsi_sbc_modepage_recovery_time_limit
, { "Recovery Time Limit (ms)", "scsi.sbc.modepage.recovery_time_limit", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7392 { &hf_scsi_sbc_modepage_number_of_cylinders
, { "Number of Cylinders", "scsi.sbc.modepage.number_of_cylinders", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7393 { &hf_scsi_sbc_modepage_number_of_heads
, { "Number of Heads", "scsi.sbc.modepage.number_of_heads", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7394 { &hf_scsi_sbc_modepage_starting_cyl_pre_compensation
, { "Starting Cyl Pre-compensation", "scsi.sbc.modepage.starting_cyl_pre_compensation", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7395 { &hf_scsi_sbc_modepage_starting_cyl_reduced_write_current
, { "Starting Cyl-reduced Write Current", "scsi.sbc.modepage.starting_cyl_reduced_write_current", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7396 { &hf_scsi_sbc_modepage_device_step_rate
, { "Device Step Rate", "scsi.sbc.modepage.device_step_rate", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7397 { &hf_scsi_sbc_modepage_landing_zone_cyl
, { "Landing Zone Cyl", "scsi.sbc.modepage.landing_zone_cyl", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7398 { &hf_scsi_sbc_modepage_rotational_offset
, { "Rotational Offset", "scsi.sbc.modepage.rotational_offset", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7399 { &hf_scsi_sbc_modepage_medium_rotation_rate
, { "Medium Rotation Rate", "scsi.sbc.modepage.medium_rotation_rate", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7400 { &hf_scsi_sbc_modepage_ic
, { "IC", "scsi.sbc.modepage.ic", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7401 { &hf_scsi_sbc_modepage_demand_read_retention_priority
, { "Demand Read Retention Priority", "scsi.sbc.modepage.demand_read_retention_priority", FT_UINT8
, BASE_DEC
, NULL
, 0xF0, NULL
, HFILL
}},
7402 { &hf_scsi_sbc_modepage_disable_pre_fetch_xfer_len
, { "Disable Pre-fetch Xfer Len", "scsi.sbc.modepage.disable_pre_fetch_xfer_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7403 { &hf_scsi_sbc_modepage_minimum_pre_fetch
, { "Minimum Pre-Fetch", "scsi.sbc.modepage.minimum_pre_fetch", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7404 { &hf_scsi_sbc_modepage_maximum_pre_fetch
, { "Maximum Pre-Fetch", "scsi.sbc.modepage.maximum_pre_fetch", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7405 { &hf_scsi_sbc_modepage_maximum_pre_fetch_ceiling
, { "Maximum Pre-Fetch Ceiling", "scsi.sbc.modepage.maximum_pre_fetch_ceiling", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7406 { &hf_scsi_sbc_modepage_fsw
, { "FSW", "scsi.sbc.modepage.fsw", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7407 { &hf_scsi_sbc_modepage_number_of_cache_segments
, { "Number of Cache Segments", "scsi.sbc.modepage.number_of_cache_segments", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7408 { &hf_scsi_sbc_modepage_cache_segment_size
, { "Cache Segment Size", "scsi.sbc.modepage.cache_segment_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7409 { &hf_scsi_sbc_modepage_non_cache_segment_size
, { "Non-Cache Segment Size", "scsi.sbc.modepage.non_cache_segment_size", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7410 { &hf_scsi_ssc2_modepage_dce
, { "DCE", "scsi.ssc2.modepage.dce", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7411 { &hf_scsi_ssc2_modepage_dde
, { "DDE", "scsi.ssc2.modepage.dde", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7412 { &hf_scsi_ssc2_modepage_compression_algorithm
, { "Compression algorithm", "scsi.ssc2.modepage.compression_algorithm", FT_UINT32
, BASE_HEX
, VALS(compression_algorithm_vals
), 0x0, NULL
, HFILL
}},
7413 { &hf_scsi_ssc2_modepage_decompression_algorithm
, { "Decompression algorithm", "scsi.ssc2.modepage.decompression_algorithm", FT_UINT32
, BASE_HEX
, VALS(compression_algorithm_vals
), 0x0, NULL
, HFILL
}},
7414 { &hf_scsi_ssc2_modepage_caf
, { "CAF", "scsi.ssc2.modepage.caf", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7415 { &hf_scsi_ssc2_modepage_active_partition
, { "Active Partition", "scsi.ssc2.modepage.active_partition", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7416 { &hf_scsi_ssc2_modepage_write_object_buffer_full_ratio
, { "Write Object Buffer Full Ratio", "scsi.ssc2.modepage.write_object_buffer_full_ratio", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7417 { &hf_scsi_ssc2_modepage_read_object_buffer_empty_ratio
, { "Read Object Buffer Empty Ratio", "scsi.ssc2.modepage.read_object_buffer_empty_ratio", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7418 { &hf_scsi_ssc2_modepage_write_delay_time
, { "Write Delay time", "scsi.ssc2.modepage.write_delay_time", FT_UINT16
, BASE_DEC
|BASE_UNIT_STRING
, UNS(&units_100_milliseconds
), 0x0, NULL
, HFILL
}},
7419 { &hf_scsi_ssc2_modepage_obr
, { "OBR", "scsi.ssc2.modepage.obr", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7420 { &hf_scsi_ssc2_modepage_gap_size
, { "Gap Size", "scsi.ssc2.modepage.gap_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7421 { &hf_scsi_ssc2_modepage_eod_defined
, { "EOD Defined", "scsi.ssc2.modepage.eod_defined", FT_UINT8
, BASE_DEC
, NULL
, 0xE0, NULL
, HFILL
}},
7422 { &hf_scsi_ssc2_modepage_object_buffer_size_at_early_warning
, { "Object Buffer Size At Early Warning", "scsi.ssc2.modepage.object_buffer_size_at_early_warning", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7423 { &hf_scsi_ssc2_modepage_select_data_compression_algorithm
, { "Select Data Compression Algorithm", "scsi.ssc2.modepage.select_data_compression_algorithm", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7424 { &hf_scsi_ssc2_modepage_oir
, { "OIR", "scsi.ssc2.modepage.oir", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7425 { &hf_scsi_ssc2_modepage_maximum_additional_partitions
, { "Maximum Additional Partitions", "scsi.ssc2.modepage.maximum_additional_partitions", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7426 { &hf_scsi_ssc2_modepage_additional_partitions_defined
, { "Additional Partitions Defined", "scsi.ssc2.modepage.additional_partitions_defined", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7427 { &hf_scsi_ssc2_modepage_fdp
, { "FDP", "scsi.ssc2.modepage.fdp", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7428 { &hf_scsi_ssc2_modepage_media_format_recognition
, { "Media Format Recognition", "scsi.ssc2.modepage.media_format_recognition", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7429 { &hf_scsi_ssc2_modepage_partition_units
, { "Partition Units", "scsi.ssc2.modepage.partition_units", FT_UINT8
, BASE_DEC
, NULL
, 0x0F, NULL
, HFILL
}},
7430 { &hf_scsi_ssc2_modepage_partition_size
, { "Partition Size", "scsi.ssc2.modepage.partition_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7431 { &hf_scsi_mmc5_modepage_lba_space
, { "LBA Space", "scsi.mmc5.modepage.lba_space", FT_UINT8
, BASE_DEC
, NULL
, 0x01, NULL
, HFILL
}},
7432 { &hf_scsi_mmc5_modepage_bufe
, { "BUFE", "scsi.mmc5.modepage.bufe", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7433 { &hf_scsi_mmc5_modepage_wrparam_multi_session
, { "Multi-session", "scsi.mmc5.modepage.wrparam_multi_session", FT_UINT8
, BASE_DEC
, NULL
, 0xC0, NULL
, HFILL
}},
7434 { &hf_scsi_mmc5_modepage_data_block_type
, { "Data Block Type", "scsi.mmc5.modepage.data_block_type", FT_UINT8
, BASE_DEC
, NULL
, 0x0F, NULL
, HFILL
}},
7435 { &hf_scsi_mmc5_modepage_link_size
, { "Link Size", "scsi.mmc5.modepage.link_size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7436 { &hf_scsi_mmc5_modepage_initiator_application_code
, { "Initiator Application Code", "scsi.mmc5.modepage.initiator_application_code", FT_UINT8
, BASE_DEC
, NULL
, 0x3F, NULL
, HFILL
}},
7437 { &hf_scsi_mmc5_modepage_session_format
, { "Session Format", "scsi.mmc5.modepage.session_format", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7438 { &hf_scsi_mmc5_modepage_packet_size
, { "Packet Size", "scsi.mmc5.modepage.packet_size", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7439 { &hf_scsi_mmc5_modepage_audio_pause_length
, { "Audio Pause Length", "scsi.mmc5.modepage.audio_pause_length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7440 { &hf_scsi_mmc5_modepage_media_catalog_number
, { "Media Catalog Number", "scsi.mmc5.modepage.media_catalog_number", FT_STRINGZ
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7441 { &hf_scsi_mmc5_modepage_international_standard_recording_code
, { "International Standard Recording Code", "scsi.mmc5.modepage.international_standard_recording_code", FT_STRINGZ
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7442 { &hf_scsi_mmc5_modepage_sub_header_byte
, { "Sub-header Byte", "scsi.mmc5.modepage.sub_header_byte", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7443 { &hf_scsi_mmc5_modepage_vendor_specific
, { "Vendor Specific", "scsi.mmc5.modepage.vendor_specific", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7444 { &hf_scsi_mmc5_modepage_dvd_ram_read
, { "DVD-RAM Read", "scsi.mmc5.modepage.dvd_ram_read", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7445 { &hf_scsi_mmc5_modepage_dvd_ram_write
, { "DVD-RAM Write", "scsi.mmc5.modepage.dvd_ram_write", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7446 { &hf_scsi_mmc5_modepage_buf
, { "BUF", "scsi.mmc5.modepage.buf", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7447 { &hf_scsi_mmc5_modepage_read_bar_code
, { "Read Bar Code", "scsi.mmc5.modepage.read_bar_code", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7448 { &hf_scsi_mmc5_modepage_loading_mechanism_type
, { "Loading Mechanism Type", "scsi.mmc5.modepage.loading_mechanism_type", FT_UINT8
, BASE_DEC
, NULL
, 0xE0, NULL
, HFILL
}},
7449 { &hf_scsi_mmc5_modepage_rw_in_lead_in
, { "R-W in Lead-in", "scsi.mmc5.modepage.rw_in_lead_in", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7450 { &hf_scsi_mmc5_modepage_number_of_volume_levels_supported
, { "Number of Volume Levels Supported", "scsi.mmc5.modepage.number_of_volume_levels_supported", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7451 { &hf_scsi_mmc5_modepage_buffer_size_supported
, { "Buffer Size Supported", "scsi.mmc5.modepage.buffer_size_supported", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7452 { &hf_scsi_mmc5_modepage_length
, { "Length", "scsi.mmc5.modepage.length", FT_UINT8
, BASE_DEC
, NULL
, 0x30, NULL
, HFILL
}},
7453 { &hf_scsi_mmc5_modepage_copy_management_revision_support
, { "Copy Management Revision Support", "scsi.mmc5.modepage.copy_management_revision_support", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7454 { &hf_scsi_mmc5_modepage_rotation_control_selected
, { "Rotation Control Selected", "scsi.mmc5.modepage.rotation_control_selected", FT_UINT8
, BASE_DEC
, NULL
, 0x03, NULL
, HFILL
}},
7455 { &hf_scsi_mmc5_modepage_current_write_speed_selected
, { "Current Write Speed Selected", "scsi.mmc5.modepage.current_write_speed_selected", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7456 { &hf_scsi_mmc5_modepage_num_write_speed_performance
, { "Number of Logical Unit Write Speed Performance Descriptor Tables", "scsi.mmc5.modepage.num_write_speed_performance", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7457 { &hf_scsi_smc_modepage_first_medium_transport_element_address
, { "First Medium Transport Element Address", "scsi.mode.smc.first_medium_transport_element_address", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7458 { &hf_scsi_smc_modepage_number_of_medium_transport_elements
, { "Number of Medium Transport Elements", "scsi.mode.smc.number_of_medium_transport_elements", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7459 { &hf_scsi_smc_modepage_first_storage_element_address
, { "First Storage Element Address", "scsi.mode.smc.first_storage_element_address", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7460 { &hf_scsi_smc_modepage_number_of_storage_elements
, { "Number of Storage Elements", "scsi.mode.smc.number_of_storage_elements", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7461 { &hf_scsi_smc_modepage_first_import_export_element_address
, { "First Import/Export Element Address", "scsi.mode.smc.first_import_export_element_address", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7462 { &hf_scsi_smc_modepage_number_of_import_export_elements
, { "Number of Import/Export Elements", "scsi.mode.smc.number_of_import_export_elements", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7463 { &hf_scsi_smc_modepage_first_data_transfer_element_address
, { "First Data Transfer Element Address", "scsi.mode.smc.first_data_transfer_element_address", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7464 { &hf_scsi_smc_modepage_number_of_data_transfer_elements
, { "Number of Data Transfer Elements", "scsi.mode.smc.number_of_data_transfer_elements", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7465 { &hf_scsi_smc_modepage_stordt
, { "STORDT", "scsi.mode.smc.stordt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7466 { &hf_scsi_smc_modepage_mt_dt
, { "MT->DT", "scsi.mode.smc.mt_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7467 { &hf_scsi_smc_modepage_st_dt
, { "ST->DT", "scsi.mode.smc.st_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7468 { &hf_scsi_smc_modepage_ie_dt
, { "I/E->DT", "scsi.mode.smc.ie_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7469 { &hf_scsi_smc_modepage_dt_dt
, { "DT->DT", "scsi.mode.smc.dt_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7470 { &hf_scsi_smc_modepage_mt_ne_dt
, { "MT<>DT", "scsi.mode.smc.mt_ne_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7471 { &hf_scsi_smc_modepage_st_ne_dt
, { "ST<>DT", "scsi.mode.smc.st_ne_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7472 { &hf_scsi_smc_modepage_ie_ne_dt
, { "I/E<>DT", "scsi.mode.smc.ie_ne_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7473 { &hf_scsi_smc_modepage_dt_ne_dt
, { "DT<>DT", "scsi.mode.smc.dt_ne_dt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7474 { &hf_scsi_modesel_mode_data_length8
, { "Mode Data Length", "scsi.cdb.mode.mode_data_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7475 { &hf_scsi_modesel_dev_sbc_medium_type
, { "Medium Type", "scsi.cdb.mode.medium_type", FT_UINT8
, BASE_HEX
, VALS(scsi_modesense_medtype_sbc_val
), 0x0, NULL
, HFILL
}},
7476 { &hf_scsi_modesel_medium_type
, { "Medium Type", "scsi.cdb.mode.medium_type", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7477 { &hf_scsi_modesel_device_specific_parameter
, { "Device-Specific Parameter", "scsi.cdb.mode.device_specific_parameter", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7478 { &hf_scsi_modesel_block_descriptor_length8
, { "Block Descriptor Length", "scsi.cdb.mode.block_descriptor_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7479 { &hf_scsi_modesel_mode_data_length16
, { "Mode Data Length", "scsi.cdb.mode.mode_data_length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7480 { &hf_scsi_modesel_longlba
, { "LongLBA", "scsi.cdb.mode.longlba", FT_UINT8
, BASE_DEC
, NULL
, 0x01, NULL
, HFILL
}},
7481 { &hf_scsi_modesel_block_descriptor_length16
, { "Block Descriptor Length", "scsi.cdb.mode.block_descriptor_length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7482 { &hf_scsi_persresvin_generation_number
, { "Generation Number", "scsi.persresvin.generation_number", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7483 { &hf_scsi_persresvin_additional_length
, { "Additional Length", "scsi.persresvin.additional_length", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7484 { &hf_scsi_reportluns_lun_list_length
, { "LUN List Length", "scsi.reportluns.lun_list_length", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7485 { &hf_scsi_sns_valid
, { "Valid", "scsi.sns.valid", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7486 { &hf_scsi_sns_filemark
, { "Filemark", "scsi.sns.filemark", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
7487 { &hf_scsi_sns_command_specific_information
, { "Command-Specific Information", "scsi.sns.command_specific_information", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7488 { &hf_scsi_spc_modepage_report_log_exception_condition
, { "Report Log Exception Condition", "scsi.spc.modepage.report_log_exception_condition", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7489 { &hf_scsi_spc_modepage_faa
, { "FAA", "scsi.spc.modepage.faa", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7490 { &hf_scsi_spc_modepage_fab
, { "FAB", "scsi.spc.modepage.fab", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7491 { &hf_scsi_spc_modepage_fac
, { "FAC", "scsi.spc.modepage.fac", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7492 { &hf_scsi_spc_modepage_ebf
, { "EBF", "scsi.spc.modepage.ebf", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7493 { &hf_scsi_spc_modepage_ewasc
, { "EWasc", "scsi.spc.modepage.ewasc", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7494 { &hf_scsi_spc_modepage_dexcpt
, { "DExcpt", "scsi.spc.modepage.dexcpt", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7495 { &hf_scsi_spc_modepage_test
, { "Test", "scsi.spc.modepage.test", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7496 { &hf_scsi_spc_modepage_logerr
, { "LogErr", "scsi.spc.modepage.logerr", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7497 { &hf_scsi_spc_modepage_standby
, { "Standby", "scsi.spc.modepage.standby", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7498 { &hf_scsi_spc_modepage_plpb
, { "PLPB", "scsi.spc.modepage.plpb", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7499 { &hf_scsi_spc_modepage_ddis
, { "DDIS", "scsi.spc.modepage.ddis", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7500 { &hf_scsi_spc_modepage_dlm
, { "DLM", "scsi.spc.modepage.dlm", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7501 { &hf_scsi_spc_modepage_rha
, { "RHA", "scsi.spc.modepage.rha", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7502 { &hf_scsi_spc_modepage_alwi
, { "ALWI", "scsi.spc.modepage.alwi", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7503 { &hf_scsi_spc_modepage_dtipe
, { "DTIPE", "scsi.spc.modepage.dtipe", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7504 { &hf_scsi_spc_modepage_dtoli
, { "DTOLI", "scsi.spc.modepage.dtoli", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7505 { &hf_scsi_sbc_modepage_hsec
, { "HSEC", "scsi.sbc.modepage.hsec", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7506 { &hf_scsi_sbc_modepage_rmb
, { "RMB", "scsi.sbc.modepage.rmb", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7507 { &hf_scsi_sbc_modepage_surf
, { "SURF", "scsi.sbc.modepage.surf", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7508 { &hf_scsi_sbc_modepage_arre
, { "ARRE", "scsi.sbc.modepage.arre", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7509 { &hf_scsi_sbc_modepage_tb
, { "TB", "scsi.sbc.modepage.tb", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7510 { &hf_scsi_sbc_modepage_rc
, { "RC", "scsi.sbc.modepage.rc", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7511 { &hf_scsi_sbc_modepage_eer
, { "EER", "scsi.sbc.modepage.eer", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7512 { &hf_scsi_sbc_modepage_per
, { "PER", "scsi.sbc.modepage.per", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7513 { &hf_scsi_sbc_modepage_dte
, { "DTE", "scsi.sbc.modepage.dte", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7514 { &hf_scsi_sbc_modepage_dcr
, { "DCR", "scsi.sbc.modepage.dcr", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7515 { &hf_scsi_sbc_modepage_abpf
, { "ABPF", "scsi.sbc.modepage.abpf", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7516 { &hf_scsi_sbc_modepage_cap
, { "CAP", "scsi.sbc.modepage.cap", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7517 { &hf_scsi_sbc_modepage_disc
, { "Disc", "scsi.sbc.modepage.disc", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7518 { &hf_scsi_sbc_modepage_size
, { "Size", "scsi.sbc.modepage.size", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7519 { &hf_scsi_sbc_modepage_wce
, { "WCE", "scsi.sbc.modepage.wce", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7520 { &hf_scsi_sbc_modepage_mf
, { "MF", "scsi.sbc.modepage.mf", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7521 { &hf_scsi_sbc_modepage_rcd
, { "RCD", "scsi.sbc.modepage.rcd", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7522 { &hf_scsi_sbc_modepage_write_retention_priority
, { "Write Retention Priority", "scsi.sbc.modepage.write_retention_priority", FT_UINT8
, BASE_DEC
, NULL
, 0x0F, NULL
, HFILL
}},
7523 { &hf_scsi_sbc_modepage_lbcss
, { "LBCSS", "scsi.sbc.modepage.lbcss", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7524 { &hf_scsi_sbc_modepage_dra
, { "DRA", "scsi.sbc.modepage.dra", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7525 { &hf_scsi_sbc_modepage_vendor_specific
, { "Vendor Specific", "scsi.sbc.modepage.vendor_specific", FT_UINT8
, BASE_DEC
, NULL
, 0x1F, NULL
, HFILL
}},
7526 { &hf_scsi_ssc2_modepage_dcc
, { "DCC", "scsi.ssc2.modepage.dcc", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7527 { &hf_scsi_ssc2_modepage_red
, { "RED", "scsi.ssc2.modepage.red", FT_UINT8
, BASE_DEC
, NULL
, 0x60, NULL
, HFILL
}},
7528 { &hf_scsi_ssc2_modepage_active_format
, { "Active Format", "scsi.ssc2.modepage.active_format", FT_UINT8
, BASE_DEC
, NULL
, 0x1F, NULL
, HFILL
}},
7529 { &hf_scsi_ssc2_modepage_lois
, { "LOIS", "scsi.ssc2.modepage.lois", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7530 { &hf_scsi_ssc2_modepage_rsmk
, { "RSMK", "scsi.ssc2.modepage.rsmk", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7531 { &hf_scsi_ssc2_modepage_avc
, { "AVC", "scsi.ssc2.modepage.avc", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7532 { &hf_scsi_ssc2_modepage_socf
, { "SOCF", "scsi.ssc2.modepage.socf", FT_UINT8
, BASE_DEC
, NULL
, 0x0C, NULL
, HFILL
}},
7533 { &hf_scsi_ssc2_modepage_robo
, { "ROBO", "scsi.ssc2.modepage.robo", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7534 { &hf_scsi_ssc2_modepage_rew
, { "REW", "scsi.ssc2.modepage.rew", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7535 { &hf_scsi_ssc2_modepage_eeg
, { "EEG", "scsi.ssc2.modepage.eeg", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7536 { &hf_scsi_ssc2_modepage_sew
, { "SEW", "scsi.ssc2.modepage.sew", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7537 { &hf_scsi_ssc2_modepage_swp
, { "SWP", "scsi.ssc2.modepage.swp", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7538 { &hf_scsi_ssc2_modepage_baml
, { "BAML", "scsi.ssc2.modepage.baml", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7539 { &hf_scsi_ssc2_modepage_bam
, { "BAM", "scsi.ssc2.modepage.bam", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7540 { &hf_scsi_ssc2_modepage_rewind_on_reset
, { "ReWind on Reset", "scsi.ssc2.modepage.rewind_on_reset", FT_UINT8
, BASE_DEC
, NULL
, 0x18, NULL
, HFILL
}},
7541 { &hf_scsi_ssc2_modepage_asocwp
, { "ASOCWP", "scsi.ssc2.modepage.asocwp", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7542 { &hf_scsi_ssc2_modepage_perswp
, { "PERSWP", "scsi.ssc2.modepage.perswp", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7543 { &hf_scsi_ssc2_modepage_prmwp
, { "PRMWP", "scsi.ssc2.modepage.prmwp", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7544 { &hf_scsi_ssc2_modepage_dsp
, { "DSP", "scsi.ssc2.modepage.dsp", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7545 { &hf_scsi_ssc2_modepage_idp
, { "IDP", "scsi.ssc2.modepage.idp", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7546 { &hf_scsi_ssc2_modepage_psum
, { "PSUM", "scsi.ssc2.modepage.psum", FT_UINT8
, BASE_DEC
, NULL
, 0x18, NULL
, HFILL
}},
7547 { &hf_scsi_ssc2_modepage_pofm
, { "POFM", "scsi.ssc2.modepage.pofm", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7548 { &hf_scsi_ssc2_modepage_clear
, { "CLEAR", "scsi.ssc2.modepage.clear", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7549 { &hf_scsi_ssc2_modepage_addp
, { "ADDP", "scsi.ssc2.modepage.addp", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7550 { &hf_scsi_mmc5_modepage_ls_v
, { "LS_V", "scsi.mmc5.modepage.ls_v", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7551 { &hf_scsi_mmc5_modepage_wrparam_test_write
, { "Test Write", "scsi.mmc5.modepage.wrparam_test_write", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7552 { &hf_scsi_mmc5_modepage_write_type
, { "Write Type", "scsi.mmc5.modepage.write_type", FT_UINT8
, BASE_DEC
, NULL
, 0x0F, NULL
, HFILL
}},
7553 { &hf_scsi_mmc5_modepage_fp
, { "FP", "scsi.mmc5.modepage.fp", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7554 { &hf_scsi_mmc5_modepage_copy
, { "Copy", "scsi.mmc5.modepage.copy", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7555 { &hf_scsi_mmc5_modepage_track_mode
, { "Track Mode", "scsi.mmc5.modepage.track_mode", FT_UINT8
, BASE_DEC
, NULL
, 0x0F, NULL
, HFILL
}},
7556 { &hf_scsi_mmc5_modepage_dvd_r_read
, { "DVD-R Read", "scsi.mmc5.modepage.dvd_r_read", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7557 { &hf_scsi_mmc5_modepage_dvd_rom_read
, { "DVD-ROM Read", "scsi.mmc5.modepage.dvd_rom_read", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7558 { &hf_scsi_mmc5_modepage_method_2
, { "Method 2", "scsi.mmc5.modepage.method_2", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7559 { &hf_scsi_mmc5_modepage_cd_rw_read
, { "CD-RW Read", "scsi.mmc5.modepage.cd_rw_read", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7560 { &hf_scsi_mmc5_modepage_cd_r_read
, { "CD-R Read", "scsi.mmc5.modepage.cd_r_read", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7561 { &hf_scsi_mmc5_modepage_dvd_r_write
, { "DVD-R Write", "scsi.mmc5.modepage.dvd_r_write", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7562 { &hf_scsi_mmc5_modepage_dvd_rom_write
, { "DVD-ROM Write", "scsi.mmc5.modepage.dvd_rom_write", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7563 { &hf_scsi_mmc5_modepage_mmcap_test_write
, { "Test Write", "scsi.mmc5.modepage.mmcap_test_write", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7564 { &hf_scsi_mmc5_modepage_cd_rw_write
, { "CD-RW Write", "scsi.mmc5.modepage.cd_rw_write", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7565 { &hf_scsi_mmc5_modepage_cd_r_write
, { "CD-R Write", "scsi.mmc5.modepage.cd_r_write", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7566 { &hf_scsi_mmc5_modepage_mmcap_multi_session
, { "Multi Session", "scsi.mmc5.modepage.mmcap_multi_session", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7567 { &hf_scsi_mmc5_modepage_mode_2_form2
, { "Mode 2 Form 2", "scsi.mmc5.modepage.mode_2_form2", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7568 { &hf_scsi_mmc5_modepage_mode_2_form1
, { "Mode 2 Form 1", "scsi.mmc5.modepage.mode_2_form1", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7569 { &hf_scsi_mmc5_modepage_digital_port2
, { "Digital Port (2)", "scsi.mmc5.modepage.digital_port2", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7570 { &hf_scsi_mmc5_modepage_digital_port1
, { "Digital Port (1)", "scsi.mmc5.modepage.digital_port1", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7571 { &hf_scsi_mmc5_modepage_composite
, { "Composite", "scsi.mmc5.modepage.composite", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7572 { &hf_scsi_mmc5_modepage_audio_play
, { "Audio Play", "scsi.mmc5.modepage.audio_play", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7573 { &hf_scsi_mmc5_modepage_upc
, { "UPC", "scsi.mmc5.modepage.upc", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7574 { &hf_scsi_mmc5_modepage_isrc
, { "ISRC", "scsi.mmc5.modepage.isrc", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7575 { &hf_scsi_mmc5_modepage_c2_pointers_supported
, { "C2 Pointers supported", "scsi.mmc5.modepage.c2_pointers_supported", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7576 { &hf_scsi_mmc5_modepage_rw_deinterleaved_corrected
, { "R-W Deinterleaved & corrected", "scsi.mmc5.modepage.rw_deinterleaved_corrected", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7577 { &hf_scsi_mmc5_modepage_rw_supported
, { "R-W Supported", "scsi.mmc5.modepage.rw_supported", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7578 { &hf_scsi_mmc5_modepage_cd_da_stream_is_accurate
, { "CD-DA Stream is Accurate", "scsi.mmc5.modepage.cd_da_stream_is_accurate", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7579 { &hf_scsi_mmc5_modepage_cd_da_cmds_supported
, { "CD-DA Cmds Supported", "scsi.mmc5.modepage.cd_da_cmds_supported", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7580 { &hf_scsi_mmc5_modepage_eject
, { "Eject", "scsi.mmc5.modepage.eject", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7581 { &hf_scsi_mmc5_modepage_prevent_jumper
, { "Prevent Jumper", "scsi.mmc5.modepage.prevent_jumper", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7582 { &hf_scsi_mmc5_modepage_lock_state
, { "Lock State", "scsi.mmc5.modepage.lock_state", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7583 { &hf_scsi_mmc5_modepage_lock
, { "Lock", "scsi.mmc5.modepage.lock", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7584 { &hf_scsi_mmc5_modepage_side_change_capable
, { "Side Change Capable", "scsi.mmc5.modepage.side_change_capable", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
7585 { &hf_scsi_mmc5_modepage_sw_slot_selection
, { "S/W Slot Selection", "scsi.mmc5.modepage.sw_slot_selection", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
7586 { &hf_scsi_mmc5_modepage_changer_supports_disc_present
, { "Changer Supports Disc Present", "scsi.mmc5.modepage.changer_supports_disc_present", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7587 { &hf_scsi_mmc5_modepage_separate_channel_mute
, { "Separate Channel Mute", "scsi.mmc5.modepage.separate_channel_mute", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7588 { &hf_scsi_mmc5_modepage_separate_volume_levels
, { "Separate volume levels", "scsi.mmc5.modepage.separate_volume_levels", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7589 { &hf_scsi_mmc5_modepage_lsbf
, { "LSBF", "scsi.mmc5.modepage.lsbf", FT_UINT8
, BASE_DEC
, NULL
, 0x30, NULL
, HFILL
}},
7590 { &hf_scsi_mmc5_modepage_rck
, { "RCK", "scsi.mmc5.modepage.rck", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7591 { &hf_scsi_mmc5_modepage_bckf
, { "BCKF", "scsi.mmc5.modepage.bckf", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7592 { &hf_scsi_smc_modepage_storie
, { "STORI/E", "scsi.mode.smc.storie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7593 { &hf_scsi_smc_modepage_storst
, { "STORST", "scsi.mode.smc.storst", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7594 { &hf_scsi_smc_modepage_stormt
, { "STORMT", "scsi.mode.smc.stormt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7595 { &hf_scsi_smc_modepage_mt_ie
, { "MT->I/E", "scsi.mode.smc.mt_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7596 { &hf_scsi_smc_modepage_mt_st
, { "MT->ST", "scsi.mode.smc.mt_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7597 { &hf_scsi_smc_modepage_mt_mt
, { "MT->MT", "scsi.mode.smc.mt_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7598 { &hf_scsi_smc_modepage_st_ie
, { "ST->I/E", "scsi.mode.smc.st_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7599 { &hf_scsi_smc_modepage_st_st
, { "ST->ST", "scsi.mode.smc.st_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7600 { &hf_scsi_smc_modepage_st_mt
, { "ST->MT", "scsi.mode.smc.st_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7601 { &hf_scsi_smc_modepage_ie_ie
, { "I/E->I/E", "scsi.mode.smc.ie_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7602 { &hf_scsi_smc_modepage_ie_st
, { "I/E->ST", "scsi.mode.smc.ie_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7603 { &hf_scsi_smc_modepage_ie_mt
, { "I/E->MT", "scsi.mode.smc.ie_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7604 { &hf_scsi_smc_modepage_dt_ie
, { "DT->I/E", "scsi.mode.smc.dt_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7605 { &hf_scsi_smc_modepage_dt_st
, { "DT->ST", "scsi.mode.smc.dt_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7606 { &hf_scsi_smc_modepage_dt_mt
, { "DT->MT", "scsi.mode.smc.dt_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7607 { &hf_scsi_smc_modepage_mt_ne_ie
, { "MT<>I/E", "scsi.mode.smc.mt_ne_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7608 { &hf_scsi_smc_modepage_mt_ne_st
, { "MT<>ST", "scsi.mode.smc.mt_ne_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7609 { &hf_scsi_smc_modepage_mt_ne_mt
, { "MT<>MT", "scsi.mode.smc.mt_ne_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7610 { &hf_scsi_smc_modepage_st_ne_ie
, { "ST<>I/E", "scsi.mode.smc.st_ne_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7611 { &hf_scsi_smc_modepage_st_ne_st
, { "ST<>ST", "scsi.mode.smc.st_ne_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7612 { &hf_scsi_smc_modepage_st_ne_mt
, { "ST<>MT", "scsi.mode.smc.st_ne_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7613 { &hf_scsi_smc_modepage_ie_ne_ie
, { "I/E<>I/E", "scsi.mode.smc.ie_ne_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7614 { &hf_scsi_smc_modepage_ie_ne_st
, { "I/E<>ST", "scsi.mode.smc.ie_ne_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7615 { &hf_scsi_smc_modepage_ie_ne_mt
, { "I/E<>MT", "scsi.mode.smc.ie_ne_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7616 { &hf_scsi_smc_modepage_dt_ne_ie
, { "DT<>I/E", "scsi.mode.smc.dt_ne_ie", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
7617 { &hf_scsi_smc_modepage_dt_ne_st
, { "DT<>ST", "scsi.mode.smc.dt_ne_st", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
7618 { &hf_scsi_smc_modepage_dt_ne_mt
, { "DT<>MT", "scsi.mode.smc.dt_ne_mt", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
7619 { &hf_scsi_sns_eom
, { "EOM", "scsi.sns.eom", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
7620 { &hf_scsi_sns_ili
, { "ILI", "scsi.sns.ili", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
7621 { &hf_scsi_spc_xcopy_service
, { "Service action", "scsi.extcopy.service_action", FT_UINT8
, BASE_HEX
, VALS(extcopy_service_vals
), 0x0, NULL
, HFILL
}},
7622 { &hf_scsi_spc_recv_copy_service
, { "Service action", "scsi.recv_copy.service_action", FT_UINT8
, BASE_HEX
, VALS(recv_copy_service_vals
), 0x1F, NULL
, HFILL
}},
7623 { &hf_scsi_spc_xcopy_param_list_len
, { "Parameter list length (bytes)", "scsi.extcopy.param_list_len", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7624 { &hf_scsi_spc_xcopy_param_list_format
, { "List format", "scsi.extcopy.list_format", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7625 { &hf_scsi_spc_xcopy_head_cscd_desc_list_len
, { "Header cscd descriptor list length", "scsi.extcopy.hdr_cscd_list_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7626 { &hf_scsi_spc_xcopy_cscd_desc_list_len
, { "CSCD descriptor list length", "scsi.extcopy.cscd_list_len", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7627 { &hf_scsi_spc_xcopy_inline_data_len
, { "Inline data length", "scsi.extcopy.inline_data_len", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7628 { &hf_scsi_spc_xcopy_seg_desc_list_len
, { "Segment descriptor list length", "scsi.extcopy.seg_desc_list_len", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7629 { &hf_scsi_spc_xcopy_list_id
, { "List ID", "scsi.extcopy.list_id", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7630 { &hf_scsi_spc_xcopy_head_cscd_desc_type_code
, { "Header CSCD description type code", "scsi.extcopy.head_cscd_desc_type_code", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7631 { &hf_scsi_spc_xcopy_cscd_desc_type_code
, { "CSCD description type code", "scsi.cscd_desc_type_code", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(desc_type_rval
), 0x0, NULL
, HFILL
}},
7632 { &hf_scsi_spc_xcopy_rel_init_port_id
, { "Relative Initiator Port ID", "scsi.extcopy.rel_init_port_id", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7633 { &hf_scsi_spc_xcopy_per_dev_type
, { "Peripheral Device Type", "scsi.extcopy.per_dev_type", FT_UINT8
, BASE_DEC
, VALS(per_dev_type_vals
), 0x1F, NULL
, HFILL
}},
7634 { &hf_scsi_spc_xcopy_lu_type
, { "LU type", "scsi.extcopy.lu_type", FT_UINT8
, BASE_DEC
, VALS(lu_type_vals
), 0xC0, NULL
, HFILL
}},
7635 { &hf_scsi_spc_xcopy_per_dev_type_byte
, { "Peripheral Device Type bits", "scsi.extcopy.per_dev_type_byte", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7636 { &hf_scsi_spc_xcopy_disk_block_len
, { "Disk block length", "scsi.extcopy.disk_block_len", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7637 { &hf_scsi_spc_xcopy_cscd_desc_code_set
, { "CSCD descriptor code set", "scsi.extcopy.cscd_code_set", FT_UINT8
, BASE_DEC
, VALS(scsi_devid_codeset_val
), 0x0F, NULL
, HFILL
}},
7638 { &hf_scsi_spc_xcopy_cscd_desc_assoc
, { "CSCD descriptor association", "scsi.extcopy.cscd_assoc", FT_UINT8
, BASE_DEC
, VALS(scsi_devid_assoc_val
), 0x30, NULL
, HFILL
}},
7639 { &hf_scsi_spc_xcopy_cscd_desc_des_type
, { "CSCD descriptor designator type", "scsi.extcopy.cscd_des_type", FT_UINT8
, BASE_DEC
, VALS(scsi_devid_idtype_val
), 0x0F, NULL
, HFILL
}},
7640 { &hf_scsi_spc_xcopy_cscd_desc_des_len
, { "CSCD descriptor designator length", "scsi.extcopy.cscd_des_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7641 { &hf_scsi_spc_xcopy_seg_desc_type
, { "Segment descriptor type code", "scsi.extcopy.seg_desc_type", FT_UINT8
, BASE_DEC
|BASE_RANGE_STRING
, RVALS(desc_type_rval
), 0x0, NULL
, HFILL
}},
7642 { &hf_scsi_spc_xcopy_seg_desc_dc
, { "Segment descriptor designation count bit", "scsi.extcopy.seg_desc_dc", FT_UINT8
, BASE_DEC
, NULL
, 0x2, NULL
, HFILL
}},
7643 { &hf_scsi_spc_xcopy_seg_desc_cat
, { "Segment descriptor CAT bit", "scsi.extcopy.seg_desc_cat", FT_UINT8
, BASE_DEC
, NULL
, 0x1, NULL
, HFILL
}},
7644 { &hf_scsi_spc_xcopy_seg_des_src_desc_id
, { "Segment descriptor source ID", "scsi.extcopy.seg_desc_src_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7645 { &hf_scsi_spc_xcopy_seg_des_dest_desc_id
, { "Segment descriptor destination ID", "scsi.extcopy.seg_desc_dest_id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7646 { &hf_scsi_spc_xcopy_num_of_blocks
, { "Number of blocks", "scsi.extcopy.seg_desc_num_of_blocks", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7647 { &hf_scsi_spc_xcopy_param_list_id_usage
, { "List ID usage", "scsi.extcopy.xcopy_param_list_id_usage", FT_UINT8
, BASE_HEX
, NULL
, 0x18, NULL
, HFILL
}},
7648 { &hf_scsi_spc_xcopy_param_str
, { "Sequential strip bit (str)", "scsi.extcopy.xcopy_param_str", FT_UINT8
, BASE_HEX
, NULL
, 0x20, NULL
, HFILL
}},
7649 { &hf_scsi_spc_xcopy_param_priority
, { "Priority", "scsi.extcopy.xcopy_param_priority", FT_UINT8
, BASE_HEX
, NULL
, 0x7, NULL
, HFILL
}},
7650 { &hf_scsi_spc_xcopy_param_byte
, { "Extended copy Parameters: str, list ID usage, priority", "scsi.extcopy.xcopy_params_byte", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7651 { &hf_scsi_spc_xcopy_source_lba
, { "Source LBA", "scsi.extcopy.source_lba", FT_UINT64
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7652 { &hf_scsi_spc_xcopy_dest_lba
, { "Destination LBA", "scsi.extcopy.dest_lba", FT_UINT64
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7653 { &hf_scsi_recv_copy_max_cscd_desc_count
, { "Max. CSCD descriptors count", "scsi.recv_copy.max_cscd_desc_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7654 { &hf_scsi_recv_copy_max_seg_desc_count
, { "Max. segment descriptors count", "scsi.recv_copy.max_seg_desc_count", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7655 { &hf_scsi_recv_copy_max_desc_list_len
, { "Max. descriptor list length", "scsi.recv_copy.max_desc_list_len", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7656 { &hf_scsi_recv_copy_max_seg_len
, { "Max. segment length", "scsi.recv_copy.max_seg_len", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7657 { &hf_scsi_recv_copy_max_inline_data_len
, { "Max. inline data length", "scsi.recv_copy.max_inline_data_len", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7658 { &hf_scsi_recv_copy_held_data_limit
, { "Held data limit", "scsi.recv_copy.max_held_data_limit", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7659 { &hf_scsi_recv_copy_max_stream_dev_trans_size
, { "Max. stream device transfer size", "scsi.recv_copy.max_stream_dev_trans_size", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7660 { &hf_scsi_recv_copy_snlid
, { "SNLID bit", "scsi.recv_copy.snlid", FT_UINT8
, BASE_DEC
, NULL
, 0x1, NULL
, HFILL
}},
7661 { &hf_scsi_recv_copy_avail_data
, { "Available data", "scsi.recv_copy.avail_data", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7662 { &hf_scsi_recv_copy_total_con_copies
, { "Total number of concurrent copies", "scsi.recv_copy.total_con_copies", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7663 { &hf_scsi_recv_copy_max_con_copies
, { "Max. number of concurrent copies", "scsi.recv_copy.max_con_copies", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7664 { &hf_scsi_recv_copy_data_seg_gran
, { "Data segment granularity", "scsi.recv_copy.data_seg_gran", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7665 { &hf_scsi_recv_copy_inline_data_gran
, { "Inline data granularity", "scsi.recv_copy.inline_data_gran", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7666 { &hf_scsi_recv_copy_held_data_gran
, { "Held data granularity", "scsi.recv_copy.held_data_gran", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7667 { &hf_scsi_recv_copy_implemented_desc_list_len
, { "Implemented description list length", "scsi.recv_copy.implemented_desc_list_len", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7668 { &hf_scsi_designator
, { "Designator", "scsi.designator", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7669 { &hf_scsi_segment_descriptor_length
, { "Segment descriptor length (bytes)", "scsi.segment_descriptor_length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7670 { &hf_scsi_inline_data
, { "Inline data", "scsi.inline_data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7671 { &hf_scsi_reserved_8
, { "Reserved (1 byte)", "scsi.reserved", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7672 { &hf_scsi_reserved_16
, { "Reserved (2 bytes)", "scsi.reserved2", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7673 { &hf_scsi_reserved_24
, { "Reserved (3 bytes)", "scsi.reserved3", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7674 { &hf_scsi_reserved_32
, { "Reserved (4 bytes)", "scsi.reserved4", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7675 { &hf_scsi_reserved_64
, { "Reserved (8 bytes)", "scsi.reserved8", FT_UINT64
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
7676 { &hf_scsi_naa_type
, { "NAA Designator Type", "scsi.naa.type", FT_UINT8
, BASE_DEC
, VALS(scsi_naa_designator_type_val
), 0xF0, NULL
, HFILL
}},
7677 { &hf_scsi_naa_locally_assigned
, { "Locally Assigned", "scsi.naa.locally_assigned", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
7678 { &hf_scsi_naa_ieee_company_id
, { "IEEE Company ID", "scsi.naa.ieee_company_id", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7679 { &hf_scsi_naa_vendor_specific
, { "Vendor Specific Identifier", "scsi.naa.vendor_specific", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
7680 { &hf_scsi_naa_vendor_specific_extension
, { "Vendor Specific Identifier Extension", "scsi.naa.vendor_specific.extension", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}}
7683 /* Setup protocol subtree array */
7684 static int *ett
[] = {
7688 &ett_scsi_inq_control
,
7689 &ett_scsi_inq_peripheral
,
7690 &ett_scsi_inq_acaflags
,
7691 &ett_scsi_inq_rmbflags
,
7692 &ett_scsi_inq_sccsflags
,
7693 &ett_scsi_inq_bqueflags
,
7694 &ett_scsi_inq_reladrflags
,
7698 &ett_scsi_log_param
,
7699 &ett_scsi_fragments
,
7701 &ett_persresv_control
,
7704 &ett_scsi_prevent_allow
,
7705 &ett_command_descriptor
,
7706 &ett_timeout_descriptor
,
7707 &ett_sense_descriptor
,
7708 &ett_sense_osd_not_initiated
,
7709 &ett_sense_osd_completed
,
7710 &ett_xcopy_per_dev_type
,
7711 &ett_scsi_xcopy_dev_params
,
7712 &ett_scsi_xcopy_cscds
,
7713 &ett_scsi_xcopy_cscd
,
7714 &ett_scsi_xcopy_segs
,
7715 &ett_scsi_xcopy_seg
,
7716 &ett_scsi_xcopy_seg_param
,
7717 &ett_xcopy_param_byte
,
7718 &ett_scsi_cscd_desc
,
7719 &ett_scsi_designation_descriptor
,
7723 static ei_register_info ei
[] = {
7724 { &ei_scsi_product_data_goes_past_end_of_page
, { "scsi.product_data_goes_past_end_of_page", PI_MALFORMED
, PI_WARN
, "Product data goes past end of page", EXPFILL
}},
7725 { &ei_scsi_unknown_page
, { "scsi.unknown_page", PI_UNDECODED
, PI_WARN
, "Unknown Page", EXPFILL
}},
7726 { &ei_scsi_no_dissection_for_service_action
, { "scsi.no_dissection_for_service_action", PI_UNDECODED
, PI_WARN
, "No dissection for this service action yet", EXPFILL
}},
7727 { &ei_scsi_unknown_scsi_exchange
, { "scsi.unknown_scsi_exchange", PI_PROTOCOL
, PI_WARN
, "Unknown SCSI exchange, can not decode SCSI data", EXPFILL
}},
7728 { &ei_scsi_unknown_serv_action
, { "scsi.unknown_serv_action", PI_PROTOCOL
, PI_WARN
, "Unknown serv_action", EXPFILL
}},
7731 module_t
*scsi_module
;
7732 expert_module_t
* expert_scsi
;
7734 /* Register the protocol name and description */
7735 proto_scsi
= proto_register_protocol("SCSI", "SCSI", "scsi");
7737 /* Required function calls to register the header fields and subtrees used */
7738 proto_register_field_array(proto_scsi
, hf
, array_length(hf
));
7739 proto_register_subtree_array(ett
, array_length(ett
));
7740 expert_scsi
= expert_register_protocol(proto_scsi
);
7741 expert_register_field_array(expert_scsi
, ei
, array_length(ei
));
7743 /* add preferences to decode SCSI message */
7744 scsi_module
= prefs_register_protocol(proto_scsi
, NULL
);
7745 prefs_register_enum_preference(scsi_module
, "decode_scsi_messages_as",
7746 "Decode SCSI Messages As",
7747 "When Target Cannot Be Identified, Decode SCSI Messages As",
7749 scsi_devtype_options
,
7752 prefs_register_bool_preference(scsi_module
, "defragment",
7753 "Reassemble fragmented SCSI DATA IN/OUT transfers",
7754 "Whether fragmented SCSI DATA IN/OUT transfers should be reassembled",
7756 reassembly_table_register(&scsi_reassembly_table
,
7757 &addresses_reassembly_table_functions
);
7759 register_srt_table(proto_scsi
, NULL
, 1, scsistat_packet
, scsistat_init
, scsistat_param
);
7761 scsi_tap
= register_tap("scsi");
7765 * Editor modelines - https://www.wireshark.org/tools/modelines.html
7770 * indent-tabs-mode: nil
7773 * vi: set shiftwidth=4 tabstop=8 expandtab:
7774 * :indentSize=4:tabSize=8:noTabs=true: