package nbd

  1. Overview
  2. Docs

Types representing NBD protocol requests and responses.

module Error : sig ... end

Read and write requests can fail with an error response.

module Command : sig ... end

Once a connection has been established, the client can submit commands.

module PerExportFlag : sig ... end

Every disk (or 'export') has a number of associated flags. This will be returned from the server when the negotiation is complete.

module GlobalFlag : sig ... end

During the protocol negotiation there are some defined flags used to choose protocol variants. These flags are sent by the server.

module ClientFlag : sig ... end

During the protocol negotiation there are some defined flags used to choose protocol variants. These flags are sent by the client.

module Option : sig ... end

In the 'newstyle' negotiation there is an opportunity for the client to negotiate options with the server. These are the known options.

module OptionResponse : sig ... end

When the client sends an option request, the server must reply.

module Announcement : sig ... end

The server sends an initial greeting when the connectino is opened. It can be of two main types: the original V1 and a 'newstyle' V2.

module Negotiate : sig ... end

The initial greeting sent by the server

module NegotiateResponse : sig ... end

The client's initial response to the server's greeting

module OptionRequestHeader : sig ... end

Every option the client requests has the same header.

module ExportName : sig ... end

An ExportName option payload

module DiskInfo : sig ... end

Details about the export chosen by the client, sent in response to an ExportName option.

module OptionResponseHeader : sig ... end

The server sends a response to every option request sent by the client (except ExportName which is followed by a DiskInfo. This is the header of the response.

module Server : sig ... end

In response to a List option, the server sends a number of Server responses and then finally an Ack

module Request : sig ... end

After the negotation phase, clients send I/O requests to the server.

module Reply : sig ... end

A reply sent from the server in response to a Request. Note these arrive out-of-order.

OCaml

Innovation. Community. Security.