ethnl_name_to_idx(9)
π ethnl_name_to_idx (it's giving "kernel API manual" energy)
okay so bestie, welcome to the ethnl_name_to_idx glow-up, straight out of the Kernel API Manual. this is the little function that goes "hey, what index does this name live at?" and honestly? iconic behavior. it's a lookup girlie. that's the whole vibe. π
β¨ NAME β¨
ethnl_name_to_idx β look up the string index for a name π
like, you hand it a name, it hands you back where that name sits in the array. matchmaking, basically. π
πΈ SYNOPSIS πΈ
int ethnl_name_to_idx (ethnl_string_array_t names , unsigned int n_names
, const char *name );
no cap, that's the whole signature β names, n_names, name, three besties in a trench coat. π«Ά
π¦ ARGUMENTS π¦
namesβ the array ofETH_GSTRING_LENsized strings. yep, each one is exactlyETH_GSTRING_LENsized, that's the rule, we respect it. πn_namesβ the number of strings chilling in the array. so it knows where the party ends. βnameβ the name you're looking up. the main character of this whole operation, fr fr. π
π₯ RETURN π₯
if it finds it: the index of the string. slay. β
if it doesn't: -ENOENT, which is kernel-speak for "not found, bestie, she's not here" ππ
π SEE ALSO π
the kernel file ./net/ethtool/bitset.c, plus the whole friend group:
ethnl_bitmap32_clear(9)ethnl_bitmap32_not_zero(9)ethnl_bitmap32_update(9)ethnl_bitset32_size(9)ethnl_put_bitset32(9)ethnl_bitset_is_compact(9)ethnl_bitmap32_equal(9)ethnl_update_bitset32(9)ethnl_parse_bitset(9)
go read them, they're all lowkey obsessed with bitsets and honestly so am I π§π
and that's the page!! mwah π this one came from ./net/ethtool, dated October 2026 β periodt, no notes. π
π¦ 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