NOZZLE_GET_MAC(3)

✨ NOZZLE_GET_MAC(3) ✨

okay so bestie, welcome to the Kronosnet Programmer's Manual πŸ’– this one's called nozzle_get_mac and it's literally just vibes + one mac address, let's gooo πŸŽ€


🌸 NAME 🌸

nozzle_get_mac β€” the way it retrieves the mac address on a given nozzle interface πŸ¦‹ no cap, that's the whole job.


✨ SYNOPSIS ✨

#include <libnozzle.h>

int nozzle_get_mac(
    const nozzle_t  nozzle,
    char          **ether_addr
);

look at her. iconic. πŸ’…


πŸ’– DESCRIPTION πŸ’–

nozzle_get_mac bestie it's giving "tell me my mac address" and honestly? same energy.

  • nozzle β€” pointer to the nozzle struct. your main character. the handle you're working with 🫢
  • ether_addr β€” pointers to string containing the current mac address. yes, a pointer to a pointer, she's fancy like that ✨
⚠️ important bestie, do NOT sleep on this: the string is malloc'ed, so the caller needs to free this buffer. like, it's YOUR buffer now. you gotta clean up after yourself, that's the rule πŸ’€ no memory leaks in this house.

πŸŽ€ RETURN VALUE πŸŽ€

  • 0 β€” on success. slay. we ate. πŸ‘‘
  • -1 β€” on error, and errno is set. sad girl hours 😭 go check errno, she's telling you what went wrong.

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, go say hi:

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_open(3), nozzle_del_ip(3), nozzle_set_mac(3), nozzle_get_name_by_handle(3), nozzle_add_ip(3)

iykyk πŸ’œ


Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved. 🫢 protecting the goods since 2010, periodt.


and that's the page bestie!! 🌸 this one came from kronosnet, dated 2026-07-20 β€” stan a manual that shows up on time βœ¨πŸ’– bye ily, go free that buffer πŸŽ€πŸ’…

πŸ“¦ where this page comes from