netlbl_domhsh_search_def(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a u16, 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:


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