ethnl_strz_size(9)
π ethnl_strz_size β a Kernel API Manual moment π
okay so bestie, welcome to the Kernel API Manual, where we learn how to measure a string before we yeet it into a netlink attribute β¨ this one is ethnl_strz_size(9) and honestly? she's a little math girlie and we stan π«Ά
β¨ NAME β¨
ethnl_strz_size β calculate attribute length for fixed size string π literally just doing the size math so you don't have to, no cap
πΈ SYNOPSIS πΈ
int ethnl_strz_size (const char *s );
π¦ ARGUMENTS π¦
sβ anETH_GSTRING_LENsized string, and heads up bestie: it may not be null terminated π so don't go assuming there's a cute little\0waiting for you at the end, because there might not be π
π RETURN π
returns the total length of an attribute with a null terminated string from s β¨ that's the whole vibe β attribute length, null terminator included, periodt π
π₯ SEE ALSO π₯
the whole friend group, iykyk:
- Kernel file
./net/ethtool/netlink.hβ the source material, main character energy π ethnl_put_strz(9)ethnl_update_u32(9)ethnl_update_u8(9)ethnl_update_u8_u32(9)ethnl_update_bool32(9)ethnl_update_bool(9)ethnl_update_binary(9)ethnl_update_bitfield32(9)ethnl_reply_header_size(9)struct ethnl_req_info(9)ethnl_req_get_phydev(9)struct ethnl_reply_data(9)struct ethnl_request_ops(9)
ngl this one is short and sweet and that's her charm π read the whole squad above if you wanna go deeper, fr fr π
and that's the page, bestie π brought to you by ./net/ethtool, dated October 2026 β stream it, memorize it, slay it π
β¨π
π¦ 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