ether_addr_equal_unaligned(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ether_addr_equal_unaligned β€” the Kernel API Manual, bestie edition πŸŽ€

okay so you know how sometimes you just need to know if two Ethernet addresses are the same, but like... the memory's a little messy and you can't promise everything's lined up all cute on a u16 boundary? yeah. that's literally this function. welcome 🫢


✨ NAME ✨

ether_addr_equal_unaligned β€” compares two Ethernet addresses that are not u16 aligned πŸ’«


🌸 SYNOPSIS 🌸

bool ether_addr_equal_unaligned(const u8 *addr1, const u8 *addr2);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr1 β€” a pointer to a six-byte array holding the Ethernet address πŸ“
  • addr2 β€” a pointer to the other six-byte array holding the Ethernet address. yes, also six bytes. they match. it's giving symmetry πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

Compares two Ethernet addresses. returns true if they're equal. slay. that's the whole thing, honestly ✨

please note, and I mean it: use this only when any Ethernet address may not be u16 aligned. that's the entire reason this function exists β€” the alignment situation. don't come for ether_addr_equal with unaligned addresses, she was not built for that 😭

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./include/linux/etherdevice.h is the mothership, and she's serving the whole friend group:

every single one of them, no cap. iykyk πŸ’œ


🌈 okay that's the page!! this little beauty lives in ./include/linux, and this version is dated October 2026 β€” she's iconic, she's aligned to nothing, and she ate πŸ’€βœ¨ periodt. mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from