package
0.0.0-20240720002214-37b2b8227b91
Repository: https://github.com/progrium/go-netstack.git
Documentation: pkg.go.dev

# Functions

AttrMaskAll returns an AttrMask with all fields masked.
CanOpen returns whether this file open can be opened, read and written to.
ExtractErrno extracts a unix.Errno from a error, best effort.
ExtractLinuxerrErrno extracts a *errors.Error from a error, best effort.
HighestVersionString returns the highest possible version string that a client may request or a server may support.
ModeFromOS returns a FileMode from an os.FileMode.
NewClient creates a new client.
NewServer returns a new server.
SocketTypeFromLinux maps a Linux socket type to a SocketType.
StatToAttr converts a Linux syscall stat structure to an Attr.
ToAllocateMode returns an AllocateMode from a fallocate(2) mode.
VersionSupportsAnonymous returns true if version v supports Tlconnect with the AnonymousSocket mode.
VersionSupportsConnect returns true if version v supports the Tlconnect message.
VersionSupportsMultiUser returns true if version v supports multi-user fake directory permissions and ID values.
VersionSupportsOpenTruncateFlag returns true if version v supports passing the OpenTruncate flag to Tlopen.
VersionSupportsTflushf returns true if version v supports the Tflushf message.

# Constants

AllPermissions is a mask with rwx bits set for user, group and others.
AnonymousSocket is only valid for Connect calls, and indicates that the caller will accept any socket type.
DefaultMessageSize is a sensible default.
DgramSocket indicates SOCK_DGRAM mode.
DirentSizeStatic is the number of bytes required to encode a p9.Dirent with an empty name.
Exec is a mode bit indicating exec permission.
FileModeMask is a mask of all the file mode bits of FileMode.
ModeBlockDevice is a mode bit for block devices.
ModeCharacterDevice is a mode bit for a character device.
ModeDirectory is a mode bit for directories.
ModeNamedPipe is a mode bit for a named pipe.
ModeRegular is a mode bit for regular files.
ModeSocket is an (unused) mode bit for a socket.
ModeSymlink is a mode bit for a symlink.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
MsgType declarations.
NoFID is a sentinel used to indicate no valid FID.
NoGID is a sentinel used to indicate no valid GID.
NoTag is a sentinel used to indicate no valid tag.
NoUID is a sentinel used to indicate no valid UID.
OpenFlagsModeMask is a mask of valid OpenFlags mode bits.
OpenTruncate is a Tlopen flag indicating that the opened file should be truncated.
Read is a mode bit indicating read permission.
ReadOnly is a Tlopen and Tlcreate flag indicating read-only mode.
ReadWrite is a Tlopen flag indicates read-write mode.
SeqpacketSocket indicates SOCK_SEQPACKET mode.
SetGID is the set group ID bit.
SetUID is the set user ID bit.
Sticky is a mode bit indicating sticky directories.
StreamSocket indicates SOCK_STREAM mode.
TypeAppendOnly represents an append only file.
TypeAuth represents an authentication file.
TypeDir represents a directory type.
TypeExclusive represents an exclusive-use file.
TypeLink represents a hard link.
TypeMount represents a mounted channel.
TypeRegular represents a regular file.
TypeSymlink represents a symlink.
TypeTemporary represents a temporary file.
Write is a mode bit indicating write permission.
WriteOnly is a Tlopen and Tlcreate flag indicating write-only mode.

# Variables

ErrBadVersionString indicates that the version string is malformed or unsupported.
ErrNoValidMessage indicates no valid message could be decoded.
ErrOutOfFIDs indicates no more FIDs are available.
ErrOutOfTags indicates no tags are available.
ErrUnexpectedTag indicates a response with an unexpected tag was received.
ErrVersionsExhausted indicates that all versions to negotiate have been exhausted.

# Structs

AllocateMode are possible modes to p9.File.Allocate().
AttacherOptions contains Attacher configuration.
Attr is a set of attributes for getattr.
AttrMask is a mask of attributes for getattr.
Client is at least a 9P2000.L client.
DefaultWalkGetAttr implements File.WalkGetAttr to return ENOSYS for server-side Files.
Dirent is used for readdir.
DisallowClientCalls panics if a client-only function is called.
DisallowServerCalls panics if a server-only function is called.
ErrBadResponse indicates the response didn't match the request.
ErrInvalidMsgType is returned when an unsupported message type is found.
ErrMessageTooLarge indicates the size was larger than reasonable.
ErrSocket is returned in cases of a socket issue.
FSStat is used by statfs.
FullStat is used in the result of a MultiGetAttr call.
NoServerOptions partially implements Attacher with empty AttacherOptions.
QID is a unique file identifier.
QIDGenerator is a simple generator for QIDs that atomically increments Path values.
Rallocate is an allocate response.
Rattach is an attach response.
Rauth is an authentication response.
Rbind is a bind response.
Rchannel is the channel response.
Rclunk is a close response.
ReadWriterFile wraps a File and implements io.ReadWriter, io.ReaderAt, and io.WriterAt.
Rflush is a flush response.
Rflushf is a flush file response.
Rfsync is an fsync response.
Rgetattr is a getattr response.
Rgetxattr is a getxattr response.
Rlconnect is a connect response.
Rlcreate is a create response.
Rlerror is an error response.
Rlink is a link response.
Rlistxattr is a listxattr response.
Rlopen is a open response.
Rmkdir is a mkdir response.
Rmknod is a mknod response.
Rmultigetattr is a multi-getattr response.
Rread is the response for a Tread.
Rreaddir is a readdir response.
Rreadlink is a readlink response.
Rremove is a remove response.
Rremovexattr is a removexattr response.
Rrename is a rename response.
Rrenameat is a rename response.
Rsetattr is a setattr response.
Rsetattrclunk is a setattr+close response.
Rsetxattr is a setxattr response.
Rstatfs is the response for a Tstatfs.
Rsymlink is a symlink response.
Rucreate is a file creation response.
Rumkdir is a umkdir response.
Rumknod is a umknod response.
Runlinkat is an unlink response.
Rusymlink is a usymlink response.
Rversion is a version response.
Rwalk is a walk response.
Rwalkgetattr is a walk response.
Rwrite is the response for a Twrite.
Rxattrcreate is a xattrcreate response.
Rxattrwalk is a xattrwalk response.
Server is a 9p2000.L server.
SetAttr specifies a set of attributes for a setattr.
SetAttrMask specifies a valid mask for setattr.
Tallocate is an allocate request.
Tattach is an attach request.
Tauth is an authentication request.
Tbind is a bind request.
Tchannel creates a new channel.
Tclunk is a close request.
Tflush is a flush request.
Tflushf is a flush file request, not to be confused with Tflush.
Tfsync is an fsync request.
Tgetattr is a getattr request.
Tgetxattr is a getxattr request.
Tlconnect is a connect request.
Tlcreate is a create request.
Tlink is a link request.
Tlistxattr is a listxattr request.
Tlopen is an open request.
Tmkdir is a mkdir request.
Tmknod is a mknod request.
Tmultigetattr is a multi-getattr request.
Tread is a read request.
Treaddir is a readdir request.
Treadlink is a readlink request.
Tremove is a remove request.
Tremovexattr is a removexattr request.
Trename is a rename request.
Trenameat is a rename request.
Tsetattr is a setattr request.
Tsetattrclunk is a setattr+close request.
Tsetxattr sets extended attributes.
Tstatfs is a stat request.
Tsymlink is a symlink request.
Tucreate is a Tlcreate message that includes a UID.
Tumkdir is a Tmkdir message that includes a UID.
Tumknod is a Tmknod message that includes a UID.
Tunlinkat is an unlink request.
Tusymlink is a Tsymlink message that includes a UID.
Tversion is a version request.
Twalk is a walk request.
Twalkgetattr is a walk request.
Twrite is a write request.
Txattrcreate prepare to set extended attributes.
Txattrwalk walks extended attributes.

# Interfaces

Attacher is provided by the server.
File is a set of operations corresponding to a single node.

# Type aliases

FID is a file identifier.
FileMode are flags corresponding to file modes.
GID represents a group ID.
MsgType is a type identifier.
OpenFlags is the mode passed to Open and Create operations.
QIDType represents the file type for QIDs.
SocketType is the socket type passed in Connect and Bind operations.
Tag is a message tag.
UID represents a user ID.