1nbd_aio_opt_list_meta_context(3)    LIBNBD    nbd_aio_opt_list_meta_context(3)
2
3
4

NAME

6       nbd_aio_opt_list_meta_context - request list of available meta
7       contexts, using implicit query
8

SYNOPSIS

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 (
25              struct nbd_handle *h,
26              nbd_context_callback context_callback,
27              nbd_completion_callback completion_callback
28            );
29

DESCRIPTION

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 a list of
34       queries from prior calls to nbd_add_meta_context(3) (see
35       nbd_aio_opt_list_meta_context_queries(3) if you want to supply an
36       explicit query list instead).  This can only be used if
37       nbd_set_opt_mode(3) enabled 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

RETURN VALUE

48       This call returns an integer ≥ 0.
49

ERRORS

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".  For more information
57       see "Non-NULL parameters" in libnbd(3).
58

HANDLE STATE

60       The handle must be negotiating, otherwise this call will return an
61       error.
62

VERSION

64       This function first appeared in libnbd 1.6.
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 1
70

SEE ALSO

72       nbd_add_meta_context(3), nbd_aio_is_connecting(3),
73       nbd_aio_opt_list_meta_context_queries(3), nbd_connect_uri(3),
74       nbd_create(3), nbd_opt_list_meta_context(3), nbd_set_export_name(3),
75       nbd_set_opt_mode(3), libnbd(3).
76

AUTHORS

78       Eric Blake
79
80       Richard W.M. Jones
81
83       Copyright Red Hat
84

LICENSE

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-10-31  nbd_aio_opt_list_meta_context(3)
Impressum