[Libguestfs] [PATCH libnbd discussion only 1/5] docs: Document NBD URI support.

Eric Blake eblake at redhat.com
Mon Jun 3 16:18:31 UTC 2019


On 6/3/19 10:29 AM, Richard W.M. Jones wrote:
> ---
>  docs/libnbd.pod | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/docs/libnbd.pod b/docs/libnbd.pod
> index b909833..f299ef1 100644
> --- a/docs/libnbd.pod
> +++ b/docs/libnbd.pod
> @@ -228,6 +228,8 @@ For C<nbd_connect_tcp> the third parameter is the port name or number,
>  which can either be a name from F</etc/services> or the port number as
>  a string (eg. C<"10809">).
>  
> +=head2 Connecting to a subprocess
> +
>  Some NBD servers — notably L<nbdkit(1)> with the C<-s> parameter — can
>  also accept a single NBD connection on stdin/stdout.  You can run
>  these servers as a subprocess of your main program.  This example
> @@ -237,6 +239,23 @@ as the libnbd handle is closed:
>   char *argv[] = { "nbdkit", "-s", "memory", "1G", NULL };
>   nbd_connect_command (nbd, argv);
>  
> +=head2 Connecting to a URI
> +
> +libnbd supports the NBD URI specification.
> +
> +This specification is currently evolving, and discussion about it can
> +be found on the L<NBD mailing list|https://lists.debian.org/nbd/>.  A
> +final link to the specification will be added to this documentation
> +when it is available.

Probably ought to mention nbd_supports_uri in this discussion.

> +
> +To connect to a URI via the high level API, use:
> +
> + nbd_connect_uri (nbd, "nbd://example.com/");
> +
> +This feature is implemented by calling other libnbd APIs to set up the
> +export name, TLS parameters, and finally connect over a Unix domain
> +socket or TCP.
> +
>  =head1 EXPORTS AND FLAGS
>  
>  It is possible for NBD servers to serve different content on different
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190603/41c984fd/attachment.sig>


More information about the Libguestfs mailing list