Using optional fields, navigate net_device list in its various incarnations.
[virt-mem.git] / lib / virt_mem_types.mli
index a95b770..2d6e9ee 100644 (file)
@@ -75,6 +75,9 @@ type kdata = {
   tasks : Virt_mem_mmap.addr option;    (** Linked list of tasks (processes)
                                            starting at the address of
                                            init_task (swapper). *)
+  net_devices : Virt_mem_mmap.addr option; (** Linked list of net devices
+                                              starting at the address of
+                                              dev_base_head. *)
 }
   (** Optional data derived from the raw kernel image by the main
       program and passed to the tools' [~run] functions.
@@ -87,6 +90,20 @@ type kdata = {
       fields.
 *)
 
+(** {2 Kernel structure parsers} *)
+
+exception ParseError of string * string * string
+  (** Parsing exception raised by [Kernel_*] parser functions.
+
+      The fields are: structure name, function which raised the error,
+      error message. *)
+
+type fieldsig = {
+  field_available : bool; (** Field available in this kernel version? *)
+  field_offset : int;   (** Offset of field in this kernel version. *)
+}
+  (** Returned by [Kernel_*.field_signature_of_*] functions. *)
+
 (** {2 Load kernel memory} *)
 
 type load_memory_error =