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

DESCRIPTION

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

RETURN VALUE

35       If the call is successful the function returns 0.
36

ERRORS

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

HANDLE STATE

44       The handle must be negotiating, otherwise this call will return an
45       error.
46

VERSION

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

SEE ALSO

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

AUTHORS

61       Eric Blake
62
63       Richard W.M. Jones
64
66       Copyright (C) 2019-2021 Red Hat Inc.
67

LICENSE

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.7.12                     2021-05-29               nbd_aio_opt_info(3)
Impressum