eth_hw_addr_set(9)
π
eth_hw_addr_set β Kernel API Manual, but make it a group chat β¨
okay so bestie, welcome to the Kernel API Manual entry for eth_hw_addr_set, and honestly? she's a short one but she's iconic. no cap. π
πΈ NAME πΈ
eth_hw_addr_set β assign an Ethernet address to a net_device π¦
β¨ SYNOPSIS β¨
void eth_hw_addr_set (struct net_device *dev , const u8 *addr );
literally that's it. that's the whole vibe. π
π«Ά ARGUMENTS π«Ά
devβ pointer to thenet_devicestructure π this is the device getting a glow-upaddrβ the address you're assigning π the actual bytes going in
π DESCRIPTION π
So here's the tea: you hand her a net_device and an address, and she assigns that given address to the net_device.
But β and this is the part you cannot skip, bestie β addr_assign_type is not changed. π₯ She does not touch it. She does not update it. She does not even look at it. If you were expecting her to flip that field for you, she did not, and she will not, periodt. π
ngl this is the whole personality of the function: it sets the address and only the address. everything else stays exactly where it was. iykyk π
π SEE ALSO π
Kernel file ./include/linux/etherdevice.h β go read her, she's lowkey the main character of Ethernet helpers π§ and while you're there, say hi to the whole friend group:
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_random_addr(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_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)
thirty-one besties and one header file, we love a supportive community π
okay that's the whole page, you ate that π
β¨ and one last cute lil sign-off: this iconic lil doc lives in ./include/linux and it's dated October 2026 β mark your calendars bestie, see you then πΈππ¦
π¦ 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