1nbd_set_uri_allow_transports(3)     LIBNBD     nbd_set_uri_allow_transports(3)
2
3
4

NAME

6       nbd_set_uri_allow_transports - set the allowed transports in NBD URIs
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_set_uri_allow_transports (
12              struct nbd_handle *h, uint32_t mask
13            );
14

DESCRIPTION

16       Set which transports are allowed to appear in NBD URIs.  The default is
17       to allow any transport.
18
19       The "mask" parameter may contain any of the following flags ORed
20       together:
21
22       "LIBNBD_ALLOW_TRANSPORT_TCP" = 0x1
23       "LIBNBD_ALLOW_TRANSPORT_UNIX" = 0x2
24       "LIBNBD_ALLOW_TRANSPORT_VSOCK" = 0x4
25
26       For convenience, the constant "LIBNBD_ALLOW_TRANSPORT_MASK" is
27       available to describe all transports recognized by this build of
28       libnbd.  A future version of the library may add new flags.
29

RETURN VALUE

31       If the call is successful the function returns 0.
32

ERRORS

34       On error -1 is returned.
35
36       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
37       of the error.
38
39       The following parameters must not be NULL: "h".  For more information
40       see "Non-NULL parameters" in libnbd(3).
41

HANDLE STATE

43       The handle must be newly created, otherwise this call will return an
44       error.
45

VERSION

47       This function first appeared in libnbd 1.2.
48
49       If you need to test if this function is available at compile time check
50       if the following macro is defined:
51
52        #define LIBNBD_HAVE_NBD_SET_URI_ALLOW_TRANSPORTS 1
53

SEE ALSO

55       nbd_connect_uri(3), nbd_create(3), nbd_set_uri_allow_tls(3), libnbd(3).
56

AUTHORS

58       Eric Blake
59
60       Richard W.M. Jones
61
63       Copyright Red Hat
64

LICENSE

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