drive

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

README

Drive sub-library

This library represents the OS dependent actions of sending security commands to a supported device.

Documentation

Index

Constants

View Source
const (
	ComIDDiscoveryL0 ComID = 1

	SecurityProtocolManagement SecurityProtocol = 1
	SecurityProtocolTPer       SecurityProtocol = 2
)
View Source
const (
	NVME_ADMIN_IDENTIFY = 0x06
	NVME_SECURITY_SEND  = 0x81
	NVME_SECURITY_RECV  = 0x82
)

Variables

View Source
var (
	ErrNotSupported = errors.New("Operation is not supported")
)
View Source
var (
	NVME_IOCTL_ADMIN_CMD = ioctl.Iowr('N', 0x41, unsafe.Sizeof(nvmePassthruCommand{}))
)

Functions

func NVMEDrive

func NVMEDrive(fd FdIntf) *nvmeDrive

func Open

func Open(device string) (driveIntf, error)

func SCSIDrive

func SCSIDrive(fd FdIntf) *scsiDrive

Types

type ComID added in v1.0.1

type ComID int

type FdIntf

type FdIntf interface {
	Fd() uintptr
}

type SecurityProtocol

type SecurityProtocol int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL