1nbd_set_export_name(3)              LIBNBD              nbd_set_export_name(3)
2
3
4

NAME

6       nbd_set_export_name - set the export name
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_set_export_name (struct nbd_handle *h,
12                                 const char *export_name);
13

DESCRIPTION

15       For servers which require an export name or can serve different content
16       on different exports, set the "export_name" to connect to.  The default
17       is the empty string "".
18
19       This is only relevant when connecting to servers using the newstyle
20       protocol as the oldstyle protocol did not support export names.  The
21       NBD protocol limits export names to 4096 bytes, but servers may not
22       support the full length.  The encoding of export names is always UTF-8.
23
24       This call may be skipped if using nbd_connect_uri(3) to connect to a
25       URI that includes an export name.
26

RETURN VALUE

28       If the call is successful the function returns 0.
29

ERRORS

31       On error "-1" is returned.
32
33       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
34       of the error.
35

HANDLE STATE

37       The handle must be newly created, otherwise this call will return an
38       error.
39

VERSION

41       This function first appeared in libnbd 1.0.
42
43       If you need to test if this function is available at compile time check
44       if the following macro is defined:
45
46        #define LIBNBD_HAVE_NBD_SET_EXPORT_NAME 1
47

SEE ALSO

49       nbd_connect_uri(3), nbd_create(3), nbd_get_export_name(3), libnbd(3).
50

AUTHORS

52       Eric Blake
53
54       Richard W.M. Jones
55
57       Copyright (C) 2019 Red Hat Inc.
58

LICENSE

60       This library is free software; you can redistribute it and/or modify it
61       under the terms of the GNU Lesser General Public License as published
62       by the Free Software Foundation; either version 2 of the License, or
63       (at your option) any later version.
64
65       This library is distributed in the hope that it will be useful, but
66       WITHOUT ANY WARRANTY; without even the implied warranty of
67       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
68       Lesser General Public License for more details.
69
70       You should have received a copy of the GNU Lesser General Public
71       License along with this library; if not, write to the Free Software
72       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
73       02110-1301 USA
74
75
76
77libnbd-1.3.7                      2020-04-23            nbd_set_export_name(3)
Impressum