rpc_peeraddr2str(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the Kernel API Manual page for rpc_peeraddr2str(9) β€” the function whose whole glow is literally return remote peer address in printable format. It’s giving β€œmake the peer address readable” and honestly? iconic. πŸ’…

✨ SYNOPSIS ✨

const char * rpc_peeraddr2str (struct rpc_clnt *clnt , enum
       rpc_display_format_t format );

πŸŽ€ ARGUMENTS πŸŽ€

  • clnt β€” RPC client structure. That’s the main-character struct you’re handing over.
  • format β€” address format. This tells it which printable format situation we’re in, no cap.

πŸ¦‹ DESCRIPTION πŸ¦‹

Big caution, bestie: NB: the lifetime of the memory referenced by the returned pointer is the same as the rpc_xprt itself. As long as the caller uses this pointer, it must hold the RCU read lock. That is not a vibe suggestion β€” that is the rule. Do not let that pointer wander off outside its RCU-safe era. 😭

TL;DR: returned-pointer memory lives exactly as long as the rpc_xprt itself, and while you’re using it you must hold the RCU read lock. periodt.

🌈 SEE ALSO 🌈

Kernel file ./net/sunrpc/clnt.c β€” and here’s the full bestie roll call, no skips:


source/version: ./net/sunrpc β€’ date: October 2026 β€” mwah, go hold that RCU read lock responsibly πŸ’‹

πŸ“¦ where this page comes from