Documentation
¶
Overview ¶
Package p9 implements the 9P2000.L protocol used for VirtIO 9P filesystem sharing.
9P2000.L is the Linux variant of the 9P protocol, which uses file identifiers (fids) rather than file descriptors and supports Unix-like file operations.
Index ¶
- Constants
- Variables
- func DirentSize(name string) int
- func ErrorCode(err error) uint32
- func MarshalDirent(e *Encoder, d Dirent) error
- func MarshalHeader(b []byte, h Header)
- func MarshalRattach(e *Encoder, msg RattachMsg) error
- func MarshalRerror(e *Encoder, ecode uint32) error
- func MarshalRgetattr(e *Encoder, msg RgetattrMsg) error
- func MarshalRgetlock(e *Encoder, msg RgetlockMsg) error
- func MarshalRlock(e *Encoder, status uint8) error
- func MarshalRlopen(e *Encoder, msg RlopenMsg) error
- func MarshalRmkdir(e *Encoder, qid QID) error
- func MarshalRread(e *Encoder, data []byte) error
- func MarshalRreadlink(e *Encoder, target string) error
- func MarshalRstatfs(e *Encoder, st StatFS) error
- func MarshalRversion(e *Encoder, msg RversionMsg) error
- func MarshalRwalk(e *Encoder, msg RwalkMsg) error
- func MarshalRwrite(e *Encoder, count uint32) error
- func MessageTypeName(typ uint8) string
- func ReadMessage(r io.Reader, maxSize uint32) ([]byte, error)
- func WriteMessage(w io.Writer, msgType uint8, tag uint16, body []byte) error
- type Decoder
- func (d *Decoder) GetBytes(n int) ([]byte, error)
- func (d *Decoder) GetQID() (QID, error)
- func (d *Decoder) GetStat() (Stat, error)
- func (d *Decoder) GetString() (string, error)
- func (d *Decoder) GetUint8() (uint8, error)
- func (d *Decoder) GetUint16() (uint16, error)
- func (d *Decoder) GetUint32() (uint32, error)
- func (d *Decoder) GetUint64() (uint64, error)
- func (d *Decoder) Remaining() int
- func (d *Decoder) Reset(buf []byte)
- func (d *Decoder) Skip(n int) error
- type Dirent
- type Encoder
- func (e *Encoder) Bytes() []byte
- func (e *Encoder) Len() int
- func (e *Encoder) PutBytes(b []byte) error
- func (e *Encoder) PutQID(q QID) error
- func (e *Encoder) PutStat(st Stat) error
- func (e *Encoder) PutString(s string) error
- func (e *Encoder) PutUint8(v uint8) error
- func (e *Encoder) PutUint16(v uint16) error
- func (e *Encoder) PutUint32(v uint32) error
- func (e *Encoder) PutUint64(v uint64) error
- func (e *Encoder) Reset()
- type FSDevice
- type File
- type Header
- type HostFS
- func (h *HostFS) Attach(uid uint32, uname, aname string) (File, QID, error)
- func (h *HostFS) Clunk(f File) error
- func (h *HostFS) Create(f File, name string, flags, mode, gid uint32) (QID, uint32, error)
- func (h *HostFS) Fsync(f File) error
- func (h *HostFS) Getattr(f File, mask uint64) (Stat, uint64, error)
- func (h *HostFS) Getlock(f File, lock *Lock) (*Lock, error)
- func (h *HostFS) Link(dfid File, f File, name string) error
- func (h *HostFS) Lock(f File, lock *Lock) (uint8, error)
- func (h *HostFS) Mkdir(f File, name string, mode, gid uint32) (QID, error)
- func (h *HostFS) Mknod(f File, name string, mode, major, minor, gid uint32) (QID, error)
- func (h *HostFS) Open(f File, flags uint32) (QID, uint32, error)
- func (h *HostFS) Read(f File, offset uint64, count uint32) ([]byte, error)
- func (h *HostFS) Readdir(f File, offset uint64, count uint32) ([]byte, error)
- func (h *HostFS) Readlink(f File) (string, error)
- func (h *HostFS) Remove(f File) error
- func (h *HostFS) Renameat(oldDirF File, oldName string, newDirF File, newName string) error
- func (h *HostFS) Setattr(f File, valid uint32, mode, uid, gid uint32, size uint64, ...) error
- func (h *HostFS) Statfs() (StatFS, error)
- func (h *HostFS) Symlink(f File, name, target string, gid uint32) (QID, error)
- func (h *HostFS) Unlinkat(f File, name string, flags uint32) error
- func (h *HostFS) Walk(f File, names []string) (File, []QID, error)
- func (h *HostFS) Write(f File, offset uint64, data []byte) (uint32, error)
- type Lock
- type QID
- type RattachMsg
- type RerrorMsg
- type RgetattrMsg
- type RgetlockMsg
- type RlopenMsg
- type RmkdirMsg
- type RreadMsg
- type RversionMsg
- type RwalkMsg
- type RwriteMsg
- type Stat
- type StatFS
- type TattachMsg
- type TclunkMsg
- type TflushMsg
- type TfsyncMsg
- type TgetattrMsg
- type TgetlockMsg
- type TlcreateMsg
- type TlinkMsg
- type TlockMsg
- type TlopenMsg
- type TmkdirMsg
- type TmknodMsg
- type TreadMsg
- type TreaddirMsg
- type TreadlinkMsg
- type TrenameatMsg
- type TsetattrMsg
- type TstatfsMsg
- type TsymlinkMsg
- type TunlinkatMsg
- type TversionMsg
- type TwalkMsg
- type TwriteMsg
Constants ¶
const ( // Tversion/Rversion - protocol version negotiation Tversion = 100 Rversion = 101 // Tauth/Rauth - authentication (not commonly used) Tauth = 102 Rauth = 103 // Tattach/Rattach - attach to filesystem Tattach = 104 Rattach = 105 // Rerror - error response (9P2000 classic, uses error string) Rerror = 107 // Rlerror - error response (9P2000.L, uses errno directly) // Reference: tinyemu-2019-12-21/virtio.c:1992-2000 Rlerror = 7 // Tflush/Rflush - flush pending request Tflush = 108 Rflush = 109 // Twalk/Rwalk - walk filesystem tree Twalk = 110 Rwalk = 111 // Tread/Rread - read data Tread = 116 Rread = 117 // Twrite/Rwrite - write data Twrite = 118 Rwrite = 119 // Tclunk/Rclunk - close fid Tclunk = 120 Rclunk = 121 // Tremove/Rremove - remove file (deprecated in 9P2000.L) Tremove = 122 Rremove = 123 // Tstat/Rstat - get attributes (9P2000 style) Tstat = 124 Rstat = 125 // Twstat/Rwstat - set attributes (9P2000 style) Twstat = 126 Rwstat = 127 // 9P2000.L extensions // Tstatfs/Rstatfs - filesystem statistics Tstatfs = 8 Rstatfs = 9 // Tlopen/Rlopen - open a file Tlopen = 12 Rlopen = 13 // Tlcreate/Rlcreate - create a file Tlcreate = 14 Rlcreate = 15 // Tsymlink/Rsymlink - create symbolic link Tsymlink = 16 Rsymlink = 17 // Tmknod/Rmknod - create device node Tmknod = 18 Rmknod = 19 // Trename/Rrename - rename file Trename = 20 Rrename = 21 // Treadlink/Rreadlink - read symbolic link Treadlink = 22 Rreadlink = 23 // Tgetattr/Rgetattr - get file attributes Tgetattr = 24 Rgetattr = 25 // Tsetattr/Rsetattr - set file attributes Tsetattr = 26 Rsetattr = 27 // Txattrwalk/Rxattrwalk - extended attributes Txattrwalk = 30 Rxattrwalk = 31 // Txattrcreate/Rxattrcreate - create extended attribute Txattrcreate = 32 Rxattrcreate = 33 // Treaddir/Rreaddir - read directory entries Treaddir = 40 Rreaddir = 41 // Tfsync/Rfsync - synchronize file Tfsync = 50 Rfsync = 51 // Tlock/Rlock - file locking Tlock = 52 Rlock = 53 // Tgetlock/Rgetlock - get lock status Tgetlock = 54 Rgetlock = 55 // Tlink/Rlink - create hard link Tlink = 70 Rlink = 71 // Tmkdir/Rmkdir - create directory Tmkdir = 72 Rmkdir = 73 // Trenameat/Rrenameat - rename file (relative) Trenameat = 74 Rrenameat = 75 // Tunlinkat/Runlinkat - remove file or directory Tunlinkat = 76 Runlinkat = 77 )
Protocol message types (T = request, R = response)
const ( QtDir = 0x80 // Directory QtAppend = 0x40 // Append-only file QtExcl = 0x20 // Exclusive use file QtMount = 0x10 // Mounted channel QtAuth = 0x08 // Authentication file QtTmp = 0x04 // Temporary file QtSymlink = 0x02 // Symbolic link QtLink = 0x01 // Hard link QtFile = 0x00 // Regular file )
QID type bits
const ( ModeIRWXUGO = 0x01FF ModeISVTX = 0x0200 // Sticky bit ModeISGID = 0x0400 // Set GID ModeISUID = 0x0800 // Set UID ModeIFMT = 0xF000 // Type mask ModeIFIFO = 0x1000 // FIFO ModeIFCHR = 0x2000 // Character device ModeIFDIR = 0x4000 // Directory ModeIFBLK = 0x6000 // Block device ModeIFREG = 0x8000 // Regular file ModeIFLNK = 0xA000 // Symbolic link ModeIFSOC = 0xC000 // Socket )
Mode bits for stat
const ( OpenRDONLY = 0x00000000 OpenWRONLY = 0x00000001 OpenRDWR = 0x00000002 OpenNOACCESS = 0x00000003 OpenCREAT = 0x00000040 OpenEXCL = 0x00000080 OpenNOCTTY = 0x00000100 OpenTRUNC = 0x00000200 OpenAPPEND = 0x00000400 OpenNONBLOCK = 0x00000800 OpenDSYNC = 0x00001000 OpenFASYNC = 0x00002000 OpenDIRECT = 0x00004000 OpenLARGEFILE = 0x00008000 OpenDIRECTORY = 0x00010000 OpenNOFOLLOW = 0x00020000 OpenNOATIME = 0x00040000 OpenCLOEXEC = 0x00080000 OpenSYNC = 0x00100000 )
Open flags
const ( SetattrMode = 0x00000001 SetattrUID = 0x00000002 SetattrGID = 0x00000004 SetattrSize = 0x00000008 SetattrAtime = 0x00000010 SetattrMtime = 0x00000020 SetattrCtime = 0x00000040 SetattrAtimeSet = 0x00000080 SetattrMtimeSet = 0x00000100 )
Setattr mask bits
const ( GetattrMode = 0x00000001 GetattrNlink = 0x00000002 GetattrUID = 0x00000004 GetattrGID = 0x00000008 GetattrRdev = 0x00000010 GetattrAtime = 0x00000020 GetattrMtime = 0x00000040 GetattrCtime = 0x00000080 GetattrIno = 0x00000100 GetattrSize = 0x00000200 GetattrBlocks = 0x00000400 GetattrBtime = 0x00000800 GetattrGen = 0x00001000 GetattrDataVer = 0x00002000 GetattrBasic = 0x000007ff // All basic stats GetattrAll = 0x00003fff // All stats )
Getattr request mask bits
const ( LockTypeRDLCK = 0 LockTypeWRLCK = 1 LockTypeUNLCK = 2 )
Lock types
const ( LockFlagsBlock = 1 LockFlagsReclaim = 2 )
Lock flags
const ( LockSuccess = 0 LockBlocked = 1 LockError = 2 LockGrace = 3 )
Lock status values
const ( EPERM = 1 ENOENT = 2 EIO = 5 EEXIST = 17 ENOTDIR = 20 EINVAL = 22 ENOSPC = 28 ENOTEMPTY = 39 EPROTO = 71 ENOTSUP = 524 )
Error codes (Unix errno values)
const DefaultMsize = 8192
Maximum message size (default, can be negotiated)
const HeaderSize = 7
Message header size: 4 (size) + 1 (type) + 2 (tag)
const NOFID = 0xFFFFFFFF
NOFID is used when no fid is specified
const NoTag = 0xFFFF
NoTag is a special tag used for Tversion/Rversion messages
Variables ¶
var ErrInvalidMessage = errors.New("invalid message format")
ErrInvalidMessage indicates the message format is invalid.
var ErrMessageTooLarge = errors.New("message too large")
ErrMessageTooLarge indicates the message exceeds the maximum size.
var ErrMessageTooShort = errors.New("message too short")
ErrMessageTooShort indicates the message buffer is too short.
Functions ¶
func DirentSize ¶
DirentSize returns the encoded size of a directory entry.
func MarshalDirent ¶
MarshalDirent marshals a single directory entry. Returns the number of bytes written.
func MarshalHeader ¶
MarshalHeader writes a 9P message header to a byte slice.
func MarshalRattach ¶
func MarshalRattach(e *Encoder, msg RattachMsg) error
MarshalRattach marshals a Rattach message.
func MarshalRerror ¶
MarshalRerror marshals an Rerror message.
func MarshalRgetattr ¶
func MarshalRgetattr(e *Encoder, msg RgetattrMsg) error
MarshalRgetattr marshals an Rgetattr message.
func MarshalRgetlock ¶
func MarshalRgetlock(e *Encoder, msg RgetlockMsg) error
MarshalRgetlock marshals an Rgetlock message.
func MarshalRlock ¶
MarshalRlock marshals an Rlock message.
func MarshalRlopen ¶
MarshalRlopen marshals an Rlopen message.
func MarshalRmkdir ¶
MarshalRmkdir marshals an Rmkdir message.
func MarshalRread ¶
MarshalRread marshals an Rread message.
func MarshalRreadlink ¶
MarshalRreadlink marshals an Rreadlink message.
func MarshalRstatfs ¶
MarshalRstatfs marshals an Rstatfs message.
func MarshalRversion ¶
func MarshalRversion(e *Encoder, msg RversionMsg) error
MarshalRversion marshals an Rversion message.
func MarshalRwalk ¶
MarshalRwalk marshals an Rwalk message.
func MarshalRwrite ¶
MarshalRwrite marshals an Rwrite message.
func MessageTypeName ¶
MessageTypeName returns the name of a message type.
func ReadMessage ¶
ReadMessage reads a complete 9P message from a reader.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder handles decoding of 9P messages.
func NewDecoder ¶
NewDecoder creates a new decoder for the given buffer.
func (*Decoder) GetStat ¶
GetStat reads a Stat structure from an Rgetattr response. Reference: tinyemu-2019-12-21/virtio.c:2241-2251 (getattr marshalling) Note: nsec fields are uint64 on the wire but stored as uint32 in the struct.
type Dirent ¶
type Dirent struct {
QID QID
Offset uint64 // Offset for next readdir
Type uint8 // Entry type
Name string
}
Dirent represents a directory entry.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder handles encoding of 9P messages.
func NewEncoder ¶
NewEncoder creates a new encoder with the given buffer.
func (*Encoder) PutStat ¶
PutStat writes a Stat structure for Rgetattr response. Reference: tinyemu-2019-12-21/virtio.c:2241-2251 (getattr marshalling) Note: nsec fields are marshalled as uint64 on the wire (matching C behavior), and trailing zeros are added for btime_sec, btime_nsec, gen, data_version.
type FSDevice ¶
type FSDevice interface {
// Statfs returns filesystem statistics.
Statfs() (StatFS, error)
// Attach attaches to the filesystem and returns a root file handle.
Attach(uid uint32, uname, aname string) (File, QID, error)
// Walk walks the filesystem tree from f using the given path components.
// Returns the new file handle and QIDs for each path component walked.
Walk(f File, names []string) (File, []QID, error)
// Open opens a file with the given flags.
Open(f File, flags uint32) (QID, uint32, error) // Returns QID, IOUnit, error
// Create creates a new file.
Create(f File, name string, flags, mode, gid uint32) (QID, uint32, error)
// Read reads data from a file.
Read(f File, offset uint64, count uint32) ([]byte, error)
// Write writes data to a file.
Write(f File, offset uint64, data []byte) (uint32, error)
// Clunk closes a file handle (releases fid).
Clunk(f File) error
// Remove removes a file (and clunks the fid).
Remove(f File) error
// Getattr returns file attributes.
Getattr(f File, mask uint64) (Stat, uint64, error) // Returns stat, valid_mask, error
// Setattr sets file attributes.
Setattr(f File, valid uint32, mode, uid, gid uint32, size uint64,
atimeSec, atimeNsec, mtimeSec, mtimeNsec uint64) error
// Readdir reads directory entries.
// Returns directory entries starting at offset, up to count bytes.
Readdir(f File, offset uint64, count uint32) ([]byte, error)
// Mkdir creates a directory.
Mkdir(f File, name string, mode, gid uint32) (QID, error)
// Symlink creates a symbolic link.
Symlink(f File, name, target string, gid uint32) (QID, error)
// Mknod creates a device node.
Mknod(f File, name string, mode, major, minor, gid uint32) (QID, error)
// Readlink reads a symbolic link.
Readlink(f File) (string, error)
// Link creates a hard link.
Link(dfid File, f File, name string) error
// Renameat renames a file.
Renameat(oldDirF File, oldName string, newDirF File, newName string) error
// Unlinkat removes a file or directory.
Unlinkat(f File, name string, flags uint32) error
// Fsync synchronizes file data.
Fsync(f File) error
// Lock applies a file lock.
Lock(f File, lock *Lock) (uint8, error)
// Getlock gets lock information.
Getlock(f File, lock *Lock) (*Lock, error)
}
FSDevice is the interface for 9P filesystem providers. It abstracts filesystem operations for use with the 9P protocol.
type File ¶
type File interface {
// Path returns the file path (for debugging).
Path() string
}
File represents an open file handle (fid) in the 9P protocol. This is an opaque handle that the FSDevice implementation uses to track open files.
type Header ¶
type Header struct {
Size uint32 // Total message size including header
Type uint8 // Message type
Tag uint16 // Request tag for matching responses
}
Header represents a 9P message header.
func ParseHeader ¶
ParseHeader parses a 9P message header from a byte slice.
type HostFS ¶
type HostFS struct {
// contains filtered or unexported fields
}
HostFS implements FSDevice by exposing a host directory.
func NewHostFS ¶
NewHostFS creates a new host filesystem rooted at the given path. Reference: tinyemu-2019-12-21/fs_disk.c:623-659
func (*HostFS) Clunk ¶
Clunk closes a file handle. Reference: tinyemu-2019-12-21/fs_disk.c:377-386 (fs_close)
func (*HostFS) Getattr ¶
Getattr returns file attributes. Reference: tinyemu-2019-12-21/fs_disk.c:388-410 (fs_stat)
func (*HostFS) Getlock ¶
Getlock gets lock information. Reference: tinyemu-2019-12-21/fs_disk.c:592-615
func (*HostFS) Readdir ¶
Readdir reads directory entries. Reference: tinyemu-2019-12-21/fs_disk.c:293-347
func (*HostFS) Readlink ¶
Readlink reads a symbolic link. Reference: tinyemu-2019-12-21/fs_disk.c:527-535
func (*HostFS) Setattr ¶
func (h *HostFS) Setattr(f File, valid uint32, mode, uid, gid uint32, size uint64, atimeSec, atimeNsec, mtimeSec, mtimeNsec uint64) error
Setattr sets file attributes. Reference: tinyemu-2019-12-21/fs_disk.c:412-471
func (*HostFS) Symlink ¶
Symlink creates a symbolic link. Reference: tinyemu-2019-12-21/fs_disk.c:486-504
func (*HostFS) Unlinkat ¶
Unlinkat removes a file or directory. Reference: tinyemu-2019-12-21/fs_disk.c:553-565
type Lock ¶
type Lock struct {
Type uint8
Flags uint32
Start uint64
Length uint64
ProcID uint32
ClientID string
}
Lock represents a file lock.
type QID ¶
type QID struct {
Type uint8 // QID type (QtDir, QtFile, etc.)
Version uint32 // Version number for cache coherence
Path uint64 // Unique identifier (like inode number)
}
QID represents a unique file identifier. The QID is comparable to an inode number in Unix.
type RgetattrMsg ¶
RgetattrMsg represents an Rgetattr response.
type RgetlockMsg ¶
RgetlockMsg represents an Rgetlock response.
type RversionMsg ¶
RversionMsg represents an Rversion response.
type Stat ¶
type Stat struct {
QID QID
Mode uint32
UID uint32
GID uint32
NLink uint64
RDev uint64
Size uint64
BlkSize uint64
Blocks uint64
AtimeSec uint64
AtimeNsec uint32
MtimeSec uint64
MtimeNsec uint32
CtimeSec uint64
CtimeNsec uint32
}
Stat represents file attributes (9P2000.L style).
type StatFS ¶
type StatFS struct {
Type uint32 // Filesystem type
BSize uint32 // Block size
Blocks uint64 // Total blocks
BFree uint64 // Free blocks
BAvail uint64 // Available blocks (non-root)
Files uint64 // Total file nodes
FFree uint64 // Free file nodes
FSid uint64 // Filesystem ID
NameLen uint32 // Max filename length
}
StatFS represents filesystem statistics.
type TattachMsg ¶
type TattachMsg struct {
Fid uint32
AFid uint32 // Auth fid (usually NOFID)
Uname string
Aname string
NUname uint32 // Numeric user ID (9P2000.L extension)
}
TattachMsg represents a Tattach request.
func ParseTattach ¶
func ParseTattach(d *Decoder) (TattachMsg, error)
ParseTattach parses a Tattach message body.
type TclunkMsg ¶
type TclunkMsg struct {
Fid uint32
}
TclunkMsg represents a Tclunk request.
func ParseTclunk ¶
ParseTclunk parses a Tclunk message body.
type TflushMsg ¶
type TflushMsg struct {
OldTag uint16
}
TflushMsg represents a Tflush request.
func ParseTflush ¶
ParseTflush parses a Tflush message body.
type TfsyncMsg ¶
type TfsyncMsg struct {
Fid uint32
}
TfsyncMsg represents a Tfsync request.
func ParseTfsync ¶
ParseTfsync parses a Tfsync message body.
type TgetattrMsg ¶
TgetattrMsg represents a Tgetattr request.
func ParseTgetattr ¶
func ParseTgetattr(d *Decoder) (TgetattrMsg, error)
ParseTgetattr parses a Tgetattr message body.
type TgetlockMsg ¶
type TgetlockMsg struct {
Fid uint32
Type uint8
Start uint64
Length uint64
ProcID uint32
ClientID string
}
TgetlockMsg represents a Tgetlock request.
func ParseTgetlock ¶
func ParseTgetlock(d *Decoder) (TgetlockMsg, error)
ParseTgetlock parses a Tgetlock message body.
type TlcreateMsg ¶
TlcreateMsg represents a Tlcreate request.
func ParseTlcreate ¶
func ParseTlcreate(d *Decoder) (TlcreateMsg, error)
ParseTlcreate parses a Tlcreate message body.
type TlinkMsg ¶
TlinkMsg represents a Tlink request.
func ParseTlink ¶
ParseTlink parses a Tlink message body.
type TlockMsg ¶
type TlockMsg struct {
Fid uint32
Type uint8
Flags uint32
Start uint64
Length uint64
ProcID uint32
ClientID string
}
TlockMsg represents a Tlock request.
func ParseTlock ¶
ParseTlock parses a Tlock message body.
type TlopenMsg ¶
TlopenMsg represents a Tlopen request.
func ParseTlopen ¶
ParseTlopen parses a Tlopen message body.
type TmkdirMsg ¶
TmkdirMsg represents a Tmkdir request.
func ParseTmkdir ¶
ParseTmkdir parses a Tmkdir message body.
type TmknodMsg ¶
TmknodMsg represents a Tmknod request.
func ParseTmknod ¶
ParseTmknod parses a Tmknod message body.
type TreadMsg ¶
TreadMsg represents a Tread request.
func ParseTread ¶
ParseTread parses a Tread message body.
type TreaddirMsg ¶
TreaddirMsg represents a Treaddir request.
func ParseTreaddir ¶
func ParseTreaddir(d *Decoder) (TreaddirMsg, error)
ParseTreaddir parses a Treaddir message body.
type TreadlinkMsg ¶
type TreadlinkMsg struct {
Fid uint32
}
TreadlinkMsg represents a Treadlink request.
func ParseTreadlink ¶
func ParseTreadlink(d *Decoder) (TreadlinkMsg, error)
ParseTreadlink parses a Treadlink message body.
type TrenameatMsg ¶
TrenameatMsg represents a Trenameat request.
func ParseTrenameat ¶
func ParseTrenameat(d *Decoder) (TrenameatMsg, error)
ParseTrenameat parses a Trenameat message body.
type TsetattrMsg ¶
type TsetattrMsg struct {
Fid uint32
Valid uint32
Mode uint32
UID uint32
GID uint32
Size uint64
AtimeSec uint64
AtimeNsec uint64
MtimeSec uint64
MtimeNsec uint64
}
TsetattrMsg represents a Tsetattr request.
func ParseTsetattr ¶
func ParseTsetattr(d *Decoder) (TsetattrMsg, error)
ParseTsetattr parses a Tsetattr message body.
type TstatfsMsg ¶
type TstatfsMsg struct {
Fid uint32
}
TstatfsMsg represents a Tstatfs request.
func ParseTstatfs ¶
func ParseTstatfs(d *Decoder) (TstatfsMsg, error)
ParseTstatfs parses a Tstatfs message body.
type TsymlinkMsg ¶
TsymlinkMsg represents a Tsymlink request.
func ParseTsymlink ¶
func ParseTsymlink(d *Decoder) (TsymlinkMsg, error)
ParseTsymlink parses a Tsymlink message body.
type TunlinkatMsg ¶
TunlinkatMsg represents a Tunlinkat request.
func ParseTunlinkat ¶
func ParseTunlinkat(d *Decoder) (TunlinkatMsg, error)
ParseTunlinkat parses a Tunlinkat message body.
type TversionMsg ¶
TversionMsg represents a Tversion request.
func ParseTversion ¶
func ParseTversion(d *Decoder) (TversionMsg, error)
ParseTversion parses a Tversion message body.
type TwalkMsg ¶
TwalkMsg represents a Twalk request.
func ParseTwalk ¶
ParseTwalk parses a Twalk message body.