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.errorcodes.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 optiontype opcode =
| |
RRQ |
(* |
read request
| *) |
| |
WRQ |
(* |
write request
| *) |
| |
DATA |
(* |
data block
| *) |
| |
ACK |
(* |
acknowledgement
| *) |
| |
ERROR |
(* |
error indication
| *) |
Wire.opcodes.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 optionWire.opcode.RRQ/Wire.opcode.WRQval 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 -> unitWire.opcode.DATA/Wire.opcode.ACKval 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 -> unitWire.opcode.ERRORval 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 -> unitval string0 : Cstruct.t -> string * Cstruct.tstring0 buf extracts a NUL terminated ASCII string from buf, shifts
buf past it, and returns the pair.