Module Proto.Tauth

A Tauth request establishes a channel to authenticate a user.

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 afid : t -> Fid.t

Handle for the authentication file. After the auth request is complete, the client can use normal read and write requests on this file to complete any authentication protocol that the server supports.

val uname : t -> string

The name of the authenticating user.

val aname : t -> string

The name of the file system root the user wants to attach to. It may be empty.

val n_uname : t -> int

9P2000.u: The numeric id for the user, or -1 if not provided.

val write : Iovec.t -> tag:Tag.t -> afid:Fid.t -> uname:string -> aname:string -> int

write iov writes a new Tauth message to iov.

val write_ext : Iovec.t -> tag:Tag.t -> afid:Fid.t -> uname:string -> aname:string -> n_uname:int -> int

write_ext iov writes a Tauth message with the 9P2000.u extension for a numeric user ID.