rpc_peeraddr(9)
π rpc_peeraddr β a Kernel API Manual moment (section 9, bestie)
okay so first of all, this whole page lives in the Kernel API Manual, section 9 β very "kernel devs only" of it, we love that for them π
β¨ NAME β¨
rpc_peeraddr β extract remote peer address from clnt's xprt
like literally just... get the remote peer's address out of the clnt's xprt. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
size_t rpc_peeraddr (struct rpc_clnt *clnt , struct sockaddr *buf ,
size_t bufsize );
β¨ ARGUMENTS β¨
clntβ the RPC client structure, the main character of this function ngl πbufβ target buffer. it's giving "put the address here please" π―bufsizeβ length of that target buffer. yes bestie, it needs to know how much room it has π
β¨ DESCRIPTION β¨
so the function returns the number of bytes that are actually in the stored address β¨ not the size of the buffer, not a guess, the real byte count. iconic honestly.
β¨ SEE ALSO β¨
heads up, this all lives in the kernel file ./net/sunrpc/clnt.c, and here's the whole friend group π
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_peeraddr2str(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)
and that's the whole page, bestie π«Ά written from ./net/sunrpc with a date stamp of October 2026 β slay, go read the rest of section 9, i'm obsessed π
β¨
π¦ 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