fbnic_tlv_attr_put_mac_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

fbnic_tlv_attr_put_mac_addr β€” bestie, this is the one that adds mac_addr to your message ✨

okay so real quick, this page lives in the kernel API manual section (9), and the function we're stanning is fbnic_tlv_attr_put_mac_addr. She's giving "small but crucial" energy, ngl πŸŽ€


✨ SYNOPSIS ✨

int fbnic_tlv_attr_put_mac_addr (struct fbnic_tlv_msg *msg , const u16
attr_id , const u8 *mac_addr );

like, she takes three things and hands you back an int. that's the whole vibe πŸ”₯


🫢 ARGUMENTS 🫢

  • msg β€” the message header we are adding flag attribute to. this is the canvas, the main character, the whole reason we're here πŸ’–
  • attr_id β€” the ID of flag attribute we are adding to message. it's how the message knows which attribute is getting the glow-up πŸ’…
  • mac_addr β€” byte pointer to MAC address to be stored. literally just a pointer to the bytes, bestie, she's not doing anything fancy with it πŸ¦‹

🌸 RETURN 🌸

  • -ENOSPC if there is no room for the attribute 😭 (no space, no slay β€” the message said "I'm full")
  • Otherwise 0 β€” which is the good ending, we love a zero return ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's what she actually does: adds header and copies data pointed to by mac_addr into the message. simple, iconic, done 🌈

and like, the important deets β€” she will copy the address raw, so it will be in big endian with start of MAC address at start of attribute. no flipping, no reinterpreting, no "not me trying to be clever" energy. raw bytes go in, raw bytes come out, and the first byte of the MAC lands right at the start of the attribute. periodt πŸ’œ

ngl the word "raw" is doing a lot of work here β€” she is not massaging the byte order for you, so if you were expecting a little endian surprise, this is your heads-up πŸ™ˆ

🧚 SEE ALSO 🧚

the kernel file in question, bestie:

./drivers/net/ethernet/meta/fbnic/fbnic_tlv.c

and the whole friend group of related calls, iykyk:


πŸ’€ one (1) tiny catch: that argument description for msg and attr_id says "flag attribute" β€” that's straight from the source, bestie, so I'm keeping it exactly as-is. not my lore to rewrite, I just report it πŸ“

and that's the page!! this lil section came from the ./drivers/net/ethernet/meta/fbnic corner of the kernel, dated October 2026, and she's filed under fbnic_tlv_attr_put_mac_addr(9) πŸŽ€ go forth and put some MAC addresses in some messages, bestie, you've got this πŸ’–βœ¨

πŸ“¦ where this page comes from