tcmu

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdEmulateInquiry

func CmdEmulateInquiry(cmd Command, dev Device) int

func CmdEmulateModeSelect

func CmdEmulateModeSelect(cmd Command) int

func CmdEmulateModeSense

func CmdEmulateModeSense(cmd Command) int

func CmdEmulateServiceActionIn

func CmdEmulateServiceActionIn(cmd Command, numLbas int64, blockSize int) int

func CmdEmulateTestUnitReady

func CmdEmulateTestUnitReady(cmd Command) int

func CmdGetLba

func CmdGetLba(cmd Command) int64

func CmdGetScsiCmd

func CmdGetScsiCmd(cmd Command) byte

func CmdGetXferLength

func CmdGetXferLength(cmd Command) int

func CmdMemcpyFromIovec

func CmdMemcpyFromIovec(cmd Command, buf []byte, length int) int

func CmdMemcpyIntoIovec

func CmdMemcpyIntoIovec(cmd Command, buf []byte, length int) int

func CmdSetMediumError

func CmdSetMediumError(cmd Command) int

func GetDevConfig

func GetDevConfig(volume string) string

func New

func New() types.Frontend

func PostEnableTcmu

func PostEnableTcmu(volume string) error

func PreEnableTcmu

func PreEnableTcmu(volume string, size, sectorSize int64) error

func TeardownTcmu

func TeardownTcmu(volume string) error

Types

type Cbuffer

type Cbuffer *C.void

type Command

type Command *C.struct_tcmulib_cmd

type Device

type Device *C.struct_tcmu_device

type State

type State struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*State) HandleRequest

func (s *State) HandleRequest(dev Device)

type Tcmu

type Tcmu struct {
	// contains filtered or unexported fields
}

func (*Tcmu) Endpoint added in v0.3.0

func (t *Tcmu) Endpoint() string

func (*Tcmu) FrontendName added in v0.3.0

func (t *Tcmu) FrontendName() string

func (*Tcmu) Shutdown

func (t *Tcmu) Shutdown() error

func (*Tcmu) Startup added in v0.3.0

func (t *Tcmu) Startup(name string, size, sectorSize int64, rw types.ReaderWriterAt) error

func (*Tcmu) State added in v0.3.0

func (t *Tcmu) State() types.State

Jump to

Keyboard shortcuts

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