eth_addr_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ eth_addr_add(9) ✨

okay so bestie, this one's from the Kernel API Manual and it's genuinely so simple you're gonna scream. it's eth_addr_add, and yes before you ask, it does exactly what it says on the tin πŸ’…


🌸 NAME 🌸

eth_addr_add β€” Add (or subtract) an offset to/from the given MAC address.

like... math but make it networking πŸ¦‹


✨ SYNOPSIS ✨

void eth_addr_add (u8 *addr , long offset );

no return value, it just does the thing. main character energy fr πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • addr β€” Pointer to a six-byte array containing the Ethernet address to increment. six bytes, bestie, that's a MAC address, don't get cute and pass something else πŸ™ˆ
  • offset β€” Offset to add. and yeah the title says "or subtract" β€” that's because it's a long, so you can just hand it a negative number and it'll happily go the other way πŸŽ€
ngl the long type on the offset is doing a lot of heavy lifting here β€” that's the whole trick for going backwards, so don't overthink it πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ

all the siblings live in the Kernel file ./include/linux/etherdevice.h and honestly it's a whole family reunion in there, so let's give everyone a shoutout 🫢

like that's 29 friends and every single one of them is invited to the group chat, iykyk πŸ’€


and that's the whole page!! short, sweet, and iconic β€” it lives in ./include/linux, dated October 2026, so go forth and increment (or decrement, we don't judge) your MAC addresses, bestie πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from