ether_addr_equal_64bits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of addr1 & addr2 are 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 πŸ“‹βœ¨:


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