nsm_get_handle(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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