1nbd_aio_opt_info(3)                 LIBNBD                 nbd_aio_opt_info(3)
2
3
4

NAME

6       nbd_aio_opt_info - request the server for information about an export
7

SYNOPSIS

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 (
18              struct nbd_handle *h,
19              nbd_completion_callback completion_callback
20            );
21

DESCRIPTION

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

RETURN VALUE

37       If the call is successful the function returns 0.
38

ERRORS

40       On error -1 is returned.
41
42       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
43       of the error.
44
45       The following parameters must not be NULL: "h".  For more information
46       see "Non-NULL parameters" in libnbd(3).
47

HANDLE STATE

49       The handle must be negotiating, otherwise this call will return an
50       error.
51

VERSION

53       This function first appeared in libnbd 1.4.
54
55       If you need to test if this function is available at compile time check
56       if the following macro is defined:
57
58        #define LIBNBD_HAVE_NBD_AIO_OPT_INFO 1
59

SEE ALSO

61       nbd_aio_is_connecting(3), nbd_connect_uri(3), nbd_create(3),
62       nbd_is_read_only(3), nbd_opt_info(3), nbd_set_export_name(3),
63       nbd_set_opt_mode(3), libnbd(3).
64

AUTHORS

66       Eric Blake
67
68       Richard W.M. Jones
69
71       Copyright Red Hat
72

LICENSE

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