1nbd_set_uri_allow_tls(3)            LIBNBD            nbd_set_uri_allow_tls(3)
2
3
4

NAME

6       nbd_set_uri_allow_tls - set the allowed TLS settings in NBD URIs
7

SYNOPSIS

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

DESCRIPTION

16       Set which TLS settings are allowed to appear in NBD URIs.  The default
17       is to allow either non-TLS or TLS URIs.
18
19       The "tls" parameter can be:
20
21       "LIBNBD_TLS_DISABLE"
22           TLS URIs are not permitted, ie. a URI such as "nbds://..."  will be
23           rejected.
24
25       "LIBNBD_TLS_ALLOW"
26           This is the default.  TLS may be used or not, depending on whether
27           the URI uses "nbds" or "nbd".
28
29       "LIBNBD_TLS_REQUIRE"
30           TLS URIs are required.  All URIs must use "nbds".
31

RETURN VALUE

33       If the call is successful the function returns 0.
34

ERRORS

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

HANDLE STATE

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

VERSION

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

SEE ALSO

57       nbd_connect_uri(3), nbd_create(3), nbd_set_uri_allow_transports(3),
58       libnbd(3).
59

AUTHORS

61       Eric Blake
62
63       Richard W.M. Jones
64
66       Copyright Red Hat
67

LICENSE

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