Add .gitignore file for git.
[virt-mem.git] / lib / virt_mem.mli
1 (** Memory info for virtual domains. *)
2 (* Memory info for virtual domains.
3    (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
4    http://libvirt.org/
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *)
20
21 val register :
22   ?needs_ksyms:bool ->
23   ?needs_utsname:bool ->
24   ?needs_tasks:bool ->
25   ?needs_net_devices:bool ->
26   ?needs_everything:bool ->
27   run:(bool -> Virt_mem_types.kimage -> unit) ->
28   ?external_cmd:bool ->
29   ?extra_args:(Arg.key * Arg.spec * Arg.doc) list ->
30   ?argcheck:(bool -> unit) ->
31   string -> string -> Arg.usage_msg ->
32   unit
33   (** Tools register themselves with this call.
34
35       The required parameters are:
36       - tool name (eg. "uname")
37       - short summary
38       - full usage message
39
40       The boolean parameters specify what kernel structures the
41       tool needs before it can run.  The main program will read
42       these structures in before calling [~run].
43       - [~needs_ksyms:true] if kernel symbols are needed
44       - [~needs_utsname:true] if kernel version (utsname) is needed
45       - [~needs_tasks:true] if all task_struct (processes) are needed
46       - [~needs_net_devices:true] if all net devices are needed
47       - [~needs_everything:true] if the tool requires as much as
48       possible (but will not fail if we cannot determine everything)
49
50       The [~run] function is the tool's run function.  This function
51       is run once for each separate domain.  It may throw any exception,
52       which is printed out, but does not abort the program.  (If for
53       some reason you need to abort the whole program, call [exit].)
54
55       Pass [~external_cmd:false] if this tool doesn't have an
56       external 'virt-tool' link.
57
58       Pass [~extra_args:...] if this tool needs extra command
59       line options.
60
61       Pass [~argcheck:...] so that the tool can do any additional
62       parameter checks needed (eg. for [~extra_args]).
63   *)
64
65 val main : unit -> unit
66   (** Entry point for the combined virt-mem executable. *)