package nbd

  1. Overview
  2. Docs

The initial greeting sent by the server

type v1 = {
  1. size : int64;
    (*

    The size of the disk

    *)
  2. flags : PerExportFlag.t list;
    (*

    Flags associated with the disk

    *)
}

The original V1 protocol supports only one disk.

include sig ... end
val v1_of_sexp : Sexplib.Sexp.t -> v1
val sexp_of_v1 : v1 -> Sexplib.Sexp.t
type v2 = GlobalFlag.t list

The 'newstyle' V2 protocol supports an option negotiation phase and a number of sub-options GlobalFlag.ts

include sig ... end
val v2_of_sexp : Sexplib.Sexp.t -> v2
val sexp_of_v2 : v2 -> Sexplib.Sexp.t
type t =
  1. | V1 of v1
  2. | V2 of v2
    (*

    The initial greeting sent by the server

    *)
val to_string : t -> string
val sizeof : Announcement.t -> int
val marshal : Cstruct.t -> t -> unit
val unmarshal : Cstruct.t -> Announcement.t -> [ `Ok of t | `Error of exn ]
OCaml

Innovation. Community. Security.