rpc_peeraddr2str(9)
πΈ 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:
rpc_create(9)rpc_clone_client(9)rpc_clone_client_set_auth(9)rpc_switch_client_transport(9)rpc_clnt_iterate_for_each_xprt(9)rpc_cancel_tasks(9)rpc_hold_client(9)rpc_release_client(9)rpc_bind_new_program(9)rpc_run_task(9)rpc_call_sync(9)rpc_call_async(9)rpc_run_bc_task(9)rpc_prepare_reply_pages(9)rpc_peeraddr(9)rpc_localaddr(9)rpc_net_ns(9)rpc_max_payload(9)rpc_max_bc_payload(9)rpc_force_rebind(9)rpc_clnt_test_and_add_xprt(9)rpc_clnt_setup_test_and_add_xprt(9)rpc_clnt_add_xprt(9)
source/version: ./net/sunrpc β’ date: October 2026 β mwah, go hold that RCU read lock responsibly π
π¦ 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