Documentation ¶
Overview ¶
Package lisafs (LInux SAndbox FileSystem) defines the protocol for filesystem RPCs between an untrusted Sandbox (client) and a trusted filesystem server.
Lock ordering:
Server.renameMu Node.opMu Node.childrenMu Node.controlFDsMu
Locking rules:
- Node.childrenMu can be simultaneously held on multiple nodes, ancestors before descendants.
- Node.opMu can be simultaneously held on multiple nodes, ancestors before descendants.
- Node.opMu can be simultaneously held on two nodes that do not have an ancestor-descendant relationship. One node must be an internal (directory) node and the other a leaf (non-directory) node. Directory must be locked before non-directories.
- "Ancestors before descendants" requires that Server.renameMu is locked to ensure that this ordering remains satisfied.
Index ¶
- Constants
- func AcceptHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func BindAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func ChannelHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func CloseHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func ConnectHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func CopyFDIDSliceIn(cc marshal.CopyContext, addr hostarch.Addr, dst []FDID) (int, error)
- func CopyFDIDSliceOut(cc marshal.CopyContext, addr hostarch.Addr, src []FDID) (int, error)
- func CopyInodeSliceIn(cc marshal.CopyContext, addr hostarch.Addr, dst []Inode) (int, error)
- func CopyInodeSliceOut(cc marshal.CopyContext, addr hostarch.Addr, src []Inode) (int, error)
- func CopyMIDSliceIn(cc marshal.CopyContext, addr hostarch.Addr, dst []MID) (int, error)
- func CopyMIDSliceOut(cc marshal.CopyContext, addr hostarch.Addr, src []MID) (int, error)
- func CopyMsg1SliceIn(cc marshal.CopyContext, addr hostarch.Addr, dst []MsgSimple) (int, error)
- func CopyMsg1SliceOut(cc marshal.CopyContext, addr hostarch.Addr, src []MsgSimple) (int, error)
- func ErrorHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FAllocateHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FGetXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FListXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FRemoveXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FSetXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FStatFSHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FStatHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FSyncHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func FlushHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func Getdents64Handler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func LinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func ListenHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func MarshalUnsafeFDIDSlice(src []FDID, dst []byte) []byte
- func MarshalUnsafeInodeSlice(src []Inode, dst []byte) []byte
- func MarshalUnsafeMIDSlice(src []MID, dst []byte) []byte
- func MarshalUnsafeMsg1Slice(src []MsgSimple, dst []byte) []byte
- func MaxMessageSize() uint32
- func MkdirAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func MknodAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func MountHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func NewClient(sock *unet.Socket) (*Client, Inode, int, error)
- func OpenAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func OpenCreateAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func PReadHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func PWriteHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func ReadLinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func RenameAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func SetStatHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func SymlinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func UnlinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func UnmarshalUnsafeFDIDSlice(dst []FDID, src []byte) []byte
- func UnmarshalUnsafeInodeSlice(dst []Inode, src []byte) []byte
- func UnmarshalUnsafeMIDSlice(dst []MID, src []byte) []byte
- func UnmarshalUnsafeMsg1Slice(dst []MsgSimple, src []byte) []byte
- func WalkHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- func WalkStatHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
- type AcceptReq
- func (a *AcceptReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (a *AcceptReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (a *AcceptReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (a *AcceptReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (a *AcceptReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (a *AcceptReq) MarshalBytes(dst []byte) []byte
- func (a *AcceptReq) MarshalUnsafe(dst []byte) []byte
- func (a *AcceptReq) Packed() bool
- func (a *AcceptReq) SizeBytes() int
- func (a *AcceptReq) String() string
- func (a *AcceptReq) UnmarshalBytes(src []byte) []byte
- func (a *AcceptReq) UnmarshalUnsafe(src []byte) []byte
- func (a *AcceptReq) WriteTo(writer io.Writer) (int64, error)
- type AcceptResp
- type BindAtReq
- func (b *BindAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (c *BindAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *BindAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *BindAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (b *BindAtReq) MarshalBytes(dst []byte) []byte
- func (c *BindAtReq) MarshalUnsafe(dst []byte) []byte
- func (c *BindAtReq) Packed() bool
- func (b *BindAtReq) SizeBytes() int
- func (b *BindAtReq) String() string
- func (c *BindAtReq) UnmarshalBytes(src []byte) []byte
- func (c *BindAtReq) UnmarshalUnsafe(src []byte) []byte
- func (c *BindAtReq) WriteTo(writer io.Writer) (int64, error)
- type BindAtResp
- func (b *BindAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (b *BindAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (b *BindAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (b *BindAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (b *BindAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (b *BindAtResp) MarshalBytes(dst []byte) []byte
- func (b *BindAtResp) MarshalUnsafe(dst []byte) []byte
- func (b *BindAtResp) Packed() bool
- func (b *BindAtResp) SizeBytes() int
- func (b *BindAtResp) String() string
- func (b *BindAtResp) UnmarshalBytes(src []byte) []byte
- func (b *BindAtResp) UnmarshalUnsafe(src []byte) []byte
- func (b *BindAtResp) WriteTo(writer io.Writer) (int64, error)
- type BoundSocketFD
- func (fd *BoundSocketFD) ControlFD() ControlFDImpl
- func (fd *BoundSocketFD) DecRef(context.Context)
- func (r *BoundSocketFD) IncRef()
- func (fd *BoundSocketFD) Init(cfd *ControlFD, impl BoundSocketFDImpl)
- func (r *BoundSocketFD) InitRefs()
- func (r *BoundSocketFD) LeakMessage() string
- func (r *BoundSocketFD) LogRefs() bool
- func (r *BoundSocketFD) ReadRefs() int64
- func (r *BoundSocketFD) RefType() string
- func (r *BoundSocketFD) StateFields() []string
- func (r *BoundSocketFD) StateLoad(stateSourceObject state.Source)
- func (r *BoundSocketFD) StateSave(stateSinkObject state.Sink)
- func (r *BoundSocketFD) StateTypeName() string
- func (r *BoundSocketFD) TryIncRef() bool
- type BoundSocketFDImpl
- type ChannelReq
- type ChannelResp
- func (c *ChannelResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (c *ChannelResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (c *ChannelResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *ChannelResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *ChannelResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (c *ChannelResp) MarshalBytes(dst []byte) []byte
- func (c *ChannelResp) MarshalUnsafe(dst []byte) []byte
- func (c *ChannelResp) Packed() bool
- func (c *ChannelResp) SizeBytes() int
- func (c *ChannelResp) String() string
- func (c *ChannelResp) UnmarshalBytes(src []byte) []byte
- func (c *ChannelResp) UnmarshalUnsafe(src []byte) []byte
- func (c *ChannelResp) WriteTo(writer io.Writer) (int64, error)
- type Client
- func (c *Client) Close()
- func (c *Client) CloseFD(ctx context.Context, fd FDID, flush bool)
- func (c *Client) IsSupported(m MID) bool
- func (c *Client) NewFD(fd FDID) ClientFD
- func (c *Client) SndRcvMessage(m MID, payloadLen uint32, reqMarshal marshalFunc, respUnmarshal unmarshalFunc, ...) error
- func (c *Client) StartChannels() error
- func (c *Client) SyncFDs(ctx context.Context, fds []FDID) error
- type ClientBoundSocketFD
- type ClientFD
- func (f *ClientFD) Allocate(ctx context.Context, mode, offset, length uint64) error
- func (f *ClientFD) BindAt(ctx context.Context, sockType linux.SockType, name string, mode linux.FileMode, ...) (Inode, *ClientBoundSocketFD, error)
- func (f *ClientFD) Client() *Client
- func (f *ClientFD) Close(ctx context.Context, flush bool)
- func (f *ClientFD) Connect(ctx context.Context, sockType linux.SockType) (int, error)
- func (f *ClientFD) Flush(ctx context.Context) error
- func (f *ClientFD) GetXattr(ctx context.Context, name string, size uint64) (string, error)
- func (f *ClientFD) Getdents64(ctx context.Context, count int32) ([]Dirent64, error)
- func (f *ClientFD) ID() FDID
- func (f *ClientFD) LinkAt(ctx context.Context, targetFD FDID, name string) (Inode, error)
- func (f *ClientFD) ListXattr(ctx context.Context, size uint64) ([]string, error)
- func (f *ClientFD) MkdirAt(ctx context.Context, name string, mode linux.FileMode, uid UID, gid GID) (Inode, error)
- func (f *ClientFD) MknodAt(ctx context.Context, name string, mode linux.FileMode, uid UID, gid GID, ...) (Inode, error)
- func (f *ClientFD) Ok() bool
- func (f *ClientFD) OpenAt(ctx context.Context, flags uint32) (FDID, int, error)
- func (f *ClientFD) OpenCreateAt(ctx context.Context, name string, flags uint32, mode linux.FileMode, uid UID, ...) (Inode, FDID, int, error)
- func (f *ClientFD) Read(ctx context.Context, dst []byte, offset uint64) (uint64, error)
- func (f *ClientFD) ReadLinkAt(ctx context.Context) (string, error)
- func (f *ClientFD) RemoveXattr(ctx context.Context, name string) error
- func (f *ClientFD) RenameAt(ctx context.Context, oldName string, newDirFD FDID, newName string) error
- func (f *ClientFD) SetStat(ctx context.Context, stat *linux.Statx) (uint32, error, error)
- func (f *ClientFD) SetXattr(ctx context.Context, name string, value string, flags uint32) error
- func (f *ClientFD) StatFSTo(ctx context.Context, statFS *StatFS) error
- func (f *ClientFD) StatTo(ctx context.Context, stat *linux.Statx) error
- func (f *ClientFD) SymlinkAt(ctx context.Context, name, target string, uid UID, gid GID) (Inode, error)
- func (f *ClientFD) Sync(ctx context.Context) error
- func (f *ClientFD) UnlinkAt(ctx context.Context, name string, flags uint32) error
- func (f *ClientFD) Walk(ctx context.Context, name string) (Inode, error)
- func (f *ClientFD) WalkMultiple(ctx context.Context, names []string) (WalkStatus, []Inode, error)
- func (f *ClientFD) WalkStat(ctx context.Context, names []string) ([]linux.Statx, error)
- func (f *ClientFD) Write(ctx context.Context, src []byte, offset uint64) (uint64, error)
- type CloseReq
- type CloseResp
- type Communicator
- type ConnectReq
- func (c *ConnectReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (c *ConnectReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (c *ConnectReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *ConnectReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *ConnectReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (c *ConnectReq) MarshalBytes(dst []byte) []byte
- func (c *ConnectReq) MarshalUnsafe(dst []byte) []byte
- func (c *ConnectReq) Packed() bool
- func (c *ConnectReq) SizeBytes() int
- func (c *ConnectReq) String() string
- func (c *ConnectReq) UnmarshalBytes(src []byte) []byte
- func (c *ConnectReq) UnmarshalUnsafe(src []byte) []byte
- func (c *ConnectReq) WriteTo(writer io.Writer) (int64, error)
- type ConnectResp
- type Connection
- type ControlFD
- func (fd *ControlFD) Conn() *Connection
- func (fd *ControlFD) DecRef(context.Context)
- func (fd *ControlFD) FileType() linux.FileMode
- func (r *ControlFD) IncRef()
- func (fd *ControlFD) Init(c *Connection, node *Node, mode linux.FileMode, impl ControlFDImpl)
- func (r *ControlFD) InitRefs()
- func (fd *ControlFD) IsDir() bool
- func (fd *ControlFD) IsRegular() bool
- func (fd *ControlFD) IsSocket() bool
- func (fd *ControlFD) IsSymlink() bool
- func (r *ControlFD) LeakMessage() string
- func (r *ControlFD) LogRefs() bool
- func (e *ControlFD) Next() *ControlFD
- func (fd *ControlFD) Node() *Node
- func (e *ControlFD) Prev() *ControlFD
- func (r *ControlFD) ReadRefs() int64
- func (r *ControlFD) RefType() string
- func (fd *ControlFD) RemoveFromConn()
- func (e *ControlFD) SetNext(elem *ControlFD)
- func (e *ControlFD) SetPrev(elem *ControlFD)
- func (r *ControlFD) TryIncRef() bool
- type ControlFDImpl
- type Dirent64
- type EmptyMessage
- type ErrorResp
- func (e *ErrorResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (e *ErrorResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (e *ErrorResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (e *ErrorResp) MarshalBytes(dst []byte) []byte
- func (e *ErrorResp) MarshalUnsafe(dst []byte) []byte
- func (e *ErrorResp) Packed() bool
- func (e *ErrorResp) SizeBytes() int
- func (e *ErrorResp) String() string
- func (e *ErrorResp) UnmarshalBytes(src []byte) []byte
- func (e *ErrorResp) UnmarshalUnsafe(src []byte) []byte
- func (e *ErrorResp) WriteTo(writer io.Writer) (int64, error)
- type FAllocateReq
- func (a *FAllocateReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (a *FAllocateReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (a *FAllocateReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (a *FAllocateReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (a *FAllocateReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (a *FAllocateReq) MarshalBytes(dst []byte) []byte
- func (a *FAllocateReq) MarshalUnsafe(dst []byte) []byte
- func (a *FAllocateReq) Packed() bool
- func (a *FAllocateReq) SizeBytes() int
- func (a *FAllocateReq) String() string
- func (a *FAllocateReq) UnmarshalBytes(src []byte) []byte
- func (a *FAllocateReq) UnmarshalUnsafe(src []byte) []byte
- func (a *FAllocateReq) WriteTo(writer io.Writer) (int64, error)
- type FAllocateResp
- type FDID
- func (f *FDID) CheckedMarshal(dst []byte) ([]byte, bool)
- func (f *FDID) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (f *FDID) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (f *FDID) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (f *FDID) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (f *FDID) MarshalBytes(dst []byte) []byte
- func (f *FDID) MarshalUnsafe(dst []byte) []byte
- func (f FDID) Ok() bool
- func (f *FDID) Packed() bool
- func (f *FDID) SizeBytes() int
- func (f *FDID) UnmarshalBytes(src []byte) []byte
- func (f *FDID) UnmarshalUnsafe(src []byte) []byte
- func (f *FDID) WriteTo(writer io.Writer) (int64, error)
- type FGetXattrReq
- type FGetXattrResp
- type FListXattrReq
- func (l *FListXattrReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (l *FListXattrReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (l *FListXattrReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (l *FListXattrReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (l *FListXattrReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (l *FListXattrReq) MarshalBytes(dst []byte) []byte
- func (l *FListXattrReq) MarshalUnsafe(dst []byte) []byte
- func (l *FListXattrReq) Packed() bool
- func (l *FListXattrReq) SizeBytes() int
- func (l *FListXattrReq) String() string
- func (l *FListXattrReq) UnmarshalBytes(src []byte) []byte
- func (l *FListXattrReq) UnmarshalUnsafe(src []byte) []byte
- func (l *FListXattrReq) WriteTo(writer io.Writer) (int64, error)
- type FListXattrResp
- type FRemoveXattrReq
- type FRemoveXattrResp
- type FSetXattrReq
- type FSetXattrResp
- type FStatFSReq
- func (s *FStatFSReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (s *FStatFSReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (s *FStatFSReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *FStatFSReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *FStatFSReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (s *FStatFSReq) MarshalBytes(dst []byte) []byte
- func (s *FStatFSReq) MarshalUnsafe(dst []byte) []byte
- func (s *FStatFSReq) Packed() bool
- func (s *FStatFSReq) SizeBytes() int
- func (s *FStatFSReq) String() string
- func (s *FStatFSReq) UnmarshalBytes(src []byte) []byte
- func (s *FStatFSReq) UnmarshalUnsafe(src []byte) []byte
- func (s *FStatFSReq) WriteTo(writer io.Writer) (int64, error)
- type FdArray
- type FlushReq
- func (f *FlushReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (f *FlushReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (f *FlushReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (f *FlushReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (f *FlushReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (f *FlushReq) MarshalBytes(dst []byte) []byte
- func (f *FlushReq) MarshalUnsafe(dst []byte) []byte
- func (f *FlushReq) Packed() bool
- func (f *FlushReq) SizeBytes() int
- func (f *FlushReq) String() string
- func (f *FlushReq) UnmarshalBytes(src []byte) []byte
- func (f *FlushReq) UnmarshalUnsafe(src []byte) []byte
- func (f *FlushReq) WriteTo(writer io.Writer) (int64, error)
- type FlushResp
- type FsyncReq
- type FsyncResp
- type GID
- func (gid *GID) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (gid *GID) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (gid *GID) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (gid *GID) MarshalBytes(dst []byte) []byte
- func (gid *GID) MarshalUnsafe(dst []byte) []byte
- func (gid GID) Ok() bool
- func (gid *GID) Packed() bool
- func (gid *GID) SizeBytes() int
- func (gid *GID) UnmarshalBytes(src []byte) []byte
- func (gid *GID) UnmarshalUnsafe(src []byte) []byte
- func (gid *GID) WriteTo(writer io.Writer) (int64, error)
- type Getdents64Req
- func (g *Getdents64Req) CheckedMarshal(dst []byte) ([]byte, bool)
- func (g *Getdents64Req) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (g *Getdents64Req) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (g *Getdents64Req) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (g *Getdents64Req) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (g *Getdents64Req) MarshalBytes(dst []byte) []byte
- func (g *Getdents64Req) MarshalUnsafe(dst []byte) []byte
- func (g *Getdents64Req) Packed() bool
- func (g *Getdents64Req) SizeBytes() int
- func (g *Getdents64Req) String() string
- func (g *Getdents64Req) UnmarshalBytes(src []byte) []byte
- func (g *Getdents64Req) UnmarshalUnsafe(src []byte) []byte
- func (g *Getdents64Req) WriteTo(writer io.Writer) (int64, error)
- type Getdents64Resp
- type Inode
- func (i *Inode) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (i *Inode) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (i *Inode) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (i *Inode) MarshalBytes(dst []byte) []byte
- func (i *Inode) MarshalUnsafe(dst []byte) []byte
- func (i *Inode) Packed() bool
- func (i *Inode) SizeBytes() int
- func (i *Inode) UnmarshalBytes(src []byte) []byte
- func (i *Inode) UnmarshalUnsafe(src []byte) []byte
- func (i *Inode) WriteTo(writer io.Writer) (int64, error)
- type LinkAtReq
- type LinkAtResp
- func (l *LinkAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (l *LinkAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (l *LinkAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (l *LinkAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (l *LinkAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (l *LinkAtResp) MarshalBytes(dst []byte) []byte
- func (l *LinkAtResp) MarshalUnsafe(dst []byte) []byte
- func (l *LinkAtResp) Packed() bool
- func (l *LinkAtResp) SizeBytes() int
- func (l *LinkAtResp) String() string
- func (l *LinkAtResp) UnmarshalBytes(src []byte) []byte
- func (l *LinkAtResp) UnmarshalUnsafe(src []byte) []byte
- func (l *LinkAtResp) WriteTo(writer io.Writer) (int64, error)
- type ListenReq
- func (l *ListenReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (l *ListenReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (l *ListenReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (l *ListenReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (l *ListenReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (l *ListenReq) MarshalBytes(dst []byte) []byte
- func (l *ListenReq) MarshalUnsafe(dst []byte) []byte
- func (l *ListenReq) Packed() bool
- func (l *ListenReq) SizeBytes() int
- func (l *ListenReq) String() string
- func (l *ListenReq) UnmarshalBytes(src []byte) []byte
- func (l *ListenReq) UnmarshalUnsafe(src []byte) []byte
- func (l *ListenReq) WriteTo(writer io.Writer) (int64, error)
- type ListenResp
- type MID
- func (m *MID) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MID) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MID) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MID) MarshalBytes(dst []byte) []byte
- func (m *MID) MarshalUnsafe(dst []byte) []byte
- func (m *MID) Packed() bool
- func (m *MID) SizeBytes() int
- func (m *MID) UnmarshalBytes(src []byte) []byte
- func (m *MID) UnmarshalUnsafe(src []byte) []byte
- func (m *MID) WriteTo(writer io.Writer) (int64, error)
- type MkdirAtReq
- func (m *MkdirAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (c *MkdirAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *MkdirAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *MkdirAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MkdirAtReq) MarshalBytes(dst []byte) []byte
- func (c *MkdirAtReq) MarshalUnsafe(dst []byte) []byte
- func (c *MkdirAtReq) Packed() bool
- func (m *MkdirAtReq) SizeBytes() int
- func (m *MkdirAtReq) String() string
- func (c *MkdirAtReq) UnmarshalBytes(src []byte) []byte
- func (c *MkdirAtReq) UnmarshalUnsafe(src []byte) []byte
- func (c *MkdirAtReq) WriteTo(writer io.Writer) (int64, error)
- type MkdirAtResp
- func (m *MkdirAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (m *MkdirAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (m *MkdirAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MkdirAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MkdirAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MkdirAtResp) MarshalBytes(dst []byte) []byte
- func (m *MkdirAtResp) MarshalUnsafe(dst []byte) []byte
- func (m *MkdirAtResp) Packed() bool
- func (m *MkdirAtResp) SizeBytes() int
- func (m *MkdirAtResp) String() string
- func (m *MkdirAtResp) UnmarshalBytes(src []byte) []byte
- func (m *MkdirAtResp) UnmarshalUnsafe(src []byte) []byte
- func (m *MkdirAtResp) WriteTo(writer io.Writer) (int64, error)
- type MknodAtReq
- func (m *MknodAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (c *MknodAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *MknodAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *MknodAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MknodAtReq) MarshalBytes(dst []byte) []byte
- func (c *MknodAtReq) MarshalUnsafe(dst []byte) []byte
- func (c *MknodAtReq) Packed() bool
- func (m *MknodAtReq) SizeBytes() int
- func (m *MknodAtReq) String() string
- func (c *MknodAtReq) UnmarshalBytes(src []byte) []byte
- func (c *MknodAtReq) UnmarshalUnsafe(src []byte) []byte
- func (c *MknodAtReq) WriteTo(writer io.Writer) (int64, error)
- type MknodAtResp
- func (m *MknodAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (m *MknodAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (m *MknodAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MknodAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MknodAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MknodAtResp) MarshalBytes(dst []byte) []byte
- func (m *MknodAtResp) MarshalUnsafe(dst []byte) []byte
- func (m *MknodAtResp) Packed() bool
- func (m *MknodAtResp) SizeBytes() int
- func (m *MknodAtResp) String() string
- func (m *MknodAtResp) UnmarshalBytes(src []byte) []byte
- func (m *MknodAtResp) UnmarshalUnsafe(src []byte) []byte
- func (m *MknodAtResp) WriteTo(writer io.Writer) (int64, error)
- type MountReq
- type MountResp
- type MsgDynamic
- func (m *MsgDynamic) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (m *MsgDynamic) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MsgDynamic) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MsgDynamic) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MsgDynamic) MarshalBytes(dst []byte) []byte
- func (m *MsgDynamic) MarshalUnsafe(dst []byte) []byte
- func (m *MsgDynamic) Packed() bool
- func (m *MsgDynamic) Randomize(arrLen int)
- func (m *MsgDynamic) SizeBytes() int
- func (m *MsgDynamic) String() string
- func (m *MsgDynamic) UnmarshalBytes(src []byte) []byte
- func (m *MsgDynamic) UnmarshalUnsafe(src []byte) []byte
- func (m *MsgDynamic) WriteTo(writer io.Writer) (int64, error)
- type MsgSimple
- func (m *MsgSimple) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MsgSimple) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (m *MsgSimple) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (m *MsgSimple) MarshalBytes(dst []byte) []byte
- func (m *MsgSimple) MarshalUnsafe(dst []byte) []byte
- func (m *MsgSimple) Packed() bool
- func (m *MsgSimple) Randomize()
- func (m *MsgSimple) SizeBytes() int
- func (m *MsgSimple) UnmarshalBytes(src []byte) []byte
- func (m *MsgSimple) UnmarshalUnsafe(src []byte) []byte
- func (m *MsgSimple) WriteTo(writer io.Writer) (int64, error)
- type Node
- func (n *Node) DecRef(context.Context)
- func (n *Node) FilePath() string
- func (r *Node) IncRef()
- func (n *Node) InitLocked(name string, parent *Node)
- func (r *Node) InitRefs()
- func (r *Node) LeakMessage() string
- func (r *Node) LogRefs() bool
- func (n *Node) LookupChildLocked(name string) *Node
- func (r *Node) ReadRefs() int64
- func (r *Node) RefType() string
- func (r *Node) StateFields() []string
- func (r *Node) StateLoad(stateSourceObject state.Source)
- func (r *Node) StateSave(stateSinkObject state.Sink)
- func (r *Node) StateTypeName() string
- func (r *Node) TryIncRef() bool
- func (n *Node) WithChildrenMu(fn func())
- type OpenAtReq
- func (o *OpenAtReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (o *OpenAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (o *OpenAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (o *OpenAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (o *OpenAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (o *OpenAtReq) MarshalBytes(dst []byte) []byte
- func (o *OpenAtReq) MarshalUnsafe(dst []byte) []byte
- func (o *OpenAtReq) Packed() bool
- func (o *OpenAtReq) SizeBytes() int
- func (o *OpenAtReq) String() string
- func (o *OpenAtReq) UnmarshalBytes(src []byte) []byte
- func (o *OpenAtReq) UnmarshalUnsafe(src []byte) []byte
- func (o *OpenAtReq) WriteTo(writer io.Writer) (int64, error)
- type OpenAtResp
- func (o *OpenAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (o *OpenAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (o *OpenAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (o *OpenAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (o *OpenAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (o *OpenAtResp) MarshalBytes(dst []byte) []byte
- func (o *OpenAtResp) MarshalUnsafe(dst []byte) []byte
- func (o *OpenAtResp) Packed() bool
- func (o *OpenAtResp) SizeBytes() int
- func (o *OpenAtResp) String() string
- func (o *OpenAtResp) UnmarshalBytes(src []byte) []byte
- func (o *OpenAtResp) UnmarshalUnsafe(src []byte) []byte
- func (o *OpenAtResp) WriteTo(writer io.Writer) (int64, error)
- type OpenCreateAtReq
- func (o *OpenCreateAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (c *OpenCreateAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *OpenCreateAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (c *OpenCreateAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (o *OpenCreateAtReq) MarshalBytes(dst []byte) []byte
- func (c *OpenCreateAtReq) MarshalUnsafe(dst []byte) []byte
- func (c *OpenCreateAtReq) Packed() bool
- func (o *OpenCreateAtReq) SizeBytes() int
- func (o *OpenCreateAtReq) String() string
- func (c *OpenCreateAtReq) UnmarshalBytes(src []byte) []byte
- func (c *OpenCreateAtReq) UnmarshalUnsafe(src []byte) []byte
- func (c *OpenCreateAtReq) WriteTo(writer io.Writer) (int64, error)
- type OpenCreateAtResp
- func (o *OpenCreateAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (o *OpenCreateAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (o *OpenCreateAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (o *OpenCreateAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (o *OpenCreateAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (o *OpenCreateAtResp) MarshalBytes(dst []byte) []byte
- func (o *OpenCreateAtResp) MarshalUnsafe(dst []byte) []byte
- func (o *OpenCreateAtResp) Packed() bool
- func (o *OpenCreateAtResp) SizeBytes() int
- func (o *OpenCreateAtResp) String() string
- func (o *OpenCreateAtResp) UnmarshalBytes(src []byte) []byte
- func (o *OpenCreateAtResp) UnmarshalUnsafe(src []byte) []byte
- func (o *OpenCreateAtResp) WriteTo(writer io.Writer) (int64, error)
- type OpenFD
- func (fd *OpenFD) ControlFD() ControlFDImpl
- func (fd *OpenFD) DecRef(context.Context)
- func (r *OpenFD) IncRef()
- func (fd *OpenFD) Init(cfd *ControlFD, flags uint32, impl OpenFDImpl)
- func (r *OpenFD) InitRefs()
- func (r *OpenFD) LeakMessage() string
- func (r *OpenFD) LogRefs() bool
- func (e *OpenFD) Next() *OpenFD
- func (e *OpenFD) Prev() *OpenFD
- func (r *OpenFD) ReadRefs() int64
- func (r *OpenFD) RefType() string
- func (e *OpenFD) SetNext(elem *OpenFD)
- func (e *OpenFD) SetPrev(elem *OpenFD)
- func (r *OpenFD) TryIncRef() bool
- type OpenFDImpl
- type P9Version
- type PReadReq
- func (r *PReadReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (r *PReadReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (r *PReadReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (r *PReadReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (r *PReadReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (r *PReadReq) MarshalBytes(dst []byte) []byte
- func (r *PReadReq) MarshalUnsafe(dst []byte) []byte
- func (r *PReadReq) Packed() bool
- func (r *PReadReq) SizeBytes() int
- func (r *PReadReq) String() string
- func (r *PReadReq) UnmarshalBytes(src []byte) []byte
- func (r *PReadReq) UnmarshalUnsafe(src []byte) []byte
- func (r *PReadReq) WriteTo(writer io.Writer) (int64, error)
- type PReadResp
- type PWriteReq
- type PWriteResp
- func (w *PWriteResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (w *PWriteResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (w *PWriteResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (w *PWriteResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (w *PWriteResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (w *PWriteResp) MarshalBytes(dst []byte) []byte
- func (w *PWriteResp) MarshalUnsafe(dst []byte) []byte
- func (w *PWriteResp) Packed() bool
- func (w *PWriteResp) SizeBytes() int
- func (w *PWriteResp) String() string
- func (w *PWriteResp) UnmarshalBytes(src []byte) []byte
- func (w *PWriteResp) UnmarshalUnsafe(src []byte) []byte
- func (w *PWriteResp) WriteTo(writer io.Writer) (int64, error)
- type RPCHandler
- type ReadLinkAtReq
- func (r *ReadLinkAtReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (r *ReadLinkAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (r *ReadLinkAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (r *ReadLinkAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (r *ReadLinkAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (r *ReadLinkAtReq) MarshalBytes(dst []byte) []byte
- func (r *ReadLinkAtReq) MarshalUnsafe(dst []byte) []byte
- func (r *ReadLinkAtReq) Packed() bool
- func (r *ReadLinkAtReq) SizeBytes() int
- func (r *ReadLinkAtReq) String() string
- func (r *ReadLinkAtReq) UnmarshalBytes(src []byte) []byte
- func (r *ReadLinkAtReq) UnmarshalUnsafe(src []byte) []byte
- func (r *ReadLinkAtReq) WriteTo(writer io.Writer) (int64, error)
- type ReadLinkAtResp
- type RenameAtReq
- type RenameAtResp
- type Server
- func (s *Server) CreateConnection(sock *unet.Socket, mountPath string, readonly bool) (*Connection, error)
- func (s *Server) Destroy()
- func (s *Server) Init(impl ServerImpl, opts ServerOpts)
- func (s *Server) SetHandlers(handlers []RPCHandler)
- func (s *Server) StartConnection(c *Connection)
- func (s *Server) Wait()
- type ServerImpl
- type ServerOpts
- type SetStatReq
- func (s *SetStatReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (s *SetStatReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (s *SetStatReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *SetStatReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *SetStatReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (s *SetStatReq) MarshalBytes(dst []byte) []byte
- func (s *SetStatReq) MarshalUnsafe(dst []byte) []byte
- func (s *SetStatReq) Packed() bool
- func (s *SetStatReq) SizeBytes() int
- func (s *SetStatReq) String() string
- func (s *SetStatReq) UnmarshalBytes(src []byte) []byte
- func (s *SetStatReq) UnmarshalUnsafe(src []byte) []byte
- func (s *SetStatReq) WriteTo(writer io.Writer) (int64, error)
- type SetStatResp
- func (s *SetStatResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (s *SetStatResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (s *SetStatResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *SetStatResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *SetStatResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (s *SetStatResp) MarshalBytes(dst []byte) []byte
- func (s *SetStatResp) MarshalUnsafe(dst []byte) []byte
- func (s *SetStatResp) Packed() bool
- func (s *SetStatResp) SizeBytes() int
- func (s *SetStatResp) String() string
- func (s *SetStatResp) UnmarshalBytes(src []byte) []byte
- func (s *SetStatResp) UnmarshalUnsafe(src []byte) []byte
- func (s *SetStatResp) WriteTo(writer io.Writer) (int64, error)
- type SizedString
- type StatFS
- func (s *StatFS) CheckedMarshal(dst []byte) ([]byte, bool)
- func (s *StatFS) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (s *StatFS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *StatFS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *StatFS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (s *StatFS) MarshalBytes(dst []byte) []byte
- func (s *StatFS) MarshalUnsafe(dst []byte) []byte
- func (s *StatFS) Packed() bool
- func (s *StatFS) SizeBytes() int
- func (s *StatFS) String() string
- func (s *StatFS) UnmarshalBytes(src []byte) []byte
- func (s *StatFS) UnmarshalUnsafe(src []byte) []byte
- func (s *StatFS) WriteTo(writer io.Writer) (int64, error)
- type StatReq
- func (s *StatReq) CheckedMarshal(dst []byte) ([]byte, bool)
- func (s *StatReq) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (s *StatReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *StatReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *StatReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (s *StatReq) MarshalBytes(dst []byte) []byte
- func (s *StatReq) MarshalUnsafe(dst []byte) []byte
- func (s *StatReq) Packed() bool
- func (s *StatReq) SizeBytes() int
- func (s *StatReq) String() string
- func (s *StatReq) UnmarshalBytes(src []byte) []byte
- func (s *StatReq) UnmarshalUnsafe(src []byte) []byte
- func (s *StatReq) WriteTo(writer io.Writer) (int64, error)
- type StringArray
- type SymlinkAtReq
- type SymlinkAtResp
- func (s *SymlinkAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
- func (s *SymlinkAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
- func (s *SymlinkAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *SymlinkAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (s *SymlinkAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (s *SymlinkAtResp) MarshalBytes(dst []byte) []byte
- func (s *SymlinkAtResp) MarshalUnsafe(dst []byte) []byte
- func (s *SymlinkAtResp) Packed() bool
- func (s *SymlinkAtResp) SizeBytes() int
- func (s *SymlinkAtResp) String() string
- func (s *SymlinkAtResp) UnmarshalBytes(src []byte) []byte
- func (s *SymlinkAtResp) UnmarshalUnsafe(src []byte) []byte
- func (s *SymlinkAtResp) WriteTo(writer io.Writer) (int64, error)
- type UID
- func (uid *UID) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (uid *UID) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
- func (uid *UID) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
- func (uid *UID) MarshalBytes(dst []byte) []byte
- func (uid *UID) MarshalUnsafe(dst []byte) []byte
- func (uid UID) Ok() bool
- func (uid *UID) Packed() bool
- func (uid *UID) SizeBytes() int
- func (uid *UID) UnmarshalBytes(src []byte) []byte
- func (uid *UID) UnmarshalUnsafe(src []byte) []byte
- func (uid *UID) WriteTo(writer io.Writer) (int64, error)
- type UnlinkAtReq
- type UnlinkAtResp
- type WalkReq
- type WalkResp
- type WalkStatResp
- type WalkStatus
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func AcceptHandler ¶
func AcceptHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
AcceptHandler handles the Accept RPC.
func BindAtHandler ¶
func BindAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
BindAtHandler handles the BindAt RPC.
func ChannelHandler ¶
func ChannelHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
ChannelHandler handles the Channel RPC.
func CloseHandler ¶
func CloseHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
CloseHandler handles the Close RPC.
func ConnectHandler ¶
func ConnectHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
ConnectHandler handles the Connect RPC.
func CopyFDIDSliceIn ¶
CopyFDIDSliceIn copies in a slice of FDID objects from the task's memory.
func CopyFDIDSliceOut ¶
CopyFDIDSliceOut copies a slice of FDID objects to the task's memory.
func CopyInodeSliceIn ¶
CopyInodeSliceIn copies in a slice of Inode objects from the task's memory.
func CopyInodeSliceOut ¶
CopyInodeSliceOut copies a slice of Inode objects to the task's memory.
func CopyMIDSliceIn ¶
CopyMIDSliceIn copies in a slice of MID objects from the task's memory.
func CopyMIDSliceOut ¶
CopyMIDSliceOut copies a slice of MID objects to the task's memory.
func CopyMsg1SliceIn ¶
CopyMsg1SliceIn copies in a slice of MsgSimple objects from the task's memory.
func CopyMsg1SliceOut ¶
CopyMsg1SliceOut copies a slice of MsgSimple objects to the task's memory.
func ErrorHandler ¶
func ErrorHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
ErrorHandler handles Error message.
func FAllocateHandler ¶
func FAllocateHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FAllocateHandler handles the FAllocate RPC.
func FGetXattrHandler ¶
func FGetXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FGetXattrHandler handles the FGetXattr RPC.
func FListXattrHandler ¶
func FListXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FListXattrHandler handles the FListXattr RPC.
func FRemoveXattrHandler ¶
func FRemoveXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FRemoveXattrHandler handles the FRemoveXattr RPC.
func FSetXattrHandler ¶
func FSetXattrHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FSetXattrHandler handles the FSetXattr RPC.
func FStatFSHandler ¶
func FStatFSHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FStatFSHandler handles the FStatFS RPC.
func FStatHandler ¶
func FStatHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FStatHandler handles the FStat RPC.
func FSyncHandler ¶
func FSyncHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FSyncHandler handles the FSync RPC.
func FlushHandler ¶
func FlushHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
FlushHandler handles the Flush RPC.
func Getdents64Handler ¶
func Getdents64Handler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
Getdents64Handler handles the Getdents64 RPC.
func LinkAtHandler ¶
func LinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
LinkAtHandler handles the LinkAt RPC.
func ListenHandler ¶
func ListenHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
ListenHandler handles the Listen RPC.
func MarshalUnsafeFDIDSlice ¶
MarshalUnsafeFDIDSlice is like FDID.MarshalUnsafe, but for a []FDID.
func MarshalUnsafeInodeSlice ¶
MarshalUnsafeInodeSlice is like Inode.MarshalUnsafe, but for a []Inode.
func MarshalUnsafeMIDSlice ¶
MarshalUnsafeMIDSlice is like MID.MarshalUnsafe, but for a []MID.
func MarshalUnsafeMsg1Slice ¶
MarshalUnsafeMsg1Slice is like MsgSimple.MarshalUnsafe, but for a []MsgSimple.
func MaxMessageSize ¶
func MaxMessageSize() uint32
MaxMessageSize is the recommended max message size that can be used by connections. Server implementations may choose to use other values.
func MkdirAtHandler ¶
func MkdirAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
MkdirAtHandler handles the MkdirAt RPC.
func MknodAtHandler ¶
func MknodAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
MknodAtHandler handles the MknodAt RPC.
func MountHandler ¶
func MountHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
MountHandler handles the Mount RPC. Note that there can not be concurrent executions of MountHandler on a connection because the connection enforces that Mount is the first message on the connection. Only after the connection has been successfully mounted can other channels be created.
func NewClient ¶
NewClient creates a new client for communication with the server. It mounts the server and creates channels for fast IPC. NewClient takes ownership over the passed socket. On success, it returns the initialized client along with the root Inode.
func OpenAtHandler ¶
func OpenAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
OpenAtHandler handles the OpenAt RPC.
func OpenCreateAtHandler ¶
func OpenCreateAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
OpenCreateAtHandler handles the OpenCreateAt RPC.
func PReadHandler ¶
func PReadHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
PReadHandler handles the PRead RPC.
func PWriteHandler ¶
func PWriteHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
PWriteHandler handles the PWrite RPC.
func ReadLinkAtHandler ¶
func ReadLinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
ReadLinkAtHandler handles the ReadLinkAt RPC.
func RenameAtHandler ¶
func RenameAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
RenameAtHandler handles the RenameAt RPC.
func SetStatHandler ¶
func SetStatHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
SetStatHandler handles the SetStat RPC.
func SymlinkAtHandler ¶
func SymlinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
SymlinkAtHandler handles the SymlinkAt RPC.
func UnlinkAtHandler ¶
func UnlinkAtHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
UnlinkAtHandler handles the UnlinkAt RPC.
func UnmarshalUnsafeFDIDSlice ¶
UnmarshalUnsafeFDIDSlice is like FDID.UnmarshalUnsafe, but for a []FDID.
func UnmarshalUnsafeInodeSlice ¶
UnmarshalUnsafeInodeSlice is like Inode.UnmarshalUnsafe, but for a []Inode.
func UnmarshalUnsafeMIDSlice ¶
UnmarshalUnsafeMIDSlice is like MID.UnmarshalUnsafe, but for a []MID.
func UnmarshalUnsafeMsg1Slice ¶
UnmarshalUnsafeMsg1Slice is like MsgSimple.UnmarshalUnsafe, but for a []MsgSimple.
func WalkHandler ¶
func WalkHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
WalkHandler handles the Walk RPC.
func WalkStatHandler ¶
func WalkStatHandler(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
WalkStatHandler handles the WalkStat RPC.
Types ¶
type AcceptReq ¶
type AcceptReq struct {
FD FDID
}
AcceptReq is used to make AcceptRequests.
+marshal boundCheck
func (*AcceptReq) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*AcceptReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*AcceptReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*AcceptReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*AcceptReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*AcceptReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type AcceptResp ¶
type AcceptResp struct {
PeerAddr SizedString
}
AcceptResp is an empty response to AcceptResp.
func (*AcceptResp) CheckedUnmarshal ¶
func (a *AcceptResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*AcceptResp) MarshalBytes ¶
func (a *AcceptResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*AcceptResp) SizeBytes ¶
func (a *AcceptResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*AcceptResp) String ¶
func (a *AcceptResp) String() string
String implements fmt.Stringer.String.
type BindAtReq ¶
type BindAtReq struct { SockType primitive.Uint32 Name SizedString // contains filtered or unexported fields }
BindAtReq is used to make BindAt requests.
func (*BindAtReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*BindAtReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*BindAtReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*BindAtReq) Packed ¶
func (c *BindAtReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*BindAtReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*BindAtReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type BindAtResp ¶
BindAtResp is used to communicate BindAt response.
+marshal boundCheck
func (*BindAtResp) CheckedMarshal ¶
func (b *BindAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*BindAtResp) CheckedUnmarshal ¶
func (b *BindAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*BindAtResp) CopyIn ¶
func (b *BindAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*BindAtResp) CopyOut ¶
func (b *BindAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*BindAtResp) CopyOutN ¶
func (b *BindAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*BindAtResp) MarshalBytes ¶
func (b *BindAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*BindAtResp) MarshalUnsafe ¶
func (b *BindAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*BindAtResp) Packed ¶
func (b *BindAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*BindAtResp) SizeBytes ¶
func (b *BindAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*BindAtResp) String ¶
func (b *BindAtResp) String() string
String implements fmt.Stringer.String.
func (*BindAtResp) UnmarshalBytes ¶
func (b *BindAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*BindAtResp) UnmarshalUnsafe ¶
func (b *BindAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type BoundSocketFD ¶
type BoundSocketFD struct {
// contains filtered or unexported fields
}
BoundSocketFD represents a bound socket on the server.
Reference Model:
- A BoundSocketFD takes a reference on the control FD it is bound to.
func (*BoundSocketFD) ControlFD ¶
func (fd *BoundSocketFD) ControlFD() ControlFDImpl
ControlFD returns the control FD on which this FD was bound.
func (*BoundSocketFD) DecRef ¶
func (fd *BoundSocketFD) DecRef(context.Context)
DecRef implements refs.RefCounter.DecRef. Note that the context parameter should never be used. It exists solely to comply with the refs.RefCounter interface.
func (*BoundSocketFD) IncRef ¶
func (r *BoundSocketFD) IncRef()
IncRef implements refs.RefCounter.IncRef.
func (*BoundSocketFD) Init ¶
func (fd *BoundSocketFD) Init(cfd *ControlFD, impl BoundSocketFDImpl)
Init must be called before first use of fd.
func (*BoundSocketFD) InitRefs ¶
func (r *BoundSocketFD) InitRefs()
InitRefs initializes r with one reference and, if enabled, activates leak checking.
func (*BoundSocketFD) LeakMessage ¶
func (r *BoundSocketFD) LeakMessage() string
LeakMessage implements refs.CheckedObject.LeakMessage.
func (*BoundSocketFD) LogRefs ¶
func (r *BoundSocketFD) LogRefs() bool
LogRefs implements refs.CheckedObject.LogRefs.
func (*BoundSocketFD) ReadRefs ¶
func (r *BoundSocketFD) ReadRefs() int64
ReadRefs returns the current number of references. The returned count is inherently racy and is unsafe to use without external synchronization.
func (*BoundSocketFD) RefType ¶
func (r *BoundSocketFD) RefType() string
RefType implements refs.CheckedObject.RefType.
func (*BoundSocketFD) StateFields ¶
func (r *BoundSocketFD) StateFields() []string
func (*BoundSocketFD) StateTypeName ¶
func (r *BoundSocketFD) StateTypeName() string
func (*BoundSocketFD) TryIncRef ¶
func (r *BoundSocketFD) TryIncRef() bool
TryIncRef implements refs.TryRefCounter.TryIncRef.
To do this safely without a loop, a speculative reference is first acquired on the object. This allows multiple concurrent TryIncRef calls to distinguish other TryIncRef calls from genuine references held.
type BoundSocketFDImpl ¶
type BoundSocketFDImpl interface { // FD returns a pointer to the embedded BoundSocketFD. FD() *BoundSocketFD // Listen marks the socket as accepting incoming connections. // // On the server, Listen has a read concurrency guarantee. Listen(backlog int32) error // Accept takes the first pending connection and creates a new socket // for it. The new socket FD is returned along with the peer address of // the connecting socket (which may be empty string). // // On the server, Accept has a read concurrency guarantee. Accept() (int, string, error) // Close should clean up resources used by the bound socket FD // implementation. // // Close is called after all references on the FD have been dropped and its // FDID has been released. // // On the server, Close has no concurrency guarantee. Close() }
BoundSocketFDImpl represents a socket on the host filesystem that has been created by the sandboxed application via Bind.
type ChannelReq ¶
type ChannelReq struct{ EmptyMessage }
ChannelReq is an empty requent to create a Channel.
func (*ChannelReq) String ¶
func (*ChannelReq) String() string
String implements fmt.Stringer.String.
type ChannelResp ¶
type ChannelResp struct {
// contains filtered or unexported fields
}
ChannelResp is the response to the create channel request.
+marshal boundCheck
func (*ChannelResp) CheckedMarshal ¶
func (c *ChannelResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*ChannelResp) CheckedUnmarshal ¶
func (c *ChannelResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*ChannelResp) CopyIn ¶
func (c *ChannelResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*ChannelResp) CopyOut ¶
func (c *ChannelResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*ChannelResp) CopyOutN ¶
func (c *ChannelResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*ChannelResp) MarshalBytes ¶
func (c *ChannelResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*ChannelResp) MarshalUnsafe ¶
func (c *ChannelResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*ChannelResp) Packed ¶
func (c *ChannelResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*ChannelResp) SizeBytes ¶
func (c *ChannelResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*ChannelResp) String ¶
func (c *ChannelResp) String() string
String implements fmt.Stringer.String.
func (*ChannelResp) UnmarshalBytes ¶
func (c *ChannelResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*ChannelResp) UnmarshalUnsafe ¶
func (c *ChannelResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client helps manage a connection to the lisafs server and pass messages efficiently. There is a 1:1 mapping between a Connection and a Client.
func (*Client) Close ¶
func (c *Client) Close()
Close shuts down the main socket and waits for the watchdog to clean up.
func (*Client) CloseFD ¶
CloseFD either queues the passed FD to be closed or makes a batch RPC to close all the accumulated FDs-to-close. If flush is true, the RPC is made immediately.
func (*Client) IsSupported ¶
IsSupported returns true if this connection supports the passed message.
func (*Client) SndRcvMessage ¶
func (c *Client) SndRcvMessage(m MID, payloadLen uint32, reqMarshal marshalFunc, respUnmarshal unmarshalFunc, respFDs []int, reqString debugStringer, respString debugStringer) error
SndRcvMessage invokes reqMarshal to marshal the request onto the payload buffer, wakes up the server to process the request, waits for the response and invokes respUnmarshal with the response payload. respFDs is populated with the received FDs, extra fields are set to -1.
See messages.go to understand why function arguments are used instead of combining these functions into an interface type.
Precondition: function arguments must be non-nil.
func (*Client) StartChannels ¶
StartChannels starts maxChannels() channel communicators.
type ClientBoundSocketFD ¶
type ClientBoundSocketFD struct {
// contains filtered or unexported fields
}
ClientBoundSocketFD corresponds to a bound socket on the server. It implements transport.BoundSocketFD.
All fields are immutable.
func (*ClientBoundSocketFD) Accept ¶
func (f *ClientBoundSocketFD) Accept(ctx context.Context) (int, error)
Accept implements transport.BoundSocketFD.Accept.
func (*ClientBoundSocketFD) Close ¶
func (f *ClientBoundSocketFD) Close(ctx context.Context)
Close implements transport.BoundSocketFD.Close.
func (*ClientBoundSocketFD) Listen ¶
func (f *ClientBoundSocketFD) Listen(ctx context.Context, backlog int32) error
Listen implements transport.BoundSocketFD.Listen.
func (*ClientBoundSocketFD) NotificationFD ¶
func (f *ClientBoundSocketFD) NotificationFD() int32
NotificationFD implements transport.BoundSocketFD.NotificationFD.
type ClientFD ¶
type ClientFD struct {
// contains filtered or unexported fields
}
ClientFD is a wrapper around FDID that provides client-side utilities so that RPC making is easier.
func (*ClientFD) BindAt ¶
func (f *ClientFD) BindAt(ctx context.Context, sockType linux.SockType, name string, mode linux.FileMode, uid UID, gid GID) (Inode, *ClientBoundSocketFD, error)
BindAt makes the BindAt RPC.
func (*ClientFD) Close ¶
Close queues this FD to be closed on the server and resets f.fd. This maybe invoke the Close RPC if the queue is full. If flush is true, then the Close RPC is made immediately. Consider setting flush to false if closing this FD on remote right away is not critical.
func (*ClientFD) Getdents64 ¶
Getdents64 makes the Getdents64 RPC.
func (*ClientFD) MkdirAt ¶
func (f *ClientFD) MkdirAt(ctx context.Context, name string, mode linux.FileMode, uid UID, gid GID) (Inode, error)
MkdirAt makes the MkdirAt RPC.
func (*ClientFD) MknodAt ¶
func (f *ClientFD) MknodAt(ctx context.Context, name string, mode linux.FileMode, uid UID, gid GID, minor, major uint32) (Inode, error)
MknodAt makes the MknodAt RPC.
func (*ClientFD) OpenCreateAt ¶
func (f *ClientFD) OpenCreateAt(ctx context.Context, name string, flags uint32, mode linux.FileMode, uid UID, gid GID) (Inode, FDID, int, error)
OpenCreateAt makes the OpenCreateAt RPC.
func (*ClientFD) ReadLinkAt ¶
ReadLinkAt makes the ReadLinkAt RPC.
func (*ClientFD) RemoveXattr ¶
RemoveXattr makes the FRemoveXattr RPC.
func (*ClientFD) RenameAt ¶
func (f *ClientFD) RenameAt(ctx context.Context, oldName string, newDirFD FDID, newName string) error
RenameAt makes the RenameAt RPC which renames oldName inside directory f to newDirFD directory with name newName.
func (*ClientFD) SymlinkAt ¶
func (f *ClientFD) SymlinkAt(ctx context.Context, name, target string, uid UID, gid GID) (Inode, error)
SymlinkAt makes the SymlinkAt RPC.
func (*ClientFD) WalkMultiple ¶
WalkMultiple makes the Walk RPC with multiple path components.
type CloseReq ¶
type CloseReq struct {
FDs FdArray
}
CloseReq is used to close(2) FDs.
func (*CloseReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*CloseReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type Communicator ¶
type Communicator interface { fmt.Stringer // PayloadBuf returns a slice to the payload section of its internal buffer // where the message can be marshalled. The handlers should use this to // populate the payload buffer with the message. // // The payload buffer contents *should* be preserved across calls with // different sizes. Note that this is not a guarantee, because a compromised // owner of a "shared" payload buffer can tamper with its contents anytime, // even when it's not its turn to do so. PayloadBuf(size uint32) []byte // SndRcvMessage sends message m. The caller must have populated PayloadBuf() // with payloadLen bytes. The caller expects to receive wantFDs FDs. // Any received FDs must be accessible via ReleaseFDs(). It returns the // response message along with the response payload length. SndRcvMessage(m MID, payloadLen uint32, wantFDs uint8) (MID, uint32, error) // DonateFD attempts to make fd non-blocking and starts tracking it. The next // call to ReleaseFDs will include fd in the order it was added. Communicator // takes ownership of fd. Server side should call this. DonateFD(fd int) // Track starts tracking fd. The next call to ReleaseFDs will include fd in // the order it was added. Communicator takes ownership of fd. Client side // should use this for accumulating received FDs. TrackFD(fd int) // ReleaseFDs returns the accumulated FDs and stops tracking them. The // ownership of the FDs is transferred to the caller. ReleaseFDs() []int }
Communicator is a server side utility which represents exactly how the server is communicating with the client.
type ConnectReq ¶
type ConnectReq struct { FD FDID // SockType is used to specify the socket type to connect to. As a special // case, SockType = 0 means that the socket type does not matter and the // requester will accept any socket type. SockType uint32 // contains filtered or unexported fields }
ConnectReq is used to make a Connect request.
+marshal boundCheck
func (*ConnectReq) CheckedMarshal ¶
func (c *ConnectReq) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*ConnectReq) CheckedUnmarshal ¶
func (c *ConnectReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*ConnectReq) CopyIn ¶
func (c *ConnectReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*ConnectReq) CopyOut ¶
func (c *ConnectReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*ConnectReq) CopyOutN ¶
func (c *ConnectReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*ConnectReq) MarshalBytes ¶
func (c *ConnectReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*ConnectReq) MarshalUnsafe ¶
func (c *ConnectReq) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*ConnectReq) Packed ¶
func (c *ConnectReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*ConnectReq) SizeBytes ¶
func (c *ConnectReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*ConnectReq) String ¶
func (c *ConnectReq) String() string
String implements fmt.Stringer.String.
func (*ConnectReq) UnmarshalBytes ¶
func (c *ConnectReq) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*ConnectReq) UnmarshalUnsafe ¶
func (c *ConnectReq) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type ConnectResp ¶
type ConnectResp struct{ EmptyMessage }
ConnectResp is an empty response to ConnectReq.
func (*ConnectResp) String ¶
func (*ConnectResp) String() string
String implements fmt.Stringer.String.
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection represents a connection between a mount point in the client and a mount point in the server. It is owned by the server on which it was started and facilitates communication with the client mount.
Each connection is set up using a unix domain socket. One end is owned by the server and the other end is owned by the client. The connection may spawn additional comunicational channels for the same mount for increased RPC concurrency.
Reference model:
- When any FD is created, the connection takes a ref on it which represents the client's ref on the FD.
- The client can drop its ref via the Close RPC which will in turn make the connection drop its ref.
func (*Connection) ServerImpl ¶
func (c *Connection) ServerImpl() ServerImpl
ServerImpl returns the associated server implementation.
type ControlFD ¶
type ControlFD struct {
// contains filtered or unexported fields
}
A ControlFD is the gateway to the backing filesystem tree node. It is an unusual concept. This exists to provide a safe way to do path-based operations on the file. It performs operations that can modify the filesystem tree and synchronizes these operations. See ControlFDImpl for supported operations.
It is not an inode, because multiple control FDs are allowed to exist on the same file. It is not a file descriptor because it is not tied to any access mode, i.e. a control FD can change its access mode based on the operation being performed.
Reference Model:
- Each control FD holds a ref on its Node for its entire lifetime.
func (*ControlFD) Conn ¶
func (fd *ControlFD) Conn() *Connection
Conn returns the fd's owning connection.
func (*ControlFD) DecRef ¶
DecRef implements refs.RefCounter.DecRef. Note that the context parameter should never be used. It exists solely to comply with the refs.RefCounter interface.
func (*ControlFD) Init ¶
func (fd *ControlFD) Init(c *Connection, node *Node, mode linux.FileMode, impl ControlFDImpl)
Init must be called before first use of fd. It inserts fd into the filesystem tree.
Preconditions:
- server's rename mutex must be at least read locked.
- The caller must take a ref on node which is transferred to fd.
func (*ControlFD) InitRefs ¶
func (r *ControlFD) InitRefs()
InitRefs initializes r with one reference and, if enabled, activates leak checking.
func (*ControlFD) LeakMessage ¶
func (r *ControlFD) LeakMessage() string
LeakMessage implements refs.CheckedObject.LeakMessage.
func (*ControlFD) LogRefs ¶
func (r *ControlFD) LogRefs() bool
LogRefs implements refs.CheckedObject.LogRefs.
func (*ControlFD) Next ¶
func (e *ControlFD) Next() *ControlFD
Next returns the entry that follows e in the list.
func (*ControlFD) Prev ¶
func (e *ControlFD) Prev() *ControlFD
Prev returns the entry that precedes e in the list.
func (*ControlFD) ReadRefs ¶
func (r *ControlFD) ReadRefs() int64
ReadRefs returns the current number of references. The returned count is inherently racy and is unsafe to use without external synchronization.
func (*ControlFD) RefType ¶
func (r *ControlFD) RefType() string
RefType implements refs.CheckedObject.RefType.
func (*ControlFD) RemoveFromConn ¶
func (fd *ControlFD) RemoveFromConn()
RemoveFromConn removes this control FD from its owning connection.
Preconditions:
- fd should not have been returned to the client. Otherwise the client can still refer to it.
- server's rename mutex must at least be read locked.
func (*ControlFD) SetNext ¶
func (e *ControlFD) SetNext(elem *ControlFD)
SetNext assigns 'entry' as the entry that follows e in the list.
func (*ControlFD) SetPrev ¶
func (e *ControlFD) SetPrev(elem *ControlFD)
SetPrev assigns 'entry' as the entry that precedes e in the list.
func (*ControlFD) TryIncRef ¶
func (r *ControlFD) TryIncRef() bool
TryIncRef implements refs.TryRefCounter.TryIncRef.
To do this safely without a loop, a speculative reference is first acquired on the object. This allows multiple concurrent TryIncRef calls to distinguish other TryIncRef calls from genuine references held.
type ControlFDImpl ¶
type ControlFDImpl interface { // FD returns a pointer to the embedded ControlFD. FD() *ControlFD // Close should clean up resources used by the control FD implementation. // Close is called after all references on the FD have been dropped and its // FDID has been released. // // On the server, Close has no concurrency guarantee. Close() // Stat returns the stat(2) results for this FD. // // On the server, Stat has a read concurrency guarantee. Stat() (linux.Statx, error) // SetStat sets file attributes on the backing file. This does not correspond // to any one Linux syscall. On Linux, this operation is performed using // multiple syscalls like fchmod(2), fchown(2), ftruncate(2), futimesat(2) // and so on. The implementation must only set attributes for fields // indicated by stat.Mask. Failure to set an attribute may or may not // terminate the entire operation. SetStat must return a uint32 which is // interpreted as a stat mask to indicate which attribute setting attempts // failed. If multiple attribute setting attempts failed, the returned error // may be from any one of them. // // On the server, SetStat has a write concurrency guarantee. SetStat(stat SetStatReq) (uint32, error) // Walk walks one path component from the directory represented by this FD. // Walk must open a ControlFD on the walked file. // // On the server, Walk has a read concurrency guarantee. Walk(name string) (*ControlFD, linux.Statx, error) // WalkStat is capable of walking multiple path components and returning the // stat results for each path component walked via recordStat. Stat results // must be returned in the order of walk. // // In case a symlink is encountered, the walk must terminate successfully on // the symlink including its stat result. // // The first path component of path may be "" which indicates that the first // stat result returned must be of this starting directory. // // On the server, WalkStat has a read concurrency guarantee. WalkStat(path StringArray, recordStat func(linux.Statx)) error // Open opens the control FD with the flags passed. The flags should be // interpreted as open(2) flags. // // Open may also optionally return a host FD for the opened file whose // lifecycle is independent of the OpenFD. Returns -1 if not available. // // N.B. The server must resolve any lazy paths when open is called. // After this point, read and write may be called on files with no // deletion check, so resolving in the data path is not viable. // // On the server, Open has a read concurrency guarantee. Open(flags uint32) (*OpenFD, int, error) // OpenCreate creates a regular file inside the directory represented by this // FD and then also opens the file. The created file has perms as specified // by mode and owners as specified by uid and gid. The file is opened with // the specified flags. // // OpenCreate may also optionally return a host FD for the opened file whose // lifecycle is independent of the OpenFD. Returns -1 if not available. // // N.B. The server must resolve any lazy paths when open is called. // After this point, read and write may be called on files with no // deletion check, so resolving in the data path is not viable. // // On the server, OpenCreate has a write concurrency guarantee. OpenCreate(mode linux.FileMode, uid UID, gid GID, name string, flags uint32) (*ControlFD, linux.Statx, *OpenFD, int, error) // Mkdir creates a directory inside the directory represented by this FD. The // created directory has perms as specified by mode and owners as specified // by uid and gid. // // On the server, Mkdir has a write concurrency guarantee. Mkdir(mode linux.FileMode, uid UID, gid GID, name string) (*ControlFD, linux.Statx, error) // Mknod creates a file inside the directory represented by this FD. The file // type and perms are specified by mode and owners are specified by uid and // gid. If the newly created file is a character or block device, minor and // major specify its device number. // // On the server, Mkdir has a write concurrency guarantee. Mknod(mode linux.FileMode, uid UID, gid GID, name string, minor uint32, major uint32) (*ControlFD, linux.Statx, error) // Symlink creates a symlink inside the directory represented by this FD. The // symlink has owners as specified by uid and gid and points to target. // // On the server, Symlink has a write concurrency guarantee. Symlink(name string, target string, uid UID, gid GID) (*ControlFD, linux.Statx, error) // Link creates a hard link to the file represented by this FD. The hard link // is created inside dir with the specified name. // // On the server, Link has a write concurrency guarantee for dir and read // concurrency guarantee for this file. Link(dir ControlFDImpl, name string) (*ControlFD, linux.Statx, error) // StatFS returns information about the file system associated with // this file. // // On the server, StatFS has read concurrency guarantee. StatFS() (StatFS, error) // Readlink reads the symlink's target and writes the string into the buffer // returned by getLinkBuf which can be used to request buffer for some size. // It returns the number of bytes written into the buffer. // // On the server, Readlink has a read concurrency guarantee. Readlink(getLinkBuf func(uint32) []byte) (uint16, error) // Connect establishes a new host-socket backed connection with a unix domain // socket. On success it returns a non-blocking host socket FD whose // lifecycle is independent of this ControlFD. // // sockType indicates the requested type of socket and can be passed as type // argument to socket(2). // // On the server, Connect has a read concurrency guarantee. Connect(sockType uint32) (int, error) // BindAt creates a host unix domain socket of type sockType, bound to // the given namt of type sockType, bound to the given name. It returns // a ControlFD that can be used for path operations on the socket, a // BoundSocketFD that can be used to Accept/Listen on the socket, and a // host FD that can be used for event notifications (like new // connections). // // On the server, BindAt has a write concurrency guarantee. BindAt(name string, sockType uint32, mode linux.FileMode, uid UID, gid GID) (*ControlFD, linux.Statx, *BoundSocketFD, int, error) // UnlinkAt the file identified by name in this directory. // // Flags are Linux unlinkat(2) flags. // // On the server, UnlinkAt has a write concurrency guarantee. Unlink(name string, flags uint32) error // RenameAt renames a given file to a new name in a potentially new directory. // // oldName must be a name relative to this file, which must be a directory. // newName is a name relative to newDir. // // On the server, RenameAt has a global concurrency guarantee. RenameAt(oldName string, newDir ControlFDImpl, newName string) error // Renamed is called to notify the FD implementation that the file has been // renamed. FD implementation may update its state accordingly. // // On the server, Renamed has a global concurrency guarantee. Renamed() // GetXattr returns extended attributes of this file. It returns the number // of bytes written into the buffer returned by getValueBuf which can be used // to request buffer for some size. // // If the value is larger than size, implementations may return ERANGE to // indicate that the buffer is too small. // // N.B. size may be 0, in which can the implementation must first find out // the attribute value size using getxattr(2) by passing size=0. Then request // a buffer large enough using getValueBuf and write the value there. // // On the server, GetXattr has a read concurrency guarantee. GetXattr(name string, size uint32, getValueBuf func(uint32) []byte) (uint16, error) // SetXattr sets extended attributes on this file. // // On the server, SetXattr has a write concurrency guarantee. SetXattr(name string, value string, flags uint32) error // ListXattr lists the names of the extended attributes on this file. // // Size indicates the size of the buffer that has been allocated to hold the // attribute list. If the list would be larger than size, implementations may // return ERANGE to indicate that the buffer is too small, but they are also // free to ignore the hint entirely (i.e. the value returned may be larger // than size). All size checking is done independently at the syscall layer. // // On the server, ListXattr has a read concurrency guarantee. ListXattr(size uint64) (StringArray, error) // RemoveXattr removes extended attributes on this file. // // On the server, RemoveXattr has a write concurrency guarantee. RemoveXattr(name string) error }
ControlFDImpl contains implementation details for a ControlFD. Implementations of ControlFDImpl should contain their associated ControlFD by value as their first field.
The operations that perform path traversal or any modification to the filesystem tree must synchronize those modifications with the server's rename mutex.
type Dirent64 ¶
type Dirent64 struct { Ino primitive.Uint64 DevMinor primitive.Uint32 DevMajor primitive.Uint32 Off primitive.Uint64 Type primitive.Uint8 Name SizedString }
Dirent64 is analogous to struct linux_dirent64.
func (*Dirent64) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*Dirent64) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type EmptyMessage ¶
type EmptyMessage struct{}
EmptyMessage is an empty message.
func (*EmptyMessage) CheckedUnmarshal ¶
func (*EmptyMessage) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*EmptyMessage) MarshalBytes ¶
func (*EmptyMessage) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*EmptyMessage) SizeBytes ¶
func (*EmptyMessage) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*EmptyMessage) String ¶
func (*EmptyMessage) String() string
String implements fmt.Stringer.String.
type ErrorResp ¶
type ErrorResp struct {
// contains filtered or unexported fields
}
ErrorResp is returned to represent an error while handling a request.
+marshal
func (*ErrorResp) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*ErrorResp) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*ErrorResp) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*ErrorResp) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type FAllocateReq ¶
FAllocateReq is used to request to fallocate(2) an FD. This has no response.
+marshal boundCheck
func (*FAllocateReq) CheckedMarshal ¶
func (a *FAllocateReq) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*FAllocateReq) CheckedUnmarshal ¶
func (a *FAllocateReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FAllocateReq) CopyIn ¶
func (a *FAllocateReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*FAllocateReq) CopyOut ¶
func (a *FAllocateReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*FAllocateReq) CopyOutN ¶
func (a *FAllocateReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*FAllocateReq) MarshalBytes ¶
func (a *FAllocateReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FAllocateReq) MarshalUnsafe ¶
func (a *FAllocateReq) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*FAllocateReq) Packed ¶
func (a *FAllocateReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*FAllocateReq) SizeBytes ¶
func (a *FAllocateReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FAllocateReq) String ¶
func (a *FAllocateReq) String() string
String implements fmt.Stringer.String.
func (*FAllocateReq) UnmarshalBytes ¶
func (a *FAllocateReq) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*FAllocateReq) UnmarshalUnsafe ¶
func (a *FAllocateReq) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type FAllocateResp ¶
type FAllocateResp struct{ EmptyMessage }
FAllocateResp is an empty response to FAllocateReq.
func (*FAllocateResp) String ¶
func (*FAllocateResp) String() string
String implements fmt.Stringer.String.
type FDID ¶
type FDID uint64
FDID (file descriptor identifier) is used to identify FDs on a connection. Each connection has its own FDID namespace.
+marshal boundCheck slice:FDIDSlice
const InvalidFDID FDID = 0
InvalidFDID represents an invalid FDID.
func (*FDID) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*FDID) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FDID) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FDID) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*FDID) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*FDID) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type FGetXattrReq ¶
type FGetXattrReq struct { FD FDID BufSize primitive.Uint32 Name SizedString }
FGetXattrReq is used to make FGetXattr requests. The response to this is just a SizedString containing the xattr value.
func (*FGetXattrReq) CheckedUnmarshal ¶
func (g *FGetXattrReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FGetXattrReq) MarshalBytes ¶
func (g *FGetXattrReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FGetXattrReq) SizeBytes ¶
func (g *FGetXattrReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FGetXattrReq) String ¶
func (g *FGetXattrReq) String() string
String implements fmt.Stringer.String.
type FGetXattrResp ¶
type FGetXattrResp struct {
Value SizedString
}
FGetXattrResp is used to respond to FGetXattr request.
func (*FGetXattrResp) CheckedUnmarshal ¶
func (g *FGetXattrResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FGetXattrResp) MarshalBytes ¶
func (g *FGetXattrResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FGetXattrResp) SizeBytes ¶
func (g *FGetXattrResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FGetXattrResp) String ¶
func (g *FGetXattrResp) String() string
String implements fmt.Stringer.String.
type FListXattrReq ¶
FListXattrReq is used to make FListXattr requests.
+marshal boundCheck
func (*FListXattrReq) CheckedMarshal ¶
func (l *FListXattrReq) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*FListXattrReq) CheckedUnmarshal ¶
func (l *FListXattrReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FListXattrReq) CopyIn ¶
func (l *FListXattrReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*FListXattrReq) CopyOut ¶
func (l *FListXattrReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*FListXattrReq) CopyOutN ¶
func (l *FListXattrReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*FListXattrReq) MarshalBytes ¶
func (l *FListXattrReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FListXattrReq) MarshalUnsafe ¶
func (l *FListXattrReq) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*FListXattrReq) Packed ¶
func (l *FListXattrReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*FListXattrReq) SizeBytes ¶
func (l *FListXattrReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FListXattrReq) String ¶
func (l *FListXattrReq) String() string
String implements fmt.Stringer.String.
func (*FListXattrReq) UnmarshalBytes ¶
func (l *FListXattrReq) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*FListXattrReq) UnmarshalUnsafe ¶
func (l *FListXattrReq) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type FListXattrResp ¶
type FListXattrResp struct {
Xattrs StringArray
}
FListXattrResp is used to respond to FListXattr requests.
func (*FListXattrResp) CheckedUnmarshal ¶
func (l *FListXattrResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FListXattrResp) MarshalBytes ¶
func (l *FListXattrResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FListXattrResp) SizeBytes ¶
func (l *FListXattrResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FListXattrResp) String ¶
func (l *FListXattrResp) String() string
String implements fmt.Stringer.String.
type FRemoveXattrReq ¶
type FRemoveXattrReq struct { FD FDID Name SizedString }
FRemoveXattrReq is used to make FRemoveXattr requests. It has no response.
func (*FRemoveXattrReq) CheckedUnmarshal ¶
func (r *FRemoveXattrReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FRemoveXattrReq) MarshalBytes ¶
func (r *FRemoveXattrReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FRemoveXattrReq) SizeBytes ¶
func (r *FRemoveXattrReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FRemoveXattrReq) String ¶
func (r *FRemoveXattrReq) String() string
String implements fmt.Stringer.String.
type FRemoveXattrResp ¶
type FRemoveXattrResp struct{ EmptyMessage }
FRemoveXattrResp is an empty response to FRemoveXattrReq.
func (*FRemoveXattrResp) String ¶
func (*FRemoveXattrResp) String() string
String implements fmt.Stringer.String.
type FSetXattrReq ¶
type FSetXattrReq struct { FD FDID Flags primitive.Uint32 Name SizedString Value SizedString }
FSetXattrReq is used to make FSetXattr requests. It has no response.
func (*FSetXattrReq) CheckedUnmarshal ¶
func (s *FSetXattrReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FSetXattrReq) MarshalBytes ¶
func (s *FSetXattrReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FSetXattrReq) SizeBytes ¶
func (s *FSetXattrReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FSetXattrReq) String ¶
func (s *FSetXattrReq) String() string
String implements fmt.Stringer.String.
type FSetXattrResp ¶
type FSetXattrResp struct{ EmptyMessage }
FSetXattrResp is an empty response to FSetXattrReq.
func (*FSetXattrResp) String ¶
func (*FSetXattrResp) String() string
String implements fmt.Stringer.String.
type FStatFSReq ¶
type FStatFSReq struct {
FD FDID
}
FStatFSReq is used to request StatFS results for the specified FD.
+marshal boundCheck
func (*FStatFSReq) CheckedMarshal ¶
func (s *FStatFSReq) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*FStatFSReq) CheckedUnmarshal ¶
func (s *FStatFSReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FStatFSReq) CopyIn ¶
func (s *FStatFSReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*FStatFSReq) CopyOut ¶
func (s *FStatFSReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*FStatFSReq) CopyOutN ¶
func (s *FStatFSReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*FStatFSReq) MarshalBytes ¶
func (s *FStatFSReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FStatFSReq) MarshalUnsafe ¶
func (s *FStatFSReq) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*FStatFSReq) Packed ¶
func (s *FStatFSReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*FStatFSReq) SizeBytes ¶
func (s *FStatFSReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*FStatFSReq) String ¶
func (s *FStatFSReq) String() string
String implements fmt.Stringer.String.
func (*FStatFSReq) UnmarshalBytes ¶
func (s *FStatFSReq) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*FStatFSReq) UnmarshalUnsafe ¶
func (s *FStatFSReq) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type FdArray ¶
type FdArray []FDID
FdArray is a utility struct which implements a marshallable type for communicating an array of FDIDs. In memory, the array data is preceded by a uint16 denoting the array length.
func (*FdArray) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FdArray) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type FlushReq ¶
type FlushReq struct {
FD FDID
}
FlushReq is used to make Flush requests.
+marshal boundCheck
func (*FlushReq) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*FlushReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FlushReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*FlushReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*FlushReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*FlushReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type FsyncReq ¶
type FsyncReq struct {
FDs FdArray
}
FsyncReq is used to fsync(2) FDs.
func (*FsyncReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*FsyncReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type GID ¶
type GID uint32
GID represents a group ID.
+marshal
func (*GID) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*GID) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*GID) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*GID) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type Getdents64Req ¶
type Getdents64Req struct { DirFD FDID // Count is the number of bytes to read. A negative value of Count is used to // indicate that the implementation must lseek(0, SEEK_SET) before calling // getdents64(2). Implementations must use the absolute value of Count to // determine the number of bytes to read. Count int32 // contains filtered or unexported fields }
Getdents64Req is used to make Getdents64 requests.
+marshal boundCheck
func (*Getdents64Req) CheckedMarshal ¶
func (g *Getdents64Req) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*Getdents64Req) CheckedUnmarshal ¶
func (g *Getdents64Req) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*Getdents64Req) CopyIn ¶
func (g *Getdents64Req) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*Getdents64Req) CopyOut ¶
func (g *Getdents64Req) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*Getdents64Req) CopyOutN ¶
func (g *Getdents64Req) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*Getdents64Req) MarshalBytes ¶
func (g *Getdents64Req) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*Getdents64Req) MarshalUnsafe ¶
func (g *Getdents64Req) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*Getdents64Req) Packed ¶
func (g *Getdents64Req) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*Getdents64Req) SizeBytes ¶
func (g *Getdents64Req) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*Getdents64Req) String ¶
func (g *Getdents64Req) String() string
String implements fmt.Stringer.String.
func (*Getdents64Req) UnmarshalBytes ¶
func (g *Getdents64Req) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*Getdents64Req) UnmarshalUnsafe ¶
func (g *Getdents64Req) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type Getdents64Resp ¶
type Getdents64Resp struct {
Dirents []Dirent64
}
Getdents64Resp is used to communicate getdents64 results. In memory, the dirents array is preceded by a uint16 integer denoting array length.
func (*Getdents64Resp) CheckedUnmarshal ¶
func (g *Getdents64Resp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*Getdents64Resp) MarshalBytes ¶
func (g *Getdents64Resp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*Getdents64Resp) SizeBytes ¶
func (g *Getdents64Resp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*Getdents64Resp) String ¶
func (g *Getdents64Resp) String() string
String implements fmt.Stringer.String.
type Inode ¶
Inode represents an inode on the remote filesystem.
+marshal slice:InodeSlice
func (*Inode) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*Inode) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*Inode) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*Inode) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type LinkAtReq ¶
type LinkAtReq struct { DirFD FDID Target FDID Name SizedString }
LinkAtReq is used to make LinkAt requests.
func (*LinkAtReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*LinkAtReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type LinkAtResp ¶
type LinkAtResp struct {
Link Inode
}
LinkAtResp is used to respond to a successful LinkAt request.
+marshal boundCheck
func (*LinkAtResp) CheckedMarshal ¶
func (l *LinkAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*LinkAtResp) CheckedUnmarshal ¶
func (l *LinkAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*LinkAtResp) CopyIn ¶
func (l *LinkAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*LinkAtResp) CopyOut ¶
func (l *LinkAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*LinkAtResp) CopyOutN ¶
func (l *LinkAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*LinkAtResp) MarshalBytes ¶
func (l *LinkAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*LinkAtResp) MarshalUnsafe ¶
func (l *LinkAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*LinkAtResp) Packed ¶
func (l *LinkAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*LinkAtResp) SizeBytes ¶
func (l *LinkAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*LinkAtResp) String ¶
func (l *LinkAtResp) String() string
String implements fmt.Stringer.String.
func (*LinkAtResp) UnmarshalBytes ¶
func (l *LinkAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*LinkAtResp) UnmarshalUnsafe ¶
func (l *LinkAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type ListenReq ¶
ListenReq is used to make Listen requests.
+marshal boundCheck
func (*ListenReq) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*ListenReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*ListenReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*ListenReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*ListenReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*ListenReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type ListenResp ¶
type ListenResp struct{ EmptyMessage }
ListenResp is an empty response to ListenResp.
func (*ListenResp) String ¶
func (*ListenResp) String() string
String implements fmt.Stringer.String.
type MID ¶
type MID uint16
MID (message ID) is used to identify messages to parse from payload.
+marshal slice:MIDSlice
const ( // Error is only used in responses to pass errors to client. Error MID = 0 // Mount is used to establish connection between the client and server mount // point. lisafs requires that the client makes a successful Mount RPC before // making other RPCs. Mount MID = 1 // Channel requests to start a new communicational channel. Channel MID = 2 // FStat requests the stat(2) results for a specified file. FStat MID = 3 // SetStat requests to change file attributes. Note that there is no one // corresponding Linux syscall. This is a conglomeration of fchmod(2), // fchown(2), ftruncate(2) and futimesat(2). SetStat MID = 4 // Walk requests to walk the specified path starting from the specified // directory. Server-side path traversal is terminated preemptively on // symlinks entries because they can cause non-linear traversal. Walk MID = 5 // WalkStat is the same as Walk, except the following differences: // * If the first path component is "", then it also returns stat results // for the directory where the walk starts. // * Does not return Inode, just the Stat results for each path component. WalkStat MID = 6 // OpenAt is analogous to openat(2). It does not perform any walk. It merely // duplicates the control FD with the open flags passed. OpenAt MID = 7 // OpenCreateAt is analogous to openat(2) with O_CREAT|O_EXCL added to flags. // It also returns the newly created file inode. OpenCreateAt MID = 8 // Close is analogous to close(2) but can work on multiple FDs. Close MID = 9 // FSync is analogous to fsync(2) but can work on multiple FDs. FSync MID = 10 // PWrite is analogous to pwrite(2). PWrite MID = 11 // PRead is analogous to pread(2). PRead MID = 12 // MkdirAt is analogous to mkdirat(2). MkdirAt MID = 13 // MknodAt is analogous to mknodat(2). MknodAt MID = 14 // SymlinkAt is analogous to symlinkat(2). SymlinkAt MID = 15 // LinkAt is analogous to linkat(2). LinkAt MID = 16 // FStatFS is analogous to fstatfs(2). FStatFS MID = 17 // FAllocate is analogous to fallocate(2). FAllocate MID = 18 // ReadLinkAt is analogous to readlinkat(2). ReadLinkAt MID = 19 // Flush cleans up the file state. Its behavior is implementation // dependent and might not even be supported in server implementations. Flush MID = 20 // Connect is loosely analogous to connect(2). Connect MID = 21 // UnlinkAt is analogous to unlinkat(2). UnlinkAt MID = 22 // RenameAt is loosely analogous to renameat(2). RenameAt MID = 23 // Getdents64 is analogous to getdents64(2). Getdents64 MID = 24 // FGetXattr is analogous to fgetxattr(2). FGetXattr MID = 25 // FSetXattr is analogous to fsetxattr(2). FSetXattr MID = 26 // FListXattr is analogous to flistxattr(2). FListXattr MID = 27 // FRemoveXattr is analogous to fremovexattr(2). FRemoveXattr MID = 28 // BindAt is analogous to bind(2). BindAt MID = 29 // Listen is analogous to listen(2). Listen MID = 30 // Accept is analogous to accept4(2). Accept MID = 31 )
These constants are used to identify their corresponding message types.
func (*MID) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MID) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MID) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MID) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type MkdirAtReq ¶
type MkdirAtReq struct { Name SizedString // contains filtered or unexported fields }
MkdirAtReq is used to make MkdirAt requests.
func (*MkdirAtReq) CheckedUnmarshal ¶
func (m *MkdirAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*MkdirAtReq) MarshalBytes ¶
func (m *MkdirAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MkdirAtReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MkdirAtReq) Packed ¶
func (c *MkdirAtReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*MkdirAtReq) SizeBytes ¶
func (m *MkdirAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*MkdirAtReq) String ¶
func (m *MkdirAtReq) String() string
String implements fmt.Stringer.String.
func (*MkdirAtReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MkdirAtReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type MkdirAtResp ¶
type MkdirAtResp struct {
ChildDir Inode
}
MkdirAtResp is the response to a successful MkdirAt request.
+marshal boundCheck
func (*MkdirAtResp) CheckedMarshal ¶
func (m *MkdirAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*MkdirAtResp) CheckedUnmarshal ¶
func (m *MkdirAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*MkdirAtResp) CopyIn ¶
func (m *MkdirAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*MkdirAtResp) CopyOut ¶
func (m *MkdirAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*MkdirAtResp) CopyOutN ¶
func (m *MkdirAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*MkdirAtResp) MarshalBytes ¶
func (m *MkdirAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MkdirAtResp) MarshalUnsafe ¶
func (m *MkdirAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MkdirAtResp) Packed ¶
func (m *MkdirAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*MkdirAtResp) SizeBytes ¶
func (m *MkdirAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*MkdirAtResp) String ¶
func (m *MkdirAtResp) String() string
String implements fmt.Stringer.String.
func (*MkdirAtResp) UnmarshalBytes ¶
func (m *MkdirAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MkdirAtResp) UnmarshalUnsafe ¶
func (m *MkdirAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type MknodAtReq ¶
type MknodAtReq struct { Minor primitive.Uint32 Major primitive.Uint32 Name SizedString // contains filtered or unexported fields }
MknodAtReq is used to make MknodAt requests.
func (*MknodAtReq) CheckedUnmarshal ¶
func (m *MknodAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*MknodAtReq) MarshalBytes ¶
func (m *MknodAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MknodAtReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MknodAtReq) Packed ¶
func (c *MknodAtReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*MknodAtReq) SizeBytes ¶
func (m *MknodAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*MknodAtReq) String ¶
func (m *MknodAtReq) String() string
String implements fmt.Stringer.String.
func (*MknodAtReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MknodAtReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type MknodAtResp ¶
type MknodAtResp struct {
Child Inode
}
MknodAtResp is the response to a successful MknodAt request.
+marshal boundCheck
func (*MknodAtResp) CheckedMarshal ¶
func (m *MknodAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*MknodAtResp) CheckedUnmarshal ¶
func (m *MknodAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*MknodAtResp) CopyIn ¶
func (m *MknodAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*MknodAtResp) CopyOut ¶
func (m *MknodAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*MknodAtResp) CopyOutN ¶
func (m *MknodAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*MknodAtResp) MarshalBytes ¶
func (m *MknodAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MknodAtResp) MarshalUnsafe ¶
func (m *MknodAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MknodAtResp) Packed ¶
func (m *MknodAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*MknodAtResp) SizeBytes ¶
func (m *MknodAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*MknodAtResp) String ¶
func (m *MknodAtResp) String() string
String implements fmt.Stringer.String.
func (*MknodAtResp) UnmarshalBytes ¶
func (m *MknodAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MknodAtResp) UnmarshalUnsafe ¶
func (m *MknodAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type MountReq ¶
type MountReq struct{ EmptyMessage }
MountReq is an empty request to Mount on the connection.
type MountResp ¶
type MountResp struct { Root Inode // MaxMessageSize is the maximum size of messages communicated between the // client and server in bytes. This includes the communication header. MaxMessageSize primitive.Uint32 // SupportedMs holds all the supported messages. SupportedMs []MID }
MountResp represents a Mount response.
func (*MountResp) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*MountResp) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type MsgDynamic ¶
MsgDynamic is a sample dynamic struct which can be used to test message passing.
+marshal dynamic
func (*MsgDynamic) CheckedUnmarshal ¶
func (m *MsgDynamic) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*MsgDynamic) CopyIn ¶
func (m *MsgDynamic) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*MsgDynamic) CopyOut ¶
func (m *MsgDynamic) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*MsgDynamic) CopyOutN ¶
func (m *MsgDynamic) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*MsgDynamic) MarshalBytes ¶
func (m *MsgDynamic) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MsgDynamic) MarshalUnsafe ¶
func (m *MsgDynamic) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MsgDynamic) Packed ¶
func (m *MsgDynamic) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*MsgDynamic) Randomize ¶
func (m *MsgDynamic) Randomize(arrLen int)
Randomize randomizes the contents of m.
func (*MsgDynamic) SizeBytes ¶
func (m *MsgDynamic) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*MsgDynamic) String ¶
func (m *MsgDynamic) String() string
String implements fmt.Stringer.String.
func (*MsgDynamic) UnmarshalBytes ¶
func (m *MsgDynamic) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MsgDynamic) UnmarshalUnsafe ¶
func (m *MsgDynamic) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type MsgSimple ¶
MsgSimple is a sample packed struct which can be used to test message passing.
+marshal slice:Msg1Slice
func (*MsgSimple) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*MsgSimple) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*MsgSimple) Randomize ¶
func (m *MsgSimple) Randomize()
Randomize randomizes the contents of m.
func (*MsgSimple) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*MsgSimple) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a node on the filesystem tree. A Node is shared by all the ControlFDs opened on that position. For a given Server, there will only be one Node for a given filesystem position.
Reference Model:
- Each node holds a ref on its parent for its entire lifetime.
func (*Node) DecRef ¶
DecRef implements refs.RefCounter.DecRef. Note that the context parameter should never be used. It exists solely to comply with the refs.RefCounter interface.
Precondition: server's rename mutex must be at least read locked.
func (*Node) FilePath ¶
FilePath returns the absolute path of the backing file. This is an expensive operation. The returned path should be free of any intermediate symlinks because all internal (non-leaf) nodes are directories.
Precondition:
- server's rename mutex must be at least read locked. Calling handlers must at least have read concurrency guarantee from the server.
func (*Node) InitLocked ¶
InitLocked must be called before first use of fd.
Precondition: parent.childrenMu is locked.
Postconditions: A ref on n is transferred to the caller.
func (*Node) InitRefs ¶
func (r *Node) InitRefs()
InitRefs initializes r with one reference and, if enabled, activates leak checking.
func (*Node) LeakMessage ¶
func (r *Node) LeakMessage() string
LeakMessage implements refs.CheckedObject.LeakMessage.
func (*Node) LookupChildLocked ¶
LookupChildLocked looks up for a child with given name. Returns nil if child does not exist.
Preconditions: childrenMu is locked.
func (*Node) ReadRefs ¶
func (r *Node) ReadRefs() int64
ReadRefs returns the current number of references. The returned count is inherently racy and is unsafe to use without external synchronization.
func (*Node) RefType ¶
func (r *Node) RefType() string
RefType implements refs.CheckedObject.RefType.
func (*Node) StateFields ¶
func (r *Node) StateFields() []string
func (*Node) StateTypeName ¶
func (r *Node) StateTypeName() string
func (*Node) TryIncRef ¶
func (r *Node) TryIncRef() bool
TryIncRef implements refs.TryRefCounter.TryIncRef.
To do this safely without a loop, a speculative reference is first acquired on the object. This allows multiple concurrent TryIncRef calls to distinguish other TryIncRef calls from genuine references held.
func (*Node) WithChildrenMu ¶
func (n *Node) WithChildrenMu(fn func())
WithChildrenMu executes fn with n.childrenMu locked.
type OpenAtReq ¶
OpenAtReq is used to open existing FDs with the specified flags.
+marshal boundCheck
func (*OpenAtReq) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*OpenAtReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*OpenAtReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*OpenAtReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*OpenAtReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*OpenAtReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type OpenAtResp ¶
type OpenAtResp struct {
OpenFD FDID
}
OpenAtResp is used to communicate the newly created FD.
+marshal boundCheck
func (*OpenAtResp) CheckedMarshal ¶
func (o *OpenAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*OpenAtResp) CheckedUnmarshal ¶
func (o *OpenAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*OpenAtResp) CopyIn ¶
func (o *OpenAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*OpenAtResp) CopyOut ¶
func (o *OpenAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*OpenAtResp) CopyOutN ¶
func (o *OpenAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*OpenAtResp) MarshalBytes ¶
func (o *OpenAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*OpenAtResp) MarshalUnsafe ¶
func (o *OpenAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*OpenAtResp) Packed ¶
func (o *OpenAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*OpenAtResp) SizeBytes ¶
func (o *OpenAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*OpenAtResp) String ¶
func (o *OpenAtResp) String() string
String implements fmt.Stringer.String.
func (*OpenAtResp) UnmarshalBytes ¶
func (o *OpenAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*OpenAtResp) UnmarshalUnsafe ¶
func (o *OpenAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type OpenCreateAtReq ¶
type OpenCreateAtReq struct { Flags primitive.Uint32 Name SizedString // contains filtered or unexported fields }
OpenCreateAtReq is used to make OpenCreateAt requests.
func (*OpenCreateAtReq) CheckedUnmarshal ¶
func (o *OpenCreateAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*OpenCreateAtReq) CopyOutN ¶
func (c *OpenCreateAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*OpenCreateAtReq) MarshalBytes ¶
func (o *OpenCreateAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*OpenCreateAtReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*OpenCreateAtReq) Packed ¶
func (c *OpenCreateAtReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*OpenCreateAtReq) SizeBytes ¶
func (o *OpenCreateAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*OpenCreateAtReq) String ¶
func (o *OpenCreateAtReq) String() string
String implements fmt.Stringer.String.
func (*OpenCreateAtReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*OpenCreateAtReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type OpenCreateAtResp ¶
OpenCreateAtResp is used to communicate successful OpenCreateAt results.
+marshal boundCheck
func (*OpenCreateAtResp) CheckedMarshal ¶
func (o *OpenCreateAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*OpenCreateAtResp) CheckedUnmarshal ¶
func (o *OpenCreateAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*OpenCreateAtResp) CopyIn ¶
func (o *OpenCreateAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*OpenCreateAtResp) CopyOut ¶
func (o *OpenCreateAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*OpenCreateAtResp) CopyOutN ¶
func (o *OpenCreateAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*OpenCreateAtResp) MarshalBytes ¶
func (o *OpenCreateAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*OpenCreateAtResp) MarshalUnsafe ¶
func (o *OpenCreateAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*OpenCreateAtResp) Packed ¶
func (o *OpenCreateAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*OpenCreateAtResp) SizeBytes ¶
func (o *OpenCreateAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*OpenCreateAtResp) String ¶
func (o *OpenCreateAtResp) String() string
String implements fmt.Stringer.String.
func (*OpenCreateAtResp) UnmarshalBytes ¶
func (o *OpenCreateAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*OpenCreateAtResp) UnmarshalUnsafe ¶
func (o *OpenCreateAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type OpenFD ¶
type OpenFD struct {
// contains filtered or unexported fields
}
OpenFD represents an open file descriptor on the protocol. It resonates closely with a Linux file descriptor. Its operations are limited to the file. Its operations are not allowed to modify or traverse the filesystem tree. See OpenFDImpl for the supported operations.
Reference Model:
- An OpenFD takes a reference on the control FD it was opened on.
func (*OpenFD) ControlFD ¶
func (fd *OpenFD) ControlFD() ControlFDImpl
ControlFD returns the control FD on which this FD was opened.
func (*OpenFD) DecRef ¶
DecRef implements refs.RefCounter.DecRef. Note that the context parameter should never be used. It exists solely to comply with the refs.RefCounter interface.
func (*OpenFD) Init ¶
func (fd *OpenFD) Init(cfd *ControlFD, flags uint32, impl OpenFDImpl)
Init must be called before first use of fd.
func (*OpenFD) InitRefs ¶
func (r *OpenFD) InitRefs()
InitRefs initializes r with one reference and, if enabled, activates leak checking.
func (*OpenFD) LeakMessage ¶
func (r *OpenFD) LeakMessage() string
LeakMessage implements refs.CheckedObject.LeakMessage.
func (*OpenFD) LogRefs ¶
func (r *OpenFD) LogRefs() bool
LogRefs implements refs.CheckedObject.LogRefs.
func (*OpenFD) Next ¶
func (e *OpenFD) Next() *OpenFD
Next returns the entry that follows e in the list.
func (*OpenFD) Prev ¶
func (e *OpenFD) Prev() *OpenFD
Prev returns the entry that precedes e in the list.
func (*OpenFD) ReadRefs ¶
func (r *OpenFD) ReadRefs() int64
ReadRefs returns the current number of references. The returned count is inherently racy and is unsafe to use without external synchronization.
func (*OpenFD) RefType ¶
func (r *OpenFD) RefType() string
RefType implements refs.CheckedObject.RefType.
func (*OpenFD) SetNext ¶
func (e *OpenFD) SetNext(elem *OpenFD)
SetNext assigns 'entry' as the entry that follows e in the list.
func (*OpenFD) SetPrev ¶
func (e *OpenFD) SetPrev(elem *OpenFD)
SetPrev assigns 'entry' as the entry that precedes e in the list.
func (*OpenFD) TryIncRef ¶
func (r *OpenFD) TryIncRef() bool
TryIncRef implements refs.TryRefCounter.TryIncRef.
To do this safely without a loop, a speculative reference is first acquired on the object. This allows multiple concurrent TryIncRef calls to distinguish other TryIncRef calls from genuine references held.
type OpenFDImpl ¶
type OpenFDImpl interface { // FD returns a pointer to the embedded OpenFD. FD() *OpenFD // Close should clean up resources used by the open FD implementation. // Close is called after all references on the FD have been dropped and its // FDID has been released. // // On the server, Close has no concurrency guarantee. Close() // Stat returns the stat(2) results for this FD. // // On the server, Stat has a read concurrency guarantee. Stat() (linux.Statx, error) // Sync is simialr to fsync(2). // // On the server, Sync has a read concurrency guarantee. Sync() error // Write writes buf at offset off to the backing file via this open FD. Write // attempts to write len(buf) bytes and returns the number of bytes written. // // On the server, Write has a write concurrency guarantee. See Open for // additional requirements regarding lazy path resolution. Write(buf []byte, off uint64) (uint64, error) // Read reads at offset off into buf from the backing file via this open FD. // Read attempts to read len(buf) bytes and returns the number of bytes read. // // On the server, Read has a read concurrency guarantee. See Open for // additional requirements regarding lazy path resolution. Read(buf []byte, off uint64) (uint64, error) // Allocate allows the caller to directly manipulate the allocated disk space // for the file. See fallocate(2) for more details. // // On the server, Allocate has a write concurrency guarantee. Allocate(mode, off, length uint64) error // Flush can be used to clean up the file state. Behavior is // implementation-specific. // // On the server, Flush has a read concurrency guarantee. Flush() error // Getdent64 fetches directory entries for this directory and calls // recordDirent for each dirent read. If seek0 is true, then the directory FD // is seeked to 0 and iteration starts from the beginning. // // On the server, Getdent64 has a read concurrency guarantee. Getdent64(count uint32, seek0 bool, recordDirent func(Dirent64)) error // Renamed is called to notify the FD implementation that the file has been // renamed. FD implementation may update its state accordingly. // // On the server, Renamed has a global concurrency guarantee. Renamed() }
OpenFDImpl contains implementation details for a OpenFD. Implementations of OpenFDImpl should contain their associated OpenFD by value as their first field.
Since these operations do not perform any path traversal or any modification to the filesystem tree, there is no need to synchronize with rename operations.
type P9Version ¶
P9Version mimics p9.TVersion and p9.Rversion.
func (*P9Version) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*P9Version) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type PReadReq ¶
type PReadReq struct { Offset uint64 FD FDID Count uint32 // contains filtered or unexported fields }
PReadReq is used to pread(2) on an FD.
+marshal boundCheck
func (*PReadReq) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*PReadReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*PReadReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*PReadReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*PReadReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*PReadReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type PReadResp ¶
PReadResp is used to return the result of pread(2).
func (*PReadResp) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*PReadResp) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type PWriteReq ¶
PWriteReq is used to pwrite(2) on an FD.
func (*PWriteReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*PWriteReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type PWriteResp ¶
type PWriteResp struct {
Count uint64
}
PWriteResp is used to return the result of pwrite(2).
+marshal boundCheck
func (*PWriteResp) CheckedMarshal ¶
func (w *PWriteResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*PWriteResp) CheckedUnmarshal ¶
func (w *PWriteResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*PWriteResp) CopyIn ¶
func (w *PWriteResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*PWriteResp) CopyOut ¶
func (w *PWriteResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*PWriteResp) CopyOutN ¶
func (w *PWriteResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*PWriteResp) MarshalBytes ¶
func (w *PWriteResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*PWriteResp) MarshalUnsafe ¶
func (w *PWriteResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*PWriteResp) Packed ¶
func (w *PWriteResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*PWriteResp) SizeBytes ¶
func (w *PWriteResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*PWriteResp) String ¶
func (w *PWriteResp) String() string
String implements fmt.Stringer.String.
func (*PWriteResp) UnmarshalBytes ¶
func (w *PWriteResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*PWriteResp) UnmarshalUnsafe ¶
func (w *PWriteResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type RPCHandler ¶
type RPCHandler func(c *Connection, comm Communicator, payloadLen uint32) (uint32, error)
RPCHandler defines a handler that is invoked when the associated message is received. The handler is responsible for:
- Unmarshalling the request from the passed payload and interpreting it.
- Marshalling the response into the communicator's payload buffer.
- Return the number of payload bytes written.
- Donate any FDs (if needed) to comm which will in turn donate it to client.
type ReadLinkAtReq ¶
type ReadLinkAtReq struct {
FD FDID
}
ReadLinkAtReq is used to readlinkat(2) at the specified FD.
+marshal boundCheck
func (*ReadLinkAtReq) CheckedMarshal ¶
func (r *ReadLinkAtReq) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*ReadLinkAtReq) CheckedUnmarshal ¶
func (r *ReadLinkAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*ReadLinkAtReq) CopyIn ¶
func (r *ReadLinkAtReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*ReadLinkAtReq) CopyOut ¶
func (r *ReadLinkAtReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*ReadLinkAtReq) CopyOutN ¶
func (r *ReadLinkAtReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*ReadLinkAtReq) MarshalBytes ¶
func (r *ReadLinkAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*ReadLinkAtReq) MarshalUnsafe ¶
func (r *ReadLinkAtReq) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*ReadLinkAtReq) Packed ¶
func (r *ReadLinkAtReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*ReadLinkAtReq) SizeBytes ¶
func (r *ReadLinkAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*ReadLinkAtReq) String ¶
func (r *ReadLinkAtReq) String() string
String implements fmt.Stringer.String.
func (*ReadLinkAtReq) UnmarshalBytes ¶
func (r *ReadLinkAtReq) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*ReadLinkAtReq) UnmarshalUnsafe ¶
func (r *ReadLinkAtReq) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type ReadLinkAtResp ¶
type ReadLinkAtResp struct {
Target SizedString
}
ReadLinkAtResp is used to communicate ReadLinkAt results.
func (*ReadLinkAtResp) CheckedUnmarshal ¶
func (r *ReadLinkAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*ReadLinkAtResp) MarshalBytes ¶
func (r *ReadLinkAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*ReadLinkAtResp) SizeBytes ¶
func (r *ReadLinkAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*ReadLinkAtResp) String ¶
func (r *ReadLinkAtResp) String() string
String implements fmt.Stringer.String.
type RenameAtReq ¶
type RenameAtReq struct { OldDir FDID NewDir FDID OldName SizedString NewName SizedString }
RenameAtReq is used to make RenameAt requests. Note that the request takes in the to-be-renamed file's FD instead of oldDir and oldName like renameat(2).
func (*RenameAtReq) CheckedUnmarshal ¶
func (r *RenameAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*RenameAtReq) MarshalBytes ¶
func (r *RenameAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*RenameAtReq) SizeBytes ¶
func (r *RenameAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*RenameAtReq) String ¶
func (r *RenameAtReq) String() string
String implements fmt.Stringer.String.
type RenameAtResp ¶
type RenameAtResp struct{ EmptyMessage }
RenameAtResp is an empty response to RenameAtReq.
func (*RenameAtResp) String ¶
func (*RenameAtResp) String() string
String implements fmt.Stringer.String.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves a filesystem tree. Multiple connections on different mount points can be started on a server. The server provides utilities to safely modify the filesystem tree across its connections (mount points). Note that it does not support synchronizing filesystem tree mutations across other servers serving the same filesystem subtree. Server also manages the lifecycle of all connections.
func (*Server) CreateConnection ¶
func (s *Server) CreateConnection(sock *unet.Socket, mountPath string, readonly bool) (*Connection, error)
CreateConnection initializes a new connection which will be mounted at mountPath. The connection must be started separately.
func (*Server) Destroy ¶
func (s *Server) Destroy()
Destroy releases resources being used by this server.
func (*Server) Init ¶
func (s *Server) Init(impl ServerImpl, opts ServerOpts)
Init must be called before first use of the server.
func (*Server) SetHandlers ¶
func (s *Server) SetHandlers(handlers []RPCHandler)
SetHandlers overrides the server's RPC handlers. Mainly should only be used for tests.
func (*Server) StartConnection ¶
func (s *Server) StartConnection(c *Connection)
StartConnection starts the connection on a separate goroutine and tracks it.
type ServerImpl ¶
type ServerImpl interface { // Mount is called when a Mount RPC is made. It mounts the connection on // mountNode. Mount may optionally donate a host FD to the mount point. // // Mount has a read concurrency guarantee on mountNode. Mount(c *Connection, mountNode *Node) (*ControlFD, linux.Statx, int, error) // SupportedMessages returns a list of messages that the server // implementation supports. SupportedMessages() []MID // MaxMessageSize is the maximum payload length (in bytes) that can be sent // to this server implementation. MaxMessageSize() uint32 }
ServerImpl contains the implementation details for a Server. Implementations of ServerImpl should contain their associated Server by value as their first field.
type ServerOpts ¶
type ServerOpts struct { // WalkStatSupported is set to true if it's safe to call // ControlFDImpl.WalkStat and let the file implementation perform the walk // without holding locks on any of the descendant's Nodes. WalkStatSupported bool // SetAttrOnDeleted is set to true if it's safe to call ControlFDImpl.SetStat // for deleted files. SetAttrOnDeleted bool // AllocateOnDeleted is set to true if it's safe to call OpenFDImpl.Allocate // for deleted files. AllocateOnDeleted bool }
ServerOpts defines some server implementation specific behavior.
type SetStatReq ¶
type SetStatReq struct { FD FDID Mask uint32 Mode uint32 // Only permissions part is settable. UID UID GID GID Size uint64 Atime linux.Timespec Mtime linux.Timespec }
SetStatReq is used to set attributeds on FDs.
+marshal boundCheck
func (*SetStatReq) CheckedMarshal ¶
func (s *SetStatReq) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*SetStatReq) CheckedUnmarshal ¶
func (s *SetStatReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*SetStatReq) CopyIn ¶
func (s *SetStatReq) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*SetStatReq) CopyOut ¶
func (s *SetStatReq) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*SetStatReq) CopyOutN ¶
func (s *SetStatReq) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*SetStatReq) MarshalBytes ¶
func (s *SetStatReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*SetStatReq) MarshalUnsafe ¶
func (s *SetStatReq) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*SetStatReq) Packed ¶
func (s *SetStatReq) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*SetStatReq) SizeBytes ¶
func (s *SetStatReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*SetStatReq) String ¶
func (s *SetStatReq) String() string
String implements fmt.Stringer.String.
func (*SetStatReq) UnmarshalBytes ¶
func (s *SetStatReq) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*SetStatReq) UnmarshalUnsafe ¶
func (s *SetStatReq) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type SetStatResp ¶
SetStatResp is used to communicate SetStat results. It contains a mask representing the failed changes. It also contains the errno of the failed set attribute operation. If multiple operations failed then any of those errnos can be returned.
+marshal boundCheck
func (*SetStatResp) CheckedMarshal ¶
func (s *SetStatResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*SetStatResp) CheckedUnmarshal ¶
func (s *SetStatResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*SetStatResp) CopyIn ¶
func (s *SetStatResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*SetStatResp) CopyOut ¶
func (s *SetStatResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*SetStatResp) CopyOutN ¶
func (s *SetStatResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*SetStatResp) MarshalBytes ¶
func (s *SetStatResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*SetStatResp) MarshalUnsafe ¶
func (s *SetStatResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*SetStatResp) Packed ¶
func (s *SetStatResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*SetStatResp) SizeBytes ¶
func (s *SetStatResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*SetStatResp) String ¶
func (s *SetStatResp) String() string
String implements fmt.Stringer.String.
func (*SetStatResp) UnmarshalBytes ¶
func (s *SetStatResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*SetStatResp) UnmarshalUnsafe ¶
func (s *SetStatResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type SizedString ¶
type SizedString string
SizedString represents a string in memory. The marshalled string bytes are preceded by a uint16 signifying the string length.
func (*SizedString) CheckedUnmarshal ¶
func (s *SizedString) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*SizedString) MarshalBytes ¶
func (s *SizedString) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*SizedString) SizeBytes ¶
func (s *SizedString) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
type StatFS ¶
type StatFS struct { Type uint64 BlockSize int64 Blocks uint64 BlocksFree uint64 BlocksAvailable uint64 Files uint64 FilesFree uint64 NameLength uint64 }
StatFS is responded to a successful FStatFS request.
+marshal boundCheck
func (*StatFS) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*StatFS) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*StatFS) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*StatFS) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*StatFS) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*StatFS) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type StatReq ¶
type StatReq struct {
FD FDID
}
StatReq requests the stat results for the specified FD.
+marshal boundCheck
func (*StatReq) CheckedMarshal ¶
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*StatReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*StatReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*StatReq) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*StatReq) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*StatReq) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type StringArray ¶
type StringArray []string
StringArray represents an array of SizedStrings in memory. The marshalled array data is preceded by a uint16 signifying the array length.
func (*StringArray) CheckedUnmarshal ¶
func (s *StringArray) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*StringArray) MarshalBytes ¶
func (s *StringArray) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*StringArray) SizeBytes ¶
func (s *StringArray) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*StringArray) String ¶
func (s *StringArray) String() string
String implements fmt.Stringer.String. This ensures that the string slice is not escaped so that callers that use a statically sized string array do not incur an unnecessary allocation.
type SymlinkAtReq ¶
type SymlinkAtReq struct { DirFD FDID UID UID GID GID Name SizedString Target SizedString }
SymlinkAtReq is used to make SymlinkAt request.
func (*SymlinkAtReq) CheckedUnmarshal ¶
func (s *SymlinkAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*SymlinkAtReq) MarshalBytes ¶
func (s *SymlinkAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*SymlinkAtReq) SizeBytes ¶
func (s *SymlinkAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*SymlinkAtReq) String ¶
func (s *SymlinkAtReq) String() string
String implements fmt.Stringer.String.
type SymlinkAtResp ¶
type SymlinkAtResp struct {
Symlink Inode
}
SymlinkAtResp is the response to a successful SymlinkAt request.
+marshal boundCheck
func (*SymlinkAtResp) CheckedMarshal ¶
func (s *SymlinkAtResp) CheckedMarshal(dst []byte) ([]byte, bool)
CheckedMarshal implements marshal.CheckedMarshallable.CheckedMarshal.
func (*SymlinkAtResp) CheckedUnmarshal ¶
func (s *SymlinkAtResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*SymlinkAtResp) CopyIn ¶
func (s *SymlinkAtResp) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyIn implements marshal.Marshallable.CopyIn.
func (*SymlinkAtResp) CopyOut ¶
func (s *SymlinkAtResp) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)
CopyOut implements marshal.Marshallable.CopyOut.
func (*SymlinkAtResp) CopyOutN ¶
func (s *SymlinkAtResp) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)
CopyOutN implements marshal.Marshallable.CopyOutN.
func (*SymlinkAtResp) MarshalBytes ¶
func (s *SymlinkAtResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*SymlinkAtResp) MarshalUnsafe ¶
func (s *SymlinkAtResp) MarshalUnsafe(dst []byte) []byte
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*SymlinkAtResp) Packed ¶
func (s *SymlinkAtResp) Packed() bool
Packed implements marshal.Marshallable.Packed.
func (*SymlinkAtResp) SizeBytes ¶
func (s *SymlinkAtResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*SymlinkAtResp) String ¶
func (s *SymlinkAtResp) String() string
String implements fmt.Stringer.String.
func (*SymlinkAtResp) UnmarshalBytes ¶
func (s *SymlinkAtResp) UnmarshalBytes(src []byte) []byte
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*SymlinkAtResp) UnmarshalUnsafe ¶
func (s *SymlinkAtResp) UnmarshalUnsafe(src []byte) []byte
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type UID ¶
type UID uint32
UID represents a user ID.
+marshal
func (*UID) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*UID) MarshalUnsafe ¶
MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (*UID) UnmarshalBytes ¶
UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (*UID) UnmarshalUnsafe ¶
UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
type UnlinkAtReq ¶
type UnlinkAtReq struct { DirFD FDID Flags primitive.Uint32 Name SizedString }
UnlinkAtReq is used to make UnlinkAt request.
func (*UnlinkAtReq) CheckedUnmarshal ¶
func (u *UnlinkAtReq) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*UnlinkAtReq) MarshalBytes ¶
func (u *UnlinkAtReq) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*UnlinkAtReq) SizeBytes ¶
func (u *UnlinkAtReq) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*UnlinkAtReq) String ¶
func (u *UnlinkAtReq) String() string
String implements fmt.Stringer.String.
type UnlinkAtResp ¶
type UnlinkAtResp struct{ EmptyMessage }
UnlinkAtResp is an empty response to UnlinkAtReq.
func (*UnlinkAtResp) String ¶
func (*UnlinkAtResp) String() string
String implements fmt.Stringer.String.
type WalkReq ¶
type WalkReq struct { DirFD FDID Path StringArray }
WalkReq is used to request to walk multiple path components at once. This is used for both Walk and WalkStat.
func (*WalkReq) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*WalkReq) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type WalkResp ¶
type WalkResp struct { Status WalkStatus Inodes []Inode }
WalkResp is used to communicate the inodes walked by the server. In memory, the inode array is preceded by a uint16 integer denoting array length.
func (*WalkResp) CheckedUnmarshal ¶
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*WalkResp) MarshalBytes ¶
MarshalBytes implements marshal.Marshallable.MarshalBytes.
type WalkStatResp ¶
WalkStatResp is used to communicate stat results for WalkStat. In memory, the array data is preceded by a uint16 denoting the array length.
func (*WalkStatResp) CheckedUnmarshal ¶
func (w *WalkStatResp) CheckedUnmarshal(src []byte) ([]byte, bool)
CheckedUnmarshal implements marshal.CheckedMarshallable.CheckedUnmarshal.
func (*WalkStatResp) MarshalBytes ¶
func (w *WalkStatResp) MarshalBytes(dst []byte) []byte
MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (*WalkStatResp) SizeBytes ¶
func (w *WalkStatResp) SizeBytes() int
SizeBytes implements marshal.Marshallable.SizeBytes.
func (*WalkStatResp) String ¶
func (w *WalkStatResp) String() string
String implements fmt.Stringer.String.
type WalkStatus ¶
WalkStatus is used to indicate the reason for partial/unsuccessful server side Walk operations. Please note that partial/unsuccessful walk operations do not necessarily fail the RPC. The RPC is successful with a failure hint which can be used by the client to infer server-side state.
const ( // WalkSuccess indicates that all path components were successfully walked. WalkSuccess WalkStatus = iota // WalkComponentDoesNotExist indicates that the walk was prematurely // terminated because an intermediate path component does not exist on // server. The results of all previous existing path components is returned. WalkComponentDoesNotExist // WalkComponentSymlink indicates that the walk was prematurely // terminated because an intermediate path component was a symlink. It is not // safe to resolve symlinks remotely (unaware of mount points). WalkComponentSymlink )
Source Files ¶
- bound_socket_fd_refs.go
- channel.go
- client.go
- client_file.go
- communicator.go
- connection.go
- control_fd_list.go
- control_fd_refs.go
- fd.go
- handlers.go
- lisafs.go
- lisafs_abi_autogen_unsafe.go
- lisafs_state_autogen.go
- message.go
- node.go
- node_fd_refs.go
- open_fd_list.go
- open_fd_refs.go
- sample_message.go
- server.go
- sock.go