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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #include <epan/strutil.h>
41 #include <epan/packet.h>
42 #include <epan/conversation.h>
44 #include "packet-scsi.h"
45 #include "packet-fc.h"
46 #include "packet-scsi-ssc.h"
47 #include "packet-scsi-smc.h"
50 static int proto_scsi_ssc = -1;
51 int hf_scsi_ssc_opcode = -1;
52 static int hf_scsi_ssc_rdwr6_xferlen = -1;
53 static int hf_scsi_ssc_ver16_verlen = -1;
54 static int hf_scsi_ssc_locate10_loid = -1;
55 static int hf_scsi_ssc_locate16_loid = -1;
56 static int hf_scsi_ssc_space6_code = -1;
57 static int hf_scsi_ssc_space6_count = -1;
58 static int hf_scsi_ssc_space16_count = -1;
59 static int hf_scsi_ssc_erase_flags = -1;
60 static int hf_scsi_ssc_fcs = -1;
61 static int hf_scsi_ssc_lcs = -1;
62 static int hf_scsi_ssc_erase_immed = -1;
63 static int hf_scsi_ssc_long = -1;
64 static int hf_scsi_ssc_partition = -1;
65 static int hf_scsi_ssc_lbi = -1;
66 static int hf_scsi_ssc_verify = -1;
67 static int hf_scsi_ssc_immed = -1;
68 static int hf_scsi_ssc_formatmedium_flags = -1;
69 static int hf_scsi_ssc_format = -1;
70 static int hf_scsi_ssc_rdwr10_xferlen = -1;
71 static int hf_scsi_ssc_loadunload_immed_flags = -1;
72 static int hf_scsi_ssc_loadunload_flags = -1;
73 static int hf_scsi_ssc_hold = -1;
74 static int hf_scsi_ssc_eot = -1;
75 static int hf_scsi_ssc_reten = -1;
76 static int hf_scsi_ssc_load = -1;
77 static int hf_scsi_ssc_locate_flags = -1;
78 static int hf_scsi_ssc_bt = -1;
79 static int hf_scsi_ssc_cp = -1;
80 static int hf_scsi_ssc_dest_type = -1;
81 static int hf_scsi_ssc_bam_flags = -1;
82 static int hf_scsi_ssc_bam = -1;
83 static int hf_scsi_ssc_read6_flags = -1;
84 static int hf_scsi_ssc_sili = -1;
85 static int hf_scsi_ssc_fixed = -1;
86 static int hf_scsi_ssc_bytord = -1;
87 static int hf_scsi_ssc_bytcmp = -1;
88 static int hf_scsi_ssc_verify16_immed = -1;
89 static int hf_scsi_ssc_medium_type = -1;
90 static int hf_scsi_ssc_media = -1;
91 static int hf_scsi_ssc_capacity_prop_value = -1;
93 static gint ett_scsi_erase = -1;
94 static gint ett_scsi_formatmedium = -1;
95 static gint ett_scsi_loadunload_immed = -1;
96 static gint ett_scsi_loadunload = -1;
97 static gint ett_scsi_locate = -1;
98 static gint ett_scsi_bam = -1;
99 static gint ett_scsi_read6 = -1;
103 dissect_ssc_read6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
104 guint offset, gboolean isreq, gboolean iscdb,
105 guint payload_len _U_, scsi_task_data_t *cdata _U_)
108 static const int *read6_fields[] = {
115 if (check_col (pinfo->cinfo, COL_INFO))
116 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
117 tvb_get_ntoh24 (tvb, offset+1));
120 if (tree && isreq && iscdb) {
121 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, read6_fields, FALSE);
123 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+1, 3, 0);
124 flags = tvb_get_guint8 (tvb, offset+4);
125 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
127 "Vendor Unique = %u, NACA = %u, Link = %u",
128 flags & 0xC0, flags & 0x4, flags & 0x1);
133 dissect_ssc_recoverbuffereddata (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
134 guint offset, gboolean isreq, gboolean iscdb,
135 guint payload_len _U_, scsi_task_data_t *cdata _U_)
138 static const int *recover_fields[] = {
145 if (check_col (pinfo->cinfo, COL_INFO))
146 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
147 tvb_get_ntoh24 (tvb, offset+1));
150 if (tree && isreq && iscdb) {
151 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, recover_fields, FALSE);
153 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+1, 3, 0);
154 flags = tvb_get_guint8 (tvb, offset+4);
155 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
157 "Vendor Unique = %u, NACA = %u, Link = %u",
158 flags & 0xC0, flags & 0x4, flags & 0x1);
163 dissect_ssc_reportdensitysupport (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
164 guint offset, gboolean isreq, gboolean iscdb,
165 guint payload_len _U_, scsi_task_data_t *cdata _U_)
168 static const int *rd_fields[] = {
169 &hf_scsi_ssc_medium_type,
175 if (check_col (pinfo->cinfo, COL_INFO))
176 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
177 tvb_get_ntoh24 (tvb, offset+1));
183 if (isreq && iscdb) {
184 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, rd_fields, FALSE);
186 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+6, 2, 0);
187 flags = tvb_get_guint8 (tvb, offset+8);
188 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
190 "Vendor Unique = %u, NACA = %u, Link = %u",
191 flags & 0xC0, flags & 0x4, flags & 0x1);
193 /* XXX decode the data */
198 dissect_ssc_readreverse6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
199 guint offset, gboolean isreq, gboolean iscdb,
200 guint payload_len _U_, scsi_task_data_t *cdata _U_)
203 static const int *rr6_fields[] = {
211 if (check_col (pinfo->cinfo, COL_INFO))
212 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
213 tvb_get_ntoh24 (tvb, offset+1));
216 if (tree && isreq && iscdb) {
217 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, rr6_fields, FALSE);
219 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+1, 3, 0);
220 flags = tvb_get_guint8 (tvb, offset+4);
221 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
223 "Vendor Unique = %u, NACA = %u, Link = %u",
224 flags & 0xC0, flags & 0x4, flags & 0x1);
229 dissect_ssc_read16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
230 guint offset, gboolean isreq, gboolean iscdb,
231 guint payload_len _U_, scsi_task_data_t *cdata _U_)
234 static const int *read6_fields[] = {
241 if (check_col (pinfo->cinfo, COL_INFO))
242 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
243 tvb_get_ntoh24 (tvb, offset+1));
246 if (tree && isreq && iscdb) {
247 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, read6_fields, FALSE);
249 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
251 proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
253 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+11, 3, 0);
255 flags = tvb_get_guint8 (tvb, offset+14);
256 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
258 "Vendor Unique = %u, NACA = %u, Link = %u",
259 flags & 0xC0, flags & 0x4, flags & 0x1);
264 dissect_ssc_write16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
265 guint offset, gboolean isreq, gboolean iscdb,
266 guint payload_len _U_, scsi_task_data_t *cdata _U_)
269 static const int *write16_fields[] = {
277 if (check_col (pinfo->cinfo, COL_INFO))
278 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
279 tvb_get_ntoh24 (tvb, offset+1));
282 if (tree && isreq && iscdb) {
283 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, write16_fields, FALSE);
285 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
287 proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
289 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+11, 3, 0);
291 flags = tvb_get_guint8 (tvb, offset+14);
292 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
294 "Vendor Unique = %u, NACA = %u, Link = %u",
295 flags & 0xC0, flags & 0x4, flags & 0x1);
300 dissect_ssc_writefilemarks16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
301 guint offset, gboolean isreq, gboolean iscdb,
302 guint payload_len _U_, scsi_task_data_t *cdata _U_)
305 static const int *wf16_fields[] = {
313 if (check_col (pinfo->cinfo, COL_INFO))
314 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
315 tvb_get_ntoh24 (tvb, offset+1));
318 if (tree && isreq && iscdb) {
319 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, wf16_fields, FALSE);
321 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
323 proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
325 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+11, 3, 0);
327 flags = tvb_get_guint8 (tvb, offset+14);
328 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
330 "Vendor Unique = %u, NACA = %u, Link = %u",
331 flags & 0xC0, flags & 0x4, flags & 0x1);
336 dissect_ssc_verify16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
337 guint offset, gboolean isreq, gboolean iscdb,
338 guint payload_len _U_, scsi_task_data_t *cdata _U_)
341 static const int *verify16_fields[] = {
342 &hf_scsi_ssc_verify16_immed,
349 if (check_col (pinfo->cinfo, COL_INFO))
350 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
351 tvb_get_ntoh24 (tvb, offset+1));
354 if (tree && isreq && iscdb) {
355 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, verify16_fields, FALSE);
357 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
359 proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
361 proto_tree_add_item (tree, hf_scsi_ssc_ver16_verlen, tvb, offset+11, 3, 0);
363 flags = tvb_get_guint8 (tvb, offset+14);
364 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
366 "Vendor Unique = %u, NACA = %u, Link = %u",
367 flags & 0xC0, flags & 0x4, flags & 0x1);
372 dissect_ssc_verify6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
373 guint offset, gboolean isreq, gboolean iscdb,
374 guint payload_len _U_, scsi_task_data_t *cdata _U_)
377 static const int *verify6_fields[] = {
378 &hf_scsi_ssc_verify16_immed,
385 if (check_col (pinfo->cinfo, COL_INFO))
386 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
387 tvb_get_ntoh24 (tvb, offset+1));
390 if (tree && isreq && iscdb) {
391 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, verify6_fields, FALSE);
393 proto_tree_add_item (tree, hf_scsi_ssc_ver16_verlen, tvb, offset+1, 3, 0);
395 flags = tvb_get_guint8 (tvb, offset+4);
396 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
398 "Vendor Unique = %u, NACA = %u, Link = %u",
399 flags & 0xC0, flags & 0x4, flags & 0x1);
404 dissect_ssc_readreverse16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
405 guint offset, gboolean isreq, gboolean iscdb,
406 guint payload_len _U_, scsi_task_data_t *cdata _U_)
409 static const int *rr16_fields[] = {
417 if (check_col (pinfo->cinfo, COL_INFO))
418 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
419 tvb_get_ntoh24 (tvb, offset+1));
422 if (tree && isreq && iscdb) {
423 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, rr16_fields, FALSE);
425 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
427 proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
429 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+11, 3, 0);
431 flags = tvb_get_guint8 (tvb, offset+14);
432 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
434 "Vendor Unique = %u, NACA = %u, Link = %u",
435 flags & 0xC0, flags & 0x4, flags & 0x1);
440 dissect_ssc_write6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
441 guint offset, gboolean isreq, gboolean iscdb,
442 guint payload_len _U_, scsi_task_data_t *cdata _U_)
445 static const int *write6_fields[] = {
450 if (isreq && iscdb) {
451 if (check_col (pinfo->cinfo, COL_INFO))
452 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
453 tvb_get_ntoh24 (tvb, offset+1));
456 if (tree && isreq && iscdb) {
457 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, write6_fields, FALSE);
459 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+1, 3,
462 flags = tvb_get_guint8 (tvb, offset+4);
463 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
465 "Vendor Unique = %u, NACA = %u, Link = %u",
466 flags & 0xC0, flags & 0x4, flags & 0x1);
471 dissect_ssc_writefilemarks6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
472 guint offset, gboolean isreq, gboolean iscdb,
473 guint payload_len _U_, scsi_task_data_t *cdata _U_)
476 static const int *wf6_fields[] = {
482 if (check_col (pinfo->cinfo, COL_INFO))
483 col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
484 tvb_get_ntoh24 (tvb, offset+1));
487 if (tree && isreq && iscdb) {
488 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, wf6_fields, FALSE);
490 proto_tree_add_item (tree, hf_scsi_ssc_rdwr6_xferlen, tvb, offset+1, 3,
493 flags = tvb_get_guint8 (tvb, offset+4);
494 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
496 "Vendor Unique = %u, NACA = %u, Link = %u",
497 flags & 0xC0, flags & 0x4, flags & 0x1);
502 dissect_ssc_loadunload (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
503 guint offset, gboolean isreq, gboolean iscdb,
504 guint payload_len _U_, scsi_task_data_t *cdata _U_)
507 static const int *loadunload_immed_fields[] = {
511 static const int *loadunload_fields[] = {
519 if (isreq && iscdb) {
520 if (check_col (pinfo->cinfo, COL_INFO))
521 col_append_fstr (pinfo->cinfo, COL_INFO, "(Immed: %u)",
522 tvb_get_guint8 (tvb, offset) & 0x01);
529 if (isreq && iscdb) {
530 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_loadunload_immed_flags, ett_scsi_loadunload_immed, loadunload_immed_fields, FALSE);
532 proto_tree_add_bitmask(tree, tvb, offset+3, hf_scsi_ssc_loadunload_flags, ett_scsi_loadunload, loadunload_fields, FALSE);
534 flags = tvb_get_guint8 (tvb, offset+4);
535 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
537 "Vendor Unique = %u, NACA = %u, Link = %u",
538 flags & 0xC0, flags & 0x4, flags & 0x1);
544 dissect_ssc_readblocklimits (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
545 guint offset, gboolean isreq, gboolean iscdb,
546 guint payload_len _U_, scsi_task_data_t *cdata _U_)
548 guint8 flags, granularity;
553 if (isreq && iscdb) {
554 flags = tvb_get_guint8 (tvb, offset+4);
555 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
557 "Vendor Unique = %u, NACA = %u, Link = %u",
558 flags & 0xC0, flags & 0x4, flags & 0x1);
561 granularity = tvb_get_guint8 (tvb, offset);
562 proto_tree_add_text (tree, tvb, offset, 1, "Granularity: %u (%u %s)",
563 granularity, 1 << granularity,
564 plurality(1 << granularity, "byte", "bytes"));
565 proto_tree_add_text (tree, tvb, offset+1, 3, "Maximum Block Length Limit: %u bytes",
566 tvb_get_ntoh24 (tvb, offset+1));
567 proto_tree_add_text (tree, tvb, offset+4, 2, "Minimum Block Length Limit: %u bytes",
568 tvb_get_ntohs (tvb, offset+4));
573 dissect_ssc_rewind (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
574 guint offset, gboolean isreq, gboolean iscdb,
575 guint payload_len _U_, scsi_task_data_t *cdata _U_)
578 static const int *rewind_fields[] = {
586 if (isreq && iscdb) {
587 if (check_col (pinfo->cinfo, COL_INFO))
588 col_append_fstr (pinfo->cinfo, COL_INFO, "(Immed: %u)",
589 tvb_get_guint8 (tvb, offset) & 0x01);
591 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, rewind_fields, FALSE);
593 flags = tvb_get_guint8 (tvb, offset+4);
594 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
596 "Vendor Unique = %u, NACA = %u, Link = %u",
597 flags & 0xC0, flags & 0x4, flags & 0x1);
602 dissect_ssc_setcapacity (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
603 guint offset, gboolean isreq, gboolean iscdb,
604 guint payload_len _U_, scsi_task_data_t *cdata _U_)
607 static const int *sc_fields[] = {
615 if (isreq && iscdb) {
616 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_read6_flags, ett_scsi_read6, sc_fields, FALSE);
618 proto_tree_add_item (tree, hf_scsi_ssc_capacity_prop_value, tvb, offset+2, 2, 0);
620 flags = tvb_get_guint8 (tvb, offset+4);
621 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
623 "Vendor Unique = %u, NACA = %u, Link = %u",
624 flags & 0xC0, flags & 0x4, flags & 0x1);
630 dissect_ssc_locate10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
631 guint offset, gboolean isreq, gboolean iscdb,
632 guint payload_len _U_, scsi_task_data_t *cdata _U_)
635 static const int *locate_fields[] = {
645 if (isreq && iscdb) {
646 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_locate_flags, ett_scsi_locate, locate_fields, FALSE);
648 proto_tree_add_item (tree, hf_scsi_ssc_locate10_loid, tvb, offset+2, 4, 0);
650 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+7, 1, 0);
652 flags = tvb_get_guint8 (tvb, offset+8);
653 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
655 "Vendor Unique = %u, NACA = %u, Link = %u",
656 flags & 0xC0, flags & 0x4, flags & 0x1);
662 dissect_ssc_locate16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
663 guint offset, gboolean isreq, gboolean iscdb,
664 guint payload_len _U_, scsi_task_data_t *cdata _U_)
667 static const int *locate_fields[] = {
668 &hf_scsi_ssc_dest_type,
673 static const int *bam_fields[] = {
681 if (isreq && iscdb) {
682 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_locate_flags, ett_scsi_locate, locate_fields, FALSE);
684 proto_tree_add_bitmask(tree, tvb, offset+1, hf_scsi_ssc_bam_flags, ett_scsi_bam, bam_fields, FALSE);
686 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
688 proto_tree_add_item (tree, hf_scsi_ssc_locate16_loid, tvb, offset+3, 8, 0);
690 flags = tvb_get_guint8 (tvb, offset+14);
691 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
693 "Vendor Unique = %u, NACA = %u, Link = %u",
694 flags & 0xC0, flags & 0x4, flags & 0x1);
700 dissect_ssc_erase6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
701 guint offset, gboolean isreq, gboolean iscdb,
702 guint payload_len _U_, scsi_task_data_t *cdata _U_)
706 if (isreq && iscdb) {
710 flags = tvb_get_guint8 (tvb, offset);
711 proto_tree_add_text (tree, tvb, offset, 1,
712 "IMMED: %u, LONG: %u",
716 flags = tvb_get_guint8 (tvb, offset+4);
717 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
719 "Vendor Unique = %u, NACA = %u, Link = %u",
720 flags & 0xC0, flags & 0x4, flags & 0x1);
726 dissect_ssc_erase16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
727 guint offset, gboolean isreq, gboolean iscdb,
728 guint payload_len _U_, scsi_task_data_t *cdata _U_)
731 static const int *erase16_fields[] = {
734 &hf_scsi_ssc_erase_immed,
742 if (isreq && iscdb) {
743 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_erase_flags, ett_scsi_erase, erase16_fields, FALSE);
745 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset+2, 1, 0);
747 proto_tree_add_item (tree, hf_scsi_ssc_lbi, tvb, offset+3, 8, 0);
749 flags = tvb_get_guint8 (tvb, offset+14);
750 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
752 "Vendor Unique = %u, NACA = %u, Link = %u",
753 flags & 0xC0, flags & 0x4, flags & 0x1);
759 dissect_ssc_space6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
760 guint offset, gboolean isreq, gboolean iscdb,
761 guint payload_len _U_, scsi_task_data_t *cdata _U_)
768 if (isreq && iscdb) {
769 proto_tree_add_item (tree, hf_scsi_ssc_space6_code, tvb, offset, 1, 0);
771 proto_tree_add_item (tree, hf_scsi_ssc_space6_count, tvb, offset+1, 3, 0);
773 flags = tvb_get_guint8 (tvb, offset+4);
774 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
776 "Vendor Unique = %u, NACA = %u, Link = %u",
777 flags & 0xC0, flags & 0x4, flags & 0x1);
782 dissect_ssc_space16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
783 guint offset, gboolean isreq, gboolean iscdb,
784 guint payload_len _U_, scsi_task_data_t *cdata _U_)
791 if (isreq && iscdb) {
792 proto_tree_add_item (tree, hf_scsi_ssc_space6_code, tvb, offset, 1, 0);
794 proto_tree_add_item (tree, hf_scsi_ssc_space16_count, tvb, offset+3, 8, 0);
796 proto_tree_add_text (tree, tvb, offset+11, 2,
798 tvb_get_ntohs (tvb, offset+11));
800 flags = tvb_get_guint8 (tvb, offset+14);
801 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
803 "Vendor Unique = %u, NACA = %u, Link = %u",
804 flags & 0xC0, flags & 0x4, flags & 0x1);
808 static const value_string space6_code_vals[] = {
809 {0, "Logical Blocks"},
811 {2, "Sequential Filemarks"},
816 static const value_string format_vals[] = {
817 {0x0, "Use default format"},
818 {0x1, "Partition medium"},
819 {0x2, "Default format then partition"},
823 static const value_string dest_type_vals[] = {
824 {0, "Logical Object Identifier"},
825 {1, "Logical File Identifier"},
830 dissect_ssc_formatmedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
831 guint offset, gboolean isreq, gboolean iscdb,
832 guint payload_len _U_, scsi_task_data_t *cdata _U_)
835 static const int *formatmedium_fields[] = {
844 if (isreq && iscdb) {
845 proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_ssc_formatmedium_flags, ett_scsi_formatmedium, formatmedium_fields, FALSE);
847 proto_tree_add_item (tree, hf_scsi_ssc_format, tvb, offset+1, 1, 0);
849 proto_tree_add_item (tree, hf_scsi_ssc_rdwr10_xferlen, tvb, offset+2, 2, 0);
851 flags = tvb_get_guint8 (tvb, offset+4);
852 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
854 "Vendor Unique = %u, NACA = %u, Link = %u",
855 flags & 0xC0, flags & 0x4, flags & 0x1);
866 dissect_ssc_readposition (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
867 guint offset, gboolean isreq, gboolean iscdb,
868 guint payload_len _U_, scsi_task_data_t *cdata)
876 if (isreq && iscdb) {
877 service_action = tvb_get_guint8 (tvb, offset) & 0x1F;
878 proto_tree_add_text (tree, tvb, offset, 1,
879 "Service Action: %s",
880 val_to_str (service_action,
882 "Unknown (0x%02x)"));
883 /* Remember the service action so we can decode the reply */
885 cdata->itlq->flags = service_action;
887 proto_tree_add_text (tree, tvb, offset+6, 2,
889 tvb_get_ntohs (tvb, offset+6));
890 flags = tvb_get_guint8 (tvb, offset+8);
891 proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
893 "Vendor Unique = %u, NACA = %u, Link = %u",
894 flags & 0xC0, flags & 0x4, flags & 0x1);
898 service_action = cdata->itlq->flags;
900 service_action = -1; /* unknown */
901 switch (service_action) {
902 case SHORT_FORM_BLOCK_ID:
903 case SHORT_FORM_VENDOR_SPECIFIC:
904 flags = tvb_get_guint8 (tvb, offset);
905 proto_tree_add_text (tree, tvb, offset, 1,
906 "BOP: %u, EOP: %u, BCU: %u, BYCU: %u, BPU: %u, PERR: %u",
907 (flags & 0x80) >> 7, (flags & 0x40) >> 6,
908 (flags & BCU) >> 5, (flags & BYCU) >> 4,
909 (flags & BPU) >> 2, (flags & 0x02) >> 1);
912 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset, 1, 0);
915 offset += 2; /* reserved */
917 if (!(flags & BPU)) {
918 proto_tree_add_text (tree, tvb, offset, 4,
919 "First Block Location: %u",
920 tvb_get_ntohl (tvb, offset));
923 proto_tree_add_text (tree, tvb, offset, 4,
924 "Last Block Location: %u",
925 tvb_get_ntohl (tvb, offset));
930 offset += 1; /* reserved */
932 if (!(flags & BCU)) {
933 proto_tree_add_text (tree, tvb, offset, 3,
934 "Number of Blocks in Buffer: %u",
935 tvb_get_ntoh24 (tvb, offset));
939 if (!(flags & BYCU)) {
940 proto_tree_add_text (tree, tvb, offset, 4,
941 "Number of Bytes in Buffer: %u",
942 tvb_get_ntohl (tvb, offset));
948 flags = tvb_get_guint8 (tvb, offset);
949 proto_tree_add_text (tree, tvb, offset, 1,
950 "BOP: %u, EOP: %u, MPU: %u, BPU: %u",
951 (flags & 0x80) >> 7, (flags & 0x40) >> 6,
952 (flags & MPU) >> 3, (flags & BPU) >> 2);
955 offset += 3; /* reserved */
957 if (!(flags & BPU)) {
958 proto_tree_add_text (tree, tvb, offset, 4,
959 "Partition Number: %u",
960 tvb_get_ntohl (tvb, offset));
963 proto_tree_add_text (tree, tvb, offset, 8,
964 "Block Number: %" G_GINT64_MODIFIER "u",
965 tvb_get_ntoh64 (tvb, offset));
970 if (!(flags & MPU)) {
971 proto_tree_add_text (tree, tvb, offset, 8,
972 "File Number: %" G_GINT64_MODIFIER "u",
973 tvb_get_ntoh64 (tvb, offset));
976 proto_tree_add_text (tree, tvb, offset, 8,
977 "Set Number: %" G_GINT64_MODIFIER "u",
978 tvb_get_ntoh64 (tvb, offset));
985 flags = tvb_get_guint8 (tvb, offset);
986 proto_tree_add_text (tree, tvb, offset, 1,
987 "BOP: %u, EOP: %u, BCU: %u, BYCU: %u, MPU: %u, BPU: %u, PERR: %u",
988 (flags & 0x80) >> 7, (flags & 0x40) >> 6,
989 (flags & BCU) >> 5, (flags & BYCU) >> 4,
990 (flags & MPU) >> 3, (flags & BPU) >> 2,
991 (flags & 0x02) >> 1);
994 proto_tree_add_item (tree, hf_scsi_ssc_partition, tvb, offset, 1, 0);
997 proto_tree_add_text (tree, tvb, offset, 2,
998 "Additional Length: %u",
999 tvb_get_ntohs (tvb, offset));
1002 offset += 1; /* reserved */
1004 if (!(flags & BCU)) {
1005 proto_tree_add_text (tree, tvb, offset, 3,
1006 "Number of Blocks in Buffer: %u",
1007 tvb_get_ntoh24 (tvb, offset));
1011 if (!(flags & BPU)) {
1012 proto_tree_add_text (tree, tvb, offset, 8,
1013 "First Block Location: %" G_GINT64_MODIFIER "u",
1014 tvb_get_ntoh64 (tvb, offset));
1017 proto_tree_add_text (tree, tvb, offset, 8,
1018 "Last Block Location: %" G_GINT64_MODIFIER "u",
1019 tvb_get_ntoh64 (tvb, offset));
1024 offset += 1; /* reserved */
1026 if (!(flags & BYCU)) {
1027 proto_tree_add_text (tree, tvb, offset, 8,
1028 "Number of Bytes in Buffer: %" G_GINT64_MODIFIER "u",
1029 tvb_get_ntoh64 (tvb, offset));
1045 const value_string scsi_ssc_vals[] = {
1046 {SCSI_SSC_ERASE_6 , "Erase(6)"},
1047 {SCSI_SSC_ERASE_16 , "Erase(16)"},
1048 {SCSI_SPC_EXTCOPY , "Extended Copy"},
1049 {SCSI_SSC_FORMAT_MEDIUM , "Format Medium"},
1050 {SCSI_SPC_INQUIRY , "Inquiry"},
1051 {SCSI_SSC_LOAD_UNLOAD , "Load Unload"},
1052 {SCSI_SSC_LOCATE_10 , "Locate(10)"},
1053 {SCSI_SSC_LOCATE_16 , "Locate(16)"},
1054 {SCSI_SPC_LOGSELECT , "Log Select"},
1055 {SCSI_SPC_LOGSENSE , "Log Sense"},
1056 {SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
1057 {SCSI_SPC_RESERVE6 , "Reserve(6)"},
1058 {SCSI_SPC_RELEASE6 , "Release(6)"},
1059 {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
1060 {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
1061 {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
1062 {SCSI_SMC_MOVE_MEDIUM , "Move Medium"},
1063 {SCSI_SMC_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
1064 {SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
1065 {SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
1066 {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
1067 {SCSI_SSC_READ6 , "Read(6)"},
1068 {SCSI_SSC_READ_16 , "Read(16)"},
1069 {SCSI_SSC_READ_BLOCK_LIMITS , "Read Block Limits"},
1070 {SCSI_SMC_READ_ELEMENT_STATUS , "Read Element Status"},
1071 {SCSI_SMC_READ_ELEMENT_STATUS_ATTACHED , "Read Element Status Attached"},
1072 {SCSI_SSC_READ_POSITION , "Read Position"},
1073 {SCSI_SSC_READ_REVERSE_6 , "Read Reverse(6)"},
1074 {SCSI_SSC_READ_REVERSE_16 , "Read Reverse(16)"},
1075 {SCSI_SSC_RECOVER_BUFFERED_DATA , "Recover Buffered Data"},
1076 {SCSI_SSC_REPORT_DENSITY_SUPPORT , "Report Density Support"},
1077 {SCSI_SPC_REPORTLUNS , "Report LUNs"},
1078 {SCSI_SPC_REQSENSE , "Request Sense"},
1079 {SCSI_SSC_REWIND , "Rewind"},
1080 {SCSI_SPC_SENDDIAG , "Send Diagnostic"},
1081 {SCSI_SSC_SET_CAPACITY , "Set Capacity"},
1082 {SCSI_SSC_SPACE_6 , "Space(6)"},
1083 {SCSI_SSC_SPACE_16 , "Space(16)"},
1084 {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
1085 {SCSI_SSC_VERIFY_6 , "Verify(6)"},
1086 {SCSI_SSC_VERIFY_16 , "Verify(16)"},
1087 {SCSI_SSC_WRITE6 , "Write(6)"},
1088 {SCSI_SSC_WRITE_16 , "Write(16)"},
1089 {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
1090 {SCSI_SSC_WRITE_FILEMARKS_16 , "Write Filemarks(16)"},
1091 {SCSI_SSC_WRITE_FILEMARKS_6 , "Write Filemarks(6)"},
1096 scsi_cdb_table_t scsi_ssc_table[256] = {
1097 /*SPC 0x00*/{dissect_spc_testunitready},
1098 /*SSC 0x01*/{dissect_ssc_rewind},
1100 /*SPC 0x03*/{dissect_spc_requestsense},
1101 /*SSC 0x04*/{dissect_ssc_formatmedium},
1102 /*SSC 0x05*/{dissect_ssc_readblocklimits},
1105 /*SSC 0x08*/{dissect_ssc_read6},
1107 /*SSC 0x0a*/{dissect_ssc_write6},
1108 /*SSC 0x0b*/{dissect_ssc_setcapacity},
1112 /*SSC 0x0f*/{dissect_ssc_readreverse6},
1113 /*SSC 0x10*/{dissect_ssc_writefilemarks6},
1114 /*SSC 0x11*/{dissect_ssc_space6},
1115 /*SPC 0x12*/{dissect_spc_inquiry},
1116 /*SSC 0x13*/{dissect_ssc_verify6},
1117 /*SSC 0x14*/{dissect_ssc_recoverbuffereddata},
1118 /*SPC 0x15*/{dissect_spc_modeselect6},
1119 /*SSC 0x16*/{dissect_spc_reserve6},
1120 /*SSC 0x17*/{dissect_spc_release6},
1122 /*SSC 0x19*/{dissect_ssc_erase6},
1123 /*SPC 0x1a*/{dissect_spc_modesense6},
1124 /*SSC 0x1b*/{dissect_ssc_loadunload},
1126 /*SPC 0x1d*/{dissect_spc_senddiagnostic},
1127 /*SSC 0x1e*/{dissect_spc_preventallowmediaremoval},
1140 /*SSC 0x2b*/{dissect_ssc_locate10},
1149 /*SSC 0x34*/{dissect_ssc_readposition},
1156 /*SPC 0x3b*/{dissect_spc_writebuffer},
1165 /*SSC 0x44*/{dissect_ssc_reportdensitysupport},
1173 /*SPC 0x4c*/{dissect_spc_logselect},
1174 /*SPC 0x4d*/{dissect_spc_logsense},
1182 /*SPC 0x55*/{dissect_spc_modeselect10},
1187 /*SPC 0x5a*/{dissect_spc_modesense10},
1191 /*SPC 0x5e*/{dissect_spc_persistentreservein},
1192 /*SPC 0x5f*/{dissect_spc_persistentreserveout},
1225 /*SSC 0x80*/{dissect_ssc_writefilemarks16},
1226 /*SSC 0x81*/{dissect_ssc_readreverse16},
1228 /*SPC 0x83*/{dissect_spc_extcopy},
1233 /*SSC 0x88*/{dissect_ssc_read16},
1235 /*SSC 0x8a*/{dissect_ssc_write16},
1240 /*SSC 0x8f*/{dissect_ssc_verify16},
1242 /*SSC 0x91*/{dissect_ssc_space16},
1243 /*SSC 0x92*/{dissect_ssc_locate16},
1244 /*SSC 0x93*/{dissect_ssc_erase16},
1257 /*SPC 0xa0*/{dissect_spc_reportluns},
1262 /*SSC 0xa5*/{dissect_smc_movemedium},
1264 /*SSC 0xa7*/{dissect_smc_movemedium},
1277 /*SSC 0xb4*/{dissect_smc_readelementstatus},
1281 /*SSC 0xb8*/{dissect_smc_readelementstatus},
1358 proto_register_scsi_ssc(void)
1360 static hf_register_info hf[] = {
1361 { &hf_scsi_ssc_opcode,
1362 {"SSC Opcode", "scsi.ssc.opcode", FT_UINT8, BASE_HEX,
1363 VALS (scsi_ssc_vals), 0x0, "", HFILL}},
1364 { &hf_scsi_ssc_rdwr6_xferlen,
1365 {"Transfer Length", "scsi.ssc.rdwr6.xferlen", FT_UINT24, BASE_DEC, NULL, 0x0,
1367 { &hf_scsi_ssc_ver16_verlen,
1368 {"Verification Length", "scsi.ssc.verify16.verify_len", FT_UINT24, BASE_DEC, NULL, 0x0,
1370 { &hf_scsi_ssc_locate10_loid,
1371 {"Logical Object Identifier", "scsi.ssc.locate10.loid", FT_UINT32, BASE_DEC, NULL, 0x0,
1373 { &hf_scsi_ssc_locate16_loid,
1374 {"Logical Identifier", "scsi.ssc.locate16.loid", FT_UINT64, BASE_DEC, NULL, 0x0,
1376 { &hf_scsi_ssc_space6_count,
1377 {"Count", "scsi.ssc.space6.count", FT_INT24, BASE_DEC, NULL, 0x0,
1379 { &hf_scsi_ssc_space6_code,
1380 {"Code", "scsi.ssc.space6.code", FT_UINT8, BASE_HEX,
1381 VALS(space6_code_vals), 0x0f,
1383 { &hf_scsi_ssc_space16_count,
1384 {"Count", "scsi.ssc.space16.count", FT_UINT64, BASE_DEC, NULL, 0x0,
1386 { &hf_scsi_ssc_rdwr10_xferlen,
1387 {"Transfer Length", "scsi.ssc.rdwr10.xferlen", FT_UINT16, BASE_DEC, NULL,
1389 { &hf_scsi_ssc_erase_flags,
1390 {"Flags", "scsi.ssc.erase_flags", FT_UINT8, BASE_HEX,
1391 NULL, 0x0, "", HFILL}},
1393 {"FCS", "scsi.ssc.fcs", FT_BOOLEAN, 8,
1394 NULL, 0x08, "", HFILL}},
1396 {"LCS", "scsi.ssc.lcs", FT_BOOLEAN, 8,
1397 NULL, 0x04, "", HFILL}},
1398 { &hf_scsi_ssc_erase_immed,
1399 {"IMMED", "scsi.ssc.erase_immed", FT_BOOLEAN, 8,
1400 NULL, 0x02, "", HFILL}},
1401 { &hf_scsi_ssc_long,
1402 {"LONG", "scsi.ssc.long", FT_BOOLEAN, 8,
1403 NULL, 0x01, "", HFILL}},
1404 { &hf_scsi_ssc_partition,
1405 {"Partition", "scsi.ssc.partition", FT_UINT8, BASE_HEX,
1406 NULL, 0x0, "", HFILL}},
1408 {"Logical Block Identifier", "scsi.ssc.lbi", FT_UINT64, BASE_HEX,
1409 NULL, 0x0, "", HFILL}},
1410 { &hf_scsi_ssc_verify,
1411 {"VERIFY", "scsi.ssc.verify", FT_BOOLEAN, 8,
1412 NULL, 0x02, "", HFILL}},
1413 { &hf_scsi_ssc_immed,
1414 {"IMMED", "scsi.ssc.immed", FT_BOOLEAN, 8,
1415 NULL, 0x01, "", HFILL}},
1416 { &hf_scsi_ssc_formatmedium_flags,
1417 {"Flags", "scsi.ssc.formatmedium_flags", FT_UINT8, BASE_HEX,
1418 NULL, 0x0, "", HFILL}},
1419 { &hf_scsi_ssc_format,
1420 {"Format", "scsi.ssc.format", FT_UINT8, BASE_HEX,
1421 VALS(format_vals), 0x0f, "", HFILL}},
1422 { &hf_scsi_ssc_loadunload_immed_flags,
1423 {"Immed", "scsi.ssc.loadunload_immed_flags", FT_UINT8, BASE_HEX,
1424 NULL, 0x0, "", HFILL}},
1425 { &hf_scsi_ssc_loadunload_flags,
1426 {"Flags", "scsi.ssc.loadunload_flags", FT_UINT8, BASE_HEX,
1427 NULL, 0x0, "", HFILL}},
1428 { &hf_scsi_ssc_hold,
1429 {"HOLD", "scsi.ssc.hold", FT_BOOLEAN, 8,
1430 NULL, 0x08, "", HFILL}},
1432 {"EOT", "scsi.ssc.eot", FT_BOOLEAN, 8,
1433 NULL, 0x04, "", HFILL}},
1434 { &hf_scsi_ssc_reten,
1435 {"RETEN", "scsi.ssc.reten", FT_BOOLEAN, 8,
1436 NULL, 0x02, "", HFILL}},
1437 { &hf_scsi_ssc_load,
1438 {"LOAD", "scsi.ssc.load", FT_BOOLEAN, 8,
1439 NULL, 0x01, "", HFILL}},
1440 { &hf_scsi_ssc_locate_flags,
1441 {"Flags", "scsi.ssc.locate_flags", FT_UINT8, BASE_HEX,
1442 NULL, 0x0, "", HFILL}},
1444 {"BT", "scsi.ssc.bt", FT_BOOLEAN, 8,
1445 NULL, 0x04, "", HFILL}},
1447 {"CP", "scsi.ssc.cp", FT_BOOLEAN, 8,
1448 NULL, 0x02, "", HFILL}},
1449 { &hf_scsi_ssc_dest_type,
1450 {"Dest Type", "scsi.ssc.dest_type", FT_UINT8, BASE_HEX,
1451 VALS(dest_type_vals), 0x18, "", HFILL}},
1452 { &hf_scsi_ssc_bam_flags,
1453 {"Flags", "scsi.ssc.bam_flags", FT_UINT8, BASE_HEX,
1454 NULL, 0x0, "", HFILL}},
1456 {"BAM", "scsi.ssc.bam", FT_BOOLEAN, 8,
1457 NULL, 0x01, "", HFILL}},
1458 { &hf_scsi_ssc_read6_flags,
1459 {"Flags", "scsi.ssc.read6_flags", FT_UINT8, BASE_HEX,
1460 NULL, 0x0, "", HFILL}},
1461 { &hf_scsi_ssc_sili,
1462 {"SILI", "scsi.ssc.sili", FT_BOOLEAN, 8,
1463 NULL, 0x02, "", HFILL}},
1464 { &hf_scsi_ssc_fixed,
1465 {"FIXED", "scsi.ssc.fixed", FT_BOOLEAN, 8,
1466 NULL, 0x01, "", HFILL}},
1467 { &hf_scsi_ssc_bytord,
1468 {"BYTORD", "scsi.ssc.bytord", FT_BOOLEAN, 8,
1469 NULL, 0x04, "", HFILL}},
1470 { &hf_scsi_ssc_bytcmp,
1471 {"BYTCMP", "scsi.ssc.bytcmp", FT_BOOLEAN, 8,
1472 NULL, 0x02, "", HFILL}},
1473 { &hf_scsi_ssc_verify16_immed,
1474 {"IMMED", "scsi.ssc.verify16_immed", FT_BOOLEAN, 8,
1475 NULL, 0x04, "", HFILL}},
1476 { &hf_scsi_ssc_medium_type,
1477 {"Medium Type", "scsi.ssc.medium_type", FT_BOOLEAN, 8,
1478 NULL, 0x02, "", HFILL}},
1479 { &hf_scsi_ssc_media,
1480 {"Media", "scsi.ssc.media", FT_BOOLEAN, 8,
1481 NULL, 0x01, "", HFILL}},
1482 { &hf_scsi_ssc_capacity_prop_value,
1483 {"Capacity Proportion Value", "scsi.ssc.cpv", FT_UINT16, BASE_DEC,
1484 NULL, 0, "", HFILL}},
1488 /* Setup protocol subtree array */
1489 static gint *ett[] = {
1491 &ett_scsi_formatmedium,
1492 &ett_scsi_loadunload_immed,
1493 &ett_scsi_loadunload,
1500 /* Register the protocol name and description */
1501 proto_scsi_ssc = proto_register_protocol("SCSI_SSC", "SCSI_SSC", "scsi_ssc");
1503 /* Required function calls to register the header fields and subtrees used */
1504 proto_register_field_array(proto_scsi_ssc, hf, array_length(hf));
1506 proto_register_subtree_array(ett, array_length(ett));
1511 proto_reg_handoff_scsi_ssc(void)