1nbd_set_request_structured_replies(3)LIBNBDnbd_set_request_structured_replies(3)
2
3
4
6 nbd_set_request_structured_replies - control use of structured replies
7
9 #include <libnbd.h>
10
11 int nbd_set_request_structured_replies (struct nbd_handle *h,
12 bool request);
13
15 By default, libnbd tries to negotiate structured replies with the
16 server, as this protocol extension must be in use before
17 nbd_can_meta_context(3) or nbd_can_df(3) can return true. However, for
18 integration testing, it can be useful to clear this flag rather than
19 find a way to alter the server to fail the negotiation request.
20
22 If the call is successful the function returns 0.
23
25 On error "-1" is returned.
26
27 Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
28 of the error.
29
30 The following parameters must not be NULL: "h". For more information
31 see "Non-NULL parameters" in libnbd(3).
32
34 The handle must be newly created, otherwise this call will return an
35 error.
36
38 This function first appeared in libnbd 1.2.
39
40 If you need to test if this function is available at compile time check
41 if the following macro is defined:
42
43 #define LIBNBD_HAVE_NBD_SET_REQUEST_STRUCTURED_REPLIES 1
44
46 nbd_can_df(3), nbd_can_meta_context(3), nbd_create(3),
47 nbd_get_request_structured_replies(3),
48 nbd_get_structured_replies_negotiated(3), nbd_set_handshake_flags(3),
49 nbd_set_strict_mode(3), libnbd(3).
50
52 Eric Blake
53
54 Richard W.M. Jones
55
57 Copyright (C) 2019-2021 Red Hat Inc.
58
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.14.2 2023-01-n0b3d_set_request_structured_replies(3)