1nbd_connection_state(3) LIBNBD nbd_connection_state(3)
2
3
4
6 nbd_connection_state - return string describing the state of the
7 connection
8
10 #include <libnbd.h>
11
12 const char * nbd_connection_state (
13 struct nbd_handle *h
14 );
15
17 Returns a descriptive string for the state of the connection. This can
18 be used for debugging or troubleshooting, but you should not rely on
19 the state of connections since it may change in future versions.
20
22 This call returns a statically allocated string, valid for the lifetime
23 of the process or until libnbd is unloaded by dlclose(3). You must not
24 try to free the string.
25
27 On error "NULL" is returned.
28
29 Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
30 of the error.
31
32 The following parameters must not be NULL: "h". For more information
33 see "Non-NULL parameters" in libnbd(3).
34
36 This function first appeared in libnbd 1.0.
37
38 If you need to test if this function is available at compile time check
39 if the following macro is defined:
40
41 #define LIBNBD_HAVE_NBD_CONNECTION_STATE 1
42
44 nbd_create(3), libnbd(3).
45
47 Eric Blake
48
49 Richard W.M. Jones
50
52 Copyright Red Hat
53
55 This library is free software; you can redistribute it and/or modify it
56 under the terms of the GNU Lesser General Public License as published
57 by the Free Software Foundation; either version 2 of the License, or
58 (at your option) any later version.
59
60 This library is distributed in the hope that it will be useful, but
61 WITHOUT ANY WARRANTY; without even the implied warranty of
62 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
63 Lesser General Public License for more details.
64
65 You should have received a copy of the GNU Lesser General Public
66 License along with this library; if not, write to the Free Software
67 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
68 02110-1301 USA
69
70
71
72libnbd-1.16.5 2023-09-26 nbd_connection_state(3)