fbnic_tlv_attr_put_mac_addr(9)
π 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 πΈ
-ENOSPCif 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:
fbnic_tlv_msg_alloc(9)fbnic_tlv_attr_put_flag(9)fbnic_tlv_attr_put_value(9)__fbnic_tlv_attr_put_int(9)fbnic_tlv_attr_put_string(9)fbnic_tlv_attr_get_unsigned(9)fbnic_tlv_attr_get_signed(9)fbnic_tlv_attr_get_string(9)fbnic_tlv_attr_nest_start(9)fbnic_tlv_attr_nest_stop(9)fbnic_tlv_attr_parse_array(9)fbnic_tlv_attr_parse(9)fbnic_tlv_msg_parse(9)fbnic_tlv_parser_error(9)fbnic_tlv_test_create(9)fbnic_tlv_parser_test_attr(9)fbnic_tlv_parser_test(9)
π one (1) tiny catch: that argument description formsgandattr_idsays "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
- 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