1nbd_get_structured_replies_negotiatedL(I3Bn)NbBdD_get_structured_replies_negotiated(3)
2
3
4
6 nbd_get_structured_replies_negotiated - see if structured replies are
7 in use
8
10 #include <libnbd.h>
11
12 int nbd_get_structured_replies_negotiated (
13 struct nbd_handle *h
14 );
15
17 After connecting you may call this to find out if the connection is
18 using structured replies. Note that this setting is sticky; this can
19 return true even after a second nbd_opt_structured_reply(3) returns
20 false because the server detected a duplicate request.
21
22 Note that if the connection negotiates extended headers, this function
23 returns true (as extended headers imply structured replies) even if no
24 explicit request for structured replies was attempted.
25
27 This call returns a boolean value.
28
30 On error -1 is returned.
31
32 Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
33 of the error.
34
35 The following parameters must not be NULL: "h". For more information
36 see "Non-NULL parameters" in libnbd(3).
37
39 The handle must be negotiating, or connected with the server, or shut
40 down, otherwise this call will return an error.
41
43 This function first appeared in libnbd 1.2.
44
45 If you need to test if this function is available at compile time check
46 if the following macro is defined:
47
48 #define LIBNBD_HAVE_NBD_GET_STRUCTURED_REPLIES_NEGOTIATED 1
49
51 nbd_create(3), nbd_get_extended_headers_negotiated(3),
52 nbd_get_protocol(3), nbd_get_request_structured_replies(3),
53 nbd_opt_extended_headers(3), nbd_opt_structured_reply(3),
54 nbd_set_request_structured_replies(3), libnbd(3).
55
57 Eric Blake
58
59 Richard W.M. Jones
60
62 Copyright Red Hat
63
65 This library is free software; you can redistribute it and/or modify it
66 under the terms of the GNU Lesser General Public License as published
67 by the Free Software Foundation; either version 2 of the License, or
68 (at your option) any later version.
69
70 This library is distributed in the hope that it will be useful, but
71 WITHOUT ANY WARRANTY; without even the implied warranty of
72 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73 Lesser General Public License for more details.
74
75 You should have received a copy of the GNU Lesser General Public
76 License along with this library; if not, write to the Free Software
77 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
78 02110-1301 USA
79
80
81
82libnbd-1.18.1 2023-n1b0d-_3g1et_structured_replies_negotiated(3)