eth_random_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ eth_random_addr(9) ✨

okay bestie, so this one is from the Kernel API Manual (the 9 section, kernel internals vibe πŸ’…) and it's literally about conjuring a random Ethernet address out of thin air. no cap, it's giving "make me a MAC address" energy πŸŽ€


🌸 NAME 🌸

eth_random_addr β€” generate a software assigned random Ethernet address ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

void eth_random_addr (u8 *addr );

like, that's the whole signature. she's short, she's sweet, she's void (returns nothing, queen behavior) πŸ‘‘

πŸ’– ARGUMENTS πŸ’–

  • addr β€” pointer to a six-byte array containing the Ethernet address 🫢 six bytes, that's the whole MAC address, don't skimp

πŸ”₯ DESCRIPTION πŸ”₯

So what she does is generate a random Ethernet address (that's a MAC) that is not multicast and has the local assigned bit set. periodt. that's the deal πŸ’…

highkey important: those two properties are the whole personality of this function β€” not multicast, local assigned bit set, every single time πŸ”₯

🌈 SEE ALSO 🌈

bestie there are SO many siblings, it's a whole family reunion 😭 and they all live in the kernel file ./include/linux/etherdevice.h. go say hi:

like… she knows everybody in ./include/linux, iykyk 🧚


and that's the whole page!! short but iconic, honestly 🌟 huge shoutout to ./include/linux for hosting her, dated October 2026, in the Kernel API Manual β€” mwah, love u, bye bestie πŸ’œπŸŽ€

πŸ“¦ where this page comes from