nbd_aio_opt_extended_headers(3)
๐ธ NAME ๐ธ
nbd_aio_opt_extended_headers(3) from the LIBNBD manual โ bestie, this one is literally โrequest the server to enable extended headers.โ Thatโs the whole assignment. ๐
โจ SYNOPSIS โจ
#include <libnbd.h>
typedef struct {
int (*callback) (void *user_data, int *error);
void *user_data;
void (*free) (void *user_data);
} nbd_completion_callback;
int nbd_aio_opt_extended_headers (
struct nbd_handle *h,
nbd_completion_callback completion_callback
);
๐ฆ DESCRIPTION ๐ฆ
Okay so hereโs the vibe: youโre requesting that the server use extended headers by sending NBD_OPT_EXTENDED_HEADERS. This behaves like the synchronous counterpart nbd_opt_extended_headers(3), except that it does not wait for the serverโs response. No cap.
To determine when the request completes, wait for nbd_aio_is_connecting(3) to return false. Or supply the optional completion_callback, which will be invoked as described in โCompletion callbacksโ in libnbd(3), except that it is automatically retired regardless of return value. Lowkey important: detecting whether the server returns an error (as is done by the return value of the synchronous counterpart) is only possible with a completion callback.
๐ RETURN VALUE ๐
If the call is successful the function returns 0. Slay. โจ
๐ ERRORS ๐
On error -1 is returned. Oof.
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).
๐ HANDLE STATE ๐
nbd_aio_opt_extended_headers can be called when the handle is in the following state:
- Handle created, before connecting โ โ error
- Connecting โ โ error
- Connecting & handshaking (
opt_mode) โ โ allowed - Connected to the server โ โ error
- Connection shut down โ โ error
- Handle dead โ โ error
โญ VERSION โญ
This function first appeared in libnbd 1.18.
If you need to test if this function is available at compile time check if the following macro is defined:
#define LIBNBD_HAVE_NBD_AIO_OPT_EXTENDED_HEADERS 1
๐ SEE ALSO ๐
๐ซถ AUTHORS ๐ซถ
- Eric Blake
- Richard W.M. Jones
๐ COPYRIGHT ๐
Copyright Red Hat
๐ LICENSE ๐
legal bestie moment โ hereโs the exact tea:
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
xoxo, your terminal bestie โ this page is from libnbd-1.25.8, dated 2026-10-13, and itโs all about nbd_aio_opt_extended_headers(3). ๐
โจ
๐ฆ where this page comes from
- centos-stream 10: libnbd-devel 1.25.8-1.el10 ยท LGPL-2.0-or-later AND BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms