1 /* based on SSC3 spec */
3 * dissect READPOSITION data
4 * dissect REPORTDENSITYSUPPORT data
7 * Dissector for the SCSI SSC commandset
8 * Extracted from packet-scsi.c
10 * Dinesh G Dutt (ddutt@cisco.com)
11 * Ronnie sahlberg 2006
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
17 * Copyright 2002 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 #include <epan/packet.h>
38 #include <epan/conversation.h>
40 #include "packet-scsi.h"
41 #include "packet-fc.h"
42 #include "packet-scsi-ssc.h"
43 #include "packet-scsi-smc.h"
46 static int proto_scsi_ssc
= -1;
47 int hf_scsi_ssc_opcode
= -1;
48 static int hf_scsi_ssc_rdwr6_xferlen
= -1;
49 static int hf_scsi_ssc_ver16_verlen
= -1;
50 static int hf_scsi_ssc_locate10_loid
= -1;
51 static int hf_scsi_ssc_locate16_loid
= -1;
52 static int hf_scsi_ssc_space6_code
= -1;
53 static int hf_scsi_ssc_space6_count
= -1;
54 static int hf_scsi_ssc_space16_count
= -1;
55 static int hf_scsi_ssc_erase_flags
= -1;
56 static int hf_scsi_ssc_fcs
= -1;
57 static int hf_scsi_ssc_lcs
= -1;
58 static int hf_scsi_ssc_erase_immed
= -1;
59 static int hf_scsi_ssc_long
= -1;
60 static int hf_scsi_ssc_partition
= -1;
61 static int hf_scsi_ssc_lbi
= -1;
62 static int hf_scsi_ssc_verify
= -1;
63 static int hf_scsi_ssc_immed
= -1;
64 static int hf_scsi_ssc_formatmedium_flags
= -1;
65 static int hf_scsi_ssc_format
= -1;
66 static int hf_scsi_ssc_rdwr10_xferlen
= -1;
67 static int hf_scsi_ssc_loadunload_immed_flags
= -1;
68 static int hf_scsi_ssc_loadunload_flags
= -1;
69 static int hf_scsi_ssc_hold
= -1;
70 static int hf_scsi_ssc_eot
= -1;
71 static int hf_scsi_ssc_reten
= -1;
72 static int hf_scsi_ssc_load
= -1;
73 static int hf_scsi_ssc_locate_flags
= -1;
74 static int hf_scsi_ssc_bt
= -1;
75 static int hf_scsi_ssc_cp
= -1;
76 static int hf_scsi_ssc_dest_type
= -1;
77 static int hf_scsi_ssc_bam_flags
= -1;
78 static int hf_scsi_ssc_bam
= -1;
79 static int hf_scsi_ssc_read6_flags
= -1;
80 static int hf_scsi_ssc_sili
= -1;
81 static int hf_scsi_ssc_fixed
= -1;
82 static int hf_scsi_ssc_bytord
= -1;
83 static int hf_scsi_ssc_bytcmp
= -1;
84 static int hf_scsi_ssc_verify16_immed
= -1;
85 static int hf_scsi_ssc_medium_type
= -1;
86 static int hf_scsi_ssc_media
= -1;
87 static int hf_scsi_ssc_capacity_prop_value
= -1;
89 static gint ett_scsi_erase
= -1;
90 static gint ett_scsi_formatmedium
= -1;
91 static gint ett_scsi_loadunload_immed
= -1;
92 static gint ett_scsi_loadunload
= -1;
93 static gint ett_scsi_locate
= -1;
94 static gint ett_scsi_bam
= -1;
95 static gint ett_scsi_read6
= -1;
99 dissect_ssc_read6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
100 guint offset
, gboolean isreq
, gboolean iscdb
,
101 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
103 static const int *read6_fields
[] = {
110 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
111 tvb_get_ntoh24 (tvb
, offset
+1));
114 if (tree
&& isreq
&& iscdb
) {
115 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
116 ett_scsi_read6
, read6_fields
, ENC_BIG_ENDIAN
);
117 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
118 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
119 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
124 dissect_ssc_recoverbuffereddata (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
125 guint offset
, gboolean isreq
, gboolean iscdb
,
126 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
128 static const int *recover_fields
[] = {
135 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
136 tvb_get_ntoh24 (tvb
, offset
+1));
139 if (tree
&& isreq
&& iscdb
) {
140 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
141 ett_scsi_read6
, recover_fields
, ENC_BIG_ENDIAN
);
142 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
143 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
144 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
149 dissect_ssc_reportdensitysupport (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
150 guint offset
, gboolean isreq
, gboolean iscdb
,
151 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
153 static const int *rd_fields
[] = {
154 &hf_scsi_ssc_medium_type
,
160 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
161 tvb_get_ntoh24 (tvb
, offset
+1));
167 if (isreq
&& iscdb
) {
168 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
169 ett_scsi_read6
, rd_fields
, ENC_BIG_ENDIAN
);
170 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
171 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
172 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
174 /* XXX decode the data */
179 dissect_ssc_readreverse6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
180 guint offset
, gboolean isreq
, gboolean iscdb
,
181 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
183 static const int *rr6_fields
[] = {
191 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
192 tvb_get_ntoh24 (tvb
, offset
+1));
195 if (tree
&& isreq
&& iscdb
) {
196 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
197 ett_scsi_read6
, rr6_fields
, ENC_BIG_ENDIAN
);
198 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
199 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
200 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
205 dissect_ssc_read16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
206 guint offset
, gboolean isreq
, gboolean iscdb
,
207 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
209 static const int *read6_fields
[] = {
216 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
217 tvb_get_ntoh24 (tvb
, offset
+1));
220 if (tree
&& isreq
&& iscdb
) {
221 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
222 ett_scsi_read6
, read6_fields
, ENC_BIG_ENDIAN
);
223 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
224 proto_tree_add_item (tree
, hf_scsi_ssc_locate16_loid
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
225 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+11, 3, ENC_BIG_ENDIAN
);
226 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
227 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
232 dissect_ssc_write16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
233 guint offset
, gboolean isreq
, gboolean iscdb
,
234 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
236 static const int *write16_fields
[] = {
244 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
245 tvb_get_ntoh24 (tvb
, offset
+1));
248 if (tree
&& isreq
&& iscdb
) {
249 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
250 ett_scsi_read6
, write16_fields
, ENC_BIG_ENDIAN
);
251 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
252 proto_tree_add_item (tree
, hf_scsi_ssc_locate16_loid
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
253 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+11, 3, ENC_BIG_ENDIAN
);
254 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
255 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
260 dissect_ssc_writefilemarks16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
261 guint offset
, gboolean isreq
, gboolean iscdb
,
262 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
264 static const int *wf16_fields
[] = {
272 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
273 tvb_get_ntoh24 (tvb
, offset
+1));
276 if (tree
&& isreq
&& iscdb
) {
277 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
278 ett_scsi_read6
, wf16_fields
, ENC_BIG_ENDIAN
);
279 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
280 proto_tree_add_item (tree
, hf_scsi_ssc_locate16_loid
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
281 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+11, 3, ENC_BIG_ENDIAN
);
282 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
283 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
288 dissect_ssc_verify16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
289 guint offset
, gboolean isreq
, gboolean iscdb
,
290 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
292 static const int *verify16_fields
[] = {
293 &hf_scsi_ssc_verify16_immed
,
300 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
301 tvb_get_ntoh24 (tvb
, offset
+1));
304 if (tree
&& isreq
&& iscdb
) {
305 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
306 ett_scsi_read6
, verify16_fields
, ENC_BIG_ENDIAN
);
307 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
308 proto_tree_add_item (tree
, hf_scsi_ssc_locate16_loid
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
309 proto_tree_add_item (tree
, hf_scsi_ssc_ver16_verlen
, tvb
, offset
+11, 3, ENC_BIG_ENDIAN
);
310 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
311 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
316 dissect_ssc_verify6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
317 guint offset
, gboolean isreq
, gboolean iscdb
,
318 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
320 static const int *verify6_fields
[] = {
321 &hf_scsi_ssc_verify16_immed
,
328 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
329 tvb_get_ntoh24 (tvb
, offset
+1));
332 if (tree
&& isreq
&& iscdb
) {
333 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
334 ett_scsi_read6
, verify6_fields
, ENC_BIG_ENDIAN
);
335 proto_tree_add_item (tree
, hf_scsi_ssc_ver16_verlen
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
336 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
337 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
342 dissect_ssc_readreverse16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
343 guint offset
, gboolean isreq
, gboolean iscdb
,
344 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
346 static const int *rr16_fields
[] = {
354 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
355 tvb_get_ntoh24 (tvb
, offset
+1));
358 if (tree
&& isreq
&& iscdb
) {
359 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
360 ett_scsi_read6
, rr16_fields
, ENC_BIG_ENDIAN
);
361 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
362 proto_tree_add_item (tree
, hf_scsi_ssc_locate16_loid
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
363 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+11, 3, ENC_BIG_ENDIAN
);
364 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
365 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
370 dissect_ssc_write6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
371 guint offset
, gboolean isreq
, gboolean iscdb
,
372 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
374 static const int *write6_fields
[] = {
379 if (isreq
&& iscdb
) {
380 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
381 tvb_get_ntoh24 (tvb
, offset
+1));
384 if (tree
&& isreq
&& iscdb
) {
385 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
386 ett_scsi_read6
, write6_fields
, ENC_BIG_ENDIAN
);
387 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
388 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
389 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
394 dissect_ssc_writefilemarks6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
395 guint offset
, gboolean isreq
, gboolean iscdb
,
396 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
398 static const int *wf6_fields
[] = {
404 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Len: %u)",
405 tvb_get_ntoh24 (tvb
, offset
+1));
408 if (tree
&& isreq
&& iscdb
) {
409 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
410 ett_scsi_read6
, wf6_fields
, ENC_BIG_ENDIAN
);
411 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr6_xferlen
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
412 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
413 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
418 dissect_ssc_loadunload (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
419 guint offset
, gboolean isreq
, gboolean iscdb
,
420 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
422 static const int *loadunload_immed_fields
[] = {
426 static const int *loadunload_fields
[] = {
434 if (isreq
&& iscdb
) {
435 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Immed: %u)",
436 tvb_get_guint8 (tvb
, offset
) & 0x01);
443 if (isreq
&& iscdb
) {
444 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_loadunload_immed_flags
,
445 ett_scsi_loadunload_immed
, loadunload_immed_fields
, ENC_BIG_ENDIAN
);
446 proto_tree_add_bitmask(tree
, tvb
, offset
+3, hf_scsi_ssc_loadunload_flags
,
447 ett_scsi_loadunload
, loadunload_fields
, ENC_BIG_ENDIAN
);
448 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
449 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
455 dissect_ssc_readblocklimits (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
456 guint offset
, gboolean isreq
, gboolean iscdb
,
457 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
464 if (isreq
&& iscdb
) {
465 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
466 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
469 granularity
= tvb_get_guint8 (tvb
, offset
);
470 proto_tree_add_text (tree
, tvb
, offset
, 1, "Granularity: %u (%u %s)",
471 granularity
, 1 << granularity
,
472 plurality(1 << granularity
, "byte", "bytes"));
473 proto_tree_add_text (tree
, tvb
, offset
+1, 3, "Maximum Block Length Limit: %u bytes",
474 tvb_get_ntoh24 (tvb
, offset
+1));
475 proto_tree_add_text (tree
, tvb
, offset
+4, 2, "Minimum Block Length Limit: %u bytes",
476 tvb_get_ntohs (tvb
, offset
+4));
481 dissect_ssc_rewind (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
482 guint offset
, gboolean isreq
, gboolean iscdb
,
483 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
485 static const int *rewind_fields
[] = {
493 if (isreq
&& iscdb
) {
494 col_append_fstr (pinfo
->cinfo
, COL_INFO
, "(Immed: %u)",
495 tvb_get_guint8 (tvb
, offset
) & 0x01);
497 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
, ett_scsi_read6
, rewind_fields
, ENC_BIG_ENDIAN
);
498 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
499 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
504 dissect_ssc_setcapacity (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
505 guint offset
, gboolean isreq
, gboolean iscdb
,
506 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
508 static const int *sc_fields
[] = {
516 if (isreq
&& iscdb
) {
517 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_read6_flags
,
518 ett_scsi_read6
, sc_fields
, ENC_BIG_ENDIAN
);
519 proto_tree_add_item (tree
, hf_scsi_ssc_capacity_prop_value
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
520 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
521 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
527 dissect_ssc_locate10 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
528 guint offset
, gboolean isreq
, gboolean iscdb
,
529 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
531 static const int *locate_fields
[] = {
541 if (isreq
&& iscdb
) {
542 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_locate_flags
,
543 ett_scsi_locate
, locate_fields
, ENC_BIG_ENDIAN
);
544 proto_tree_add_item (tree
, hf_scsi_ssc_locate10_loid
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
545 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
546 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
547 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
553 dissect_ssc_locate16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
554 guint offset
, gboolean isreq
, gboolean iscdb
,
555 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
557 static const int *locate_fields
[] = {
558 &hf_scsi_ssc_dest_type
,
563 static const int *bam_fields
[] = {
571 if (isreq
&& iscdb
) {
572 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_locate_flags
,
573 ett_scsi_locate
, locate_fields
, ENC_BIG_ENDIAN
);
574 proto_tree_add_bitmask(tree
, tvb
, offset
+1, hf_scsi_ssc_bam_flags
,
575 ett_scsi_bam
, bam_fields
, ENC_BIG_ENDIAN
);
576 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
577 proto_tree_add_item (tree
, hf_scsi_ssc_locate16_loid
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
578 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
579 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
585 dissect_ssc_erase6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
586 guint offset
, gboolean isreq
, gboolean iscdb
,
587 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
591 if (isreq
&& iscdb
) {
595 flags
= tvb_get_guint8 (tvb
, offset
);
596 proto_tree_add_text (tree
, tvb
, offset
, 1,
597 "IMMED: %u, LONG: %u",
601 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
602 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
608 dissect_ssc_erase16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
609 guint offset
, gboolean isreq
, gboolean iscdb
,
610 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
612 static const int *erase16_fields
[] = {
615 &hf_scsi_ssc_erase_immed
,
623 if (isreq
&& iscdb
) {
624 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_erase_flags
,
625 ett_scsi_erase
, erase16_fields
, ENC_BIG_ENDIAN
);
626 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
+2, 1, ENC_BIG_ENDIAN
);
627 proto_tree_add_item (tree
, hf_scsi_ssc_lbi
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
628 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
629 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
634 dissect_ssc_space6 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
635 guint offset
, gboolean isreq
, gboolean iscdb
,
636 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
641 if (isreq
&& iscdb
) {
642 proto_tree_add_item (tree
, hf_scsi_ssc_space6_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
643 proto_tree_add_item (tree
, hf_scsi_ssc_space6_count
, tvb
, offset
+1, 3, ENC_BIG_ENDIAN
);
644 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
645 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
650 dissect_ssc_space16 (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
651 guint offset
, gboolean isreq
, gboolean iscdb
,
652 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
657 if (isreq
&& iscdb
) {
658 proto_tree_add_item (tree
, hf_scsi_ssc_space6_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
659 proto_tree_add_item (tree
, hf_scsi_ssc_space16_count
, tvb
, offset
+3, 8, ENC_BIG_ENDIAN
);
660 proto_tree_add_text (tree
, tvb
, offset
+11, 2,
662 tvb_get_ntohs (tvb
, offset
+11));
663 proto_tree_add_bitmask(tree
, tvb
, offset
+14, hf_scsi_control
,
664 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
668 static const value_string space6_code_vals
[] = {
669 {0, "Logical Blocks"},
671 {2, "Sequential Filemarks"},
676 static const value_string format_vals
[] = {
677 {0x0, "Use default format"},
678 {0x1, "Partition medium"},
679 {0x2, "Default format then partition"},
683 static const value_string dest_type_vals
[] = {
684 {0, "Logical Object Identifier"},
685 {1, "Logical File Identifier"},
690 dissect_ssc_formatmedium (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
691 guint offset
, gboolean isreq
, gboolean iscdb
,
692 guint payload_len _U_
, scsi_task_data_t
*cdata _U_
)
694 static const int *formatmedium_fields
[] = {
703 if (isreq
&& iscdb
) {
704 proto_tree_add_bitmask(tree
, tvb
, offset
, hf_scsi_ssc_formatmedium_flags
,
705 ett_scsi_formatmedium
, formatmedium_fields
, ENC_BIG_ENDIAN
);
706 proto_tree_add_item (tree
, hf_scsi_ssc_format
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
707 proto_tree_add_item (tree
, hf_scsi_ssc_rdwr10_xferlen
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
708 proto_tree_add_bitmask(tree
, tvb
, offset
+4, hf_scsi_control
,
709 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
720 dissect_ssc_readposition (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
,
721 guint offset
, gboolean isreq
, gboolean iscdb
,
722 guint payload_len _U_
, scsi_task_data_t
*cdata
)
730 if (isreq
&& iscdb
) {
731 service_action
= tvb_get_guint8 (tvb
, offset
) & 0x1F;
732 proto_tree_add_text (tree
, tvb
, offset
, 1,
733 "Service Action: %s",
734 val_to_str (service_action
,
736 "Unknown (0x%02x)"));
737 /* Remember the service action so we can decode the reply */
739 cdata
->itlq
->flags
= service_action
;
741 proto_tree_add_text (tree
, tvb
, offset
+6, 2,
743 tvb_get_ntohs (tvb
, offset
+6));
744 proto_tree_add_bitmask(tree
, tvb
, offset
+8, hf_scsi_control
,
745 ett_scsi_control
, cdb_control_fields
, ENC_BIG_ENDIAN
);
749 service_action
= cdata
->itlq
->flags
;
751 service_action
= -1; /* unknown */
752 switch (service_action
) {
753 case SHORT_FORM_BLOCK_ID
:
754 case SHORT_FORM_VENDOR_SPECIFIC
:
755 flags
= tvb_get_guint8 (tvb
, offset
);
756 proto_tree_add_text (tree
, tvb
, offset
, 1,
757 "BOP: %u, EOP: %u, BCU: %u, BYCU: %u, BPU: %u, PERR: %u",
758 (flags
& 0x80) >> 7, (flags
& 0x40) >> 6,
759 (flags
& BCU
) >> 5, (flags
& BYCU
) >> 4,
760 (flags
& BPU
) >> 2, (flags
& 0x02) >> 1);
763 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
766 offset
+= 2; /* reserved */
768 if (!(flags
& BPU
)) {
769 proto_tree_add_text (tree
, tvb
, offset
, 4,
770 "First Block Location: %u",
771 tvb_get_ntohl (tvb
, offset
));
774 proto_tree_add_text (tree
, tvb
, offset
, 4,
775 "Last Block Location: %u",
776 tvb_get_ntohl (tvb
, offset
));
781 offset
+= 1; /* reserved */
783 if (!(flags
& BCU
)) {
784 proto_tree_add_text (tree
, tvb
, offset
, 3,
785 "Number of Blocks in Buffer: %u",
786 tvb_get_ntoh24 (tvb
, offset
));
790 if (!(flags
& BYCU
)) {
791 proto_tree_add_text (tree
, tvb
, offset
, 4,
792 "Number of Bytes in Buffer: %u",
793 tvb_get_ntohl (tvb
, offset
));
799 flags
= tvb_get_guint8 (tvb
, offset
);
800 proto_tree_add_text (tree
, tvb
, offset
, 1,
801 "BOP: %u, EOP: %u, MPU: %u, BPU: %u",
802 (flags
& 0x80) >> 7, (flags
& 0x40) >> 6,
803 (flags
& MPU
) >> 3, (flags
& BPU
) >> 2);
806 offset
+= 3; /* reserved */
808 if (!(flags
& BPU
)) {
809 proto_tree_add_text (tree
, tvb
, offset
, 4,
810 "Partition Number: %u",
811 tvb_get_ntohl (tvb
, offset
));
814 proto_tree_add_text (tree
, tvb
, offset
, 8,
815 "Block Number: %" G_GINT64_MODIFIER
"u",
816 tvb_get_ntoh64 (tvb
, offset
));
821 if (!(flags
& MPU
)) {
822 proto_tree_add_text (tree
, tvb
, offset
, 8,
823 "File Number: %" G_GINT64_MODIFIER
"u",
824 tvb_get_ntoh64 (tvb
, offset
));
827 proto_tree_add_text (tree
, tvb
, offset
, 8,
828 "Set Number: %" G_GINT64_MODIFIER
"u",
829 tvb_get_ntoh64 (tvb
, offset
));
836 flags
= tvb_get_guint8 (tvb
, offset
);
837 proto_tree_add_text (tree
, tvb
, offset
, 1,
838 "BOP: %u, EOP: %u, BCU: %u, BYCU: %u, MPU: %u, BPU: %u, PERR: %u",
839 (flags
& 0x80) >> 7, (flags
& 0x40) >> 6,
840 (flags
& BCU
) >> 5, (flags
& BYCU
) >> 4,
841 (flags
& MPU
) >> 3, (flags
& BPU
) >> 2,
842 (flags
& 0x02) >> 1);
845 proto_tree_add_item (tree
, hf_scsi_ssc_partition
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
848 proto_tree_add_text (tree
, tvb
, offset
, 2,
849 "Additional Length: %u",
850 tvb_get_ntohs (tvb
, offset
));
853 offset
+= 1; /* reserved */
855 if (!(flags
& BCU
)) {
856 proto_tree_add_text (tree
, tvb
, offset
, 3,
857 "Number of Blocks in Buffer: %u",
858 tvb_get_ntoh24 (tvb
, offset
));
862 if (!(flags
& BPU
)) {
863 proto_tree_add_text (tree
, tvb
, offset
, 8,
864 "First Block Location: %" G_GINT64_MODIFIER
"u",
865 tvb_get_ntoh64 (tvb
, offset
));
868 proto_tree_add_text (tree
, tvb
, offset
, 8,
869 "Last Block Location: %" G_GINT64_MODIFIER
"u",
870 tvb_get_ntoh64 (tvb
, offset
));
875 offset
+= 1; /* reserved */
877 if (!(flags
& BYCU
)) {
878 proto_tree_add_text (tree
, tvb
, offset
, 8,
879 "Number of Bytes in Buffer: %" G_GINT64_MODIFIER
"u",
880 tvb_get_ntoh64 (tvb
, offset
));
896 const value_string scsi_ssc_vals
[] = {
897 {SCSI_SSC_ERASE_6
, "Erase(6)"},
898 {SCSI_SSC_ERASE_16
, "Erase(16)"},
899 {SCSI_SPC_EXTCOPY
, "Extended Copy"},
900 {SCSI_SSC_FORMAT_MEDIUM
, "Format Medium"},
901 {SCSI_SPC_INQUIRY
, "Inquiry"},
902 {SCSI_SSC_LOAD_UNLOAD
, "Load Unload"},
903 {SCSI_SSC_LOCATE_10
, "Locate(10)"},
904 {SCSI_SSC_LOCATE_16
, "Locate(16)"},
905 {SCSI_SPC_LOGSELECT
, "Log Select"},
906 {SCSI_SPC_LOGSENSE
, "Log Sense"},
907 {SCSI_SPC_MGMT_PROTOCOL_IN
, "Mgmt Protocol In"},
908 {SCSI_SPC_MODESELECT6
, "Mode Select(6)"},
909 {SCSI_SPC_RESERVE6
, "Reserve(6)"},
910 {SCSI_SPC_RELEASE6
, "Release(6)"},
911 {SCSI_SPC_MODESELECT10
, "Mode Select(10)"},
912 {SCSI_SPC_MODESENSE6
, "Mode Sense(6)"},
913 {SCSI_SPC_MODESENSE10
, "Mode Sense(10)"},
914 {SCSI_SMC_MOVE_MEDIUM
, "Move Medium"},
915 {SCSI_SMC_MOVE_MEDIUM_ATTACHED
, "Move Medium Attached"},
916 {SCSI_SPC_PERSRESVIN
, "Persistent Reserve In"},
917 {SCSI_SPC_PERSRESVOUT
, "Persistent Reserve Out"},
918 {SCSI_SPC_PREVMEDREMOVAL
, "Prevent/Allow Medium Removal"},
919 {SCSI_SSC_READ6
, "Read(6)"},
920 {SCSI_SSC_READ_16
, "Read(16)"},
921 {SCSI_SSC_READ_BLOCK_LIMITS
, "Read Block Limits"},
922 {SCSI_SMC_READ_ELEMENT_STATUS
, "Read Element Status"},
923 {SCSI_SMC_READ_ELEMENT_STATUS_ATTACHED
, "Read Element Status Attached"},
924 {SCSI_SSC_READ_POSITION
, "Read Position"},
925 {SCSI_SSC_READ_REVERSE_6
, "Read Reverse(6)"},
926 {SCSI_SSC_READ_REVERSE_16
, "Read Reverse(16)"},
927 {SCSI_SSC_RECOVER_BUFFERED_DATA
, "Recover Buffered Data"},
928 {SCSI_SSC_REPORT_DENSITY_SUPPORT
, "Report Density Support"},
929 {SCSI_SPC_REPORTLUNS
, "Report LUNs"},
930 {SCSI_SPC_REQSENSE
, "Request Sense"},
931 {SCSI_SSC_REWIND
, "Rewind"},
932 {SCSI_SPC_SENDDIAG
, "Send Diagnostic"},
933 {SCSI_SSC_SET_CAPACITY
, "Set Capacity"},
934 {SCSI_SSC_SPACE_6
, "Space(6)"},
935 {SCSI_SSC_SPACE_16
, "Space(16)"},
936 {SCSI_SPC_TESTUNITRDY
, "Test Unit Ready"},
937 {SCSI_SSC_VERIFY_6
, "Verify(6)"},
938 {SCSI_SSC_VERIFY_16
, "Verify(16)"},
939 {SCSI_SSC_WRITE6
, "Write(6)"},
940 {SCSI_SSC_WRITE_16
, "Write(16)"},
941 {SCSI_SPC_WRITEBUFFER
, "Write Buffer"},
942 {SCSI_SSC_WRITE_FILEMARKS_16
, "Write Filemarks(16)"},
943 {SCSI_SSC_WRITE_FILEMARKS_6
, "Write Filemarks(6)"},
948 scsi_cdb_table_t scsi_ssc_table
[256] = {
949 /*SPC 0x00*/{dissect_spc_testunitready
},
950 /*SSC 0x01*/{dissect_ssc_rewind
},
952 /*SPC 0x03*/{dissect_spc_requestsense
},
953 /*SSC 0x04*/{dissect_ssc_formatmedium
},
954 /*SSC 0x05*/{dissect_ssc_readblocklimits
},
957 /*SSC 0x08*/{dissect_ssc_read6
},
959 /*SSC 0x0a*/{dissect_ssc_write6
},
960 /*SSC 0x0b*/{dissect_ssc_setcapacity
},
964 /*SSC 0x0f*/{dissect_ssc_readreverse6
},
965 /*SSC 0x10*/{dissect_ssc_writefilemarks6
},
966 /*SSC 0x11*/{dissect_ssc_space6
},
967 /*SPC 0x12*/{dissect_spc_inquiry
},
968 /*SSC 0x13*/{dissect_ssc_verify6
},
969 /*SSC 0x14*/{dissect_ssc_recoverbuffereddata
},
970 /*SPC 0x15*/{dissect_spc_modeselect6
},
971 /*SSC 0x16*/{dissect_spc_reserve6
},
972 /*SSC 0x17*/{dissect_spc_release6
},
974 /*SSC 0x19*/{dissect_ssc_erase6
},
975 /*SPC 0x1a*/{dissect_spc_modesense6
},
976 /*SSC 0x1b*/{dissect_ssc_loadunload
},
978 /*SPC 0x1d*/{dissect_spc_senddiagnostic
},
979 /*SSC 0x1e*/{dissect_spc_preventallowmediaremoval
},
992 /*SSC 0x2b*/{dissect_ssc_locate10
},
1001 /*SSC 0x34*/{dissect_ssc_readposition
},
1008 /*SPC 0x3b*/{dissect_spc_writebuffer
},
1017 /*SSC 0x44*/{dissect_ssc_reportdensitysupport
},
1025 /*SPC 0x4c*/{dissect_spc_logselect
},
1026 /*SPC 0x4d*/{dissect_spc_logsense
},
1034 /*SPC 0x55*/{dissect_spc_modeselect10
},
1039 /*SPC 0x5a*/{dissect_spc_modesense10
},
1043 /*SPC 0x5e*/{dissect_spc_persistentreservein
},
1044 /*SPC 0x5f*/{dissect_spc_persistentreserveout
},
1077 /*SSC 0x80*/{dissect_ssc_writefilemarks16
},
1078 /*SSC 0x81*/{dissect_ssc_readreverse16
},
1080 /*SPC 0x83*/{dissect_spc_extcopy
},
1085 /*SSC 0x88*/{dissect_ssc_read16
},
1087 /*SSC 0x8a*/{dissect_ssc_write16
},
1092 /*SSC 0x8f*/{dissect_ssc_verify16
},
1094 /*SSC 0x91*/{dissect_ssc_space16
},
1095 /*SSC 0x92*/{dissect_ssc_locate16
},
1096 /*SSC 0x93*/{dissect_ssc_erase16
},
1109 /*SPC 0xa0*/{dissect_spc_reportluns
},
1112 /*SPC 0xa3*/{dissect_spc_mgmt_protocol_in
},
1114 /*SSC 0xa5*/{dissect_smc_movemedium
},
1116 /*SSC 0xa7*/{dissect_smc_movemedium
},
1129 /*SSC 0xb4*/{dissect_smc_readelementstatus
},
1133 /*SSC 0xb8*/{dissect_smc_readelementstatus
},
1210 proto_register_scsi_ssc(void)
1212 static hf_register_info hf
[] = {
1213 { &hf_scsi_ssc_opcode
,
1214 {"SSC Opcode", "scsi_ssc.opcode", FT_UINT8
, BASE_HEX
,
1215 VALS (scsi_ssc_vals
), 0x0, NULL
, HFILL
}},
1216 { &hf_scsi_ssc_rdwr6_xferlen
,
1217 {"Transfer Length", "scsi_ssc.rdwr6.xferlen", FT_UINT24
, BASE_DEC
, NULL
, 0x0,
1219 { &hf_scsi_ssc_ver16_verlen
,
1220 {"Verification Length", "scsi_ssc.verify16.verify_len", FT_UINT24
, BASE_DEC
, NULL
, 0x0,
1222 { &hf_scsi_ssc_locate10_loid
,
1223 {"Logical Object Identifier", "scsi_ssc.locate10.loid", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1225 { &hf_scsi_ssc_locate16_loid
,
1226 {"Logical Identifier", "scsi_ssc.locate16.loid", FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1228 { &hf_scsi_ssc_space6_count
,
1229 {"Count", "scsi_ssc.space6.count", FT_INT24
, BASE_DEC
, NULL
, 0x0,
1231 { &hf_scsi_ssc_space6_code
,
1232 {"Code", "scsi_ssc.space6.code", FT_UINT8
, BASE_HEX
,
1233 VALS(space6_code_vals
), 0x0f,
1235 { &hf_scsi_ssc_space16_count
,
1236 {"Count", "scsi_ssc.space16.count", FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1238 { &hf_scsi_ssc_rdwr10_xferlen
,
1239 {"Transfer Length", "scsi_ssc.rdwr10.xferlen", FT_UINT16
, BASE_DEC
, NULL
,
1241 { &hf_scsi_ssc_erase_flags
,
1242 {"Flags", "scsi_ssc.erase_flags", FT_UINT8
, BASE_HEX
,
1243 NULL
, 0x0, NULL
, HFILL
}},
1245 {"FCS", "scsi_ssc.fcs", FT_BOOLEAN
, 8,
1246 NULL
, 0x08, NULL
, HFILL
}},
1248 {"LCS", "scsi_ssc.lcs", FT_BOOLEAN
, 8,
1249 NULL
, 0x04, NULL
, HFILL
}},
1250 { &hf_scsi_ssc_erase_immed
,
1251 {"IMMED", "scsi_ssc.erase_immed", FT_BOOLEAN
, 8,
1252 NULL
, 0x02, NULL
, HFILL
}},
1253 { &hf_scsi_ssc_long
,
1254 {"LONG", "scsi_ssc.long", FT_BOOLEAN
, 8,
1255 NULL
, 0x01, NULL
, HFILL
}},
1256 { &hf_scsi_ssc_partition
,
1257 {"Partition", "scsi_ssc.partition", FT_UINT8
, BASE_HEX
,
1258 NULL
, 0x0, NULL
, HFILL
}},
1260 {"Logical Block Identifier", "scsi_ssc.lbi", FT_UINT64
, BASE_HEX
,
1261 NULL
, 0x0, NULL
, HFILL
}},
1262 { &hf_scsi_ssc_verify
,
1263 {"VERIFY", "scsi_ssc.verify", FT_BOOLEAN
, 8,
1264 NULL
, 0x02, NULL
, HFILL
}},
1265 { &hf_scsi_ssc_immed
,
1266 {"IMMED", "scsi_ssc.immed", FT_BOOLEAN
, 8,
1267 NULL
, 0x01, NULL
, HFILL
}},
1268 { &hf_scsi_ssc_formatmedium_flags
,
1269 {"Flags", "scsi_ssc.formatmedium_flags", FT_UINT8
, BASE_HEX
,
1270 NULL
, 0x0, NULL
, HFILL
}},
1271 { &hf_scsi_ssc_format
,
1272 {"Format", "scsi_ssc.format", FT_UINT8
, BASE_HEX
,
1273 VALS(format_vals
), 0x0f, NULL
, HFILL
}},
1274 { &hf_scsi_ssc_loadunload_immed_flags
,
1275 {"Immed", "scsi_ssc.loadunload_immed_flags", FT_UINT8
, BASE_HEX
,
1276 NULL
, 0x0, NULL
, HFILL
}},
1277 { &hf_scsi_ssc_loadunload_flags
,
1278 {"Flags", "scsi_ssc.loadunload_flags", FT_UINT8
, BASE_HEX
,
1279 NULL
, 0x0, NULL
, HFILL
}},
1280 { &hf_scsi_ssc_hold
,
1281 {"HOLD", "scsi_ssc.hold", FT_BOOLEAN
, 8,
1282 NULL
, 0x08, NULL
, HFILL
}},
1284 {"EOT", "scsi_ssc.eot", FT_BOOLEAN
, 8,
1285 NULL
, 0x04, NULL
, HFILL
}},
1286 { &hf_scsi_ssc_reten
,
1287 {"RETEN", "scsi_ssc.reten", FT_BOOLEAN
, 8,
1288 NULL
, 0x02, NULL
, HFILL
}},
1289 { &hf_scsi_ssc_load
,
1290 {"LOAD", "scsi_ssc.load", FT_BOOLEAN
, 8,
1291 NULL
, 0x01, NULL
, HFILL
}},
1292 { &hf_scsi_ssc_locate_flags
,
1293 {"Flags", "scsi_ssc.locate_flags", FT_UINT8
, BASE_HEX
,
1294 NULL
, 0x0, NULL
, HFILL
}},
1296 {"BT", "scsi_ssc.bt", FT_BOOLEAN
, 8,
1297 NULL
, 0x04, NULL
, HFILL
}},
1299 {"CP", "scsi_ssc.cp", FT_BOOLEAN
, 8,
1300 NULL
, 0x02, NULL
, HFILL
}},
1301 { &hf_scsi_ssc_dest_type
,
1302 {"Dest Type", "scsi_ssc.dest_type", FT_UINT8
, BASE_HEX
,
1303 VALS(dest_type_vals
), 0x18, NULL
, HFILL
}},
1304 { &hf_scsi_ssc_bam_flags
,
1305 {"Flags", "scsi_ssc.bam_flags", FT_UINT8
, BASE_HEX
,
1306 NULL
, 0x0, NULL
, HFILL
}},
1308 {"BAM", "scsi_ssc.bam", FT_BOOLEAN
, 8,
1309 NULL
, 0x01, NULL
, HFILL
}},
1310 { &hf_scsi_ssc_read6_flags
,
1311 {"Flags", "scsi_ssc.read6_flags", FT_UINT8
, BASE_HEX
,
1312 NULL
, 0x0, NULL
, HFILL
}},
1313 { &hf_scsi_ssc_sili
,
1314 {"SILI", "scsi_ssc.sili", FT_BOOLEAN
, 8,
1315 NULL
, 0x02, NULL
, HFILL
}},
1316 { &hf_scsi_ssc_fixed
,
1317 {"FIXED", "scsi_ssc.fixed", FT_BOOLEAN
, 8,
1318 NULL
, 0x01, NULL
, HFILL
}},
1319 { &hf_scsi_ssc_bytord
,
1320 {"BYTORD", "scsi_ssc.bytord", FT_BOOLEAN
, 8,
1321 NULL
, 0x04, NULL
, HFILL
}},
1322 { &hf_scsi_ssc_bytcmp
,
1323 {"BYTCMP", "scsi_ssc.bytcmp", FT_BOOLEAN
, 8,
1324 NULL
, 0x02, NULL
, HFILL
}},
1325 { &hf_scsi_ssc_verify16_immed
,
1326 {"IMMED", "scsi_ssc.verify16_immed", FT_BOOLEAN
, 8,
1327 NULL
, 0x04, NULL
, HFILL
}},
1328 { &hf_scsi_ssc_medium_type
,
1329 {"Medium Type", "scsi_ssc.medium_type", FT_BOOLEAN
, 8,
1330 NULL
, 0x02, NULL
, HFILL
}},
1331 { &hf_scsi_ssc_media
,
1332 {"Media", "scsi_ssc.media", FT_BOOLEAN
, 8,
1333 NULL
, 0x01, NULL
, HFILL
}},
1334 { &hf_scsi_ssc_capacity_prop_value
,
1335 {"Capacity Proportion Value", "scsi_ssc.cpv", FT_UINT16
, BASE_DEC
,
1336 NULL
, 0, NULL
, HFILL
}},
1340 /* Setup protocol subtree array */
1341 static gint
*ett
[] = {
1343 &ett_scsi_formatmedium
,
1344 &ett_scsi_loadunload_immed
,
1345 &ett_scsi_loadunload
,
1352 /* Register the protocol name and description */
1353 proto_scsi_ssc
= proto_register_protocol("SCSI_SSC", "SCSI_SSC", "scsi_ssc");
1355 /* Required function calls to register the header fields and subtrees used */
1356 proto_register_field_array(proto_scsi_ssc
, hf
, array_length(hf
));
1358 proto_register_subtree_array(ett
, array_length(ett
));
1363 proto_reg_handoff_scsi_ssc(void)