Versions in this module Expand all Collapse all v0 v0.2.2 Dec 13, 2022 Changes in this version type SCSICommandType + var GET_PERFORMANCE SCSICommandType = 0xac v0.2.1 Aug 17, 2021 v0.2.0 Jul 14, 2020 v0.1.0 Nov 22, 2019 Changes in this version + const SCSIDataBidirection + const SCSIDataNone + const SCSIDataRead + const SCSIDataWrite + const SCSI_DRIVER_ERR + const SCSI_DRIVER_EXIT + const SCSI_DRIVER_INIT + const SCSI_DRIVER_REGD + var DefaultBlockShift uint = 9 + var DefaultSenseBufferSize int = 252 + var SAMStatAcaActive = SAMStat + var SAMStatBusy = SAMStat + var SAMStatCheckCondition = SAMStat + var SAMStatCommandTerminated = SAMStat + var SAMStatConditionMet = SAMStat + var SAMStatGood = SAMStat + var SAMStatIntermediate = SAMStat + var SAMStatIntermediateConditionMet = SAMStat + var SAMStatReservationConflict = SAMStat + var SAMStatTaskAborted = SAMStat + var SAMStatTaskSetFull = SAMStat + var SAM_STAT_ACA_ACTIVE byte = 0x30 + var SAM_STAT_BUSY byte = 0x08 + var SAM_STAT_CHECK_CONDITION byte = 0x02 + var SAM_STAT_COMMAND_TERMINATED byte = 0x22 + var SAM_STAT_CONDITION_MET byte = 0x04 + var SAM_STAT_GOOD byte = 0x00 + var SAM_STAT_INTERMEDIATE byte = 0x10 + var SAM_STAT_INTERMEDIATE_CONDITION_MET byte = 0x14 + var SAM_STAT_RESERVATION_CONFLICT byte = 0x18 + var SAM_STAT_TASK_ABORTED byte = 0x40 + var SAM_STAT_TASK_SET_FULL byte = 0x28 + type BackingStore interface + Close func(dev *SCSILu) error + DataAdvise func(int64, int64, uint32) error + DataSync func(offset, tl int64) error + Exit func(dev *SCSILu) error + Init func(dev *SCSILu, Opts string) error + Open func(dev *SCSILu, path string) error + Read func(offset, tl int64) ([]byte, error) + Size func(dev *SCSILu) uint64 + Unmap func([]UnmapBlockDescriptor) error + Write func([]byte, int64) error + type CommandFunc func(host int, cmd *SCSICommand) SAMStat + type ITNexus struct + ID uuid.UUID + Tag string + type ITNexusLuInfo struct + ID uint64 + Lu *SCSILu + Prevent int + type LUNMap map[uint64]*SCSILu + type ModePage struct + Data []byte + PageCode uint8 + Size uint8 + SubPageCode uint8 + type ReaderWriterAt interface + type RemoteBackingStore interface + Sync func() (int, error) + Unmap func(int64, int64) (int, error) + type SAMStat struct + Err error + Stat byte + type SCSICommand struct + Attribute int + Device *SCSILu + DeviceID uint64 + Direction SCSIDataDirection + ITNexus *ITNexus + ITNexusID uuid.UUID + ITNexusLuInfo *ITNexusLuInfo + InSDBBuffer *SCSIDataBuffer + Lun [8]uint8 + Offset uint64 + OpCode byte + OutSDBBuffer *SCSIDataBuffer + RelTargetPortID uint16 + Result byte + SCB []byte + SCBLength int + SenseBuffer *SenseBuffer + State SCSICommandState + TL uint32 + Tag uint64 + Target *SCSITarget + type SCSICommandState uint64 + var SCSICommandAsync SCSICommandState = 3 + var SCSICommandNotLast SCSICommandState = 4 + var SCSICommandProcessed SCSICommandState = 2 + var SCSICommandQueued SCSICommandState = 1 + type SCSICommandType byte + var ALLOW_MEDIUM_REMOVAL SCSICommandType = 0x1e + var CHANGE_DEFINITION SCSICommandType = 0x40 + var CLOSE_TRACK SCSICommandType = 0x5b + var COMPARE SCSICommandType = 0x39 + var COMPARE_AND_WRITE SCSICommandType = 0x89 + var COPY SCSICommandType = 0x18 + var COPY_VERIFY SCSICommandType = 0x3a + var ERASE SCSICommandType = 0x19 + var EXCHANGE_MEDIUM SCSICommandType = 0xa6 + var FORMAT_UNIT SCSICommandType = 0x04 + var GET_CONFIGURATION SCSICommandType = 0x46 + var GET_PERFORMACE SCSICommandType = 0xac + var INITIALIZE_ELEMENT_STATUS SCSICommandType = 0x07 + var INITIALIZE_ELEMENT_STATUS_WITH_RANGE SCSICommandType = 0x37 + var INQUIRY SCSICommandType = 0x12 + var LOCK_UNLOCK_CACHE SCSICommandType = 0x36 + var LOG_SELECT SCSICommandType = 0x4c + var LOG_SENSE SCSICommandType = 0x4d + var MAINT_PROTOCOL_IN SCSICommandType = 0xa3 + var MEDIUM_SCAN SCSICommandType = 0x38 + var MODE_SELECT SCSICommandType = 0x15 + var MODE_SELECT_10 SCSICommandType = 0x55 + var MODE_SENSE SCSICommandType = 0x1a + var MODE_SENSE_10 SCSICommandType = 0x5a + var MOVE_MEDIUM SCSICommandType = 0xa5 + var ORWRITE_16 SCSICommandType = 0x8b + var PERSISTENT_RESERVE_IN SCSICommandType = 0x5e + var PERSISTENT_RESERVE_OUT SCSICommandType = 0x5f + var POSITION_TO_ELEMENT SCSICommandType = 0x2b + var PRE_FETCH_10 SCSICommandType = 0x34 + var PRE_FETCH_16 SCSICommandType = 0x90 + var READ_10 SCSICommandType = 0x28 + var READ_12 SCSICommandType = 0xa8 + var READ_16 SCSICommandType = 0x88 + var READ_6 SCSICommandType = 0x08 + var READ_BLOCK_LIMITS SCSICommandType = 0x05 + var READ_BUFFER SCSICommandType = 0x3c + var READ_BUFFER_CAP SCSICommandType = 0x5c + var READ_CAPACITY SCSICommandType = 0x25 + var READ_DEFECT_DATA SCSICommandType = 0x37 + var READ_DISK_INFO SCSICommandType = 0x51 + var READ_DVD_STRUCTURE SCSICommandType = 0xad + var READ_ELEMENT_STATUS SCSICommandType = 0xb8 + var READ_LONG SCSICommandType = 0x3e + var READ_POSITION SCSICommandType = 0x34 + var READ_REVERSE SCSICommandType = 0x0f + var READ_TOC SCSICommandType = 0x43 + var READ_TRACK_INFO SCSICommandType = 0x52 + var REASSIGN_BLOCKS SCSICommandType = 0x07 + var RECEIVE_DIAGNOSTIC SCSICommandType = 0x1c + var RECOVER_BUFFERED_DATA SCSICommandType = 0x14 + var RELEASE SCSICommandType = 0x17 + var RELEASE_10 SCSICommandType = 0x57 + var REPORT_LUNS SCSICommandType = 0xa0 + var REQUEST_SENSE SCSICommandType = 0x03 + var RESERVE SCSICommandType = 0x16 + var RESERVE_10 SCSICommandType = 0x56 + var REZERO_UNIT SCSICommandType = 0x01 + var SAI_GET_LBA_STATUS SCSICommandType = 0x12 + var SAI_READ_CAPACITY_16 SCSICommandType = 0x10 + var SEARCH_EQUAL SCSICommandType = 0x31 + var SEARCH_EQUAL_12 SCSICommandType = 0xb1 + var SEARCH_HIGH SCSICommandType = 0x30 + var SEARCH_HIGH_12 SCSICommandType = 0xb0 + var SEARCH_LOW SCSICommandType = 0x32 + var SEARCH_LOW_12 SCSICommandType = 0xb2 + var SEEK_10 SCSICommandType = 0x2b + var SEEK_6 SCSICommandType = 0x0b + var SEND_DIAGNOSTIC SCSICommandType = 0x1d + var SEND_VOLUME_TAG SCSICommandType = 0xb6 + var SERVICE_ACTION_IN SCSICommandType = 0x9e + var SET_CD_SPEED SCSICommandType = 0xbb + var SET_LIMITS SCSICommandType = 0x33 + var SET_STREAMING SCSICommandType = 0xb6 + var SET_WINDOW SCSICommandType = 0x24 + var SPACE SCSICommandType = 0x11 + var START_STOP SCSICommandType = 0x1b + var SYNCHRONIZE_CACHE SCSICommandType = 0x35 + var SYNCHRONIZE_CACHE_16 SCSICommandType = 0x91 + var TEST_UNIT_READY SCSICommandType = 0x00 + var UNMAP SCSICommandType = 0x42 + var UPDATE_BLOCK SCSICommandType = 0x3d + var VARLEN_CDB SCSICommandType = 0x7f + var VERIFY_10 SCSICommandType = 0x2f + var VERIFY_12 SCSICommandType = 0xaf + var VERIFY_16 SCSICommandType = 0x8f + var WRITE_10 SCSICommandType = 0x2a + var WRITE_12 SCSICommandType = 0xaa + var WRITE_16 SCSICommandType = 0x8a + var WRITE_6 SCSICommandType = 0x0a + var WRITE_BUFFER SCSICommandType = 0x3b + var WRITE_FILEMARKS SCSICommandType = 0x10 + var WRITE_LONG SCSICommandType = 0x3f + var WRITE_LONG_2 SCSICommandType = 0xea + var WRITE_SAME SCSICommandType = 0x41 + var WRITE_SAME_16 SCSICommandType = 0x93 + var WRITE_VERIFY SCSICommandType = 0x2e + var WRITE_VERIFY_12 SCSICommandType = 0xae + var WRITE_VERIFY_16 SCSICommandType = 0x8e + type SCSIDataBuffer struct + Buffer []byte + Length uint32 + Resid uint32 + TransferLength uint32 + type SCSIDataDirection int + type SCSIDeviceProtocol interface + ConfigLu func(lu *SCSILu) error + ExitLu func(lu *SCSILu) error + InitLu func(lu *SCSILu) error + OfflineLu func(lu *SCSILu) error + OnlineLu func(lu *SCSILu) error + PerformCommand func(opcode int) interface{} + PerformServiceAction func(opcode int, action uint8) interface{} + type SCSIDeviceType byte + var TYPE_COMM SCSIDeviceType = 0x09 + var TYPE_DISK SCSIDeviceType = 0x00 + var TYPE_ENCLOSURE SCSIDeviceType = 0x0d + var TYPE_MEDIUM_CHANGER SCSIDeviceType = 0x08 + var TYPE_MMC SCSIDeviceType = 0x05 + var TYPE_MOD SCSIDeviceType = 0x07 + var TYPE_NO_LUN SCSIDeviceType = 0x7f + var TYPE_OSD SCSIDeviceType = 0x11 + var TYPE_PRINTER SCSIDeviceType = 0x02 + var TYPE_PROCESSOR SCSIDeviceType = 0x03 + var TYPE_PT SCSIDeviceType = 0xff + var TYPE_RAID SCSIDeviceType = 0x0c + var TYPE_RBC SCSIDeviceType = 0x0e + var TYPE_SCANNER SCSIDeviceType = 0x06 + var TYPE_TAPE SCSIDeviceType = 0x01 + var TYPE_UNKNOWN SCSIDeviceType = 0x1f + var TYPE_WORM SCSIDeviceType = 0x04 + type SCSILu struct + Address uint64 + Attrs SCSILuPhyAttribute + BlockShift uint + BsoFlags int + DeviceProtocol SCSIDeviceProtocol + FinishCommand func(*SCSITarget, *SCSICommand) + ModeBlockDescriptor []byte + ModePages []ModePage + Path string + PerformCommand CommandFunc + ReserveID uuid.UUID + SCSIID string + SCSIProductID string + SCSIVendorID string + Size uint64 + Storage BackingStore + UUID uint64 + type SCSILuPhyAttribute struct + DeviceType SCSIDeviceType + Lbppbe int + LowestAlignedLBA int + NoLbppbe int + NumID uint64 + Online bool + ProductID string + ProductRev string + Qualifier bool + Readonly bool + Removable bool + SCSIID string + SCSISN string + SWP bool + SenseFormat bool + ThinProvisioning bool + VendorID string + VersionDesction [8]uint16 + type SCSIReservation struct + ID uuid.UUID + ITNexusID uuid.UUID + Key uint64 + Scope uint8 + Type uint8 + type SCSITarget struct + Devices LUNMap + ITNexus map[uuid.UUID]*ITNexus + ITNexusMutex sync.Mutex + LID int + LUN0 *SCSILu + Name string + SCSITargetDriver interface{} + State SCSITargetState + TID int + TargetPortGroups []*TargetPortGroup + type SCSITargetDriverCommon struct + DefaultBST string + Name string + State SCSITargetDriverState + type SCSITargetDriverState int + type SCSITargetPort struct + RelativeTargetPortID uint16 + TargetPortName string + type SCSITargetState int + var TargetOnline SCSITargetState = 1 + var TargetReady SCSITargetState = 2 + type SenseBuffer struct + Buffer []byte + Length uint32 + type TargetCreateRequest struct + Name string + type TargetListOptions struct + Name string + Verbose bool + type TargetPortGroup struct + GroupID uint16 + TargetPortGroup []*SCSITargetPort + type TargetRemoveOptions struct + Force bool + Name string + type UnmapBlockDescriptor struct + Offset uint64 + TL uint32