nlmsvc_lookup_host(9)
π 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 youhostname_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 π
- Kernel file
./fs/lockd/host.cβnlmclnt_lookup_host(9) nlmclnt_release_host(9)nlmclnt_shutdown_rpc_clnt(9)nlmsvc_release_host(9)nlm_rebind_host(9)nlm_host_rebooted(9)
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
- 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