plan9

package
v0.0.0-fhs.20200606 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: BSD-3-Clause, GooglePatentClause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION9P = "9P2000"
	MAXWELEM  = 16

	OREAD     = 0
	OWRITE    = 1
	ORDWR     = 2
	OEXEC     = 3
	OTRUNC    = 16
	OCEXEC    = 32
	ORCLOSE   = 64
	ODIRECT   = 128
	ONONBLOCK = 256
	OEXCL     = 0x1000
	OLOCK     = 0x2000
	OAPPEND   = 0x4000

	AEXIST = 0
	AEXEC  = 1
	AWRITE = 2
	AREAD  = 4

	QTDIR     = 0x80
	QTAPPEND  = 0x40
	QTEXCL    = 0x20
	QTMOUNT   = 0x10
	QTAUTH    = 0x08
	QTTMP     = 0x04
	QTSYMLINK = 0x02
	QTFILE    = 0x00

	DMDIR       = 0x80000000
	DMAPPEND    = 0x40000000
	DMEXCL      = 0x20000000
	DMMOUNT     = 0x10000000
	DMAUTH      = 0x08000000
	DMTMP       = 0x04000000
	DMSYMLINK   = 0x02000000
	DMDEVICE    = 0x00800000
	DMNAMEDPIPE = 0x00200000
	DMSOCKET    = 0x00100000
	DMSETUID    = 0x00080000
	DMSETGID    = 0x00040000
	DMREAD      = 0x4
	DMWRITE     = 0x2
	DMEXEC      = 0x1

	NOTAG   = 0xffff
	NOFID   = 0xffffffff
	NOUID   = 0xffffffff
	IOHDRSZ = 24

	MREPL   = 0x0000
	MBEFORE = 0x0001
	MAFTER  = 0x0002
)
View Source
const (
	Tversion = 100 + iota
	Rversion
	Tauth
	Rauth
	Tattach
	Rattach
	Terror // illegal
	Rerror
	Tflush
	Rflush
	Twalk
	Rwalk
	Topen
	Ropen
	Tcreate
	Rcreate
	Tread
	Rread
	Twrite
	Rwrite
	Tclunk
	Rclunk
	Tremove
	Rremove
	Tstat
	Rstat
	Twstat
	Rwstat
	Tmax
)
View Source
const (
	IOHDRSIZE = 24
)
View Source
const (
	STATMAX = 65535
)

Variables

This section is empty.

Functions

func WriteFcall

func WriteFcall(w io.Writer, f *Fcall) error

Types

type Dir

type Dir struct {
	Type   uint16
	Dev    uint32
	Qid    Qid
	Mode   Perm
	Atime  uint32
	Mtime  uint32
	Length uint64
	Name   string
	Uid    string
	Gid    string
	Muid   string
}

func UnmarshalDir

func UnmarshalDir(b []byte) (d *Dir, err error)

func (*Dir) Bytes

func (d *Dir) Bytes() ([]byte, error)

func (*Dir) Null

func (d *Dir) Null()

func (*Dir) String

func (d *Dir) String() string

type Fcall

type Fcall struct {
	Type    uint8
	Fid     uint32
	Tag     uint16
	Msize   uint32
	Version string   // Tversion, Rversion
	Oldtag  uint16   // Tflush
	Ename   string   // Rerror
	Qid     Qid      // Rattach, Ropen, Rcreate
	Iounit  uint32   // Ropen, Rcreate
	Aqid    Qid      // Rauth
	Afid    uint32   // Tauth, Tattach
	Uname   string   // Tauth, Tattach
	Aname   string   // Tauth, Tattach
	Perm    Perm     // Tcreate
	Name    string   // Tcreate
	Mode    uint8    // Tcreate, Topen
	Newfid  uint32   // Twalk
	Wname   []string // Twalk
	Wqid    []Qid    // Rwalk
	Offset  uint64   // Tread, Twrite
	Count   uint32   // Tread, Rwrite
	Data    []byte   // Twrite, Rread
	Stat    []byte   // Twstat, Rstat

	// 9P2000.u extensions
	Errno     uint32 // Rerror
	Uid       uint32 // Tattach, Tauth
	Extension string // Tcreate
}

func ReadFcall

func ReadFcall(r io.Reader) (*Fcall, error)

func UnmarshalFcall

func UnmarshalFcall(b []byte) (f *Fcall, err error)

func (*Fcall) Bytes

func (f *Fcall) Bytes() ([]byte, error)

func (*Fcall) String

func (f *Fcall) String() string

type Perm

type Perm uint32

func (Perm) String

func (p Perm) String() string

type ProtocolError

type ProtocolError string

func (ProtocolError) Error

func (e ProtocolError) Error() string

type Qid

type Qid struct {
	Path uint64
	Vers uint32
	Type uint8
}

func (Qid) String

func (q Qid) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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