nsm_get_handle(9)
π nsm_get_handle(9) β Kernel API Manual π
πΈ NAME πΈ
nsm_get_handle β Find or create a cached nsm_handle. Itβs giving βhandle matchmakingβ energy, bestie: either it finds the cached one or it makes a fresh one. π
β¨ SYNOPSIS β¨
Okay so hereβs the exact signature, character for character β do not touch, no cap:
struct nsm_handle * nsm_get_handle (const struct net *net , const struct sockaddr *sap , const size_t salen , const char *hostname , const size_t hostname_len );
π«Ά ARGUMENTS π«Ά
netβ network namespace. Thatβs the whole vibeβs scope, iykyk. πsapβ pointer to socket address of handle to find. The address bestie weβre matching against. πsalenβ length of socket address. Gotta know how much address weβre working with. πhostnameβ pointer to C string containing hostname to find. The name-search side of the mission. π·οΈhostname_lenβ length of C string. Yes, the length of that hostname string. π
π¦ DESCRIPTION π¦
Real talk: behavior is modulated by the global nsm_use_hostnames variable. Thatβs the switchboard for this whole situation. ποΈ
It returns a cached nsm_handle after bumping its ref count, or returns a fresh nsm_handle if a handle that matches sap and/or hostname cannot be found in the handle cache. Basically: cache hit, slay; cache miss, fresh handle moment. π₯
Returns NULL if an error occurs. So if you get NULL, thatβs the error signal β not a vibe, bestie. π
π SEE ALSO π
Kernel file ./fs/lockd/mon.c plus these iconic little references:
mwah π source/version: ./fs/lockd; date: October 2026 β thatβs the cute sign-off, periodt. π
π¦ 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