| 1 |
module Op : |
| 2 |
sig |
| 3 |
type operation = |
| 4 |
Op.operation = |
| 5 |
Debug |
| 6 |
| Directory |
| 7 |
| Read |
| 8 |
| Getperms |
| 9 |
| Watch |
| 10 |
| Unwatch |
| 11 |
| Transaction_start |
| 12 |
| Transaction_end |
| 13 |
| Introduce |
| 14 |
| Release |
| 15 |
| Getdomainpath |
| 16 |
| Write |
| 17 |
| Mkdir |
| 18 |
| Rm |
| 19 |
| Setperms |
| 20 |
| Watchevent |
| 21 |
| Error |
| 22 |
| Isintroduced |
| 23 |
| Resume |
| 24 |
| Set_target |
| 25 |
| Reset_watches |
| 26 |
| Invalid |
| 27 |
val operation_c_mapping : operation array |
| 28 |
val size : int |
| 29 |
val array_search : 'a -> 'a array -> int |
| 30 |
val of_cval : int -> operation |
| 31 |
val to_cval : operation -> int |
| 32 |
val to_string : operation -> string |
| 33 |
end |
| 34 |
module Packet : |
| 35 |
sig |
| 36 |
type t = |
| 37 |
Packet.t = { |
| 38 |
tid : int; |
| 39 |
rid : int; |
| 40 |
ty : Op.operation; |
| 41 |
data : string; |
| 42 |
} |
| 43 |
exception Error of string |
| 44 |
exception DataError of string |
| 45 |
external string_of_header : int -> int -> int -> int -> string |
| 46 |
= "stub_string_of_header" |
| 47 |
val create : int -> int -> Op.operation -> string -> t |
| 48 |
val of_partialpkt : Partial.pkt -> t |
| 49 |
val to_string : t -> string |
| 50 |
val unpack : t -> int * int * Op.operation * string |
| 51 |
val get_tid : t -> int |
| 52 |
val get_ty : t -> Op.operation |
| 53 |
val get_data : t -> string |
| 54 |
val get_rid : t -> int |
| 55 |
end |
| 56 |
exception End_of_file |
| 57 |
exception Eagain |
| 58 |
exception Noent |
| 59 |
exception Invalid |
| 60 |
exception Reconnect |
| 61 |
type backend_mmap = { |
| 62 |
mmap : Xenmmap.mmap_interface; |
| 63 |
eventchn_notify : unit -> unit; |
| 64 |
mutable work_again : bool; |
| 65 |
} |
| 66 |
type backend_fd = { fd : Unix.file_descr; } |
| 67 |
type backend = Fd of backend_fd | Xenmmap of backend_mmap |
| 68 |
type partial_buf = HaveHdr of Partial.pkt | NoHdr of int * bytes |
| 69 |
type capacity = { maxoutstanding: int; maxwatchevents: int } |
| 70 |
type t |
| 71 |
val init_partial_in : unit -> partial_buf |
| 72 |
val reconnect : t -> unit |
| 73 |
val queue : t -> Packet.t -> unit option |
| 74 |
val read_fd : backend_fd -> 'a -> bytes -> int -> int |
| 75 |
val read_mmap : backend_mmap -> 'a -> bytes -> int -> int |
| 76 |
val read : t -> bytes -> int -> int |
| 77 |
val write_fd : backend_fd -> 'a -> string -> int -> int |
| 78 |
val write_mmap : backend_mmap -> 'a -> string -> int -> int |
| 79 |
val write : t -> string -> int -> int |
| 80 |
val output : t -> bool |
| 81 |
val input : t -> Packet.t option |
| 82 |
val newcon : capacity:capacity -> backend -> t |
| 83 |
val open_fd : Unix.file_descr -> capacity:capacity -> t |
| 84 |
val open_mmap : Xenmmap.mmap_interface -> (unit -> unit) -> capacity:capacity -> t |
| 85 |
val close : t -> unit |
| 86 |
val is_fd : t -> bool |
| 87 |
val is_mmap : t -> bool |
| 88 |
val output_len : t -> int |
| 89 |
val can_input: t -> bool |
| 90 |
val has_new_output : t -> bool |
| 91 |
val has_old_output : t -> bool |
| 92 |
val has_output : t -> bool |
| 93 |
val peek_output : t -> Packet.t |
| 94 |
val has_partial_input : t -> bool |
| 95 |
val has_more_input : t -> bool |
| 96 |
val is_selectable : t -> bool |
| 97 |
val get_fd : t -> Unix.file_descr |
| 98 |
val debug: t -> string |