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.

val sexp_of_v1 : v1 -> Sexplib0.Sexp.t
val v1_of_sexp : Sexplib0.Sexp.t -> v1
type v2 = GlobalFlag.t list

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

val sexp_of_v2 : v2 -> Sexplib0.Sexp.t
val v2_of_sexp : Sexplib0.Sexp.t -> v2
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 -> (t, exn) Result.result
OCaml

Innovation. Community. Security.