NOZZLE_OPEN(3)
β¨ NOZZLE_OPEN(3) β¨
okay bestie, welcome to the Kronosnet Programmer's Manual π this one's about making a brand new tap device, and it's lowkey iconic, let's go π«Ά
π NAME π
nozzle_open β create a new tap device on the system. yes, we're birthing a whole interface, main character energy fr fr π
πΈ SYNOPSIS πΈ
#include <libnozzle.h>
nozzle_t nozzle_open(
char *devname,
size_t devname_size,
const char *updownpath
);
π¦ DESCRIPTION π¦
nozzle_open β the moment you call it, it goes and does the thing. here's the tea on every argument, no gatekeeping π
devnameβ pointer to the device name, and that buffer's gotta be at leastIFNAMSIZin size. if the devstrlenis 0, the system just picks a name for you automatically, slay. but if you do hand it a string, the system will try to create a device with exactly that name.
NOTE: on FreeBSD the tap device names can only betapX, whereXis a number from0to255. that's a hard limit, bestie, no negotiating π on Linux that limitation does not apply, so you've got way more freedom there.
also the name has to be unique to the system. if an interface with that same name is already configured on the system, you're getting an error back, periodt.
devname_sizeβ length of the buffer you provided indev(has to be at leastIFNAMSIZ). don't skimp on it πupdownpathβ nozzle supports the typical filesystem structure for executing actions for:down.d,post-down.d,pre-up.d,up.d, all in the form of:
updownpath/<action>/<interface_name>
updownpath is basically telling it where to find those directories on the filesystem, and it must be an absolute path. no relative paths, no shortcuts, nope π§
β RETURN VALUE β
nozzle_open returns a pointer to a nozzle struct on success, and NULL on error β and when that happens, errno is set. so like, always check your return value, bestie, that's the vibe check π
π SEE ALSO π
nozzle_close(3)nozzle_set_mtu(3)nozzle_get_fd(3)nozzle_get_mtu(3)nozzle_reset_mtu(3)nozzle_set_up(3)nozzle_get_ips(3)nozzle_set_down(3)nozzle_reset_mac(3)nozzle_get_handle_by_name(3)nozzle_run_updown(3)nozzle_del_ip(3)nozzle_get_mac(3)nozzle_set_mac(3)nozzle_get_name_by_handle(3)nozzle_add_ip(3)
the whole friend group, go read them too πβ¨
π COPYRIGHT π
Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved.
and that's the page, bestie!! π this was kronosnet, dated 2026-07-20, and you just read the whole thing like the icon you are. mwah, go write some slay code ππ¦πΈ
π¦ 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