1nbd_aio_opt_list_meta_context_queriesL(I3Bn)NbBdD_aio_opt_list_meta_context_queries(3)
2
3
4
6 nbd_aio_opt_list_meta_context_queries - request list of available meta
7 contexts, using explicit query
8
10 #include <libnbd.h>
11
12 typedef struct {
13 int (*callback) (void *user_data, const char *name);
14 void *user_data;
15 void (*free) (void *user_data);
16 } nbd_context_callback;
17
18 typedef struct {
19 int (*callback) (void *user_data, int *error);
20 void *user_data;
21 void (*free) (void *user_data);
22 } nbd_completion_callback;
23
24 int nbd_aio_opt_list_meta_context_queries (
25 struct nbd_handle *h, char **queries,
26 nbd_context_callback context_callback,
27 nbd_completion_callback completion_callback
28 );
29
31 Request that the server list available meta contexts associated with
32 the export previously specified by the most recent
33 nbd_set_export_name(3) or nbd_connect_uri(3), and with an explicit list
34 of queries provided as a parameter (see
35 nbd_aio_opt_list_meta_context(3) if you want to reuse an implicit query
36 list instead). This can only be used if nbd_set_opt_mode(3) enabled
37 option mode.
38
39 To determine when the request completes, wait for
40 nbd_aio_is_connecting(3) to return false. Or supply the optional
41 "completion_callback" which will be invoked as described in "Completion
42 callbacks" in libnbd(3), except that it is automatically retired
43 regardless of return value. Note that detecting whether the server
44 returns an error (as is done by the return value of the synchronous
45 counterpart) is only possible with a completion callback.
46
48 This call returns an integer ≥ 0.
49
51 On error -1 is returned.
52
53 Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
54 of the error.
55
56 The following parameters must not be NULL: "h", "queries". For more
57 information see "Non-NULL parameters" in libnbd(3).
58
60 The handle must be negotiating, otherwise this call will return an
61 error.
62
64 This function first appeared in libnbd 1.16.
65
66 If you need to test if this function is available at compile time check
67 if the following macro is defined:
68
69 #define LIBNBD_HAVE_NBD_AIO_OPT_LIST_META_CONTEXT_QUERIES 1
70
72 nbd_aio_is_connecting(3), nbd_aio_opt_list_meta_context(3),
73 nbd_connect_uri(3), nbd_create(3),
74 nbd_opt_list_meta_context_queries(3), nbd_set_export_name(3),
75 nbd_set_opt_mode(3), libnbd(3).
76
78 Eric Blake
79
80 Richard W.M. Jones
81
83 Copyright Red Hat
84
86 This library is free software; you can redistribute it and/or modify it
87 under the terms of the GNU Lesser General Public License as published
88 by the Free Software Foundation; either version 2 of the License, or
89 (at your option) any later version.
90
91 This library is distributed in the hope that it will be useful, but
92 WITHOUT ANY WARRANTY; without even the implied warranty of
93 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
94 Lesser General Public License for more details.
95
96 You should have received a copy of the GNU Lesser General Public
97 License along with this library; if not, write to the Free Software
98 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
99 02110-1301 USA
100
101
102
103libnbd-1.18.1 2023-n1b0d-_3a1io_opt_list_meta_context_queries(3)