1nbd_set_private_data(3)             LIBNBD             nbd_set_private_data(3)
2
3
4

NAME

6       nbd_set_private_data - set the per-handle private data
7

SYNOPSIS

9        #include <libnbd.h>
10
11        uintptr_t nbd_set_private_data (
12                    struct nbd_handle *h, uintptr_t private_data
13                  );
14

DESCRIPTION

16       Handles contain a private data field for applications to use for any
17       purpose.
18
19       When calling libnbd from C, the type of this field is "uintptr_t" so it
20       can be used to store an unsigned integer or a pointer.
21
22       In non-C bindings it can be used to store an unsigned integer.
23
24       This function sets the value of this field and returns the old value
25       (or 0 if it was not previously set).
26

RETURN VALUE

28       This call returns a "uintptr_t".
29

ERRORS

31       This function does not fail.
32
33       The following parameters must not be NULL: "h".  For more information
34       see "Non-NULL parameters" in libnbd(3).
35

VERSION

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

SEE ALSO

45       nbd_create(3), nbd_get_private_data(3), libnbd(3).
46

AUTHORS

48       Eric Blake
49
50       Richard W.M. Jones
51
53       Copyright Red Hat
54

LICENSE

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