NOZZLE_GET_IPS(3)
π NOZZLE_GET_IPS(3) π
okay bestie, welcome to the Kronosnet Programmer's Manual β¨ this one's about nozzle_get_ips, and it's lowkey one of the most useful little guys in the whole libnozzle friend group. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
nozzle_get_ips β retrieve the list of all configured ips for a given interface
like. it goes and gets the IPs. all of them. for the interface you asked about. that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <libnozzle.h>
int nozzle_get_ips(
const nozzle_t nozzle,
struct nozzle_ip **nozzle_ip
);
π¦ DESCRIPTION π¦
nozzle_get_ips π
here's who's who in this function call, bestie:
nozzleβ pointer to the nozzle struct. yes, the nozzle. the whole point of the library. give it here π«΄nozzle_ipβ pointer to the head of a list ofnozzle_ipstructs. the last IP in that list will havenext = NULL, so that's how you know you've hit the end (iconic linked-list behaviour, we love a clean sentinel π).nozzle_ipcan beNULLif there are no IP addresses associated with this nozzle device β no IPs, no problem, it just hands you a whole lot of nothing π
π¨ DO NOT free those structs. they are used internally for IP address tracking. hands off, bestie. that memory is not yours, it's the library's, and it will notice. βπ
π STRUCTURES π
here's the tea on an IP address on a nozzle interface, as returned from nozzle_get_ips π§
struct nozzle_ip {
char ipaddr[IPADDR_CHAR_MAX+1]; /* The IP address */
char prefix[PREFIX_CHAR_MAX+1]; /* Prefix - eg "24" */
int domain; /* AF_INET or AF_INET6 */
struct next; /* Pointer to next struct or NULL */
};
field-by-field, no cap:
ipaddrβ the IP address, fr fr πprefixβ the prefix, e.g."24"(yes literally the string"24", it said so) πdomainβAF_INETorAF_INET6, pick your fighter βnextβ pointer to next struct orNULL. the chain continues, or it doesn't. vibe check complete π
π₯ RETURN VALUE π₯
0on success π-1on error, anderrnois set π
that's it. that's the whole scoring system. binary. main character energy.
π SEE ALSO π
the whole squad, in this exact order, because we respect the roster:
nozzle_close(3)nozzle_set_mtu(3)nozzle_get_fd(3)nozzle_get_mtu(3)nozzle_reset_mtu(3)nozzle_set_up(3)nozzle_set_down(3)nozzle_reset_mac(3)nozzle_get_handle_by_name(3)nozzle_run_updown(3)nozzle_open(3)nozzle_del_ip(3)nozzle_get_mac(3)nozzle_set_mac(3)nozzle_get_name_by_handle(3)nozzle_add_ip(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved.
and that's the page, bestie!! this was kronosnet's very own NOZZLE_GET_IPS(3), dated 2026-07-20 β screenshot it, cite it, love it, and remember: don't free the structs πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- fedora 43: libnozzle1-devel 1.35-1.fc43 Β· LGPL-2.1-or-later
- fedora 43: libnozzle1-devel 1.35-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libnozzle1-devel 1.35-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libnozzle1-devel 1.35-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms