1nbd_aio_opt_abort(3) LIBNBD nbd_aio_opt_abort(3)
2
3
4
6 nbd_aio_opt_abort - end negotiation and close the connection
7
9 #include <libnbd.h>
10
11 int nbd_aio_opt_abort (
12 struct nbd_handle *h
13 );
14
16 Request that the server finish negotiation, gracefully if possible,
17 then close the connection. This can only be used if
18 nbd_set_opt_mode(3) enabled option mode.
19
20 To determine when the request completes, wait for
21 nbd_aio_is_connecting(3) to return false.
22
24 If the call is successful the function returns 0.
25
27 On error -1 is returned.
28
29 Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
30 of the error.
31
32 The following parameters must not be NULL: "h". For more information
33 see "Non-NULL parameters" in libnbd(3).
34
36 The handle must be negotiating, otherwise this call will return an
37 error.
38
40 This function first appeared in libnbd 1.4.
41
42 If you need to test if this function is available at compile time check
43 if the following macro is defined:
44
45 #define LIBNBD_HAVE_NBD_AIO_OPT_ABORT 1
46
48 nbd_aio_is_connecting(3), nbd_create(3), nbd_opt_abort(3),
49 nbd_set_opt_mode(3), libnbd(3).
50
52 Eric Blake
53
54 Richard W.M. Jones
55
57 Copyright Red Hat
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.16.5 2023-09-26 nbd_aio_opt_abort(3)