ethnl_parse_header_dev_get(9)
π ethnl_parse_header_dev_get(9) β like, the Kernel API Manual one, bestie π
okay so this one lives in the Kernel API Manual, and it's literally the function that parses your request header. no cap, that's the whole NAME vibe:
NAME β ethnl_parse_header_dev_get β parse request header β¨
β¨ SYNOPSIS β¨
int ethnl_parse_header_dev_get (struct ethnl_req_info *req_info , const
struct nlattr *header , struct net *net , struct netlink_ext_ack *extack
, bool require_dev );
like, yes, it's a whole handful of arguments. we get it. it's giving "long signature energy" and honestly? we respect it π«Ά
π¦ ARGUMENTS π¦
req_infoβ the structure where the results go. it's the little container you're filling up, bestie πheaderβ the nest attribute with the request header in it. that's the nest we're digging through π§netβ the request netns. network namespace central, iykyk πextackβ netlink extack, used for error reporting. so when stuff goes wrong, this is who snitches πrequire_devβ fail if no device identified in header. like, if there's no device? it's over. it fails. periodt π
πΈ DESCRIPTION πΈ
okay so here's the tea β β it parses the request header inside the nested attribute nest and puts the results into the structure that req_info points to. the extack from info is what gets used for error reporting, so the drama gets reported properly.
and now the important part, bestie, pay attention π: if req_info->dev is not null on return, then a reference to it has been taken. if an error is returned, *req_info is null initialized and no reference is held. no sneaky lurking references, we love a clean exit β¨
β RETURN β
0 on success, or a negative error code. that's it. that's the whole vibe check π
π₯ SEE ALSO π₯
- Kernel file
./net/ethtool/netlink.c ethnl_fill_reply_header(9)ethnl_reply_init(9)struct ethnl_dump_ctx(9)struct ethnl_perphy_dump_ctx(9)ethnl_default_parse(9)ethnl_init_reply_data(9)
and that's the whole page, bestie π this one's from ./net/ethtool, dated October 2026, and it's literally titled ethnl_parse_header_dev_get(9). slay, go read the source, ily πβ¨
π¦ 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