nlmclnt_lookup_host(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

nlmclnt_lookup_host β€” okay so, from the Kernel API Manual (section 9 bestie, we're in the kernel docs now πŸ’…), this is the function that finds you an NLM host handle matching a remote server. that's it, that's the whole vibe check ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct nlm_host * nlmclnt_lookup_host (const struct sockaddr *sap ,
const size_t salen , const unsigned short protocol , const u32 version ,
const char *hostname , int noresvport , struct net *net , const struct
cred *cred );

like look at all those params 😭 she takes eight arguments, highkey an overachiever, we stan 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • sap β€” the network address of the server 🌐 like, where the server actually lives, address-wise.
  • salen β€” the length of the server address πŸ“ (yes she needs to know how big the address is, don't ask, it's a whole thing).
  • protocol β€” the transport protocol to use 🚚 your ride, basically.
  • version β€” the NLM protocol version πŸ”’ which generation of NLM we're dealing with.
  • hostname β€” okay so the original gives her zero description, not one single word, and honestly? iconic. main character energy πŸŽ€ she's just there, iykyk.
  • noresvport β€” set this to 1 if a non-privileged port should be used πŸ”“ slay, no root required.
  • net β€” pointer to the net namespace πŸͺ her own little universe.
  • cred β€” pointer to cred πŸͺͺ credentials, the whole "who am i" of it all.

🌈 DESCRIPTION 🌈

so here's the tea β˜•: this returns an nlm_host structure that matches the passed-in [server address, transport protocol, NLM version, server hostname] πŸ’– all four, matching, no cap.

and if one of those doesn't already exist in the host cache? 🧚 she creates a new handle and returns it. literally just builds it out of thin air, ate and left no crumbs πŸ‘‘


⭐ SEE ALSO ⭐

Kernel file ./fs/lockd/host.c β€” go read the source bestie, it's giving required reading πŸ“–


okay that's the whole page, you ate that πŸ“ and real quick, the receipts: this one came from ./fs/lockd, dated October 2026, and the page is literally called nlmclnt_lookup_host(9) β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from