ether_addr_equal_64bits(9)
π ether_addr_equal_64bits β like, the Kernel API Manual page, bestie β¨
Okay so picture this: you're deep in kernel-land, you've got two Ethernet addresses, and you need to know if they're the same. That's it. That's the whole vibe of ether_addr_equal_64bits(9). π
β¨ NAME β¨
ether_addr_equal_64bits β compare two Ethernet addresses π¦
πΈ SYNOPSIS πΈ
bool ether_addr_equal_64bits (const u8 *addr1 , const u8 *addr2 );
π ARGUMENTS π
addr1β pointer to an array of 8 bytes, no cap π«Άaddr2β pointer to an other array of 8 bytes, equally iconic
π DESCRIPTION π
So what does it do? It compares two Ethernet addresses. Equal? Returns true. Not equal? Returns false. Simple as that, periodt. π
Now here's the cute part β the function doesn't need any conditional branches, and it possibly uses word memory accesses on CPUs that allow cheap unaligned memory reads. Like, it just eats that memory up, no drama. π₯
And the arrays look like this:
arrays = { byte1, byte2, byte3, byte4, byte5, byte6, pad1, pad2 }
β οΈ Okay bestie, important heads-up before you go off: the alignment ofaddr1&addr2are only guaranteed to be 16 bits. Not 64, not "probably fine", sixteen. Do not forget this. π
π SEE ALSO π
Kernel file ./include/linux/etherdevice.h β and honestly, the whole friend group is here, so let's do roll call πβ¨:
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_set(9)eth_hw_addr_inherit(9)ether_addr_equal(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)
Okay that's the whole page, bestie, go forth and compare addresses responsibly π§π
Kernel API Manual Β· source dir ./include/linux Β· dated October 2026 Β· ether_addr_equal_64bits(9) β mwah, talk later ππ
π¦ 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