aoe

package
v0.0.0-...-71dce46 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

aoe provides the implementation of an ATA over Ethernet server, backed by a Torus block volume.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	io.Closer
	io.ReadWriteSeeker
	Sync() error
	aoe.Identifier
}

type FileDevice

type FileDevice struct {
	*block.BlockFile
}

func (*FileDevice) Identify

func (fd *FileDevice) Identify() ([512]byte, error)

func (*FileDevice) Sectors

func (fd *FileDevice) Sectors() (int64, error)

type Frame

type Frame struct {
	// received ethernet frame
	ethernet.Frame
	// received AoE header
	aoe.Header
}

func (*Frame) UnmarshalBinary

func (f *Frame) UnmarshalBinary(data []byte) error

type FrameSender

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

func (*FrameSender) Send

func (fs *FrameSender) Send(hdr *aoe.Header) (int, error)

func (*FrameSender) SendError

func (fs *FrameSender) SendError(aerr aoe.Error) (int, error)

type Interface

type Interface struct {
	*net.Interface
	net.PacketConn
}

implements net.PacketConn

func NewInterface

func NewInterface(ifname string) (*Interface, error)

type Server

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

func NewServer

func NewServer(b *block.BlockVolume, options *ServerOptions) (*Server, error)

NewServer creates a new Server which utilizes the specified block volume. If options is nil, DefaultServerOptions will be used.

func (*Server) Close

func (s *Server) Close() error

func (*Server) Serve

func (s *Server) Serve(iface *Interface) error

type ServerOptions

type ServerOptions struct {
	// Major and Minor specify the major and minor address of an AoE server.
	// Typically, all AoE devices on a single server will share the same
	// major address, but have different minor addresses.
	//
	// It is important to note that all AoE servers on the same layer 2
	// network must have different major and minor addresses.
	Major uint16
	Minor uint8
}

ServerOptions specifies options for a Server.

type WriterTo

type WriterTo interface {
	WriteTo(b []byte, addr net.Addr) (n int, err error)
}

Jump to

Keyboard shortcuts

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