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 the server to list available
7       meta contexts
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 (struct nbd_handle *h,
25                                           nbd_context_callback context_callback,
26                                           nbd_completion_callback completion_callback);
27

DESCRIPTION

29       Request that the server list available meta contexts associated with
30       the export previously specified by the most recent
31       nbd_set_export_name(3) or nbd_connect_uri(3).  This can only be used if
32       nbd_set_opt_mode(3) enabled option mode.
33
34       To determine when the request completes, wait for
35       nbd_aio_is_connecting(3) to return false.  Or supply the optional
36       "completion_callback" which will be invoked as described in "Completion
37       callbacks" in libnbd(3), except that it is automatically retired
38       regardless of return value.  Note that detecting whether the server
39       returns an error (as is done by the return value of the synchronous
40       counterpart) is only possible with a completion callback.
41

RETURN VALUE

43       This call returns an integer ≥ 0.
44

ERRORS

46       On error "-1" is returned.
47
48       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
49       of the error.
50
51       The following parameters must not be NULL: "h".  For more information
52       see "Non-NULL parameters" in libnbd(3).
53

HANDLE STATE

55       The handle must be negotiating, otherwise this call will return an
56       error.
57

VERSION

59       This function first appeared in libnbd 1.6.
60
61       If you need to test if this function is available at compile time check
62       if the following macro is defined:
63
64        #define LIBNBD_HAVE_NBD_AIO_OPT_LIST_META_CONTEXT 1
65

SEE ALSO

67       nbd_aio_is_connecting(3), nbd_connect_uri(3), nbd_create(3),
68       nbd_opt_list_meta_context(3), nbd_set_export_name(3),
69       nbd_set_opt_mode(3), libnbd(3).
70

AUTHORS

72       Eric Blake
73
74       Richard W.M. Jones
75
77       Copyright (C) 2019-2021 Red Hat Inc.
78

LICENSE

80       This library is free software; you can redistribute it and/or modify it
81       under the terms of the GNU Lesser General Public License as published
82       by the Free Software Foundation; either version 2 of the License, or
83       (at your option) any later version.
84
85       This library is distributed in the hope that it will be useful, but
86       WITHOUT ANY WARRANTY; without even the implied warranty of
87       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
88       Lesser General Public License for more details.
89
90       You should have received a copy of the GNU Lesser General Public
91       License along with this library; if not, write to the Free Software
92       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
93       02110-1301 USA
94
95
96
97libnbd-1.14.2                     2023-01-03  nbd_aio_opt_list_meta_context(3)
Impressum