1nbd_get_meta_context(3)             LIBNBD             nbd_get_meta_context(3)
2
3
4

NAME

6       nbd_get_meta_context - return the i'th meta context request
7

SYNOPSIS

9        #include <libnbd.h>
10
11        char * nbd_get_meta_context (struct nbd_handle *h,
12                                     size_t i);
13

DESCRIPTION

15       During connection libnbd can negotiate zero or more metadata contexts
16       with the server.  Metadata contexts are features (such as
17       "base:allocation") which describe information returned by the
18       nbd_block_status(3) command (for "base:allocation" this is whether
19       blocks of data are allocated, zero or sparse).
20
21       This command returns the i'th meta context request, as added by
22       nbd_add_meta_context(3), and bounded by nbd_get_nr_meta_contexts(3).
23

RETURN VALUE

25       This call returns a string.  The caller must free the returned string
26       to avoid a memory leak.
27

ERRORS

29       On error "NULL" is returned.
30
31       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
32       of the error.
33
34       The following parameters must not be NULL: "h".  For more information
35       see "Non-NULL parameters" in libnbd(3).
36

VERSION

38       This function first appeared in libnbd 1.6.
39
40       If you need to test if this function is available at compile time check
41       if the following macro is defined:
42
43        #define LIBNBD_HAVE_NBD_GET_META_CONTEXT 1
44

SEE ALSO

46       nbd_add_meta_context(3), nbd_block_status(3), nbd_can_meta_context(3),
47       nbd_clear_meta_contexts(3), nbd_create(3), nbd_get_nr_meta_contexts(3),
48       libnbd(3).
49

AUTHORS

51       Eric Blake
52
53       Richard W.M. Jones
54
56       Copyright (C) 2019-2021 Red Hat Inc.
57

LICENSE

59       This library is free software; you can redistribute it and/or modify it
60       under the terms of the GNU Lesser General Public License as published
61       by the Free Software Foundation; either version 2 of the License, or
62       (at your option) any later version.
63
64       This library is distributed in the hope that it will be useful, but
65       WITHOUT ANY WARRANTY; without even the implied warranty of
66       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
67       Lesser General Public License for more details.
68
69       You should have received a copy of the GNU Lesser General Public
70       License along with this library; if not, write to the Free Software
71       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
72       02110-1301 USA
73
74
75
76libnbd-1.14.2                     2023-01-03           nbd_get_meta_context(3)
Impressum