eth_random_addr(9)
β¨ 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:
is_link_local_ether_addr(9)is_zero_ether_addr(9)is_multicast_ether_addr(9)is_local_ether_addr(9)is_broadcast_ether_addr(9)is_unicast_ether_addr(9)is_valid_ether_addr(9)eth_proto_is_802_3(9)eth_broadcast_addr(9)eth_zero_addr(9)eth_hw_addr_random(9)eth_hw_addr_crc(9)ether_addr_copy(9)eth_hw_addr_set(9)eth_hw_addr_inherit(9)ether_addr_equal(9)ether_addr_equal_64bits(9)ether_addr_equal_unaligned(9)ether_addr_equal_masked(9)ether_addr_to_u64(9)u64_to_ether_addr(9)eth_addr_dec(9)eth_addr_inc(9)eth_addr_add(9)is_etherdev_addr(9)compare_ether_header(9)eth_hw_addr_gen(9)eth_skb_pkt_type(9)eth_skb_pad(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms