netlbl_domhsh_search_def(9)
π netlbl_domhsh_search_def β bestie, let's find that domain entry β¨
okay so real talk, this is a page from the Kernel API Manual (that's the manual name, iykyk π) and it's all about one little function that goes looking for a domain entry. She's a searcher, she's a fallback queen, she's lowkey doing a lot of work for you. Let's get into it π
πΈ NAME πΈ
netlbl_domhsh_search_def β search for a domain entry, bestie πβ¨
π¦ SYNOPSIS π¦
struct netlbl_dom_map * netlbl_domhsh_search_def (const char *domain ,
u16 family );
like yes, that's the whole signature, she's not complicated π
π ARGUMENTS π
domainβ the domain. that's it, that's the domain you're looking for π«Άfamilyβ the address family. she's au16, she's got range π
β DESCRIPTION β
okay so here's the vibe check on what this function actually does π
It searches the domain hash table and returns a pointer to the hash table entry if an exact match is found. Iconic. But wait, because the plot thickens π β if an exact match is not present in the hash table, then the default entry is returned if it's valid, and otherwise NULL is returned. So like, she tries her best, and if she can't find your specific one she'll hand you the default instead. So accommodating. So generous. π₯Ί
And here's a fun little detail: family may be AF_UNSPEC, which matches any address family entries. Versatile queen πβ¨
β οΈ okay but for real, listen to this part because it's the important one: the caller is responsible for ensuring that the hash table is protected with either a RCU read lock or the hash table lock. Not me, not her β you. Do not skip this. Locking is not optional and she will not do it for you π
π₯ SEE ALSO π₯
- Kernel file
./net/netlabel/netlabel_domainhash.cβ that's where the magic lives, go read the source bestie π
And the whole friend group, fr fr:
netlbl_domhsh_free_entry(9)netlbl_domhsh_hash(9)netlbl_domhsh_search(9)netlbl_domhsh_audit_add(9)netlbl_domhsh_validate(9)netlbl_domhsh_init(9)netlbl_domhsh_add(9)netlbl_domhsh_add_default(9)netlbl_domhsh_remove_entry(9)netlbl_domhsh_remove_af4(9)netlbl_domhsh_remove_af6(9)netlbl_domhsh_remove(9)netlbl_domhsh_remove_default(9)netlbl_domhsh_getentry(9)netlbl_domhsh_getentry_af4(9)netlbl_domhsh_getentry_af6(9)netlbl_domhsh_walk(9)
mwah π that's the whole page, go forth and search responsibly
comes to you straight from ./net/netlabel, dated October 2026 β and yes she's still netlbl_domhsh_search_def(9), same as she ever was. slay, bye bestie π«Άβ¨π
π¦ 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