nbd_get_tls(3)

πŸ’… nbd_get_tls β€” get the TLS request setting

okay so bestie, welcome to a page from the libnbd manual (yes, that libnbd, the one you keep hearing about πŸ¦‹) and it's literally about reading back your TLS request setting. tiny function, big slay.


✨ SYNOPSIS ✨

like, here's the whole vibe:

#include <libnbd.h>

int nbd_get_tls (
      struct nbd_handle *h
    );

that's it. that's the whole function. she's compact πŸ‘‘


🌸 DESCRIPTION 🌸

so nbd_get_tls gets the TLS request setting. that's the setting, not the reality. keep that energy in mind.

🚨 important note bestie: if you actually want to find out if TLS was negotiated on a particular connection, use nbd_get_tls_negotiated(3) instead. nbd_get_tls is giving "what did I ask for" and nbd_get_tls_negotiated(3) is giving "what did I actually get". two different main characters, don't mix them up πŸ’…

πŸ’– RETURN VALUE πŸ’–

this call returns one of the LIBNBD_TLS_* values. iconic, consistent, no surprises.


πŸŽ€ ERRORS πŸŽ€

good news bestie: this function does not fail. like at all. zero drama πŸ”₯

the following parameters must not be NULL: "h". and for more info on that whole rule, see "Non-NULL parameters" in libnbd(3).


⭐ VERSION ⭐

this function first appeared in libnbd 1.0. she's an OG 🫢

if you need to test if this function is available at compile time, check if the following macro is defined:

#define LIBNBD_HAVE_NBD_GET_TLS 1

🌈 SEE ALSO 🌈

the whole friend group:


πŸ‘‘ AUTHORS πŸ‘‘

Eric Blake

Richard W.M. Jones


Copyright Red Hat


🧚 LICENSE 🧚

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


and that's the whole page!! πŸŽ€ this lil masterpiece is from libnbd-1.25.8, dated 2026-10-13 β€” stan her, she ate πŸ’…βœ¨

πŸ“¦ where this page comes from