type t
val size : t -> int
The size of this message in bytes. It is identical to the length of the underlying I/O vector but is also encoded in the first 4 bytes of the message.
val code : int
The op code for this message.
val tag : t -> Tag.t
An identifier for this transaction. All in-flight requests on a given connection must have unique tags.
val of_iovec : Iovec.t -> t
of_iovec
verifies a message from an I/O vector. No copying is done, and of_iovec
only performs bounds checks. Modifying the underlying I/O vector will change the results when accessing message fields.
val fid : t -> Fid.t
fid
is the file handle to be associated with the root of the file system.
val afid : t -> Fid.t
afid
is the identifier for the authentication file used to verify this user's identity. If the client elects not to authenticate, afid will be equal to Fid.nofid
.
val uname : t -> string
uname
is the name of the user attaching to the file system.
val aname : t -> string
aname
is the name of the root file system to attach to.
val n_uname : t -> int
9P2000.u: the numeric id of the user, or -1 if not provided.
val write : Iovec.t -> tag:Tag.t -> fid:Fid.t -> afid:Fid.t -> uname:string -> aname:string -> int
write iov
writes a Tattach message to iov
.
val write_ext : Iovec.t -> tag:Tag.t -> fid:Fid.t -> afid:Fid.t -> uname:string -> aname:string -> n_uname:int -> int
write_ext iov
writes a Tattach message with the 9P2000.u numeric user id extension to iov
.