nlmsvc_lookup_host(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nlmsvc_lookup_host(9) β€” like, the Kernel API Manual but make it make sense ✨

Okay bestie, gather 'round, because we're about to vibe-check a kernel function from the nlmsvc_lookup_host(9) page in the Kernel API Manual. No cap, this one's lowkey iconic for anyone doing NLM (Network Lock Manager) stuff. Let's get into it πŸ’–


🌸 SYNOPSIS 🌸

struct nlm_host * nlmsvc_lookup_host (const struct svc_rqst *rqstp ,
const char *hostname , const size_t hostname_len );

πŸŽ€ ARGUMENTS πŸŽ€

  • rqstp β€” the incoming NLM request, like the whole receipt of what just showed up at your door 🫢
  • hostname β€” name of client host, aka who's tryna talk to you
  • hostname_len β€” length of client hostname, because we gotta be precise, periodt πŸ’…

✨ DESCRIPTION ✨

So here's the tea β˜•: this function returns an nlm_host structure that matches the [client address, transport protocol, NLM version, client hostname] of the passed-in NLM request. If one doesn't already exist in the host cache, a new handle is created and returned. It's giving "if you don't have a friend like this yet, I'll literally make you one" energy πŸ”₯

Before possibly creating a new nlm_host, it constructs a sockaddr for a specific source address, just in case the local system has multiple network addresses β€” because our local machine is a main character with many faces, and we gotta pick the right one πŸ’β€β™€οΈ

And listen, the family of the address in rq_daddr is guaranteed to be the same as the family of the address in rq_addr, so it's safe to use the same family for the source address. No mixing and matching, no chaos, we stan a consistent family 🧚✨


🌈 SEE ALSO 🌈


Seriously bestie, if you're messing with lockd host handles, read the whole family of functions above. They're all in ./fs/lockd and they're all important, iykyk πŸ’€

Okay that's the whole page, no skips, no summaries, every flag and path accounted for πŸ‘‘

Stay slaying out there in kernel land πŸ¦‹ β€” and remember, this lil masterpiece lives in ./fs/lockd and was dated October 2026 in the manual, so when you see it, just know: iconic behavior, documented. Byeee! πŸ’œπŸŽ€

πŸ“¦ where this page comes from