device_get_mac_address(9)
π device_get_mac_address(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this is the page for device_get_mac_address, and no cap, it's a little one but it's iconic in its own way π
πΈ NAME πΈ
device_get_mac_address β get the MAC for a given device π«Ά
like literally, that's the whole vibe. it gets you the MAC address for a device you hand it. periodt.
β¨ SYNOPSIS β¨
int device_get_mac_address (struct device *dev , char *addr );
yep that's it, that's the whole signature, and yes the spacing is exactly like that, don't @ me π β copy it verbatim or the compiler will simply vibe check you into next week π
π ARGUMENTS π
devβ Pointer to the device π this is the main character, the one you're asking about. it's astruct device *, so pointer-city, as per usual.addrβ Address of buffer to store the MAC in π not the MAC itself, bestie β the address of the buffer where the MAC is gonna live. subtle but highkey important, iykyk β¨
π¦ SEE ALSO π¦
sooo much good stuff to read next, we love a well-connected friend group π β and yes, these are literally all of them, lowkey obsessed:
- Kernel file
./net/ethernet/eth.cβ that's the file where this whole situation lives, for reference π eth_header(9)eth_get_headlen(9)eth_type_trans(9)eth_header_cache(9)eth_header_cache_update(9)eth_header_parse_protocol(9)eth_prepare_mac_addr_change(9)eth_commit_mac_addr_change(9)eth_mac_addr(9)ether_setup(9)alloc_etherdev_mqs(9)platform_get_ethdev_address(9)nvmem_get_mac_address(9)fwnode_get_mac_address(9)device_get_ethdev_address(9)
like go read them, they're all friends of the family π and fr fr, device_get_ethdev_address(9) is right there next door, say hi π§
π‘ friendly reminder: this page is short and sweet and it doesn't spill extra tea β everything it says, it says up there. no invented behaviour, no guessing, we stay accurate in this house π€
and that's the whole page, bestie π stay slay, stay pointer-safe, and remember: ./net/ethernet, October 2026, device_get_mac_address(9) β mwah, catch you in the next manpage β¨ππ¦
π¦ 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