nbd_get_socket_activation_name(3)
π nbd_get_socket_activation_name(3) β a libnbd moment
okay bestie so you're in the libnbd section 3 man pages, and the star of this particular episode is nbd_get_socket_activation_name(3). yes that's a long name. no we're not shortening it. it's iconic, it ate, periodt.
β¨ NAME β¨
nbd_get_socket_activation_name β get the socket activation name π
πΈ SYNOPSIS πΈ
#include <libnbd.h>
char * nbd_get_socket_activation_name (
struct nbd_handle *h
);
look at her. one argument. no drama. she's lowkey the chillest function in the whole library.
π DESCRIPTION π
so basically: this returns the socket name that gets used when you call nbd_connect_systemd_socket_activation(3) on the same handle. same handle, same vibe, same name. iykyk.
and by default? she returns the empty string, which means the server is gonna see the name "unknown". so if your server's out here like "who are you π" that's why, bestie β that's literally the default behavior, not a bug, okay?
π¦ RETURN VALUE π¦
this call returns a string. a whole string. main character energy.
β οΈ but listen β the caller must free the returned string to avoid a memory leak. every string has to be freed. no exceptions. don't leave her hanging in memory forever, that's so not slay. π
π₯ ERRORS π₯
on error NULL is returned. yep, just NULL. sad but true.
to get further details of the error, refer to "ERROR HANDLING" in libnbd(3) β that's where the lore lives.
also! the following parameters must not be NULL: "h". like, at all. for more info see "Non-NULL parameters" in libnbd(3). don't pass a NULL handle, that's giving chaos and not the fun kind. π
π VERSION π
this function first appeared in libnbd 1.16. she's a somewhat recent queen. π
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_SOCKET_ACTIVATION_NAME 1
iconic macro name honestly. try saying it out loud three times fast. you can't. π«Ά
β SEE ALSO β
go read all of them. i'll wait. π
π§ AUTHORS π§
- Eric Blake
- Richard W.M. Jones
the founders. the blueprint. the ones who literally wrote the code. slay. β¨
π COPYRIGHT π
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
also hi, friendly PSA: that's a no warranty situation up there fr fr, the license said it not me π
and that's the whole page babes π«Ά this was libnbd-1.25.8, dated 2026-10-13, and the title was of course nbd_get_socket_activation_name(3) β go forth, free your strings, and stan libnbd π
π
π¦ 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