529
#define SCSI_SBC2_FORMATUNIT 0x04
530
#define SCSI_SBC2_LOCKUNLKCACHE10 0x36
531
#define SCSI_SBC2_LOCKUNLKCACHE16 0x92
532
#define SCSI_SBC2_PREFETCH10 0x34
533
#define SCSI_SBC2_PREFETCH16 0x90
534
#define SCSI_SBC2_READ6 0x08
535
#define SCSI_SBC2_READ10 0x28
536
#define SCSI_SBC2_READ12 0xA8
537
#define SCSI_SBC2_READ16 0x88
538
#define SCSI_SBC2_READCAPACITY10 0x25
539
#define SCSI_SBC2_SERVICEACTIONIN16 0x9E
540
#define SCSI_SBC2_READDEFDATA10 0x37
541
#define SCSI_SBC2_READDEFDATA12 0xB7
542
#define SCSI_SBC2_READLONG 0x3E
543
#define SCSI_SBC2_REASSIGNBLKS 0x07
544
#define SCSI_SBC2_REBUILD16 0x81
545
#define SCSI_SBC2_REBUILD32 0x7F
546
#define SCSI_SBC2_REGENERATE16 0x82
547
#define SCSI_SBC2_REGENERATE32 0x7F
548
#define SCSI_SBC2_SEEK10 0x2B
549
#define SCSI_SBC2_SETLIMITS10 0x33
550
#define SCSI_SBC2_SETLIMITS12 0xB3
551
#define SCSI_SBC2_STARTSTOPUNIT 0x1B
552
#define SCSI_SBC2_SYNCCACHE10 0x35
553
#define SCSI_SBC2_SYNCCACHE16 0x91
554
#define SCSI_SBC2_VERIFY10 0x2F
555
#define SCSI_SBC2_VERIFY12 0xAF
556
#define SCSI_SBC2_VERIFY16 0x8F
557
#define SCSI_SBC2_WRITE6 0x0A
558
#define SCSI_SBC2_WRITE10 0x2A
559
#define SCSI_SBC2_WRITE12 0xAA
560
#define SCSI_SBC2_WRITE16 0x8A
561
#define SCSI_SBC2_WRITENVERIFY10 0x2E
562
#define SCSI_SBC2_WRITENVERIFY12 0xAE
563
#define SCSI_SBC2_WRITENVERIFY16 0x8E
564
#define SCSI_SBC2_WRITELONG 0x3F
565
#define SCSI_SBC2_WRITESAME10 0x41
566
#define SCSI_SBC2_WRITESAME16 0x93
567
#define SCSI_SBC2_XDREAD10 0x52
568
#define SCSI_SBC2_XDREAD32 0x7F
569
#define SCSI_SBC2_XDWRITE10 0x50
570
#define SCSI_SBC2_XDWRITE32 0x7F
571
#define SCSI_SBC2_XDWRITEREAD10 0x53
572
#define SCSI_SBC2_XDWRITEREAD32 0x7F
573
#define SCSI_SBC2_XDWRITEEXTD16 0x80
574
#define SCSI_SBC2_XDWRITEEXTD32 0x7F
575
#define SCSI_SBC2_XPWRITE10 0x51
576
#define SCSI_SBC2_XPWRITE32 0x7F
579
const value_string scsi_sbc2_vals[] = {
580
{SCSI_SPC2_EXTCOPY , "Extended Copy"},
581
{SCSI_SPC2_INQUIRY , "Inquiry"},
582
{SCSI_SBC2_FORMATUNIT , "Format Unit"},
583
{SCSI_SBC2_LOCKUNLKCACHE10 , "Lock Unlock Cache(10)"},
584
{SCSI_SBC2_LOCKUNLKCACHE16 , "Lock Unlock Cache(16)"},
585
{SCSI_SPC2_LOGSELECT , "Log Select"},
586
{SCSI_SPC2_LOGSENSE , "Log Sense"},
587
{SCSI_SPC2_MODESELECT6 , "Mode Select(6)"},
588
{SCSI_SPC2_MODESELECT10 , "Mode Select(10)"},
589
{SCSI_SPC2_MODESENSE6 , "Mode Sense(6)"},
590
{SCSI_SPC2_MODESENSE10 , "Mode Sense(10)"},
591
{SCSI_SPC2_PERSRESVIN , "Persistent Reserve In"},
592
{SCSI_SPC2_PERSRESVOUT , "Persistent Reserve Out"},
593
{SCSI_SBC2_PREFETCH10 , "Pre-Fetch(10)"},
594
{SCSI_SBC2_PREFETCH16 , "Pre-Fetch(16)"},
595
{SCSI_SPC2_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
596
{SCSI_SBC2_READ6 , "Read(6)"},
597
{SCSI_SBC2_READ10 , "Read(10)"},
598
{SCSI_SBC2_READ12 , "Read(12)"},
599
{SCSI_SBC2_READ16 , "Read(16)"},
600
{SCSI_SBC2_READCAPACITY10 , "Read Capacity(10)"},
601
{SCSI_SPC2_REPORTLUNS , "Report LUNs"},
602
{SCSI_SPC2_REQSENSE , "Request Sense"},
603
{SCSI_SBC2_SERVICEACTIONIN16 , "Service Action In(16)"},
604
{SCSI_SBC2_READDEFDATA10 , "Read Defect Data(10)"},
605
{SCSI_SBC2_READDEFDATA12 , "Read Defect Data(12)"},
606
{SCSI_SBC2_READLONG , "Read Long"},
607
{SCSI_SBC2_REASSIGNBLKS , "Reassign Blocks"},
608
{SCSI_SBC2_REBUILD16 , "Rebuild(16)"},
609
{SCSI_SBC2_REBUILD32 , "Rebuild(32)"},
610
{SCSI_SBC2_REGENERATE16 , "Regenerate(16)"},
611
{SCSI_SBC2_REGENERATE32 , "Regenerate(32)"},
612
{SCSI_SBC2_SEEK10 , "Seek(10)"},
613
{SCSI_SPC2_SENDDIAG , "Send Diagnostic"},
614
{SCSI_SBC2_SETLIMITS10 , "Set Limits(10)"},
615
{SCSI_SBC2_SETLIMITS12 , "Set Limits(12)"},
616
{SCSI_SBC2_STARTSTOPUNIT , "Start Stop Unit"},
617
{SCSI_SBC2_SYNCCACHE10 , "Synchronize Cache(10)"},
618
{SCSI_SBC2_SYNCCACHE16 , "Synchronize Cache(16)"},
619
{SCSI_SPC2_TESTUNITRDY , "Test Unit Ready"},
620
{SCSI_SBC2_VERIFY10 , "Verify(10)"},
621
{SCSI_SBC2_VERIFY12 , "Verify(12)"},
622
{SCSI_SBC2_VERIFY16 , "Verify(16)"},
623
{SCSI_SBC2_WRITE6 , "Write(6)"},
624
{SCSI_SBC2_WRITE10 , "Write(10)"},
625
{SCSI_SBC2_WRITE12 , "Write(12)"},
626
{SCSI_SBC2_WRITE16 , "Write(16)"},
627
{SCSI_SPC2_WRITEBUFFER , "Write Buffer"},
628
{SCSI_SBC2_WRITENVERIFY10 , "Write & Verify(10)"},
629
{SCSI_SBC2_WRITENVERIFY12 , "Write & Verify(12)"},
630
{SCSI_SBC2_WRITENVERIFY16 , "Write & Verify(16)"},
631
{SCSI_SBC2_WRITELONG , "Write Long"},
632
{SCSI_SBC2_WRITESAME10 , "Write Same(10)"},
633
{SCSI_SBC2_WRITESAME16 , "Write Same(16)"},
634
{SCSI_SBC2_XDREAD10 , "XdRead(10)"},
635
{SCSI_SBC2_XDREAD32 , "XdRead(32)"},
636
{SCSI_SBC2_XDWRITE10 , "XdWrite(10)"},
637
{SCSI_SBC2_XDWRITE32 , "XdWrite(32)"},
638
{SCSI_SBC2_XDWRITEREAD10 , "XdWriteRead(10)"},
639
{SCSI_SBC2_XDWRITEREAD32 , "XdWriteRead(32)"},
640
{SCSI_SBC2_XDWRITEEXTD16 , "XdWrite Extended(16)"},
641
{SCSI_SBC2_XDWRITEEXTD32 , "XdWrite Extended(32)"},
642
{SCSI_SBC2_XPWRITE10 , "XpWrite(10)"},
643
{SCSI_SBC2_XPWRITE32 , "XpWrite(32)"},
648
#define SCSI_MMC4_READCAPACITY10 0x25
649
#define SCSI_MMC4_READ10 0x28
650
#define SCSI_MMC4_WRITE10 0x2a
651
#define SCSI_MMC4_SYNCHRONIZECACHE 0x35
652
#define SCSI_MMC4_READTOCPMAATIP 0x43
653
#define SCSI_MMC4_GETCONFIGURATION 0x46
654
#define SCSI_MMC4_GETEVENTSTATUSNOTIFY 0x4a
655
#define SCSI_MMC4_READDISCINFORMATION 0x51
656
#define SCSI_MMC4_READTRACKINFORMATION 0x52
657
#define SCSI_MMC4_RESERVETRACK 0x53
658
#define SCSI_MMC4_READBUFFERCAPACITY 0x5c
659
#define SCSI_MMC4_REPORTKEY 0xa4
660
#define SCSI_MMC4_READ12 0xa8
661
#define SCSI_MMC4_WRITE12 0xaa
662
#define SCSI_MMC4_GETPERFORMANCE 0xac
663
#define SCSI_MMC4_READDISCSTRUCTURE 0xad
664
#define SCSI_MMC4_SETSTREAMING 0xb6
665
#define SCSI_MMC4_SETCDSPEED 0xbb
666
const value_string scsi_mmc_vals[] = {
667
{SCSI_MMC4_GETCONFIGURATION , "Get Configuraion"},
668
{SCSI_MMC4_GETEVENTSTATUSNOTIFY , "Get Event Status Notification"},
669
{SCSI_MMC4_GETPERFORMANCE , "Get Performance"},
670
{SCSI_SPC2_INQUIRY , "Inquiry"},
671
{SCSI_SPC2_MODESELECT10 , "Mode Select(10)"},
672
{SCSI_SPC2_MODESENSE10 , "Mode Sense(10)"},
673
{SCSI_SPC2_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
674
{SCSI_MMC4_READ10 , "Read(10)"},
675
{SCSI_MMC4_READ12 , "Read(12)"},
676
{SCSI_MMC4_READBUFFERCAPACITY , "Read Buffer Capacity"},
677
{SCSI_MMC4_READCAPACITY10 , "Read Capacity(10)"},
678
{SCSI_MMC4_READDISCINFORMATION , "Read Disc Information"},
679
{SCSI_MMC4_READDISCSTRUCTURE , "Read DISC Structure"},
680
{SCSI_MMC4_READTOCPMAATIP , "Read TOC/PMA/ATIP"},
681
{SCSI_MMC4_READTRACKINFORMATION , "Read Track Information"},
682
{SCSI_MMC4_REPORTKEY , "Report Key"},
683
{SCSI_SPC2_REPORTLUNS , "Report LUNs"},
684
{SCSI_SPC2_REQSENSE , "Request Sense"},
685
{SCSI_MMC4_RESERVETRACK , "Reserve Track"},
686
{SCSI_MMC4_SETCDSPEED , "Set CD Speed"},
687
{SCSI_MMC4_SETSTREAMING , "Set Streaming"},
688
{SCSI_SBC2_STARTSTOPUNIT , "Start Stop Unit"},
689
{SCSI_MMC4_SYNCHRONIZECACHE , "Synchronize Cache"},
690
{SCSI_SPC2_TESTUNITRDY , "Test Unit Ready"},
691
{SCSI_MMC4_WRITE10 , "Write(10)"},
692
{SCSI_MMC4_WRITE12 , "Write(12)"},
693
{SCSI_SPC2_WRITEBUFFER , "Write Buffer"},
698
#define SCSI_SMC2_EXCHANGE_MEDIUM 0x40
699
#define SCSI_SMC2_INITIALIZE_ELEMENT_STATUS 0x07
700
#define SCSI_SMC2_INITIALIZE_ELEMENT_STATUS_RANGE 0x37
701
#define SCSI_SMC2_MOVE_MEDIUM 0xA5
702
#define SCSI_SMC2_MOVE_MEDIUM_ATTACHED 0xA7
703
#define SCSI_SMC2_POSITION_TO_ELEMENT 0x2B
704
#define SCSI_SMC2_READ_ATTRIBUTE 0x8C
705
#define SCSI_SMC2_READ_ELEMENT_STATUS 0xB8
706
#define SCSI_SMC2_READ_ELEMENT_STATUS_ATTACHED 0xB4
707
#define SCSI_SMC2_REQUEST_VOLUME_ELEMENT_ADDRESS 0xB5
708
#define SCSI_SMC2_SEND_VOLUME_TAG 0xB6
709
#define SCSI_SMC2_WRITE_ATTRIBUTE 0x8D
711
static const value_string scsi_smc2_vals[] = {
712
{SCSI_SMC2_EXCHANGE_MEDIUM , "Exchange Medium"},
713
{SCSI_SMC2_INITIALIZE_ELEMENT_STATUS , "Initialize Element Status"},
714
{SCSI_SMC2_INITIALIZE_ELEMENT_STATUS_RANGE, "Initialize Element Status With Range"},
715
{SCSI_SPC2_INQUIRY , "Inquiry"},
716
{SCSI_SPC2_LOGSELECT , "Log Select"},
717
{SCSI_SPC2_LOGSENSE , "Log Sense"},
718
{SCSI_SPC2_MODESELECT6 , "Mode Select(6)"},
719
{SCSI_SPC2_MODESELECT10 , "Mode Select(10)"},
720
{SCSI_SPC2_MODESENSE6 , "Mode Sense(6)"},
721
{SCSI_SPC2_MODESENSE10 , "Mode Sense(10)"},
722
{SCSI_SMC2_MOVE_MEDIUM , "Move Medium"},
723
{SCSI_SMC2_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
724
{SCSI_SPC2_PERSRESVIN , "Persistent Reserve In"},
725
{SCSI_SPC2_PERSRESVOUT , "Persistent Reserve Out"},
726
{SCSI_SMC2_POSITION_TO_ELEMENT , "Position To Element"},
727
{SCSI_SPC2_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
728
{SCSI_SMC2_READ_ATTRIBUTE , "Read Attribute"},
729
{SCSI_SMC2_READ_ELEMENT_STATUS , "Read Element Status"},
730
{SCSI_SMC2_READ_ELEMENT_STATUS_ATTACHED , "Read Element Status Attached"},
731
{SCSI_SPC2_RELEASE6 , "Release(6)"},
732
{SCSI_SPC2_RELEASE10 , "Release(10)"},
733
{SCSI_SPC2_REPORTLUNS , "Report LUNs"},
734
{SCSI_SPC2_REQSENSE , "Request Sense"},
735
{SCSI_SMC2_REQUEST_VOLUME_ELEMENT_ADDRESS , "Request Volume Element Address"},
736
{SCSI_SPC2_RESERVE6 , "Reserve(6)"},
737
{SCSI_SPC2_RESERVE10 , "Reserve(10)"},
738
{SCSI_SMC2_SEND_VOLUME_TAG , "Send Volume Tag"},
739
{SCSI_SPC2_SENDDIAG , "Send Diagnostic"},
740
{SCSI_SPC2_TESTUNITRDY , "Test Unit Ready"},
741
{SCSI_SMC2_WRITE_ATTRIBUTE , "Write Attribute"},
742
{SCSI_SPC2_WRITEBUFFER , "Write Buffer"},
748
#define SCSI_SSC2_REWIND 0x01
749
#define SCSI_SSC2_FORMAT_MEDIUM 0x04
750
#define SCSI_SSC2_READ_BLOCK_LIMITS 0x05
751
#define SCSI_SSC2_READ6 0x08
752
#define SCSI_SSC2_WRITE6 0x0A
753
#define SCSI_SSC2_SET_CAPACITY 0x0B
754
#define SCSI_SSC2_READ_REVERSE_6 0x0F
755
#define SCSI_SSC2_WRITE_FILEMARKS_6 0x10
756
#define SCSI_SSC2_SPACE_6 0x11
757
#define SCSI_SSC2_VERIFY_6 0x13
758
#define SCSI_SSC2_RECOVER_BUFFERED_DATA 0x14
759
#define SCSI_SSC2_ERASE_6 0x19
760
#define SCSI_SSC2_LOAD_UNLOAD 0x1B
761
#define SCSI_SSC2_LOCATE_10 0x2B
762
#define SCSI_SSC2_READ_POSITION 0x34
763
#define SCSI_SSC2_REPORT_DENSITY_SUPPORT 0x44
764
#define SCSI_SSC2_WRITE_FILEMARKS_16 0x80
765
#define SCSI_SSC2_READ_REVERSE_16 0x81
766
#define SCSI_SSC2_READ_16 0x88
767
#define SCSI_SSC2_WRITE_16 0x8A
768
#define SCSI_SSC2_VERIFY_16 0x8F
769
#define SCSI_SSC2_SPACE_16 0x91
770
#define SCSI_SSC2_LOCATE_16 0x92
771
#define SCSI_SSC2_ERASE_16 0x93
773
const value_string scsi_ssc2_vals[] = {
774
{SCSI_SSC2_ERASE_6 , "Erase(6)"},
775
{SCSI_SSC2_ERASE_16 , "Erase(16)"},
776
{SCSI_SPC2_EXTCOPY , "Extended Copy"},
777
{SCSI_SSC2_FORMAT_MEDIUM , "Format Medium"},
778
{SCSI_SPC2_INQUIRY , "Inquiry"},
779
{SCSI_SSC2_LOAD_UNLOAD , "Load Unload"},
780
{SCSI_SSC2_LOCATE_10 , "Locate(10)"},
781
{SCSI_SSC2_LOCATE_16 , "Locate(16)"},
782
{SCSI_SPC2_LOGSELECT , "Log Select"},
783
{SCSI_SPC2_LOGSENSE , "Log Sense"},
784
{SCSI_SPC2_MODESELECT6 , "Mode Select(6)"},
785
{SCSI_SPC2_MODESELECT10 , "Mode Select(10)"},
786
{SCSI_SPC2_MODESENSE6 , "Mode Sense(6)"},
787
{SCSI_SPC2_MODESENSE10 , "Mode Sense(10)"},
788
{SCSI_SMC2_MOVE_MEDIUM , "Move Medium"},
789
{SCSI_SMC2_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
790
{SCSI_SPC2_PERSRESVIN , "Persistent Reserve In"},
791
{SCSI_SPC2_PERSRESVOUT , "Persistent Reserve Out"},
792
{SCSI_SPC2_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
793
{SCSI_SSC2_READ6 , "Read(6)"},
794
{SCSI_SSC2_READ_16 , "Read(16)"},
795
{SCSI_SSC2_READ_BLOCK_LIMITS , "Read Block Limits"},
796
{SCSI_SMC2_READ_ELEMENT_STATUS , "Read Element Status"},
797
{SCSI_SMC2_READ_ELEMENT_STATUS_ATTACHED, "Read Element Status Attached"},
798
{SCSI_SSC2_READ_POSITION , "Read Position"},
799
{SCSI_SSC2_READ_REVERSE_6 , "Read Reverse(6)"},
800
{SCSI_SSC2_READ_REVERSE_16 , "Read Reverse(16)"},
801
{SCSI_SSC2_RECOVER_BUFFERED_DATA , "Recover Buffered Data"},
802
{SCSI_SSC2_REPORT_DENSITY_SUPPORT , "Report Density Support"},
803
{SCSI_SPC2_REPORTLUNS , "Report LUNs"},
804
{SCSI_SPC2_REQSENSE , "Request Sense"},
805
{SCSI_SSC2_REWIND , "Rewind"},
806
{SCSI_SPC2_SENDDIAG , "Send Diagnostic"},
807
{SCSI_SSC2_SET_CAPACITY , "Set Capacity"},
808
{SCSI_SSC2_SPACE_6 , "Space(6)"},
809
{SCSI_SSC2_SPACE_16 , "Space(16)"},
810
{SCSI_SPC2_TESTUNITRDY , "Test Unit Ready"},
811
{SCSI_SSC2_VERIFY_6 , "Verify(6)"},
812
{SCSI_SSC2_VERIFY_16 , "Verify(16)"},
813
{SCSI_SSC2_WRITE6 , "Write(6)"},
814
{SCSI_SSC2_WRITE_16 , "Write(16)"},
815
{SCSI_SPC2_WRITEBUFFER , "Write Buffer"},
816
{SCSI_SSC2_WRITE_FILEMARKS_16 , "Write Filemarks(16)"},
817
{SCSI_SSC2_WRITE_FILEMARKS_6 , "Write Filemarks(6)"},
821
300
static const value_string scsi_select_report_val[] = {
822
301
{0, "Select All LUNs" },
3928
dissect_sbc2_formatunit (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
3929
guint offset, gboolean isreq, gboolean iscdb,
3930
guint payload_len _U_, scsi_task_data_t *cdata _U_)
3937
if (isreq && iscdb) {
3938
flags = tvb_get_guint8 (tvb, offset);
3939
proto_tree_add_uint_format (tree, hf_scsi_formatunit_flags, tvb, offset,
3941
"Flags: Longlist = %u, FMTDATA = %u, CMPLIST = %u",
3942
flags & 0x20, flags & 0x8, flags & 0x4);
3943
proto_tree_add_item (tree, hf_scsi_cdb_defectfmt, tvb, offset, 1, 0);
3944
proto_tree_add_item (tree, hf_scsi_formatunit_vendor, tvb, offset+1,
3946
proto_tree_add_item (tree, hf_scsi_formatunit_interleave, tvb, offset+2,
3948
flags = tvb_get_guint8 (tvb, offset+4);
3949
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
3951
"Vendor Unique = %u, NACA = %u, Link = %u",
3952
flags & 0xC0, flags & 0x4, flags & 0x1);
3957
dissect_sbc2_readwrite6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
3958
guint offset, gboolean isreq, gboolean iscdb,
3959
guint payload_len _U_, scsi_task_data_t *cdata _U_)
3963
if (isreq && iscdb) {
3964
if (check_col (pinfo->cinfo, COL_INFO))
3965
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%06x, Len: %u)",
3966
tvb_get_ntoh24 (tvb, offset),
3967
tvb_get_guint8 (tvb, offset+3));
3970
if (tree && isreq && iscdb) {
3971
proto_tree_add_item (tree, hf_scsi_rdwr6_lba, tvb, offset, 3, 0);
3972
proto_tree_add_item (tree, hf_scsi_rdwr6_xferlen, tvb, offset+3, 1, 0);
3973
flags = tvb_get_guint8 (tvb, offset+4);
3974
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
3976
"Vendor Unique = %u, NACA = %u, Link = %u",
3977
flags & 0xC0, flags & 0x4, flags & 0x1);
3982
dissect_sbc2_readwrite10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
3983
guint offset, gboolean isreq, gboolean iscdb,
3984
guint payload_len _U_, scsi_task_data_t *cdata _U_)
3989
if (isreq && iscdb) {
3990
if (check_col (pinfo->cinfo, COL_INFO))
3991
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%08x, Len: %u)",
3992
tvb_get_ntohl (tvb, offset+1),
3993
tvb_get_ntohs (tvb, offset+6));
3996
if (tree && isreq && iscdb) {
3997
flags = tvb_get_guint8 (tvb, offset);
3999
proto_tree_add_uint_format (tree, hf_scsi_read_flags, tvb, offset, 1,
4001
"DPO = %u, FUA = %u, RelAddr = %u",
4002
flags & 0x10, flags & 0x8, flags & 0x1);
4003
proto_tree_add_item (tree, hf_scsi_rdwr10_lba, tvb, offset+1, 4, 0);
4004
proto_tree_add_item (tree, hf_scsi_rdwr10_xferlen, tvb, offset+6, 2, 0);
4005
flags = tvb_get_guint8 (tvb, offset+8);
4006
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4008
"Vendor Unique = %u, NACA = %u, Link = %u",
4009
flags & 0xC0, flags & 0x4, flags & 0x1);
4014
dissect_sbc2_readwrite12 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4015
guint offset, gboolean isreq, gboolean iscdb,
4016
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4020
if (isreq && iscdb) {
4021
if (check_col (pinfo->cinfo, COL_INFO))
4022
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%08x, Len: %u)",
4023
tvb_get_ntohl (tvb, offset+1),
4024
tvb_get_ntohl (tvb, offset+5));
4027
if (tree && isreq && iscdb) {
4028
flags = tvb_get_guint8 (tvb, offset);
4030
proto_tree_add_uint_format (tree, hf_scsi_read_flags, tvb, offset, 1,
4032
"DPO = %u, FUA = %u, RelAddr = %u",
4033
flags & 0x10, flags & 0x8, flags & 0x1);
4034
proto_tree_add_item (tree, hf_scsi_rdwr10_lba, tvb, offset+1, 4, 0);
4035
proto_tree_add_item (tree, hf_scsi_rdwr12_xferlen, tvb, offset+5, 4, 0);
4036
flags = tvb_get_guint8 (tvb, offset+10);
4037
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
4039
"Vendor Unique = %u, NACA = %u, Link = %u",
4040
flags & 0xC0, flags & 0x4, flags & 0x1);
4045
dissect_sbc2_readwrite16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4046
guint offset, gboolean isreq, gboolean iscdb,
4047
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4051
if (isreq && iscdb) {
4052
if (check_col (pinfo->cinfo, COL_INFO))
4053
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: %" PRIu64 ", Len: %u)",
4054
tvb_get_ntoh64 (tvb, offset+1),
4055
tvb_get_ntohl (tvb, offset+9));
4058
if (tree && isreq && iscdb) {
4059
flags = tvb_get_guint8 (tvb, offset);
4061
proto_tree_add_uint_format (tree, hf_scsi_read_flags, tvb, offset, 1,
4063
"DPO = %u, FUA = %u, RelAddr = %u",
4064
flags & 0x10, flags & 0x8, flags & 0x1);
4065
proto_tree_add_item (tree, hf_scsi_rdwr16_lba, tvb, offset+1, 8, 0);
4066
proto_tree_add_item (tree, hf_scsi_rdwr12_xferlen, tvb, offset+9, 4, 0);
4067
flags = tvb_get_guint8 (tvb, offset+14);
4068
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
4070
"Vendor Unique = %u, NACA = %u, Link = %u",
4071
flags & 0xC0, flags & 0x4, flags & 0x1);
4076
dissect_sbc2_verify10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4077
guint offset, gboolean isreq, gboolean iscdb,
4078
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4083
if (isreq && iscdb) {
4084
if (check_col (pinfo->cinfo, COL_INFO))
4085
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%08x, Len: %u)",
4086
tvb_get_ntohl (tvb, offset+2),
4087
tvb_get_ntohs (tvb, offset+7));
4090
if (tree && isreq && iscdb) {
4091
proto_tree_add_item (tree, hf_sbc2_verify_dpo, tvb, offset+1, 1, 0);
4092
proto_tree_add_item (tree, hf_sbc2_verify_blkvfy, tvb, offset+1, 1, 0);
4093
proto_tree_add_item (tree, hf_sbc2_verify_bytchk, tvb, offset+1, 1, 0);
4094
proto_tree_add_item (tree, hf_sbc2_verify_reladdr, tvb, offset+1, 1,
4096
proto_tree_add_item (tree, hf_sbc2_verify_lba, tvb, offset+2, 4, 0);
4097
proto_tree_add_item (tree, hf_sbc2_verify_vlen, tvb, offset+7, 2, 0);
4098
flags = tvb_get_guint8 (tvb, offset+9);
4099
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+9, 1,
4101
"Vendor Unique = %u, NACA = %u, Link = %u",
4102
flags & 0xC0, flags & 0x4, flags & 0x1);
4107
dissect_sbc2_verify12 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4108
guint offset, gboolean isreq, gboolean iscdb,
4109
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4114
if (isreq && iscdb) {
4115
if (check_col (pinfo->cinfo, COL_INFO))
4116
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%08x, Len: %u)",
4117
tvb_get_ntohl (tvb, offset+2),
4118
tvb_get_ntohl (tvb, offset+6));
4121
if (tree && isreq && iscdb) {
4122
proto_tree_add_item (tree, hf_sbc2_verify_dpo, tvb, offset+1, 1, 0);
4123
proto_tree_add_item (tree, hf_sbc2_verify_blkvfy, tvb, offset+1, 1, 0);
4124
proto_tree_add_item (tree, hf_sbc2_verify_bytchk, tvb, offset+1, 1, 0);
4125
proto_tree_add_item (tree, hf_sbc2_verify_reladdr, tvb, offset+1, 1,
4127
proto_tree_add_item (tree, hf_sbc2_verify_lba, tvb, offset+2, 4, 0);
4128
proto_tree_add_item (tree, hf_sbc2_verify_vlen32, tvb, offset+6, 4, 0);
4129
flags = tvb_get_guint8 (tvb, offset+11);
4130
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+11, 1,
4132
"Vendor Unique = %u, NACA = %u, Link = %u",
4133
flags & 0xC0, flags & 0x4, flags & 0x1);
4138
dissect_sbc2_verify16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4139
guint offset, gboolean isreq, gboolean iscdb,
4140
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4145
if (isreq && iscdb) {
4146
if (check_col (pinfo->cinfo, COL_INFO))
4147
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: %" PRIu64 ", Len: %u)",
4148
tvb_get_ntoh64 (tvb, offset+2),
4149
tvb_get_ntohl (tvb, offset+10));
4152
if (tree && isreq && iscdb) {
4153
proto_tree_add_item (tree, hf_sbc2_verify_dpo, tvb, offset+1, 1, 0);
4154
proto_tree_add_item (tree, hf_sbc2_verify_blkvfy, tvb, offset+1, 1, 0);
4155
proto_tree_add_item (tree, hf_sbc2_verify_bytchk, tvb, offset+1, 1, 0);
4156
proto_tree_add_item (tree, hf_sbc2_verify_reladdr, tvb, offset+1, 1,
4158
proto_tree_add_item (tree, hf_sbc2_verify_lba, tvb, offset+2, 8, 0);
4159
proto_tree_add_item (tree, hf_sbc2_verify_vlen, tvb, offset+10, 4, 0);
4160
flags = tvb_get_guint8 (tvb, offset+15);
4161
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+15, 1,
4163
"Vendor Unique = %u, NACA = %u, Link = %u",
4164
flags & 0xC0, flags & 0x4, flags & 0x1);
4169
dissect_sbc2_wrverify10 (tvbuff_t *tvb, packet_info *pinfo _U_,
4170
proto_tree *tree, guint offset, gboolean isreq,
4171
gboolean iscdb, guint payload_len _U_,
4172
scsi_task_data_t *cdata _U_)
4177
if (isreq && iscdb) {
4178
if (check_col (pinfo->cinfo, COL_INFO))
4179
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%08x, Len: %u)",
4180
tvb_get_ntohl (tvb, offset+2),
4181
tvb_get_ntohs (tvb, offset+7));
4184
if (tree && isreq && iscdb) {
4185
proto_tree_add_item (tree, hf_sbc2_verify_dpo, tvb, offset+1, 1, 0);
4186
proto_tree_add_item (tree, hf_sbc2_wrverify_ebp, tvb, offset+1, 1, 0);
4187
proto_tree_add_item (tree, hf_sbc2_verify_bytchk, tvb, offset+1, 1, 0);
4188
proto_tree_add_item (tree, hf_sbc2_verify_reladdr, tvb, offset+1, 1,
4190
proto_tree_add_item (tree, hf_sbc2_wrverify_lba, tvb, offset+2, 4, 0);
4191
proto_tree_add_item (tree, hf_sbc2_wrverify_xferlen, tvb, offset+7,
4193
flags = tvb_get_guint8 (tvb, offset+9);
4194
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+9, 1,
4196
"Vendor Unique = %u, NACA = %u, Link = %u",
4197
flags & 0xC0, flags & 0x4, flags & 0x1);
4202
dissect_sbc2_wrverify12 (tvbuff_t *tvb, packet_info *pinfo _U_,
4203
proto_tree *tree, guint offset, gboolean isreq,
4204
gboolean iscdb, guint payload_len _U_,
4205
scsi_task_data_t *cdata _U_)
4209
if (isreq && iscdb) {
4210
if (check_col (pinfo->cinfo, COL_INFO))
4211
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: 0x%08x, Len: %u)",
4212
tvb_get_ntohl (tvb, offset+2),
4213
tvb_get_ntohl (tvb, offset+6));
4216
if (tree && isreq && iscdb) {
4217
proto_tree_add_item (tree, hf_sbc2_verify_dpo, tvb, offset+1, 1, 0);
4218
proto_tree_add_item (tree, hf_sbc2_wrverify_ebp, tvb, offset+1, 1, 0);
4219
proto_tree_add_item (tree, hf_sbc2_verify_bytchk, tvb, offset+1, 1, 0);
4220
proto_tree_add_item (tree, hf_sbc2_verify_reladdr, tvb, offset+1, 1,
4222
proto_tree_add_item (tree, hf_sbc2_wrverify_lba, tvb, offset+2, 4, 0);
4223
proto_tree_add_item (tree, hf_sbc2_wrverify_xferlen32, tvb, offset+6,
4225
flags = tvb_get_guint8 (tvb, offset+11);
4226
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+11, 1,
4228
"Vendor Unique = %u, NACA = %u, Link = %u",
4229
flags & 0xC0, flags & 0x4, flags & 0x1);
4234
dissect_sbc2_wrverify16 (tvbuff_t *tvb, packet_info *pinfo _U_,
4235
proto_tree *tree, guint offset, gboolean isreq,
4236
gboolean iscdb, guint payload_len _U_,
4237
scsi_task_data_t *cdata _U_)
4241
if (isreq && iscdb) {
4242
if (check_col (pinfo->cinfo, COL_INFO))
4243
col_append_fstr (pinfo->cinfo, COL_INFO, "(LBA: %" PRIu64 ", Len: %u)",
4244
tvb_get_ntoh64 (tvb, offset+2),
4245
tvb_get_ntohl (tvb, offset+10));
4248
if (tree && isreq && iscdb) {
4249
proto_tree_add_item (tree, hf_sbc2_verify_dpo, tvb, offset+1, 1, 0);
4250
proto_tree_add_item (tree, hf_sbc2_wrverify_ebp, tvb, offset+1, 1, 0);
4251
proto_tree_add_item (tree, hf_sbc2_verify_bytchk, tvb, offset+1, 1, 0);
4252
proto_tree_add_item (tree, hf_sbc2_verify_reladdr, tvb, offset+1, 1,
4254
proto_tree_add_item (tree, hf_sbc2_wrverify_lba64, tvb, offset+2, 8, 0);
4255
proto_tree_add_item (tree, hf_sbc2_wrverify_xferlen32, tvb, offset+10,
4257
flags = tvb_get_guint8 (tvb, offset+15);
4258
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+15, 1,
4260
"Vendor Unique = %u, NACA = %u, Link = %u",
4261
flags & 0xC0, flags & 0x4, flags & 0x1);
4265
static const value_string scsi_key_class_val[] = {
4266
{0x00, "DVD CSS/CPPM or CPRM"},
4267
{0x01, "ReWriteable Security Service - A"},
4270
static const value_string scsi_key_format_val[] = {
4271
{0x00, "AGID for CSS/CPPM"},
4272
{0x01, "Challenge Key"},
4274
{0x04, "Title Key"},
4275
{0x05, "Authentication Success Flag"},
4276
{0x08, "RPC State"},
4277
{0x11, "AGID for CPRM"},
4281
static const value_string scsi_report_key_type_code_val[] = {
4284
{0x02, "LAST CHANCE"},
4288
static const value_string scsi_report_key_rpc_scheme_val[] = {
4289
{0x00, "Unknown (RPC not enforced)"},
4290
{0x01, "RPC Phase II"},
4295
dissect_mmc4_reportkey (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4296
guint offset, gboolean isreq, gboolean iscdb,
4297
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4300
guint8 flags, agid, key_format, key_class;
4303
if (tree && isreq && iscdb) {
4304
proto_tree_add_item (tree, hf_scsi_lba, tvb, offset+1,
4306
key_class=tvb_get_guint8(tvb, offset+6);
4307
proto_tree_add_item (tree, hf_scsi_key_class, tvb, offset+6,
4309
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+7, 2, 0);
4311
agid=tvb_get_guint8(tvb, offset+9)&0xc0;
4312
key_format=tvb_get_guint8(tvb, offset+9)&0x3f;
4318
/* agid is only valid for some formats */
4319
proto_tree_add_uint (tree, hf_scsi_agid, tvb, offset+9, 1, agid);
4322
proto_tree_add_uint (tree, hf_scsi_key_format, tvb, offset+9, 1, key_format);
4323
/* save key_class/key_format so we can decode the response */
4324
cdata->itlq->flags=(key_format<<8)|key_class;
4326
flags = tvb_get_guint8 (tvb, offset+14);
4327
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
4329
"Vendor Unique = %u, NACA = %u, Link = %u",
4330
flags & 0xC0, flags & 0x4, flags & 0x1);
4332
if(tree && (!isreq)) {
4333
switch(cdata->itlq->flags){
4334
case 0x0800: /* format:RPC State class:00 */
4335
proto_tree_add_item (tree, hf_scsi_data_length, tvb, offset, 2, 0);
4336
proto_tree_add_item (tree, hf_scsi_report_key_type_code, tvb, offset+4, 1, 0);
4337
proto_tree_add_item (tree, hf_scsi_report_key_vendor_resets, tvb, offset+4, 1, 0);
4338
proto_tree_add_item (tree, hf_scsi_report_key_user_changes, tvb, offset+4, 1, 0);
4339
proto_tree_add_item (tree, hf_scsi_report_key_region_mask, tvb, offset+5, 1, 0);
4340
proto_tree_add_item (tree, hf_scsi_report_key_rpc_scheme, tvb, offset+6, 1, 0);
4343
ti = proto_tree_add_text (tree, tvb, 0, 0,
4344
"SCSI/MMC Unknown Format:0x%02x/Class:0x%02x combination",
4345
cdata->itlq->flags>>8,cdata->itlq->flags&0xff);
4346
PROTO_ITEM_SET_GENERATED(ti);
4352
static const value_string scsi_setstreaming_type_val[] = {
4353
{0x00, "Performance Descriptor"},
4354
{0x05, "DBI cache zone descriptor"},
4359
dissect_mmc4_setstreaming (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4360
guint offset, gboolean isreq, gboolean iscdb,
4361
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4367
if (tree && isreq && iscdb) {
4368
type=tvb_get_guint8(tvb, offset+7);
4369
cdata->itlq->flags=type;
4370
proto_tree_add_item (tree, hf_scsi_setstreaming_type, tvb, offset+7, 1, 0);
4371
proto_tree_add_item (tree, hf_scsi_setstreaming_param_len, tvb, offset+8, 2, 0);
4373
flags = tvb_get_guint8 (tvb, offset+10);
4374
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
4376
"Vendor Unique = %u, NACA = %u, Link = %u",
4377
flags & 0xC0, flags & 0x4, flags & 0x1);
4379
if(tree && isreq && (!iscdb)) {
4380
switch(cdata->itlq->flags){
4381
case 0x00: /* performance descriptor */
4382
proto_tree_add_item (tree, hf_scsi_setstreaming_wrc, tvb, offset+0, 1, 0);
4383
proto_tree_add_item (tree, hf_scsi_setstreaming_rdd, tvb, offset+0, 1, 0);
4384
proto_tree_add_item (tree, hf_scsi_setstreaming_exact, tvb, offset+0, 1, 0);
4385
proto_tree_add_item (tree, hf_scsi_setstreaming_ra, tvb, offset+0, 1, 0);
4386
proto_tree_add_item (tree, hf_scsi_setstreaming_start_lba, tvb, offset+4, 4, 0);
4387
proto_tree_add_item (tree, hf_scsi_setstreaming_end_lba, tvb, offset+8, 4, 0);
4388
proto_tree_add_item (tree, hf_scsi_setstreaming_read_size, tvb, offset+12, 4, 0);
4389
proto_tree_add_item (tree, hf_scsi_setstreaming_read_time, tvb, offset+16, 4, 0);
4390
proto_tree_add_item (tree, hf_scsi_setstreaming_write_size, tvb, offset+20, 4, 0);
4391
proto_tree_add_item (tree, hf_scsi_setstreaming_write_time, tvb, offset+24, 4, 0);
4394
ti = proto_tree_add_text (tree, tvb, 0, 0,
4395
"SCSI/MMC Unknown SetStreaming Type:0x%02x",cdata->itlq->flags);
4396
PROTO_ITEM_SET_GENERATED(ti);
4402
static const value_string scsi_setcdspeed_rc_val[] = {
4403
{0x00, "CLV and none-pure CAV"},
4411
dissect_mmc4_setcdspeed (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4412
guint offset, gboolean isreq, gboolean iscdb,
4413
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4418
if (tree && isreq && iscdb) {
4419
proto_tree_add_item (tree, hf_scsi_setcdspeed_rc, tvb, offset+0, 1, 0);
4421
proto_tree_add_text (tree, tvb, offset+1, 2,
4422
"Logical Unit Read Speed(bytes/sec): %u",
4423
tvb_get_ntohs (tvb, offset+1));
4424
proto_tree_add_text (tree, tvb, offset+3, 2,
4425
"Logical Unit Write Speed(bytes/sec): %u",
4426
tvb_get_ntohs (tvb, offset+3));
4428
flags = tvb_get_guint8 (tvb, offset+10);
4429
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
4431
"Vendor Unique = %u, NACA = %u, Link = %u",
4432
flags & 0xC0, flags & 0x4, flags & 0x1);
4436
static const value_string scsi_getconf_rt_val[] = {
4437
{0x00, "Return all features"},
4438
{0x01, "Return all current features"},
4439
{0x02, "Return all identified by Starting Feature"},
4442
static const value_string scsi_getconf_current_profile_val[] = {
4443
{0x0000, "Reserved"},
4444
{0x0001, "Non-removable disk"},
4445
{0x0002, "Removable disk"},
4446
{0x0003, "MO Erasable"},
4447
{0x0004, "Optical Write Once"},
4452
{0x0010, "DVD-ROM"},
4454
{0x0012, "DVD-RAM"},
4455
{0x0013, "DVD-RW Restricted Overwrite"},
4456
{0x0014, "DVD-RW Sequential recording"},
4459
{0x0020, "DDCD-ROM"},
4461
{0x0022, "DDCD-RW"},
4462
{0xffff, "Logical unit not conforming to a standard profile"},
4466
static const value_string scsi_feature_val[] = {
4467
{0x0000, "Profile List"},
4469
{0x0002, "Morphing"},
4470
{0x0003, "Removable Medium"},
4471
{0x0004, "Write Protect"},
4472
{0x0010, "Random Readable"},
4473
{0x001d, "Multi-read"},
4474
{0x001e, "CD Read"},
4475
{0x001f, "DVD Read"},
4476
{0x0020, "Random Writeable"},
4477
{0x0021, "Incremental Streaming Writeable"},
4478
{0x0022, "Sector Erasable"},
4479
{0x0023, "Formattable"},
4480
{0x0024, "Defect Management"},
4481
{0x0025, "Write Once"},
4482
{0x0026, "Restricted Overwrite"},
4483
{0x0027, "CD-RW CAV Write"},
4485
{0x0029, "Enhanced Defect Reporting"},
4488
{0x002c, "Rigid Restricted Overwrite"},
4489
{0x002d, "CD Track At Once"},
4490
{0x002e, "CD Mastering"},
4491
{0x002f, "DVD-R/-RW Write"},
4492
{0x0030, "DDCD Read"},
4493
{0x0031, "DDCD-R Write"},
4494
{0x0032, "DDCD-RW Write"},
4495
{0x0037, "CD-RW Media Write Support"},
4496
{0x0100, "Power Management"},
4498
{0x0102, "Embedded Changer"},
4499
{0x0103, "CD Audio analog play"},
4500
{0x0104, "Microcode Upgrade"},
4501
{0x0105, "Timeout"},
4502
{0x0106, "DVD-CSS"},
4503
{0x0107, "Real Time Streaming"},
4504
{0x0108, "Logical Unit serial number"},
4505
{0x010a, "Disc control Block"},
4506
{0x010b, "DVD CPRM"},
4507
{0x010c, "Firmware Information"},
4512
dissect_mmc4_getconfiguration (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4513
guint offset, gboolean isreq, gboolean iscdb,
4514
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4521
if (tree && isreq && iscdb) {
4522
proto_tree_add_item (tree, hf_scsi_getconf_rt, tvb, offset+0, 1, 0);
4523
proto_tree_add_item (tree, hf_scsi_getconf_starting_feature, tvb, offset+1, 2, 0);
4525
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
4526
/* we need the alloc_len in the response */
4528
cdata->itlq->alloc_len=tvb_get_ntohs(tvb, offset+6);
4531
flags = tvb_get_guint8 (tvb, offset+8);
4532
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4534
"Vendor Unique = %u, NACA = %u, Link = %u",
4535
flags & 0xC0, flags & 0x4, flags & 0x1);
4542
TRY_SCSI_CDB_ALLOC_LEN(pinfo, tvb, offset, cdata->itlq->alloc_len);
4544
len=tvb_get_ntohl(tvb, offset+0);
4545
proto_tree_add_item (tree, hf_scsi_data_length, tvb, offset, 4, 0);
4546
proto_tree_add_item (tree, hf_scsi_getconf_current_profile, tvb, offset+6, 2, 0);
4551
guint8 additional_length;
4552
guint8 num_linksize;
4554
feature=tvb_get_ntohs(tvb, offset);
4555
proto_tree_add_item (tree, hf_scsi_feature, tvb, offset, 2, 0);
4557
proto_tree_add_item (tree, hf_scsi_feature_version, tvb, offset, 1, 0);
4558
proto_tree_add_item (tree, hf_scsi_feature_persistent, tvb, offset, 1, 0);
4559
proto_tree_add_item (tree, hf_scsi_feature_current, tvb, offset, 1, 0);
4561
additional_length=tvb_get_guint8(tvb, offset);
4562
proto_tree_add_item (tree, hf_scsi_feature_additional_length, tvb, offset, 1, 0);
4566
case 0x0000: /* profile list */
4567
while(offset<(old_offset+additional_length)){
4568
proto_item *it=NULL;
4569
proto_tree *tr=NULL;
4574
it=proto_tree_add_text(tree, tvb, offset, 4, "Profile:");
4575
tr=proto_item_add_subtree(it, ett_scsi_profile);
4578
profile=tvb_get_ntohs(tvb, offset);
4579
proto_tree_add_item (tr, hf_scsi_feature_profile, tvb, offset, 2, 0);
4580
proto_item_append_text(it, "%s", val_to_str(profile, scsi_getconf_current_profile_val, "Unknown 0x%04x"));
4582
cur_profile=tvb_get_guint8(tvb, offset+2);
4583
proto_tree_add_item (tr, hf_scsi_feature_profile_current, tvb, offset+2, 1, 0);
4584
if(cur_profile&0x01){
4585
proto_item_append_text(it, " [CURRENT PROFILE]");
4591
case 0x001d: /* multi-read */
4592
case 0x001f: /* dvd read feature */
4593
/* no data for this one */
4595
case 0x001e: /* cd read */
4596
proto_tree_add_item (tree, hf_scsi_feature_cdread_dap, tvb, offset, 1, 0);
4597
proto_tree_add_item (tree, hf_scsi_feature_cdread_c2flag, tvb, offset, 1, 0);
4598
proto_tree_add_item (tree, hf_scsi_feature_cdread_cdtext, tvb, offset, 1, 0);
4600
case 0x0021: /* incremental streaming writeable */
4601
proto_tree_add_item (tree, hf_scsi_feature_dts, tvb, offset, 2, 0);
4603
proto_tree_add_item (tree, hf_scsi_feature_isw_buf, tvb, offset, 1, 0);
4605
num_linksize=tvb_get_guint8(tvb, offset);
4606
proto_tree_add_item (tree, hf_scsi_feature_isw_num_linksize, tvb, offset, 1, 0);
4608
while(num_linksize--){
4609
proto_tree_add_item (tree, hf_scsi_feature_isw_linksize, tvb, offset, 1, 0);
4613
case 0x002a: /* dvd-rw */
4614
proto_tree_add_item (tree, hf_scsi_feature_dvdrw_write, tvb, offset, 1, 0);
4615
proto_tree_add_item (tree, hf_scsi_feature_dvdrw_quickstart, tvb, offset, 2, 0);
4616
proto_tree_add_item (tree, hf_scsi_feature_dvdrw_closeonly, tvb, offset, 2, 0);
4618
case 0x002b: /* dvd-r */
4619
proto_tree_add_item (tree, hf_scsi_feature_dvdr_write, tvb, offset, 1, 0);
4621
case 0x002d: /* track at once */
4622
proto_tree_add_item (tree, hf_scsi_feature_tao_buf, tvb, offset, 1, 0);
4623
proto_tree_add_item (tree, hf_scsi_feature_tao_rwraw, tvb, offset, 1, 0);
4624
proto_tree_add_item (tree, hf_scsi_feature_tao_rwpack, tvb, offset, 1, 0);
4625
proto_tree_add_item (tree, hf_scsi_feature_tao_testwrite, tvb, offset, 1, 0);
4626
proto_tree_add_item (tree, hf_scsi_feature_tao_cdrw, tvb, offset, 1, 0);
4627
proto_tree_add_item (tree, hf_scsi_feature_tao_rwsubcode, tvb, offset, 1, 0);
4628
proto_tree_add_item (tree, hf_scsi_feature_dts, tvb, offset+2, 2, 0);
4630
case 0x002e: /* session at once */
4631
proto_tree_add_item (tree, hf_scsi_feature_sao_buf, tvb, offset, 1, 0);
4632
proto_tree_add_item (tree, hf_scsi_feature_sao_sao, tvb, offset, 1, 0);
4633
proto_tree_add_item (tree, hf_scsi_feature_sao_rawms, tvb, offset, 1, 0);
4634
proto_tree_add_item (tree, hf_scsi_feature_sao_raw, tvb, offset, 1, 0);
4635
proto_tree_add_item (tree, hf_scsi_feature_sao_testwrite, tvb, offset, 1, 0);
4636
proto_tree_add_item (tree, hf_scsi_feature_sao_cdrw, tvb, offset, 1, 0);
4637
proto_tree_add_item (tree, hf_scsi_feature_sao_rw, tvb, offset, 1, 0);
4638
proto_tree_add_item (tree, hf_scsi_feature_sao_mcsl, tvb, offset+1, 3, 0);
4640
case 0x002f: /* dvd-r/-rw*/
4641
proto_tree_add_item (tree, hf_scsi_feature_dvdr_buf, tvb, offset, 1, 0);
4642
proto_tree_add_item (tree, hf_scsi_feature_dvdr_testwrite, tvb, offset, 1, 0);
4643
proto_tree_add_item (tree, hf_scsi_feature_dvdr_dvdrw, tvb, offset, 1, 0);
4645
case 0x0108: /* logical unit serial number */
4646
proto_tree_add_item (tree, hf_scsi_feature_lun_sn, tvb, offset, additional_length, 0);
4649
proto_tree_add_text (tree, tvb, offset, additional_length,
4650
"SCSI/MMC Unknown Feature:0x%04x",feature);
4653
old_offset+=additional_length;
4654
len-=4+additional_length;
4656
END_TRY_SCSI_CDB_ALLOC_LEN;
4661
dissect_mmc4_geteventstatusnotification (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4662
guint offset, gboolean isreq, gboolean iscdb,
4663
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4668
if (tree && isreq && iscdb) {
4669
flags = tvb_get_guint8 (tvb, offset);
4670
proto_tree_add_text (tree, tvb, offset, 1,
4674
flags = tvb_get_guint8 (tvb, offset+3);
4675
proto_tree_add_text (tree, tvb, offset+3, 1,
4676
"Notification Class Request: %u",
4679
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
4681
flags = tvb_get_guint8 (tvb, offset+8);
4682
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4684
"Vendor Unique = %u, NACA = %u, Link = %u",
4685
flags & 0xC0, flags & 0x4, flags & 0x1);
4689
static const value_string scsi_q_subchannel_adr_val[] = {
4690
{0x0, "Q-Subchannel mode info not supplied"},
4691
{0x1, "Q-Subchannel encodes current position data"},
4692
{0x2, "Q-Subchannel encodes media catalog number"},
4693
{0x3, "Q-Subchannel encodes ISRC"},
4696
static const value_string scsi_q_subchannel_control_val[] = {
4697
{0x0, "2 Audio channels without pre-emphasis (digital copy prohibited)"},
4698
{0x2, "2 Audio channels without pre-emphasis (digital copy permitted)"},
4699
{0x1, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
4700
{0x3, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
4701
{0x8, "audio channels without pre-emphasis (digital copy prohibited)"},
4702
{0xa, "audio channels without pre-emphasis (digital copy permitted)"},
4703
{0x9, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
4704
{0xb, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
4705
{0x4, "Data track, recorded uninterrupted (digital copy prohibited)"},
4706
{0x6, "Data track, recorded uninterrupted (digital copy permitted)"},
4707
{0x5, "Data track, recorded incremental (digital copy prohibited)"},
4708
{0x7, "Data track, recorded incremental (digital copy permitted)"},
4713
dissect_mmc4_readtocpmaatip (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4714
guint offset, gboolean isreq, gboolean iscdb,
4715
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4718
guint8 flags, format;
4721
if (tree && isreq && iscdb) {
4722
format=tvb_get_guint8(tvb, offset+1)&0x0f;
4723
/* save format so we can decode the response */
4724
cdata->itlq->flags=format;
4729
proto_tree_add_item (tree, hf_scsi_readtoc_time, tvb, offset, 1, 0);
4730
/* save time so we can pick it up in the response */
4731
if(tvb_get_guint8(tvb, offset)&0x02){
4732
cdata->itlq->flags|=0x0100;
4736
proto_tree_add_item (tree, hf_scsi_readtoc_format, tvb, offset+1, 1, 0);
4740
proto_tree_add_item (tree, hf_scsi_track, tvb, offset+5, 1, 0);
4741
/* save track so we can pick it up in the response */
4742
cdata->itlq->flags|=0x0200;
4745
proto_tree_add_item (tree, hf_scsi_session, tvb, offset+5, 1, 0);
4746
/* save session so we can pick it up in the response */
4747
cdata->itlq->flags|=0x0400;
4751
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
4753
flags = tvb_get_guint8 (tvb, offset+8);
4754
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4756
"Vendor Unique = %u, NACA = %u, Link = %u",
4757
flags & 0xC0, flags & 0x4, flags & 0x1);
4760
if(tree && (!isreq)) {
4761
len=tvb_get_ntohs(tvb, offset);
4762
proto_tree_add_item (tree, hf_scsi_data_length, tvb, offset, 2, 0);
4763
if(cdata->itlq->flags&0x0200){
4764
proto_tree_add_item (tree, hf_scsi_first_track, tvb, offset+2, 1, 0);
4765
proto_tree_add_item (tree, hf_scsi_readtoc_last_track, tvb, offset+3, 1, 0);
4767
if(cdata->itlq->flags&0x0400){
4768
proto_tree_add_item (tree, hf_scsi_readtoc_first_session, tvb, offset+2, 1, 0);
4769
proto_tree_add_item (tree, hf_scsi_readtoc_last_session, tvb, offset+3, 1, 0);
4773
switch(cdata->itlq->flags&0x000f){
4776
proto_tree_add_item (tree, hf_scsi_q_subchannel_adr, tvb, offset+1, 1, 0);
4777
proto_tree_add_item (tree, hf_scsi_q_subchannel_control, tvb, offset+1, 1, 0);
4778
proto_tree_add_item (tree, hf_scsi_track, tvb, offset+2, 1, 0);
4779
if(cdata->itlq->flags&0x0100){
4780
proto_tree_add_item (tree, hf_scsi_track_start_time, tvb, offset+4, 4, 0);
4782
proto_tree_add_item (tree, hf_scsi_track_start_address, tvb, offset+4, 4, 0);
4789
proto_tree_add_text (tree, tvb, offset, len,
4790
"SCSI/MMC Unknown READ TOC Format:0x%04x",cdata->itlq->flags&0x000f);
4797
dissect_mmc4_getperformance (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4798
guint offset, gboolean isreq, gboolean iscdb,
4799
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4804
if (tree && isreq && iscdb) {
4805
flags = tvb_get_guint8 (tvb, offset);
4806
proto_tree_add_text (tree, tvb, offset, 1,
4810
proto_tree_add_text (tree, tvb, offset+1, 4,
4812
tvb_get_ntohl (tvb, offset+1));
4814
proto_tree_add_text (tree, tvb, offset+7, 2,
4815
"Maximum Number of Descriptors: %u",
4816
tvb_get_ntohs (tvb, offset+7));
4818
flags = tvb_get_guint8 (tvb, offset+9);
4819
proto_tree_add_text (tree, tvb, offset+9, 1,
4823
flags = tvb_get_guint8 (tvb, offset+10);
4824
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
4826
"Vendor Unique = %u, NACA = %u, Link = %u",
4827
flags & 0xC0, flags & 0x4, flags & 0x1);
4833
dissect_mmc4_synchronizecache (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4834
guint offset, gboolean isreq, gboolean iscdb,
4835
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4840
if (tree && isreq && iscdb) {
4841
proto_tree_add_item (tree, hf_scsi_synccache_immed, tvb, offset, 1, 0);
4842
proto_tree_add_item (tree, hf_scsi_synccache_reladr, tvb, offset, 1, 0);
4843
proto_tree_add_item (tree, hf_scsi_lba, tvb, offset+1, 4, 0);
4844
proto_tree_add_item (tree, hf_scsi_num_blocks, tvb, offset+6, 2, 0);
4846
flags = tvb_get_guint8 (tvb, offset+8);
4847
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4849
"Vendor Unique = %u, NACA = %u, Link = %u",
4850
flags & 0xC0, flags & 0x4, flags & 0x1);
4856
dissect_mmc4_readbuffercapacity (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4857
guint offset, gboolean isreq, gboolean iscdb,
4858
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4864
if (tree && isreq && iscdb) {
4865
cdata->itlq->flags=0;
4866
proto_tree_add_item (tree, hf_scsi_rbc_block, tvb, offset, 1, 0);
4867
if(tvb_get_guint8(tvb, offset)&0x01){
4868
cdata->itlq->flags=1;
4871
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
4873
flags = tvb_get_guint8 (tvb, offset+8);
4874
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4876
"Vendor Unique = %u, NACA = %u, Link = %u",
4877
flags & 0xC0, flags & 0x4, flags & 0x1);
4880
if(tree && (!isreq)) {
4881
len=tvb_get_ntohs(tvb, offset);
4882
proto_tree_add_item (tree, hf_scsi_data_length, tvb, offset, 2, 0);
4883
if(cdata->itlq->flags){
4884
proto_tree_add_item (tree, hf_scsi_rbc_lob_blocks, tvb, offset+4, 4, 0);
4885
proto_tree_add_item (tree, hf_scsi_rbc_alob_blocks, tvb, offset+8, 4, 0);
4887
proto_tree_add_item (tree, hf_scsi_rbc_lob_bytes, tvb, offset+4, 4, 0);
4888
proto_tree_add_item (tree, hf_scsi_rbc_alob_bytes, tvb, offset+8, 4, 0);
4894
dissect_mmc4_reservetrack (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4895
guint offset, gboolean isreq, gboolean iscdb,
4896
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4901
if (tree && isreq && iscdb) {
4902
proto_tree_add_item (tree, hf_scsi_reservation_size, tvb, offset+4, 4, 0);
4904
flags = tvb_get_guint8 (tvb, offset+8);
4905
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4907
"Vendor Unique = %u, NACA = %u, Link = %u",
4908
flags & 0xC0, flags & 0x4, flags & 0x1);
4913
static const value_string scsi_rti_address_type_val[] = {
4914
{0x00, "Logical Block Address"},
4915
{0x01, "Logical Track Number"},
4916
{0x02, "Session Number"},
4921
dissect_mmc4_readtrackinformation (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
4922
guint offset, gboolean isreq, gboolean iscdb,
4923
guint payload_len _U_, scsi_task_data_t *cdata _U_)
4926
guint8 flags, addresstype;
4928
if (tree && isreq && iscdb) {
4929
addresstype=tvb_get_guint8(tvb, offset)&0x03;
4930
proto_tree_add_item (tree, hf_scsi_rti_address_type, tvb, offset+0, 1, 0);
4931
switch(addresstype){
4932
case 0x00: /* logical block address */
4933
proto_tree_add_item (tree, hf_scsi_lba, tvb, offset+1,
4936
case 0x01: /* logical track number */
4937
proto_tree_add_item (tree, hf_scsi_track, tvb, offset+1,
4940
case 0x02: /* logical session number */
4941
proto_tree_add_item (tree, hf_scsi_session, tvb, offset+1,
4946
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
4948
flags = tvb_get_guint8 (tvb, offset+8);
4949
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
4951
"Vendor Unique = %u, NACA = %u, Link = %u",
4952
flags & 0xC0, flags & 0x4, flags & 0x1);
4955
if(tree && (!isreq)) {
4956
proto_tree_add_item (tree, hf_scsi_data_length, tvb, 0, 2, 0);
4957
/* track offset+2 and offset+32 */
4958
proto_tree_add_uint (tree, hf_scsi_track, tvb, 2, 1, (tvb_get_guint8(tvb, offset+32)<<8)|tvb_get_guint8(tvb, offset+2));
4959
/* session offset+3 and offset+33 */
4960
proto_tree_add_uint (tree, hf_scsi_session, tvb, 3, 1, (tvb_get_guint8(tvb, offset+33)<<8)|tvb_get_guint8(tvb, offset+3));
4961
proto_tree_add_item (tree, hf_scsi_rti_damage, tvb, 5, 1, 0);
4962
proto_tree_add_item (tree, hf_scsi_rti_copy, tvb, 5, 1, 0);
4963
proto_tree_add_item (tree, hf_scsi_rti_track_mode, tvb, 5, 1, 0);
4964
proto_tree_add_item (tree, hf_scsi_rti_rt, tvb, 6, 1, 0);
4965
proto_tree_add_item (tree, hf_scsi_rti_blank, tvb, 6, 1, 0);
4966
proto_tree_add_item (tree, hf_scsi_rti_packet, tvb, 6, 1, 0);
4967
proto_tree_add_item (tree, hf_scsi_rti_fp, tvb, 6, 1, 0);
4968
proto_tree_add_item (tree, hf_scsi_rti_data_mode, tvb, 6, 1, 0);
4969
proto_tree_add_item (tree, hf_scsi_rti_lra_v, tvb, 7, 1, 0);
4970
proto_tree_add_item (tree, hf_scsi_rti_nwa_v, tvb, 7, 1, 0);
4971
proto_tree_add_item (tree, hf_scsi_track_start_address, tvb, offset+8, 4, 0);
4972
proto_tree_add_item (tree, hf_scsi_next_writable_address, tvb, offset+12, 4, 0);
4973
proto_tree_add_item (tree, hf_scsi_free_blocks, tvb, offset+16, 4, 0);
4974
proto_tree_add_item (tree, hf_scsi_fixed_packet_size, tvb, offset+20, 4, 0);
4975
proto_tree_add_item (tree, hf_scsi_track_size, tvb, offset+24, 4, 0);
4976
proto_tree_add_item (tree, hf_scsi_last_recorded_address, tvb, offset+28, 4, 0);
4977
proto_tree_add_item (tree, hf_scsi_read_compatibility_lba, tvb, offset+36, 4, 0);
4981
static const value_string scsi_disc_info_sols_val[] = {
4982
{0x00, "Empty Session"},
4983
{0x01, "Incomplete Session"},
4984
{0x02, "Reserved/Damaged Session"},
4985
{0x03, "Complete Session"},
4989
static const value_string scsi_disc_info_disc_status_val[] = {
4990
{0x00, "Empty Disc"},
4991
{0x01, "Incomplete Disc"},
4992
{0x02, "Finalized Disc"},
4997
static const value_string scsi_disc_info_bgfs_val[] = {
4998
{0x00, "Blank or not CD-RW/DVD-RW"},
4999
{0x01, "Background Format started but is not running nor complete"},
5000
{0x02, "Backgroung Format in progress"},
5001
{0x03, "Backgroung Format has completed"},
5005
static const value_string scsi_disc_info_disc_type_val[] = {
5006
{0x00, "CD-DA or CD-ROM Disc"},
5007
{0x10, "CD-I Disc"},
5008
{0x20, "CD-ROM XA Disc or DDCD"},
5009
{0xff, "Undefined"},
5014
dissect_mmc4_readdiscinformation (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5015
guint offset, gboolean isreq, gboolean iscdb,
5016
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5021
if (tree && isreq && iscdb) {
5022
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
5024
flags = tvb_get_guint8 (tvb, offset+8);
5025
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
5027
"Vendor Unique = %u, NACA = %u, Link = %u",
5028
flags & 0xC0, flags & 0x4, flags & 0x1);
5031
if(tree && (!isreq)) {
5032
proto_tree_add_item (tree, hf_scsi_data_length, tvb, 0, 2, 0);
5033
proto_tree_add_item (tree, hf_scsi_disc_info_erasable, tvb, 2, 1, 0);
5034
proto_tree_add_item (tree, hf_scsi_disc_info_state_of_last_session, tvb, 2, 1, 0);
5035
proto_tree_add_item (tree, hf_scsi_disc_info_disk_status, tvb, 2, 1, 0);
5036
proto_tree_add_item (tree, hf_scsi_first_track, tvb, offset+3, 1, 0);
5037
/* number of session offset+4 and offset+9 */
5038
proto_tree_add_uint (tree, hf_scsi_disc_info_number_of_sessions, tvb, 4, 1, (tvb_get_guint8(tvb, offset+9)<<8)|tvb_get_guint8(tvb, offset+4));
5039
/* first track in last session offset+5 and offset+10 */
5040
proto_tree_add_uint (tree, hf_scsi_disc_info_first_track_in_last_session, tvb, 5, 1, (tvb_get_guint8(tvb, offset+10)<<8)|tvb_get_guint8(tvb, offset+5));
5041
/* last track in last session offset+6 and offset+11 */
5042
proto_tree_add_uint (tree, hf_scsi_disc_info_last_track_in_last_session, tvb, 6, 1, (tvb_get_guint8(tvb, offset+11)<<8)|tvb_get_guint8(tvb, offset+6));
5043
proto_tree_add_item (tree, hf_scsi_disc_info_did_v, tvb, offset+7, 1, 0);
5044
proto_tree_add_item (tree, hf_scsi_disc_info_dbc_v, tvb, offset+7, 1, 0);
5045
proto_tree_add_item (tree, hf_scsi_disc_info_uru, tvb, offset+7, 1, 0);
5046
proto_tree_add_item (tree, hf_scsi_disc_info_dac_v, tvb, offset+7, 1, 0);
5047
proto_tree_add_item (tree, hf_scsi_disc_info_dbit, tvb, offset+7, 1, 0);
5048
proto_tree_add_item (tree, hf_scsi_disc_info_bgfs, tvb, offset+7, 1, 0);
5049
proto_tree_add_item (tree, hf_scsi_disc_info_disc_type, tvb, offset+8, 1, 0);
5050
proto_tree_add_item (tree, hf_scsi_disc_info_disc_identification, tvb, offset+12, 4, 0);
5051
proto_tree_add_item (tree, hf_scsi_disc_info_last_session_lead_in_start_address, tvb, offset+16, 4, 0);
5052
proto_tree_add_item (tree, hf_scsi_disc_info_last_possible_lead_out_start_address, tvb, offset+20, 4, 0);
5053
proto_tree_add_item (tree, hf_scsi_disc_info_disc_bar_code, tvb, offset+24, 8, 0);
5054
/* XXX should add OPC table decoding here ... */
5059
dissect_mmc4_readdiscstructure (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5060
guint offset, gboolean isreq, gboolean iscdb,
5061
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5066
if (tree && isreq && iscdb) {
5067
proto_tree_add_text (tree, tvb, offset+1, 4,
5069
tvb_get_ntohl (tvb, offset+1));
5071
proto_tree_add_text (tree, tvb, offset+5, 1,
5073
tvb_get_guint8 (tvb, offset+5));
5075
proto_tree_add_text (tree, tvb, offset+6, 1,
5077
tvb_get_guint8 (tvb, offset+6));
5079
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+7, 2, 0);
5081
flags = tvb_get_guint8 (tvb, offset+9);
5082
proto_tree_add_text (tree, tvb, offset+9, 1,
5086
flags = tvb_get_guint8 (tvb, offset+10);
5087
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
5089
"Vendor Unique = %u, NACA = %u, Link = %u",
5090
flags & 0xC0, flags & 0x4, flags & 0x1);
5095
dissect_sbc2_readcapacity10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5096
guint offset, gboolean isreq, gboolean iscdb,
5097
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5100
guint32 len, block_len, tot_len;
5106
if (isreq && iscdb) {
5107
flags = tvb_get_guint8 (tvb, offset);
5109
proto_tree_add_uint_format (tree, hf_scsi_readcapacity_flags, tvb,
5111
"LongLBA = %u, RelAddr = %u",
5112
flags & 0x2, flags & 0x1);
5113
proto_tree_add_item (tree, hf_scsi_readcapacity_lba, tvb, offset+1,
5115
proto_tree_add_item (tree, hf_scsi_readcapacity_pmi, tvb, offset+7,
5118
flags = tvb_get_guint8 (tvb, offset+8);
5119
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
5121
"Vendor Unique = %u, NACA = %u, Link = %u",
5122
flags & 0xC0, flags & 0x4, flags & 0x1);
5125
len = tvb_get_ntohl (tvb, offset);
5126
block_len = tvb_get_ntohl (tvb, offset+4);
5127
tot_len=((len/1024)*block_len)/1024; /*MB*/
5133
proto_tree_add_text (tree, tvb, offset, 4, "LBA: %u (%u %s)",
5135
proto_tree_add_text (tree, tvb, offset+4, 4, "Block Length: %u bytes",
5140
#define SHORT_FORM_BLOCK_ID 0x00
5141
#define SHORT_FORM_VENDOR_SPECIFIC 0x01
5142
#define LONG_FORM 0x06
5143
#define EXTENDED_FORM 0x08
5144
#define SERVICE_READ_CAPACITY16 0x10
5145
#define SERVICE_READ_LONG16 0x11
5147
static const value_string service_action_vals[] = {
5148
{SHORT_FORM_BLOCK_ID, "Short Form - Block ID"},
5149
{SHORT_FORM_VENDOR_SPECIFIC, "Short Form - Vendor-Specific"},
5150
{LONG_FORM, "Long Form"},
5151
{EXTENDED_FORM, "Extended Form"},
5152
{SERVICE_READ_CAPACITY16, "Read Capacity(16)"},
5153
{SERVICE_READ_LONG16, "Read Long(16)"},
5158
/* this is either readcapacity16 or readlong16 depending of what service
5159
action is set to. for now we only implement readcapacity16
5162
dissect_sbc2_serviceactionin16 (tvbuff_t *tvb, packet_info *pinfo _U_,
5163
proto_tree *tree, guint offset, gboolean isreq,
5165
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5167
guint8 service_action, flags;
5169
guint64 len, tot_len;
5175
if (isreq && iscdb) {
5176
service_action = tvb_get_guint8 (tvb, offset) & 0x1F;
5177
/* we should store this one for later so the data in can be decoded */
5178
switch(service_action){
5179
case SERVICE_READ_CAPACITY16:
5180
proto_tree_add_text (tree, tvb, offset, 1,
5181
"Service Action: %s",
5182
val_to_str (service_action,
5183
service_action_vals,
5184
"Unknown (0x%02x)"));
5187
proto_tree_add_text (tree, tvb, offset, 8,
5188
"Logical Block Address: %" PRIu64,
5189
tvb_get_ntoh64 (tvb, offset));
5192
proto_tree_add_item (tree, hf_scsi_alloclen32, tvb, offset, 4, 0);
5195
proto_tree_add_item (tree, hf_scsi_readcapacity_pmi, tvb, offset, 1, 0);
5198
flags = tvb_get_guint8 (tvb, offset);
5199
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset, 1,
5201
"Vendor Unique = %u, NACA = %u, Link = %u",
5202
flags & 0xC0, flags & 0x4, flags & 0x1);
5207
} else if (!iscdb) {
5208
/* assuming for now that all such data in PDUs are read capacity16 */
5209
len = tvb_get_ntoh64 (tvb, offset);
5210
block_len = tvb_get_ntohl (tvb, offset+8);
5211
tot_len=((len/1024)*block_len)/1024; /*MB*/
5217
proto_tree_add_text (tree, tvb, offset, 8, "LBA: %" PRIu64 " (%" PRIu64 " %s)",
5219
proto_tree_add_text (tree, tvb, offset+8, 4, "Block Length: %u bytes",
5225
dissect_sbc2_readdefectdata10 (tvbuff_t *tvb, packet_info *pinfo _U_,
5226
proto_tree *tree, guint offset, gboolean isreq,
5228
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5235
if (isreq && iscdb) {
5236
flags = tvb_get_guint8 (tvb, offset);
5238
proto_tree_add_uint_format (tree, hf_scsi_readdefdata_flags, tvb,
5239
offset, 1, flags, "PLIST = %u, GLIST = %u",
5240
flags & 0x10, flags & 0x8);
5241
proto_tree_add_item (tree, hf_scsi_cdb_defectfmt, tvb, offset, 1, 0);
5242
proto_tree_add_item (tree, hf_scsi_alloclen16, tvb, offset+6, 2, 0);
5243
flags = tvb_get_guint8 (tvb, offset+8);
5244
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
5246
"Vendor Unique = %u, NACA = %u, Link = %u",
5247
flags & 0xC0, flags & 0x4, flags & 0x1);
5252
dissect_sbc2_readdefectdata12 (tvbuff_t *tvb, packet_info *pinfo _U_,
5253
proto_tree *tree, guint offset, gboolean isreq,
5255
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5262
if (isreq && iscdb) {
5263
flags = tvb_get_guint8 (tvb, offset);
5265
proto_tree_add_uint_format (tree, hf_scsi_readdefdata_flags, tvb,
5266
offset, 1, flags, "PLIST = %u, GLIST = %u",
5267
flags & 0x10, flags & 0x8);
5268
proto_tree_add_item (tree, hf_scsi_cdb_defectfmt, tvb, offset, 1, 0);
5269
proto_tree_add_item (tree, hf_scsi_alloclen32, tvb, offset+5, 4, 0);
5270
flags = tvb_get_guint8 (tvb, offset+10);
5271
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
5273
"Vendor Unique = %u, NACA = %u, Link = %u",
5274
flags & 0xC0, flags & 0x4, flags & 0x1);
5279
dissect_sbc2_reassignblocks (tvbuff_t *tvb, packet_info *pinfo _U_,
5280
proto_tree *tree, guint offset, gboolean isreq,
5282
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5289
if (isreq && iscdb) {
5290
flags = tvb_get_guint8 (tvb, offset);
5292
proto_tree_add_uint_format (tree, hf_scsi_reassignblks_flags, tvb,
5294
"LongLBA = %u, LongList = %u",
5295
flags & 0x2, flags & 0x1);
5296
flags = tvb_get_guint8 (tvb, offset+4);
5297
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5299
"Vendor Unique = %u, NACA = %u, Link = %u",
5300
flags & 0xC0, flags & 0x4, flags & 0x1);
5305
3343
dissect_spc3_senddiagnostic (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5306
3344
guint offset, gboolean isreq, gboolean iscdb _U_,
5307
3345
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5367
dissect_ssc2_read6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5368
guint offset, gboolean isreq, gboolean iscdb,
5369
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5374
if (check_col (pinfo->cinfo, COL_INFO))
5375
col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
5376
tvb_get_ntoh24 (tvb, offset+1));
5379
if (tree && isreq && iscdb) {
5380
flags = tvb_get_guint8 (tvb, offset);
5381
proto_tree_add_text (tree, tvb, offset, 1,
5382
"SILI: %u, FIXED: %u",
5383
(flags & 0x02) >> 1, flags & 0x01);
5384
proto_tree_add_item (tree, hf_scsi_rdwr6_xferlen, tvb, offset+1, 3, 0);
5385
flags = tvb_get_guint8 (tvb, offset+4);
5386
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5388
"Vendor Unique = %u, NACA = %u, Link = %u",
5389
flags & 0xC0, flags & 0x4, flags & 0x1);
5394
dissect_ssc2_write6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5395
guint offset, gboolean isreq, gboolean iscdb,
5396
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5400
if (isreq && iscdb) {
5401
if (check_col (pinfo->cinfo, COL_INFO))
5402
col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
5403
tvb_get_ntoh24 (tvb, offset+1));
5406
if (tree && isreq && iscdb) {
5407
flags = tvb_get_guint8 (tvb, offset);
5408
proto_tree_add_text (tree, tvb, offset, 1,
5409
"FIXED: %u", flags & 0x01);
5410
proto_tree_add_item (tree, hf_scsi_rdwr6_xferlen, tvb, offset+1, 3,
5412
flags = tvb_get_guint8 (tvb, offset+4);
5413
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5415
"Vendor Unique = %u, NACA = %u, Link = %u",
5416
flags & 0xC0, flags & 0x4, flags & 0x1);
5421
dissect_ssc2_writefilemarks6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5422
guint offset, gboolean isreq, gboolean iscdb,
5423
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5428
if (check_col (pinfo->cinfo, COL_INFO))
5429
col_append_fstr (pinfo->cinfo, COL_INFO, "(Len: %u)",
5430
tvb_get_ntoh24 (tvb, offset+1));
5433
if (tree && isreq && iscdb) {
5434
flags = tvb_get_guint8 (tvb, offset);
5435
proto_tree_add_text (tree, tvb, offset, 1,
5436
"WSMK: %u, IMMED: %u",
5437
(flags & 0x02) >> 1, flags & 0x01);
5438
proto_tree_add_item (tree, hf_scsi_rdwr6_xferlen, tvb, offset+1, 3,
5440
flags = tvb_get_guint8 (tvb, offset+4);
5441
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5443
"Vendor Unique = %u, NACA = %u, Link = %u",
5444
flags & 0xC0, flags & 0x4, flags & 0x1);
5449
dissect_ssc2_loadunload (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5450
guint offset, gboolean isreq, gboolean iscdb,
5451
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5455
if (isreq && iscdb) {
5456
if (check_col (pinfo->cinfo, COL_INFO))
5457
col_append_fstr (pinfo->cinfo, COL_INFO, "(Immed: %u)",
5458
tvb_get_guint8 (tvb, offset) & 0x01);
5463
proto_tree_add_text (tree, tvb, offset, 1,
5464
"Immed: %u", tvb_get_guint8 (tvb, offset) & 0x01);
5465
flags = tvb_get_guint8 (tvb, offset+3);
5466
proto_tree_add_text (tree, tvb, offset+3, 1,
5467
"Hold: %u, EOT: %u, Reten: %u, Load: %u",
5468
(flags & 0x08) >> 3, (flags & 0x04) >> 2,
5469
(flags & 0x02) >> 1, (flags & 0x01));
5470
flags = tvb_get_guint8 (tvb, offset+4);
5471
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5473
"Vendor Unique = %u, NACA = %u, Link = %u",
5474
flags & 0xC0, flags & 0x4, flags & 0x1);
5479
dissect_ssc2_readblocklimits (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5480
guint offset, gboolean isreq, gboolean iscdb,
5481
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5483
guint8 flags, granularity;
5488
if (isreq && iscdb) {
5489
flags = tvb_get_guint8 (tvb, offset+4);
5490
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5492
"Vendor Unique = %u, NACA = %u, Link = %u",
5493
flags & 0xC0, flags & 0x4, flags & 0x1);
5496
granularity = tvb_get_guint8 (tvb, offset);
5497
proto_tree_add_text (tree, tvb, offset, 1, "Granularity: %u (%u %s)",
5498
granularity, 1 << granularity,
5499
plurality(1 << granularity, "byte", "bytes"));
5500
proto_tree_add_text (tree, tvb, offset+1, 3, "Maximum Block Length Limit: %u bytes",
5501
tvb_get_ntoh24 (tvb, offset+1));
5502
proto_tree_add_text (tree, tvb, offset+4, 2, "Minimum Block Length Limit: %u bytes",
5503
tvb_get_ntohs (tvb, offset+4));
5513
dissect_ssc2_readposition (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5514
guint offset, gboolean isreq, gboolean iscdb,
5515
guint payload_len _U_, scsi_task_data_t *cdata)
5517
gint service_action;
5523
if (isreq && iscdb) {
5524
service_action = tvb_get_guint8 (tvb, offset) & 0x1F;
5525
proto_tree_add_text (tree, tvb, offset, 1,
5526
"Service Action: %s",
5527
val_to_str (service_action,
5528
service_action_vals,
5529
"Unknown (0x%02x)"));
5530
/* Remember the service action so we can decode the reply */
5531
if (cdata != NULL) {
5532
cdata->itlq->flags = service_action;
5534
proto_tree_add_text (tree, tvb, offset+6, 2,
5535
"Parameter Len: %u",
5536
tvb_get_ntohs (tvb, offset+6));
5537
flags = tvb_get_guint8 (tvb, offset+8);
5538
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
5540
"Vendor Unique = %u, NACA = %u, Link = %u",
5541
flags & 0xC0, flags & 0x4, flags & 0x1);
5545
service_action = cdata->itlq->flags;
5547
service_action = -1; /* unknown */
5548
switch (service_action) {
5549
case SHORT_FORM_BLOCK_ID:
5550
case SHORT_FORM_VENDOR_SPECIFIC:
5551
flags = tvb_get_guint8 (tvb, offset);
5552
proto_tree_add_text (tree, tvb, offset, 1,
5553
"BOP: %u, EOP: %u, BCU: %u, BYCU: %u, BPU: %u, PERR: %u",
5554
(flags & 0x80) >> 7, (flags & 0x40) >> 6,
5555
(flags & BCU) >> 5, (flags & BYCU) >> 4,
5556
(flags & BPU) >> 2, (flags & 0x02) >> 1);
5559
proto_tree_add_text (tree, tvb, offset, 1,
5560
"Partition Number: %u",
5561
tvb_get_guint8 (tvb, offset));
5564
offset += 2; /* reserved */
5566
if (!(flags & BPU)) {
5567
proto_tree_add_text (tree, tvb, offset, 4,
5568
"First Block Location: %u",
5569
tvb_get_ntohl (tvb, offset));
5572
proto_tree_add_text (tree, tvb, offset, 4,
5573
"Last Block Location: %u",
5574
tvb_get_ntohl (tvb, offset));
5579
offset += 1; /* reserved */
5581
if (!(flags & BCU)) {
5582
proto_tree_add_text (tree, tvb, offset, 3,
5583
"Number of Blocks in Buffer: %u",
5584
tvb_get_ntoh24 (tvb, offset));
5588
if (!(flags & BYCU)) {
5589
proto_tree_add_text (tree, tvb, offset, 4,
5590
"Number of Bytes in Buffer: %u",
5591
tvb_get_ntohl (tvb, offset));
5597
flags = tvb_get_guint8 (tvb, offset);
5598
proto_tree_add_text (tree, tvb, offset, 1,
5599
"BOP: %u, EOP: %u, MPU: %u, BPU: %u",
5600
(flags & 0x80) >> 7, (flags & 0x40) >> 6,
5601
(flags & MPU) >> 3, (flags & BPU) >> 2);
5604
offset += 3; /* reserved */
5606
if (!(flags & BPU)) {
5607
proto_tree_add_text (tree, tvb, offset, 4,
5608
"Partition Number: %u",
5609
tvb_get_ntohl (tvb, offset));
5612
proto_tree_add_text (tree, tvb, offset, 8,
5613
"Block Number: %" PRIu64,
5614
tvb_get_ntoh64 (tvb, offset));
5619
if (!(flags & MPU)) {
5620
proto_tree_add_text (tree, tvb, offset, 8,
5621
"File Number: %" PRIu64,
5622
tvb_get_ntoh64 (tvb, offset));
5625
proto_tree_add_text (tree, tvb, offset, 8,
5626
"Set Number: %" PRIu64,
5627
tvb_get_ntoh64 (tvb, offset));
5634
flags = tvb_get_guint8 (tvb, offset);
5635
proto_tree_add_text (tree, tvb, offset, 1,
5636
"BOP: %u, EOP: %u, BCU: %u, BYCU: %u, MPU: %u, BPU: %u, PERR: %u",
5637
(flags & 0x80) >> 7, (flags & 0x40) >> 6,
5638
(flags & BCU) >> 5, (flags & BYCU) >> 4,
5639
(flags & MPU) >> 3, (flags & BPU) >> 2,
5640
(flags & 0x02) >> 1);
5643
proto_tree_add_text (tree, tvb, offset, 1,
5644
"Partition Number: %u",
5645
tvb_get_guint8 (tvb, offset));
5648
proto_tree_add_text (tree, tvb, offset, 2,
5649
"Additional Length: %u",
5650
tvb_get_ntohs (tvb, offset));
5653
offset += 1; /* reserved */
5655
if (!(flags & BCU)) {
5656
proto_tree_add_text (tree, tvb, offset, 3,
5657
"Number of Blocks in Buffer: %u",
5658
tvb_get_ntoh24 (tvb, offset));
5662
if (!(flags & BPU)) {
5663
proto_tree_add_text (tree, tvb, offset, 8,
5664
"First Block Location: %" PRIu64,
5665
tvb_get_ntoh64 (tvb, offset));
5668
proto_tree_add_text (tree, tvb, offset, 8,
5669
"Last Block Location: %" PRIu64,
5670
tvb_get_ntoh64 (tvb, offset));
5675
offset += 1; /* reserved */
5677
if (!(flags & BYCU)) {
5678
proto_tree_add_text (tree, tvb, offset, 8,
5679
"Number of Bytes in Buffer: %" PRIu64,
5680
tvb_get_ntoh64 (tvb, offset));
5693
dissect_ssc2_rewind (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5694
guint offset, gboolean isreq, gboolean iscdb,
5695
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5699
if (isreq && iscdb) {
5700
if (check_col (pinfo->cinfo, COL_INFO))
5701
col_append_fstr (pinfo->cinfo, COL_INFO, "(Immed: %u)",
5702
tvb_get_guint8 (tvb, offset) & 0x01);
5707
proto_tree_add_text (tree, tvb, offset, 1,
5708
"Immed: %u", tvb_get_guint8 (tvb, offset) & 0x01);
5709
flags = tvb_get_guint8 (tvb, offset+4);
5710
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5712
"Vendor Unique = %u, NACA = %u, Link = %u",
5713
flags & 0xC0, flags & 0x4, flags & 0x1);
5718
dissect_ssc2_locate10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5719
guint offset, gboolean isreq, gboolean iscdb,
5720
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5724
if (isreq && iscdb) {
5728
flags = tvb_get_guint8 (tvb, offset);
5729
proto_tree_add_text (tree, tvb, offset, 1,
5730
"BT: %u, CP: %u, IMMED: %u",
5731
(flags & 0x04) >> 2,
5732
(flags & 0x02) >> 1,
5735
proto_tree_add_item (tree, hf_ssc3_locate10_loid, tvb, offset+2, 4, 0);
5737
flags = tvb_get_guint8 (tvb, offset+7);
5738
proto_tree_add_text (tree, tvb, offset+7, 1,
5742
flags = tvb_get_guint8 (tvb, offset+8);
5743
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1,
5745
"Vendor Unique = %u, NACA = %u, Link = %u",
5746
flags & 0xC0, flags & 0x4, flags & 0x1);
5751
dissect_ssc2_locate16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5752
guint offset, gboolean isreq, gboolean iscdb,
5753
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5757
if (isreq && iscdb) {
5761
flags = tvb_get_guint8 (tvb, offset);
5762
proto_tree_add_text (tree, tvb, offset, 1,
5763
"DEST_TYPE: %u, CP: %u, IMMED: %u",
5764
(flags & 0x18) >> 3,
5765
(flags & 0x02) >> 1,
5768
flags = tvb_get_guint8 (tvb, offset+2);
5769
proto_tree_add_text (tree, tvb, offset+2, 1,
5773
proto_tree_add_item (tree, hf_ssc3_locate16_loid, tvb, offset+3, 8, 0);
5775
flags = tvb_get_guint8 (tvb, offset+14);
5776
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
5778
"Vendor Unique = %u, NACA = %u, Link = %u",
5779
flags & 0xC0, flags & 0x4, flags & 0x1);
5784
dissect_ssc2_erase6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5785
guint offset, gboolean isreq, gboolean iscdb,
5786
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5790
if (isreq && iscdb) {
5794
flags = tvb_get_guint8 (tvb, offset);
5795
proto_tree_add_text (tree, tvb, offset, 1,
5796
"IMMED: %u, LONG: %u",
5797
(flags & 0x02) >> 1,
5800
flags = tvb_get_guint8 (tvb, offset+4);
5801
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5803
"Vendor Unique = %u, NACA = %u, Link = %u",
5804
flags & 0xC0, flags & 0x4, flags & 0x1);
5809
dissect_ssc2_erase16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5810
guint offset, gboolean isreq, gboolean iscdb,
5811
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5815
if (isreq && iscdb) {
5819
flags = tvb_get_guint8 (tvb, offset);
5820
proto_tree_add_text (tree, tvb, offset, 1,
5821
"FCS: %u, LCS: %u, IMMED: %u, LONG: %u",
5822
(flags & 0x08) >> 3,
5823
(flags & 0x04) >> 2,
5824
(flags & 0x02) >> 1,
5827
proto_tree_add_text (tree, tvb, offset+2, 1,
5828
"Partition: %u", tvb_get_guint8(tvb,offset+2));
5830
proto_tree_add_text (tree, tvb, offset+3, 8,
5831
"Logical Object Identifier: 0x%02x%02x%02x%02x%02x%02x%02x%02x",
5832
tvb_get_guint8(tvb,offset+3),
5833
tvb_get_guint8(tvb,offset+4),
5834
tvb_get_guint8(tvb,offset+5),
5835
tvb_get_guint8(tvb,offset+6),
5836
tvb_get_guint8(tvb,offset+7),
5837
tvb_get_guint8(tvb,offset+8),
5838
tvb_get_guint8(tvb,offset+9),
5839
tvb_get_guint8(tvb,offset+10));
5841
flags = tvb_get_guint8 (tvb, offset+14);
5842
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
5844
"Vendor Unique = %u, NACA = %u, Link = %u",
5845
flags & 0xC0, flags & 0x4, flags & 0x1);
5850
dissect_ssc2_space6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5851
guint offset, gboolean isreq, gboolean iscdb,
5852
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5856
if (isreq && iscdb) {
5860
flags = tvb_get_guint8 (tvb, offset);
5861
proto_tree_add_text (tree, tvb, offset, 1,
5865
proto_tree_add_item (tree, hf_ssc3_space6_count, tvb, offset+1, 3, 0);
5867
flags = tvb_get_guint8 (tvb, offset+4);
5868
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5870
"Vendor Unique = %u, NACA = %u, Link = %u",
5871
flags & 0xC0, flags & 0x4, flags & 0x1);
5876
dissect_ssc2_space16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5877
guint offset, gboolean isreq, gboolean iscdb,
5878
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5882
if (isreq && iscdb) {
5886
flags = tvb_get_guint8 (tvb, offset);
5887
proto_tree_add_text (tree, tvb, offset, 1,
5891
proto_tree_add_item (tree, hf_ssc3_space16_count, tvb, offset+3, 8, 0);
5893
proto_tree_add_text (tree, tvb, offset+11, 2,
5894
"Parameter Len: %u",
5895
tvb_get_ntohs (tvb, offset+11));
5897
flags = tvb_get_guint8 (tvb, offset+14);
5898
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+14, 1,
5900
"Vendor Unique = %u, NACA = %u, Link = %u",
5901
flags & 0xC0, flags & 0x4, flags & 0x1);
5906
dissect_ssc2_formatmedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5907
guint offset, gboolean isreq, gboolean iscdb,
5908
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5912
if (isreq && iscdb) {
5916
flags = tvb_get_guint8 (tvb, offset);
5917
proto_tree_add_text (tree, tvb, offset, 1,
5918
"VERIFY: %u, IMMED: %u",
5919
(flags & 0x02) >> 1,
5922
proto_tree_add_text (tree, tvb, offset+1, 1,
5923
"Format: 0x%02x", tvb_get_guint8(tvb,offset+1)&0x0f);
5925
proto_tree_add_item (tree, hf_scsi_rdwr10_xferlen, tvb, offset+2, 2, 0);
5927
flags = tvb_get_guint8 (tvb, offset+4);
5928
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+4, 1,
5930
"Vendor Unique = %u, NACA = %u, Link = %u",
5931
flags & 0xC0, flags & 0x4, flags & 0x1);
5936
dissect_smc2_movemedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
5937
guint offset, gboolean isreq, gboolean iscdb,
5938
guint payload_len _U_, scsi_task_data_t *cdata _U_)
5942
if (tree && isreq && iscdb) {
5943
proto_tree_add_text (tree, tvb, offset+1, 2,
5944
"Medium Transport Address: %u",
5945
tvb_get_ntohs (tvb, offset+1));
5946
proto_tree_add_text (tree, tvb, offset+3, 2,
5947
"Source Address: %u",
5948
tvb_get_ntohs (tvb, offset+3));
5949
proto_tree_add_text (tree, tvb, offset+5, 2,
5950
"Destination Address: %u",
5951
tvb_get_ntohs (tvb, offset+5));
5952
flags = tvb_get_guint8 (tvb, offset+9);
5953
proto_tree_add_text (tree, tvb, offset+9, 1,
5954
"INV: %u", flags & 0x01);
5955
flags = tvb_get_guint8 (tvb, offset+10);
5956
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
5958
"Vendor Unique = %u, NACA = %u, Link = %u",
5959
flags & 0xC0, flags & 0x4, flags & 0x1);
5965
#define I_E_ELEM 0x3
5968
static const value_string element_type_code_vals[] = {
5969
{0x0, "All element types"},
5970
{MT_ELEM, "Medium transport element"},
5971
{ST_ELEM, "Storage element"},
5972
{I_E_ELEM, "Import/export element"},
5973
{DT_ELEM, "Data transfer element"},
5977
#define PVOLTAG 0x80
5978
#define AVOLTAG 0x40
5982
#define ID_VALID 0x20
5983
#define LU_VALID 0x10
5988
dissect_scsi_smc2_volume_tag (tvbuff_t *tvb, packet_info *pinfo _U_,
5989
proto_tree *tree, guint offset,
5995
tvb_memcpy (tvb, (guint8 *)volid, offset, 32);
6001
if (*(p - 1) != ' ')
6005
proto_tree_add_text (tree, tvb, offset, 36,
6006
"%s: Volume Identification = \"%s\", Volume Sequence Number = %u",
6007
name, volid, tvb_get_ntohs (tvb, offset+34));
6011
dissect_scsi_smc2_element (tvbuff_t *tvb, packet_info *pinfo _U_,
6012
proto_tree *tree, guint offset,
6013
guint elem_bytecnt, guint8 elem_type,
6014
guint8 voltag_flags)
6019
if (elem_bytecnt < 2)
6021
proto_tree_add_text (tree, tvb, offset, 2,
6022
"Element Address: %u",
6023
tvb_get_ntohs (tvb, offset));
6027
if (elem_bytecnt < 1)
6029
flags = tvb_get_guint8 (tvb, offset);
6030
switch (elem_type) {
6033
proto_tree_add_text (tree, tvb, offset, 1,
6034
"EXCEPT: %u, FULL: %u",
6035
(flags & EXCEPT) >> 2, flags & 0x01);
6040
proto_tree_add_text (tree, tvb, offset, 1,
6041
"ACCESS: %u, EXCEPT: %u, FULL: %u",
6042
(flags & 0x08) >> 3,
6043
(flags & EXCEPT) >> 2, flags & 0x01);
6047
proto_tree_add_text (tree, tvb, offset, 1,
6048
"cmc: %u, INENAB: %u, EXENAB: %u, ACCESS: %u, EXCEPT: %u, IMPEXP: %u, FULL: %u",
6049
(flags & 0x40) >> 6,
6050
(flags & 0x20) >> 5,
6051
(flags & 0x10) >> 4,
6052
(flags & 0x08) >> 3,
6053
(flags & EXCEPT) >> 2,
6054
(flags & 0x02) >> 1,
6061
if (elem_bytecnt < 1)
6063
offset += 1; /* reserved */
6066
if (elem_bytecnt < 2)
6068
if (flags & EXCEPT) {
6069
proto_tree_add_text (tree, tvb, offset, 2,
6070
"Additional Sense Code+Qualifier: %s",
6071
val_to_str (tvb_get_ntohs (tvb, offset),
6072
scsi_asc_val, "Unknown (0x%04x)"));
6077
if (elem_bytecnt < 3)
6079
switch (elem_type) {
6082
flags = tvb_get_guint8 (tvb, offset);
6083
if (flags & LU_VALID) {
6084
proto_tree_add_text (tree, tvb, offset, 1,
6085
"NOT BUS: %u, ID VALID: %u, LU VALID: 1, LUN: %u",
6086
(flags & 0x80) >> 7,
6087
(flags & ID_VALID) >> 5,
6089
} else if (flags & ID_VALID) {
6090
proto_tree_add_text (tree, tvb, offset, 1,
6091
"ID VALID: 1, LU VALID: 0");
6093
proto_tree_add_text (tree, tvb, offset, 1,
6094
"ID VALID: 0, LU VALID: 0");
6097
if (flags & ID_VALID) {
6098
proto_tree_add_text (tree, tvb, offset, 1,
6099
"SCSI Bus Address: %u",
6100
tvb_get_guint8 (tvb, offset));
6103
offset += 1; /* reserved */
6107
offset += 3; /* reserved */
6112
if (elem_bytecnt < 3)
6114
flags = tvb_get_guint8 (tvb, offset);
6115
if (flags & SVALID) {
6116
proto_tree_add_text (tree, tvb, offset, 1,
6117
"SVALID: 1, INVERT: %u",
6118
(flags & 0x40) >> 6);
6120
proto_tree_add_text (tree, tvb, offset, 2,
6121
"Source Storage Element Address: %u",
6122
tvb_get_ntohs (tvb, offset));
6125
proto_tree_add_text (tree, tvb, offset, 1,
6131
if (voltag_flags & PVOLTAG) {
6132
if (elem_bytecnt < 36)
6134
dissect_scsi_smc2_volume_tag (tvb, pinfo, tree, offset,
6135
"Primary Volume Tag Information");
6140
if (voltag_flags & AVOLTAG) {
6141
if (elem_bytecnt < 36)
6143
dissect_scsi_smc2_volume_tag (tvb, pinfo, tree, offset,
6144
"Alternate Volume Tag Information");
6149
if (elem_bytecnt < 1)
6151
flags = tvb_get_guint8 (tvb, offset);
6152
proto_tree_add_text (tree, tvb, offset, 1,
6154
val_to_str (flags & 0x0F,
6155
scsi_devid_codeset_val,
6156
"Unknown (0x%02x)"));
6160
if (elem_bytecnt < 1)
6162
flags = tvb_get_guint8 (tvb, offset);
6163
proto_tree_add_text (tree, tvb, offset, 1,
6164
"Identifier Type: %s",
6165
val_to_str ((flags & 0x0F),
6166
scsi_devid_idtype_val,
6167
"Unknown (0x%02x)"));
6171
if (elem_bytecnt < 1)
6173
offset += 1; /* reserved */
6176
if (elem_bytecnt < 1)
6178
ident_len = tvb_get_guint8 (tvb, offset);
6179
proto_tree_add_text (tree, tvb, offset, 1,
6180
"Identifier Length: %u",
6185
if (ident_len != 0) {
6186
if (elem_bytecnt < ident_len)
6188
proto_tree_add_text (tree, tvb, offset, ident_len,
6190
tvb_bytes_to_str (tvb, offset, ident_len));
6191
offset += ident_len;
6192
elem_bytecnt -= ident_len;
6194
if (elem_bytecnt != 0) {
6195
proto_tree_add_text (tree, tvb, offset, elem_bytecnt,
6196
"Vendor-specific Data: %s",
6197
tvb_bytes_to_str (tvb, offset, elem_bytecnt));
6202
dissect_scsi_smc2_elements (tvbuff_t *tvb, packet_info *pinfo,
6203
proto_tree *tree, guint offset,
6204
guint desc_bytecnt, guint8 elem_type,
6205
guint8 voltag_flags, guint16 elem_desc_len)
6209
while (desc_bytecnt != 0) {
6210
elem_bytecnt = elem_desc_len;
6211
if (elem_bytecnt > desc_bytecnt)
6212
elem_bytecnt = desc_bytecnt;
6213
dissect_scsi_smc2_element (tvb, pinfo, tree, offset, elem_bytecnt,
6214
elem_type, voltag_flags);
6215
offset += elem_bytecnt;
6216
desc_bytecnt -= elem_bytecnt;
6221
dissect_smc2_readelementstatus (tvbuff_t *tvb, packet_info *pinfo,
6222
proto_tree *tree, guint offset, gboolean isreq,
6224
guint payload_len _U_, scsi_task_data_t *cdata _U_)
6227
guint numelem, bytecnt, desc_bytecnt;
6229
guint8 voltag_flags;
6230
guint16 elem_desc_len;
6235
if (isreq && iscdb) {
6236
flags = tvb_get_guint8 (tvb, offset);
6237
proto_tree_add_text (tree, tvb, offset, 1,
6238
"VOLTAG: %u, Element Type Code: %s",
6239
(flags & 0x10) >> 4,
6240
val_to_str (flags & 0xF, element_type_code_vals,
6242
proto_tree_add_text (tree, tvb, offset+1, 2,
6243
"Starting Element Address: %u",
6244
tvb_get_ntohs (tvb, offset+1));
6245
proto_tree_add_text (tree, tvb, offset+3, 2,
6246
"Number of Elements: %u",
6247
tvb_get_ntohs (tvb, offset+3));
6248
flags = tvb_get_guint8 (tvb, offset+4);
6249
proto_tree_add_text (tree, tvb, offset+4, 1,
6250
"CURDATA: %u, DVCID: %u",
6251
(flags & 0x02) >> 1, flags & 0x01);
6252
proto_tree_add_text (tree, tvb, offset+6, 3,
6253
"Allocation Length: %u",
6254
tvb_get_ntoh24 (tvb, offset+6));
6255
flags = tvb_get_guint8 (tvb, offset+10);
6256
proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
6258
"Vendor Unique = %u, NACA = %u, Link = %u",
6259
flags & 0xC0, flags & 0x4, flags & 0x1);
6262
proto_tree_add_text (tree, tvb, offset, 2,
6263
"First Element Address Reported: %u",
6264
tvb_get_ntohs (tvb, offset));
6266
numelem = tvb_get_ntohs (tvb, offset);
6267
proto_tree_add_text (tree, tvb, offset, 2,
6268
"Number of Elements Available: %u", numelem);
6270
offset += 1; /* reserved */
6271
bytecnt = tvb_get_ntoh24 (tvb, offset);
6272
proto_tree_add_text (tree, tvb, offset, 3,
6273
"Byte Count of Report Available: %u", bytecnt);
6275
while (bytecnt != 0) {
6278
elem_type = tvb_get_guint8 (tvb, offset);
6279
proto_tree_add_text (tree, tvb, offset, 1,
6280
"Element Type Code: %s",
6281
val_to_str (elem_type, element_type_code_vals,
6288
voltag_flags = tvb_get_guint8 (tvb, offset);
6289
proto_tree_add_text (tree, tvb, offset, 1,
6290
"PVOLTAG: %u, AVOLTAG: %u",
6291
(voltag_flags & PVOLTAG) >> 7,
6292
(voltag_flags & AVOLTAG) >> 6);
6298
elem_desc_len = tvb_get_ntohs (tvb, offset);
6299
proto_tree_add_text (tree, tvb, offset, 2,
6300
"Element Descriptor Length: %u",
6307
offset += 1; /* reserved */
6312
desc_bytecnt = tvb_get_ntoh24 (tvb, offset);
6313
proto_tree_add_text (tree, tvb, offset, 3,
6314
"Byte Count Of Descriptor Data Available: %u",
6319
if (desc_bytecnt > bytecnt)
6320
desc_bytecnt = bytecnt;
6321
dissect_scsi_smc2_elements (tvb, pinfo, tree, offset,
6322
desc_bytecnt, elem_type,
6323
voltag_flags, elem_desc_len);
6324
offset += desc_bytecnt;
6325
bytecnt -= desc_bytecnt;
6331
3409
dissect_scsi_rsp (tvbuff_t *tvb, packet_info *pinfo,
8453
4437
{ &hf_scsi_senddiag_unitoff,
8454
4438
{"Unit Offline", "scsi.spc2.senddiag.unitoff", FT_BOOLEAN, BASE_HEX,
8455
4439
NULL, 0x1, "", HFILL}},
8456
{ &hf_scsi_key_class,
8457
{"Key Class", "scsi.mmc4.key_class", FT_UINT8, BASE_HEX,
8458
VALS (scsi_key_class_val), 0x00, "", HFILL}},
8460
{"AGID", "scsi.mmc4.agid", FT_UINT8, BASE_HEX,
8461
NULL, 0xc0, "", HFILL}},
8462
{ &hf_scsi_key_format,
8463
{"Key Format", "scsi.mmc4.key_format", FT_UINT8, BASE_HEX,
8464
VALS (scsi_key_format_val), 0x3f, "", HFILL}},
8466
{"Logical Block Address", "scsi.lba", FT_UINT32, BASE_DEC,
8467
NULL, 0x0, "", HFILL}},
8468
{ &hf_scsi_num_blocks,
8469
{"Number of Blocks", "scsi.num_blocks", FT_UINT32, BASE_DEC,
8470
NULL, 0x0, "", HFILL}},
8471
{ &hf_scsi_data_length,
8472
{"Data Length", "scsi.data_length", FT_UINT32, BASE_DEC,
8473
NULL, 0x0, "", HFILL}},
8474
{ &hf_scsi_report_key_type_code,
8475
{"Type Code", "scsi.report_key.type_code", FT_UINT8, BASE_HEX,
8476
VALS(scsi_report_key_type_code_val), 0xc0, "", HFILL}},
8477
{ &hf_scsi_report_key_vendor_resets,
8478
{"Vendor Resets", "scsi.report_key.vendor_resets", FT_UINT8, BASE_HEX,
8479
NULL, 0x38, "", HFILL}},
8480
{ &hf_scsi_report_key_user_changes,
8481
{"User Changes", "scsi.report_key.user_changes", FT_UINT8, BASE_HEX,
8482
NULL, 0x07, "", HFILL}},
8483
{ &hf_scsi_report_key_region_mask,
8484
{"Region Mask", "scsi.report_key.region_mask", FT_UINT8, BASE_HEX,
8485
NULL, 0xff, "", HFILL}},
8486
{ &hf_scsi_report_key_rpc_scheme,
8487
{"RPC Scheme", "scsi.report_key.rpc_scheme", FT_UINT8, BASE_HEX,
8488
VALS(scsi_report_key_rpc_scheme_val), 0, "", HFILL}},
8489
{ &hf_scsi_setcdspeed_rc,
8490
{"Rotational Control", "scsi.setcdspeed.rc", FT_UINT8, BASE_HEX,
8491
VALS(scsi_setcdspeed_rc_val), 0x03, "", HFILL}},
8492
{ &hf_scsi_getconf_rt,
8493
{"RT", "scsi.getconf.rt", FT_UINT8, BASE_HEX,
8494
VALS(scsi_getconf_rt_val), 0x03, "", HFILL}},
8495
{ &hf_scsi_getconf_current_profile,
8496
{"Current Profile", "scsi.getconf.current_profile", FT_UINT16, BASE_HEX,
8497
VALS(scsi_getconf_current_profile_val), 0, "", HFILL}},
8498
{ &hf_scsi_getconf_starting_feature,
8499
{"Starting Feature", "scsi.getconf.starting_feature", FT_UINT16, BASE_HEX,
8500
VALS(scsi_feature_val), 0, "", HFILL}},
8502
{"Feature", "scsi.feature", FT_UINT16, BASE_HEX,
8503
VALS(scsi_feature_val), 0, "", HFILL}},
8504
{ &hf_scsi_feature_version,
8505
{"Version", "scsi.feature.version", FT_UINT8, BASE_DEC,
8506
NULL, 0x3c, "", HFILL}},
8507
{ &hf_scsi_feature_persistent,
8508
{"Persistent", "scsi.feature.persistent", FT_UINT8, BASE_HEX,
8509
NULL, 0x02, "", HFILL}},
8510
{ &hf_scsi_feature_current,
8511
{"Current", "scsi.feature.current", FT_UINT8, BASE_HEX,
8512
NULL, 001, "", HFILL}},
8513
{ &hf_scsi_feature_additional_length,
8514
{"Additional Length", "scsi.feature.additional_length", FT_UINT8, BASE_DEC,
8515
NULL, 0, "", HFILL}},
8516
{ &hf_scsi_feature_lun_sn,
8517
{"LUN Serial Number", "scsi.feature.lun_sn", FT_STRING, BASE_NONE,
8518
NULL, 0, "", HFILL}},
8519
{ &hf_scsi_feature_cdread_dap,
8520
{"DAP", "scsi.feature.cdread.dap", FT_BOOLEAN, 8,
8521
NULL, 0x80, "", HFILL}},
8522
{ &hf_scsi_feature_cdread_c2flag,
8523
{"C2 Flag", "scsi.feature.cdread.c2flag", FT_BOOLEAN, 8,
8524
NULL, 0x02, "", HFILL}},
8525
{ &hf_scsi_feature_cdread_cdtext,
8526
{"CD-Text", "scsi.feature.cdread.cdtext", FT_BOOLEAN, 8,
8527
NULL, 0x01, "", HFILL}},
8528
{ &hf_scsi_feature_dvdrw_write,
8529
{"Write", "scsi.feature.dvdrw.write", FT_BOOLEAN, 8,
8530
NULL, 0x01, "", HFILL}},
8531
{ &hf_scsi_feature_dvdrw_quickstart,
8532
{"Quick Start", "scsi.feature.dvdrw.quickstart", FT_BOOLEAN, 8,
8533
NULL, 0x02, "", HFILL}},
8534
{ &hf_scsi_feature_dvdrw_closeonly,
8535
{"Close Only", "scsi.feature.dvdrw.closeonly", FT_BOOLEAN, 8,
8536
NULL, 0x01, "", HFILL}},
8537
{ &hf_scsi_feature_dvdr_write,
8538
{"Write", "scsi.feature.dvdr.write", FT_BOOLEAN, 8,
8539
NULL, 0x01, "", HFILL}},
8540
{ &hf_scsi_feature_tao_buf,
8541
{"BUF", "scsi.feature.tao.buf", FT_BOOLEAN, 8,
8542
NULL, 0x40, "", HFILL}},
8543
{ &hf_scsi_feature_tao_rwraw,
8544
{"R-W Raw", "scsi.feature.tao.rwraw", FT_BOOLEAN, 8,
8545
NULL, 0x10, "", HFILL}},
8546
{ &hf_scsi_feature_tao_rwpack,
8547
{"R-W Pack", "scsi.feature.tao.rwpack", FT_BOOLEAN, 8,
8548
NULL, 0x08, "", HFILL}},
8549
{ &hf_scsi_feature_tao_testwrite,
8550
{"Test Write", "scsi.feature.tao.testwrite", FT_BOOLEAN, 8,
8551
NULL, 0x04, "", HFILL}},
8552
{ &hf_scsi_feature_tao_cdrw,
8553
{"CD-RW", "scsi.feature.tao.cdrw", FT_BOOLEAN, 8,
8554
NULL, 0x02, "", HFILL}},
8555
{ &hf_scsi_feature_tao_rwsubcode,
8556
{"R-W Subcode", "scsi.feature.tao.rwsubcode", FT_BOOLEAN, 8,
8557
NULL, 0x01, "", HFILL}},
8558
{ &hf_scsi_feature_dts,
8559
{"Data Type Supported", "scsi.feature.dts", FT_UINT16, BASE_HEX,
8560
NULL, 0xffff, "", HFILL}},
8561
{ &hf_scsi_feature_sao_buf,
8562
{"BUF", "scsi.feature.sao.buf", FT_BOOLEAN, 8,
8563
NULL, 0x40, "", HFILL}},
8564
{ &hf_scsi_feature_sao_sao,
8565
{"SAO", "scsi.feature.sao.sao", FT_BOOLEAN, 8,
8566
NULL, 0x20, "", HFILL}},
8567
{ &hf_scsi_feature_sao_rawms,
8568
{"Raw MS", "scsi.feature.sao.rawms", FT_BOOLEAN, 8,
8569
NULL, 0x10, "", HFILL}},
8570
{ &hf_scsi_feature_sao_raw,
8571
{"Raw", "scsi.feature.sao.raw", FT_BOOLEAN, 8,
8572
NULL, 0x08, "", HFILL}},
8573
{ &hf_scsi_feature_sao_testwrite,
8574
{"Test Write", "scsi.feature.sao.testwrite", FT_BOOLEAN, 8,
8575
NULL, 0x04, "", HFILL}},
8576
{ &hf_scsi_feature_sao_cdrw,
8577
{"CD-RW", "scsi.feature.sao.cdrw", FT_BOOLEAN, 8,
8578
NULL, 0x02, "", HFILL}},
8579
{ &hf_scsi_feature_sao_rw,
8580
{"R-W", "scsi.feature.sao.rw", FT_BOOLEAN, 8,
8581
NULL, 0x01, "", HFILL}},
8582
{ &hf_scsi_feature_sao_mcsl,
8583
{"Maximum Cue Sheet Length", "scsi.feature.sao.mcsl", FT_UINT24, BASE_DEC,
8584
NULL, 0, "", HFILL}},
8585
{ &hf_scsi_feature_dvdr_buf,
8586
{"BUF", "scsi.feature.dvdr.buf", FT_BOOLEAN, 8,
8587
NULL, 0x40, "", HFILL}},
8588
{ &hf_scsi_feature_dvdr_testwrite,
8589
{"Test Write", "scsi.feature.dvdr.testwrite", FT_BOOLEAN, 8,
8590
NULL, 0x04, "", HFILL}},
8591
{ &hf_scsi_feature_dvdr_dvdrw,
8592
{"DVD-RW", "scsi.feature.dvdr.dvdrw", FT_BOOLEAN, 8,
8593
NULL, 0x02, "", HFILL}},
8594
{ &hf_scsi_feature_profile,
8595
{"Profile", "scsi.feature.profile", FT_UINT16, BASE_HEX,
8596
VALS(scsi_getconf_current_profile_val), 0, "", HFILL}},
8597
{ &hf_scsi_feature_profile_current,
8598
{"Current", "scsi.feature.profile.current", FT_BOOLEAN, 8,
8599
NULL, 0x01, "", HFILL}},
8600
{ &hf_scsi_feature_isw_buf,
8601
{"BUF", "scsi.feature.isw.buf", FT_BOOLEAN, 8,
8602
NULL, 0x01, "", HFILL}},
8603
{ &hf_scsi_feature_isw_num_linksize,
8604
{"Number of Link Sizes", "scsi.feature.isw.num_linksize", FT_UINT8, BASE_DEC,
8605
NULL, 0, "", HFILL}},
8606
{ &hf_scsi_feature_isw_linksize,
8607
{"Link Size", "scsi.feature.isw.linksize", FT_UINT8, BASE_DEC,
8608
NULL, 0, "", HFILL}},
8609
{ &hf_scsi_readtoc_time,
8610
{"Time", "scsi.readtoc.time", FT_BOOLEAN, 8,
8611
NULL, 0x02, "", HFILL}},
8612
{ &hf_scsi_readtoc_format,
8613
{"Format", "scsi.readtoc.format", FT_UINT8, BASE_HEX,
8614
NULL, 0x0f, "", HFILL}},
8616
{"Track", "scsi.track", FT_UINT32, BASE_DEC,
8617
NULL, 0, "", HFILL}},
8618
{ &hf_scsi_track_size,
8619
{"Track Size", "scsi.track_size", FT_UINT32, BASE_DEC,
8620
NULL, 0, "", HFILL}},
8622
{"Session", "scsi.session", FT_UINT32, BASE_DEC,
8623
NULL, 0, "", HFILL}},
8624
{ &hf_scsi_first_track,
8625
{"First Track", "scsi.first_track", FT_UINT8, BASE_DEC,
8626
NULL, 0, "", HFILL}},
8627
{ &hf_scsi_readtoc_first_session,
8628
{"First Session", "scsi.readtoc.first_session", FT_UINT8, BASE_DEC,
8629
NULL, 0, "", HFILL}},
8630
{ &hf_scsi_readtoc_last_track,
8631
{"Last Track", "scsi.readtoc.last_track", FT_UINT8, BASE_DEC,
8632
NULL, 0, "", HFILL}},
8633
{ &hf_scsi_readtoc_last_session,
8634
{"Last Session", "scsi.readtoc.last_session", FT_UINT8, BASE_DEC,
8635
NULL, 0, "", HFILL}},
8636
{ &hf_scsi_q_subchannel_adr,
8637
{"Q Subchannel ADR", "scsi.q.subchannel.adr", FT_UINT8, BASE_HEX,
8638
VALS(scsi_q_subchannel_adr_val), 0xf0, "", HFILL}},
8639
{ &hf_scsi_q_subchannel_control,
8640
{"Q Subchannel Control", "scsi.q.subchannel.control", FT_UINT8, BASE_HEX,
8641
VALS(scsi_q_subchannel_control_val), 0x0f, "", HFILL}},
8642
{ &hf_scsi_track_start_address,
8643
{"Track Start Address", "scsi.track_start_address", FT_UINT32, BASE_DEC,
8644
NULL, 0, "", HFILL}},
8645
{ &hf_scsi_next_writable_address,
8646
{"Next Writable Address", "scsi.next_writable_address", FT_UINT32, BASE_DEC,
8647
NULL, 0, "", HFILL}},
8648
{ &hf_scsi_track_start_time,
8649
{"Track Start Time", "scsi.track_start_time", FT_UINT32, BASE_DEC,
8650
NULL, 0, "", HFILL}},
8651
{ &hf_scsi_synccache_immed,
8652
{"IMMED", "scsi.synccache.immed", FT_BOOLEAN, 8,
8653
NULL, 0x02, "", HFILL}},
8654
{ &hf_scsi_synccache_reladr,
8655
{"RelAdr", "scsi.synccache.reladr", FT_BOOLEAN, 8,
8656
NULL, 0x01, "", HFILL}},
8657
{ &hf_scsi_rbc_block,
8658
{"BLOCK", "scsi.rbc.block", FT_BOOLEAN, 8,
8659
NULL, 0x01, "", HFILL}},
8660
{ &hf_scsi_rbc_lob_blocks,
8661
{"Buffer Len (blocks)", "scsi.rbc.lob_blocks", FT_UINT32, BASE_DEC,
8662
NULL, 0, "", HFILL}},
8663
{ &hf_scsi_rbc_alob_blocks,
8664
{"Available Buffer Len (blocks)", "scsi.rbc.alob_blocks", FT_UINT32, BASE_DEC,
8665
NULL, 0, "", HFILL}},
8666
{ &hf_scsi_rbc_lob_bytes,
8667
{"Buffer Len (bytes)", "scsi.rbc.lob_bytes", FT_UINT32, BASE_DEC,
8668
NULL, 0, "", HFILL}},
8669
{ &hf_scsi_rbc_alob_bytes,
8670
{"Available Buffer Len (bytes)", "scsi.rbc.alob_bytes", FT_UINT32, BASE_DEC,
8671
NULL, 0, "", HFILL}},
8672
{ &hf_scsi_setstreaming_type,
8673
{"Type", "scsi.setstreaming.type", FT_UINT8, BASE_DEC,
8674
VALS(scsi_setstreaming_type_val), 0, "", HFILL}},
8675
{ &hf_scsi_setstreaming_param_len,
8676
{"Parameter Length", "scsi.setstreaming.param_len", FT_UINT16, BASE_DEC,
8677
NULL, 0, "", HFILL}},
8678
{ &hf_scsi_setstreaming_wrc,
8679
{"WRC", "scsi.setstreaming.wrc", FT_UINT8, BASE_HEX,
8680
NULL, 0x18, "", HFILL}},
8681
{ &hf_scsi_setstreaming_rdd,
8682
{"RDD", "scsi.setstreaming.rdd", FT_BOOLEAN, 8,
8683
NULL, 0x04, "", HFILL}},
8684
{ &hf_scsi_setstreaming_exact,
8685
{"Exact", "scsi.setstreaming.exact", FT_BOOLEAN, 8,
8686
NULL, 0x02, "", HFILL}},
8687
{ &hf_scsi_setstreaming_ra,
8688
{"RA", "scsi.setstreaming.ra", FT_BOOLEAN, 8,
8689
NULL, 0x01, "", HFILL}},
8690
{ &hf_scsi_setstreaming_start_lba,
8691
{"Start LBA", "scsi.setstreaming.start_lbs", FT_UINT32, BASE_DEC,
8692
NULL, 0, "", HFILL}},
8693
{ &hf_scsi_setstreaming_end_lba,
8694
{"End LBA", "scsi.setstreaming.end_lba", FT_UINT32, BASE_DEC,
8695
NULL, 0, "", HFILL}},
8696
{ &hf_scsi_setstreaming_read_size,
8697
{"Read Size", "scsi.setstreaming.read_size", FT_UINT32, BASE_DEC,
8698
NULL, 0, "", HFILL}},
8699
{ &hf_scsi_setstreaming_read_time,
8700
{"Read Time", "scsi.setstreaming.read_time", FT_UINT32, BASE_DEC,
8701
NULL, 0, "", HFILL}},
8702
{ &hf_scsi_setstreaming_write_size,
8703
{"Write Size", "scsi.setstreaming.write_size", FT_UINT32, BASE_DEC,
8704
NULL, 0, "", HFILL}},
8705
{ &hf_scsi_setstreaming_write_time,
8706
{"Write Time", "scsi.setstreaming.write_time", FT_UINT32, BASE_DEC,
8707
NULL, 0, "", HFILL}},
8708
{ &hf_scsi_reservation_size,
8709
{"Reservation Size", "scsi.reservation_size", FT_UINT32, BASE_DEC,
8710
NULL, 0, "", HFILL}},
8711
{ &hf_scsi_rti_address_type,
8712
{"Address Type", "scsi.rti.address_type", FT_UINT8, BASE_HEX,
8713
VALS(scsi_rti_address_type_val), 0x03, "", HFILL}},
8714
{ &hf_scsi_rti_damage,
8715
{"Damage", "scsi.rti.damage", FT_BOOLEAN, 8,
8716
NULL, 0x20, "", HFILL}},
8717
{ &hf_scsi_rti_copy,
8718
{"Copy", "scsi.rti.copy", FT_BOOLEAN, 8,
8719
NULL, 0x10, "", HFILL}},
8720
{ &hf_scsi_rti_track_mode,
8721
{"Track Mode", "scsi.rti.track_mode", FT_UINT8, BASE_HEX,
8722
NULL, 0x0f, "", HFILL}},
8724
{"RT", "scsi.rti.rt", FT_BOOLEAN, 8,
8725
NULL, 0x80, "", HFILL}},
8726
{ &hf_scsi_rti_blank,
8727
{"Blank", "scsi.rti.blank", FT_BOOLEAN, 8,
8728
NULL, 0x40, "", HFILL}},
8729
{ &hf_scsi_rti_packet,
8730
{"Packet/Inc", "scsi.rti.packet", FT_BOOLEAN, 8,
8731
NULL, 0x20, "", HFILL}},
8733
{"FP", "scsi.rti.fp", FT_BOOLEAN, 8,
8734
NULL, 0x10, "", HFILL}},
8735
{ &hf_scsi_rti_data_mode,
8736
{"Data Mode", "scsi.rti.data_mode", FT_UINT8, BASE_HEX,
8737
NULL, 0x0f, "", HFILL}},
8738
{ &hf_scsi_rti_lra_v,
8739
{"LRA_V", "scsi.rti.lra_v", FT_BOOLEAN, 8,
8740
NULL, 0x02, "", HFILL}},
8741
{ &hf_scsi_rti_nwa_v,
8742
{"NWA_V", "scsi.rti.nwa_v", FT_BOOLEAN, 8,
8743
NULL, 0x01, "", HFILL}},
8744
{ &hf_scsi_free_blocks,
8745
{"Free Blocks", "scsi.free_blocks", FT_UINT32, BASE_DEC,
8746
NULL, 0, "", HFILL}},
8747
{ &hf_scsi_fixed_packet_size,
8748
{"Fixed Packet Size", "scsi.fixed_packet_size", FT_UINT32, BASE_DEC,
8749
NULL, 0, "", HFILL}},
8750
{ &hf_scsi_last_recorded_address,
8751
{"Last Recorded Address", "scsi.last_recorded_address", FT_UINT32, BASE_DEC,
8752
NULL, 0, "", HFILL}},
8753
{ &hf_scsi_read_compatibility_lba,
8754
{"Read Compatibility LBA", "scsi.read_compatibility_lba", FT_UINT32, BASE_DEC,
8755
NULL, 0, "", HFILL}},
8756
{ &hf_scsi_disc_info_erasable,
8757
{"Erasable", "scsi.disc_info.erasable", FT_BOOLEAN, 8,
8758
NULL, 0x10, "", HFILL}},
8759
{ &hf_scsi_disc_info_state_of_last_session,
8760
{"State Of Last Session", "scsi.disc_info.state_of_last_session", FT_UINT8, BASE_HEX,
8761
VALS(scsi_disc_info_sols_val), 0x0c, "", HFILL}},
8762
{ &hf_scsi_disc_info_disk_status,
8763
{"Disk Status", "scsi.disc_info.disk_status", FT_UINT8, BASE_HEX,
8764
VALS(scsi_disc_info_disc_status_val), 0x03, "", HFILL}},
8765
{ &hf_scsi_disc_info_number_of_sessions,
8766
{"Number Of Sessions", "scsi.disc_info.number_of_sessions", FT_UINT16, BASE_DEC,
8767
NULL, 0, "", HFILL}},
8768
{ &hf_scsi_disc_info_first_track_in_last_session,
8769
{"First Track In Last Session", "scsi.disc_info.first_track_in_last_session", FT_UINT16, BASE_DEC,
8770
NULL, 0, "", HFILL}},
8771
{ &hf_scsi_disc_info_last_track_in_last_session,
8772
{"Last Track In Last Session", "scsi.disc_info.last_track_in_last_session", FT_UINT16, BASE_DEC,
8773
NULL, 0, "", HFILL}},
8774
{ &hf_scsi_disc_info_did_v,
8775
{"DID_V", "scsi.disc_info.did_v", FT_BOOLEAN, 8,
8776
NULL, 0x80, "", HFILL}},
8777
{ &hf_scsi_disc_info_dbc_v,
8778
{"DBC_V", "scsi.disc_info.dbc_v", FT_BOOLEAN, 8,
8779
NULL, 0x40, "", HFILL}},
8780
{ &hf_scsi_disc_info_uru,
8781
{"URU", "scsi.disc_info.uru", FT_BOOLEAN, 8,
8782
NULL, 0x20, "", HFILL}},
8783
{ &hf_scsi_disc_info_dac_v,
8784
{"DAC_V", "scsi.disc_info.dac_v", FT_BOOLEAN, 8,
8785
NULL, 0x10, "", HFILL}},
8786
{ &hf_scsi_disc_info_dbit,
8787
{"Dbit", "scsi.disc_info.dbit", FT_BOOLEAN, 8,
8788
NULL, 0x04, "", HFILL}},
8789
{ &hf_scsi_disc_info_bgfs,
8790
{"BG Format Status", "scsi.disc_info.bgfs", FT_UINT8, BASE_HEX,
8791
VALS(scsi_disc_info_bgfs_val), 0x03, "", HFILL}},
8792
{ &hf_scsi_disc_info_disc_type,
8793
{"Disc Type", "scsi.disc_info.disc_type", FT_UINT8, BASE_HEX,
8794
VALS(scsi_disc_info_disc_type_val), 0, "", HFILL}},
8795
{ &hf_scsi_disc_info_disc_identification,
8796
{"Disc Identification", "scsi.disc_info.disc_identification", FT_UINT32, BASE_HEX,
8797
NULL, 0, "", HFILL}},
8798
{ &hf_scsi_disc_info_last_session_lead_in_start_address,
8799
{"Last Session Lead-In Start Address", "scsi.disc_info.last_session_lead_in_start_address", FT_UINT32, BASE_DEC,
8800
NULL, 0, "", HFILL}},
8801
{ &hf_scsi_disc_info_last_possible_lead_out_start_address,
8802
{"Last Possible Lead-Out Start Address", "scsi.disc_info.last_possible_lead_out_start_address", FT_UINT32, BASE_DEC,
8803
NULL, 0, "", HFILL}},
8804
{ &hf_scsi_disc_info_disc_bar_code,
8805
{"Disc Bar Code", "scsi.disc_info.disc_bar_code", FT_UINT64, BASE_HEX,
8806
NULL, 0, "", HFILL}},
8807
{ &hf_sbc2_verify_lba,
8808
{"LBA", "scsi.sbc2.verify.lba", FT_UINT32, BASE_DEC, NULL, 0x0, "",
8810
{ &hf_sbc2_verify_vlen,
8811
{"Verification Length", "scsi.sbc2.verify.vlen", FT_UINT16,
8812
BASE_DEC, NULL, 0x0, "", HFILL}},
8813
{ &hf_sbc2_verify_dpo,
8814
{"DPO", "scsi.sbc2.verify.dpo", FT_BOOLEAN, BASE_HEX, NULL, 0x10, "",
8816
{ &hf_sbc2_verify_blkvfy,
8817
{"BLKVFY", "scsi.sbc2.verify.blkvfy", FT_BOOLEAN, BASE_HEX, NULL, 0x4,
8819
{ &hf_sbc2_verify_bytchk,
8820
{"BYTCHK", "scsi.sbc2.verify.bytchk", FT_BOOLEAN, BASE_HEX, NULL, 0x2,
8822
{ &hf_sbc2_verify_reladdr,
8823
{"RELADDR", "scsi.sbc2.verify.reladdr", FT_BOOLEAN, BASE_HEX, NULL,
8825
{ &hf_sbc2_verify_vlen32,
8826
{"Verification Length", "scsi.sbc2.verify.vlen32", FT_UINT32,
8827
BASE_DEC, NULL, 0x0, "", HFILL}},
8828
{ &hf_sbc2_verify_lba64,
8829
{"LBA", "scsi.sbc2.verify.lba64", FT_UINT64, BASE_DEC, NULL, 0x0, "",
8831
{ &hf_sbc2_wrverify_ebp,
8832
{"EBP", "scsi.sbc2.wrverify.ebp", FT_BOOLEAN, BASE_HEX, NULL, 0x4, "",
8834
{ &hf_sbc2_wrverify_lba,
8835
{"LBA", "scsi.sbc2.wrverify.lba", FT_UINT32, BASE_DEC, NULL, 0x0, "",
8837
{ &hf_sbc2_wrverify_xferlen,
8838
{"Transfer Length", "scsi.sbc2.wrverify.xferlen", FT_UINT16, BASE_DEC,
8839
NULL, 0x0, "", HFILL}},
8840
{ &hf_sbc2_wrverify_lba64,
8841
{"LBA", "scsi.sbc2.wrverify.lba64", FT_UINT64, BASE_DEC, NULL, 0x0,
8843
{ &hf_sbc2_wrverify_xferlen32,
8844
{"Transfer Length", "scsi.sbc2.wrverify.xferlen32", FT_UINT32,
8845
BASE_DEC, NULL, 0x0, "", HFILL}},
8846
{ &hf_ssc3_space6_count,
8847
{"Count", "scsi.space6.count", FT_UINT24, BASE_DEC, NULL, 0x0,
8849
{ &hf_ssc3_space16_count,
8850
{"Count", "scsi.space16.count", FT_UINT64, BASE_DEC, NULL, 0x0,
8852
{ &hf_ssc3_locate10_loid,
8853
{"Logical Object Identifier", "scsi.locate10.loid", FT_UINT32, BASE_DEC, NULL, 0x0,
8855
{ &hf_ssc3_locate16_loid,
8856
{"Logical Identifier", "scsi.locate16.loid", FT_UINT64, BASE_DEC, NULL, 0x0,
8858
4440
{ &hf_scsi_request_frame,
8859
4441
{ "Request in", "scsi.request_frame", FT_FRAMENUM, BASE_NONE, NULL, 0,
8860
4442
"The request to this transaction is in this frame", HFILL }},