module Wire:sig
..end
type
errorcode =
| |
UNDEFINED |
(* |
operation undefined, e.g., couldn't create
TID | *) |
| |
FILE_NOT_FOUND |
(* |
file not found in store
| *) |
| |
ACCESS_VIOLATION |
|||
| |
DISK_FULL |
|||
| |
ILLEGAL_OP |
(* |
unsupported operation, e.g., unsupported
mode | *) |
| |
UNKNOWN_TID |
|||
| |
FILE_EXISTS |
|||
| |
UNKNOWN_USER |
Wire.errorcode
s.val int_to_errorcode : int -> errorcode option
val errorcode_to_int : errorcode -> int
val errorcode_to_string : errorcode -> string
val string_to_errorcode : string -> errorcode option
type
opcode =
| |
RRQ |
(* |
read request
| *) |
| |
WRQ |
(* |
write request
| *) |
| |
DATA |
(* |
data block
| *) |
| |
ACK |
(* |
acknowledgement
| *) |
| |
ERROR |
(* |
error indication
| *) |
Wire.opcode
s.val int_to_opcode : int -> opcode option
val opcode_to_int : opcode -> int
val opcode_to_string : opcode -> string
val string_to_opcode : string -> opcode option
Wire.opcode.RRQ
/Wire.opcode.WRQ
val sizeof_hreq : int
val get_hreq_opcode : Cstruct.t -> Cstruct.uint16
val set_hreq_opcode : Cstruct.t -> Cstruct.uint16 -> unit
val hexdump_hreq_to_buffer : Buffer.t -> Cstruct.t -> unit
val hexdump_hreq : Cstruct.t -> unit
Wire.opcode.DATA
/Wire.opcode.ACK
val sizeof_hdat : int
val get_hdat_opcode : Cstruct.t -> Cstruct.uint16
val set_hdat_opcode : Cstruct.t -> Cstruct.uint16 -> unit
val get_hdat_blockno : Cstruct.t -> Cstruct.uint16
val set_hdat_blockno : Cstruct.t -> Cstruct.uint16 -> unit
val hexdump_hdat_to_buffer : Buffer.t -> Cstruct.t -> unit
val hexdump_hdat : Cstruct.t -> unit
Wire.opcode.ERROR
val sizeof_herr : int
val get_herr_opcode : Cstruct.t -> Cstruct.uint16
val set_herr_opcode : Cstruct.t -> Cstruct.uint16 -> unit
val get_herr_errorcode : Cstruct.t -> Cstruct.uint16
val set_herr_errorcode : Cstruct.t -> Cstruct.uint16 -> unit
val hexdump_herr_to_buffer : Buffer.t -> Cstruct.t -> unit
val hexdump_herr : Cstruct.t -> unit
val string0 : Cstruct.t -> string * Cstruct.t
string0 buf
extracts a NUL
terminated ASCII string from buf
, shifts
buf
past it, and returns the pair.