nbd_connection_state3
Return string describing the state of the connection
Usage
#include <libnbd.h>const char * nbd_connection_state (struct nbd_handle *h);
Overview
Returns a descriptive string for the state of the connection. This can be used for debugging or troubleshooting, but you should not rely on the state of connections since it may change in future versions.
Return value
This call returns a statically allocated string, valid for the lifetime of the process or until libnbd is unloaded by dlclose(3). You must not try to free the string.
Errors
On error "NULL" is returned.
Refer to "ERROR HANDLING" in libnbd(3) for how to get further details of the error.
The following parameters must not be NULL: "h". For more information see "Non-NULL parameters" in libnbd(3).
Version
This function first appeared in libnbd 1.0.
If you need to test if this function is available at compile time check if the following macro is defined:
#define LIBNBD_HAVE_NBD_CONNECTION_STATE 1
Releases
4 releases since Debian 11 (Bullseye); the text changed 3 times.