package nbd

  1. Overview
  2. Docs

Module Protocol.NegotiateSource

The initial greeting sent by the server

Sourcetype 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.

Sourceval sexp_of_v1 : v1 -> Sexplib0.Sexp.t
Sourceval v1_of_sexp : Sexplib0.Sexp.t -> v1
Sourcetype v2 = GlobalFlag.t list

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

Sourceval sexp_of_v2 : v2 -> Sexplib0.Sexp.t
Sourceval v2_of_sexp : Sexplib0.Sexp.t -> v2
Sourcetype t =
  1. | V1 of v1
  2. | V2 of v2
    (*

    The initial greeting sent by the server

    *)
Sourceval to_string : t -> string
Sourceval sizeof : Announcement.t -> int
Sourceval marshal : Cstruct.t -> t -> unit
Sourceval unmarshal : Cstruct.t -> Announcement.t -> (t, exn) Result.result
OCaml

Innovation. Community. Security.