nvmem_get_mac_address(9)
π nvmem_get_mac_address(9) π
okay bestie, welcome to the Kernel API Manual entry for nvmem_get_mac_address β yes, the manual name is literally right there, we're doing this properly. This is the little kernel function that goes "hey, can I get the MAC address from that nvmem cell named 'mac-address' that's tied to this device?" and honestly? iconic behavior. π
β¨ SYNOPSIS β¨
int nvmem_get_mac_address (struct device *dev , void *addrbuf );
π«Ά ARGUMENTS π«Ά
devβ the device that themac-addresscell is associated with. like, this is the device we're asking about. main character device energy. πaddrbufβ the buffer where the MAC address gets copied on success. that's where the good stuff lands. π
πΈ DESCRIPTION πΈ
Returns 0 on success or a negative error number on failure. that's it. that's the whole vibe. no cap, no extra lore, just success 0 or a negative error number if it didn't work out. π
okay so lowkey this is a tiny function, but it's doing important work β it's the nvmem-to-MAC-address pipeline, and we respect it. periodt. π
π¦ SEE ALSO π¦
Kernel file ./net/ethernet/eth.c and all these besties:
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)fwnode_get_mac_address(9)device_get_mac_address(9)device_get_ethdev_address(9)
and that's the page, bestie! π§ this came from ./net/ethernet and it's dated October 2026 β so yeah, mark your calendar, hydrate, and go get those MAC addresses. πβ¨
π¦ 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