package vhd-format

  1. Overview
  2. Docs
type t = {
  1. table_offset : int64;
    (*

    absolute byte offset of the BAT

    *)
  2. max_table_entries : int;
    (*

    the maximum number of blocks

    *)
  3. block_size_sectors_shift : int;
    (*

    each block is 2 ** block_size_sectors_shift sectors in size

    *)
  4. checksum : int32;
    (*

    ones-complement checksum of the header

    *)
  5. parent_unique_id : Uuidm.t;
    (*

    if a differencing disk, this is the 128-bit UUID of the parent

    *)
  6. parent_time_stamp : int32;
    (*

    modification time stamp of the parent disk, as seconds since midnight Jan 1 2000

    *)
  7. parent_unicode_name : int array;
    (*

    parent disk filename

    *)
  8. parent_locators : Parent_locator.t array;
    (*

    up to 8 different pointers to the parent disk image

    *)
}
val create : table_offset:int64 -> current_size:int64 -> ?block_size_sectors_shift:int -> ?checksum:int32 -> ?parent_unique_id:Uuidm.t -> ?parent_time_stamp:int32 -> ?parent_unicode_name:int array -> ?parent_locators:Parent_locator.t array -> unit -> t
val equal : t -> t -> bool
val to_string : t -> string
val set_parent : t -> string -> t

set_parent t new_parent updates the parent locators and unicode name

val compute_checksum : t -> int32

compute the expected checksum value

val sizeof_bitmap : t -> int
val default_block_size : int
val default_block_size_sectors_shift : int
val sizeof : int
val marshal : Cstruct.t -> t -> t
val unmarshal : Cstruct.t -> (t, exn) Pervasives.result
OCaml

Innovation. Community. Security.