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
43       The following parameters must not be NULL: "h".  For more information
44       see "Non-NULL parameters" in libnbd(3).
45

HANDLE STATE

47       The handle must be negotiating, otherwise this call will return an
48       error.
49

VERSION

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

SEE ALSO

59       nbd_aio_is_connecting(3), nbd_connect_uri(3), nbd_create(3),
60       nbd_is_read_only(3), nbd_opt_info(3), nbd_set_export_name(3),
61       nbd_set_opt_mode(3), libnbd(3).
62

AUTHORS

64       Eric Blake
65
66       Richard W.M. Jones
67
69       Copyright (C) 2019-2021 Red Hat Inc.
70

LICENSE

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