go: 9fans.net/go/plan9 Index | Files | Directories

package plan9

import "9fans.net/go/plan9"

Index

Package Files

bit.go const.go dir.go fcall.go

Constants

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
)
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
)
const (
    IOHDRSIZE = 24
)
const (
    STATMAX = 65535
)

func WriteFcall Uses

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

type Dir Uses

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 Uses

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

func (*Dir) Bytes Uses

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

func (*Dir) Null Uses

func (d *Dir) Null()

func (*Dir) String Uses

func (d *Dir) String() string

type Fcall Uses

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 Uses

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

func UnmarshalFcall Uses

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

func (*Fcall) Bytes Uses

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

func (*Fcall) String Uses

func (f *Fcall) String() string

type Perm Uses

type Perm uint32

func (Perm) String Uses

func (p Perm) String() string

type ProtocolError Uses

type ProtocolError string

func (ProtocolError) Error Uses

func (e ProtocolError) Error() string

type Qid Uses

type Qid struct {
    Path uint64
    Vers uint32
    Type uint8
}

func (Qid) String Uses

func (q Qid) String() string

Directories

PathSynopsis
client

Package plan9 imports 3 packages (graph) and is imported by 39 packages. Updated 2019-09-30. Refresh now. Tools for package owners.