--- /dev/null
+(* WARNING: This file and the corresponding mli (interface) are
+ * automatically generated by the extract/codegen/kerneldb_to_parser.ml
+ * program.
+ *
+ * Any edits you make to this file will be lost.
+ *
+ * To update this file from the latest kernel database, it is recommended
+ * that you do 'make update-kernel-structs'.
+ *)
+
+let zero = 0;;
+let struct_name = "net";;
+let match_err = "failed to match kernel structure";;
+type t = { net_dev_base_head'next : Virt_mem_mmap.addr };;
+type fs_t = { __fs_net_dev_base_head'next : Virt_mem_types.fieldsig };;
+let fieldsig_1 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 64; };
+ };;
+let fieldsig_2 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 48; };
+ };;
+let fieldsig_3 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 72; };
+ };;
+let fieldsig_4 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 128; };
+ };;
+let fieldsig_5 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 48; };
+ };;
+let fieldsig_6 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 88; };
+ };;
+let fieldsig_7 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 120; };
+ };;
+let fieldsig_8 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 52; };
+ };;
+let fieldsig_9 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 96; };
+ };;
+let fieldsig_10 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 96; };
+ };;
+let fieldsig_11 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 56; };
+ };;
+let fieldsig_12 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 144; };
+ };;
+let fieldsig_13 =
+ {
+ (())
+ with
+ __fs_net_dev_base_head'next =
+ { Virt_mem_types.field_available = true; field_offset = 144; };
+ };;
+let parser_1 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+32 : offset(512), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 64L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_1", match_err));;
+let parser_2 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+32 : offset(384), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 48L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_2", match_err));;
+let parser_3 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+32 : offset(576), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 72L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_3", match_err));;
+let parser_4 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(1024), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 128L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_4", match_err));;
+let parser_5 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+32 : offset(384), bigendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 48L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_5", match_err));;
+let parser_6 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(704), bigendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 88L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_6", match_err));;
+let parser_7 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(960), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 120L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_7", match_err));;
+let parser_8 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+32 : offset(416), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 52L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_8", match_err));;
+let parser_9 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(768), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 96L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_9", match_err));;
+let parser_10 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(768), bigendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 96L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_10", match_err));;
+let parser_11 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+32 : offset(448), bigendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 56L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_11", match_err));;
+let parser_12 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(1152), bigendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 144L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_12", match_err));;
+let parser_13 bits =
+ bitmatch bits with
+ | { net_dev_base_head'next : zero+64 : offset(1152), littleendian } ->
+ { net_dev_base_head'next = Int64.sub net_dev_base_head'next 144L }
+ | { _ } ->
+ raise (Virt_mem_types.ParseError (struct_name, "parser_13", match_err));;
+module StringMap = Map.Make(String);;
+let map = StringMap.empty;;
+let v = (parser_1, 732, fieldsig_1);;
+let map = StringMap.add "2.6.26.2-2.fc8.i686" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.i686" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-7.fc9.i686" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-9.fc9.i686" v map;;
+let v = (parser_2, 660, fieldsig_2);;
+let map = StringMap.add "2.6.26.2-2.fc8.i686" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.231.rc1.git6.fc10.i686" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.i686" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.i686" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.i686" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.i686" v map;;
+let v = (parser_1, 732, fieldsig_1);;
+let map = StringMap.add "2.6.26.2-2.fc8.i686" v map;;
+let v = (parser_4, 1352, fieldsig_4);;
+let map = StringMap.add "2.6.26.2-2.fc8.x86_64" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.i586" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.i686" v map;;
+let v = (parser_5, 64, fieldsig_5);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.ppc" v map;;
+let v = (parser_6, 120, fieldsig_6);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.ppc64" v map;;
+let v = (parser_7, 152, fieldsig_7);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.x86_64" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-7.fc9.i586" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-7.fc9.i686" v map;;
+let v = (parser_5, 64, fieldsig_5);;
+let map = StringMap.add "2.6.24-7.fc9.ppc" v map;;
+let v = (parser_6, 120, fieldsig_6);;
+let map = StringMap.add "2.6.24-7.fc9.ppc64" v map;;
+let v = (parser_7, 152, fieldsig_7);;
+let map = StringMap.add "2.6.24-7.fc9.x86_64" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-9.fc9.i586" v map;;
+let v = (parser_1, 80, fieldsig_1);;
+let map = StringMap.add "2.6.24-9.fc9.i686" v map;;
+let v = (parser_5, 64, fieldsig_5);;
+let map = StringMap.add "2.6.24-9.fc9.ppc" v map;;
+let v = (parser_6, 120, fieldsig_6);;
+let map = StringMap.add "2.6.24-9.fc9.ppc64" v map;;
+let v = (parser_7, 152, fieldsig_7);;
+let map = StringMap.add "2.6.24-9.fc9.x86_64" v map;;
+let v = (parser_8, 284, fieldsig_8);;
+let map = StringMap.add "2.6.25.11-97.fc9.i686" v map;;
+let v = (parser_9, 488, fieldsig_9);;
+let map = StringMap.add "2.6.25.11-97.fc9.x86_64" v map;;
+let v = (parser_2, 660, fieldsig_2);;
+let map = StringMap.add "2.6.26.2-2.fc8.i586" v map;;
+let v = (parser_2, 660, fieldsig_2);;
+let map = StringMap.add "2.6.26.2-2.fc8.i686" v map;;
+let v = (parser_5, 652, fieldsig_5);;
+let map = StringMap.add "2.6.26.2-2.fc8.ppc" v map;;
+let v = (parser_10, 1224, fieldsig_10);;
+let map = StringMap.add "2.6.26.2-2.fc8.ppc64" v map;;
+let v = (parser_9, 1224, fieldsig_9);;
+let map = StringMap.add "2.6.26.2-2.fc8.x86_64" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.231.rc1.git6.fc10.i686" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.i586" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.i686" v map;;
+let v = (parser_11, 860, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.ppc" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.ppc64" v map;;
+let v = (parser_13, 1680, fieldsig_13);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.x86_64" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.i586" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.i686" v map;;
+let v = (parser_11, 860, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.ppc" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.ppc64" v map;;
+let v = (parser_13, 1680, fieldsig_13);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.x86_64" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.i586" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.i686" v map;;
+let v = (parser_11, 860, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.ppc" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.ppc64" v map;;
+let v = (parser_13, 1680, fieldsig_13);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.x86_64" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.i586" v map;;
+let v = (parser_3, 912, fieldsig_3);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.i686" v map;;
+let v = (parser_11, 860, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.ppc" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.ppc64" v map;;
+let v = (parser_13, 1680, fieldsig_13);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.x86_64" v map;;
+let v = (parser_6, 120, fieldsig_6);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.ppc64" v map;;
+let v = (parser_6, 120, fieldsig_6);;
+let map = StringMap.add "2.6.24-7.fc9.ppc64" v map;;
+let v = (parser_6, 120, fieldsig_6);;
+let map = StringMap.add "2.6.24-9.fc9.ppc64" v map;;
+let v = (parser_10, 1224, fieldsig_10);;
+let map = StringMap.add "2.6.26.2-2.fc8.ppc64" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.231.rc1.git6.fc10.ppc64" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.ppc64" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.ppc64" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.ppc64" v map;;
+let v = (parser_12, 1680, fieldsig_12);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.ppc64" v map;;
+let v = (parser_5, 64, fieldsig_5);;
+let map = StringMap.add "2.6.24-0.167.rc8.git4.fc9.ppc" v map;;
+let v = (parser_5, 64, fieldsig_5);;
+let map = StringMap.add "2.6.24-7.fc9.ppc" v map;;
+let v = (parser_5, 64, fieldsig_5);;
+let map = StringMap.add "2.6.24-9.fc9.ppc" v map;;
+let v = (parser_5, 660, fieldsig_5);;
+let map = StringMap.add "2.6.26.2-2.fc8.ppc" v map;;
+let v = (parser_11, 864, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.237.rc2.fc10.ppc" v map;;
+let v = (parser_11, 864, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.238.rc2.fc10.ppc" v map;;
+let v = (parser_11, 864, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.241.rc2.git1.fc10.ppc" v map;;
+let v = (parser_11, 864, fieldsig_11);;
+let map = StringMap.add "2.6.27-0.244.rc2.git1.fc10.ppc" v map;;
+type kernel_version = string;;
+let net_known version = StringMap.mem version map;;
+let net_size version =
+ let (_, size, _) = StringMap.find version map in size;;
+let net_of_bits version bits =
+ let (parsefn, _, _) = StringMap.find version map in parsefn bits;;
+let get_net version mem addr =
+ let (parsefn, size, _) = StringMap.find version map in
+ let bytes = Virt_mem_mmap.get_bytes mem addr size in
+ let bits = Bitstring.bitstring_of_string bytes in parsefn bits;;
+let field_signature_of_net_dev_base_head'next version =
+ let (_, _, fs) = StringMap.find version map
+ in fs.__fs_net_dev_base_head'next;;