1nbd_aio_opt_info(3) LIBNBD nbd_aio_opt_info(3)
2
3
4
6 nbd_aio_opt_info - request the server for information about an export
7
9 #include <libnbd.h>
10
11 typedef struct {
12 int (*callback) (void *user_data, int *error);
13 void *user_data;
14 void (*free) (void *user_data);
15 } nbd_completion_callback;
16
17 int nbd_aio_opt_info (struct nbd_handle *h,
18 nbd_completion_callback completion_callback);
19
21 Request that the server supply information about the export name
22 previously specified by the most recent nbd_set_export_name(3) or
23 nbd_connect_uri(3). This can only be used if nbd_set_opt_mode(3)
24 enabled option mode.
25
26 To determine when the request completes, wait for
27 nbd_aio_is_connecting(3) to return false. Or supply the optional
28 "completion_callback" which will be invoked as described in "Completion
29 callbacks" in libnbd(3), except that it is automatically retired
30 regardless of return value. Note that detecting whether the server
31 returns an error (as is done by the return value of the synchronous
32 counterpart) is only possible with a completion callback.
33
35 If the call is successful the function returns 0.
36
38 On error "-1" is returned.
39
40 Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
41 of the error.
42
44 The handle must be negotiating, otherwise this call will return an
45 error.
46
48 This function first appeared in libnbd 1.4.
49
50 If you need to test if this function is available at compile time check
51 if the following macro is defined:
52
53 #define LIBNBD_HAVE_NBD_AIO_OPT_INFO 1
54
56 nbd_aio_is_connecting(3), nbd_connect_uri(3), nbd_create(3),
57 nbd_is_read_only(3), nbd_opt_info(3), nbd_set_export_name(3),
58 nbd_set_opt_mode(3), libnbd(3).
59
61 Eric Blake
62
63 Richard W.M. Jones
64
66 Copyright (C) 2019-2021 Red Hat Inc.
67
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.12.5 2022-07-10 nbd_aio_opt_info(3)