rpc_clnt_ite...or_each_xprt(9)
π rpc_clnt_ite...or_each_xprt(9) β the Kernel API Manual, section 9, bestie β¨
okay so real quick before we dive in: this page lives in the Kernel API Manual, section 9, and the title is literally rpc_clnt_ite...or_each_xprt(9) β yes it's truncated with dots, no that's not a typo on my end, that's just how it's printed, iykyk π
β¨ NAME β¨
rpc_clnt_iterate_for_each_xprt β literally just "apply a function to all transports". that's the whole vibe. you got a client, it's got transports, you got a function, and we're gonna hit every single one of them π
πΈ SYNOPSIS πΈ
int rpc_clnt_iterate_for_each_xprt (struct rpc_clnt *clnt , int
(*fn)(struct rpc_clnt *, struct rpc_xprt *, void *) , void *data );
like, it returns int, takes your clnt, takes your fn, takes your data. three things. that's it. slay π«Ά
π¦ ARGUMENTS π¦
clntβ pointer to client. yeah. the client. the main character of this whole operation πfnβ function to apply. this is the one doing the actual work, we're just its little delivery service πdataβvoidpointer to function data. it'svoid *so it could be literally anything and honestly? relatable π
π DESCRIPTION π
okay so picture this: there's a list of RPC transports, right? and they're currently attached to the client. this function iterates through that list and applies the function fn(clnt, xprt, data) to each one. every transport gets a little visit. no transport left behind π§
and here's the important part, bestie, listen up β on error, the iteration stops, and the function returns the error value. so it bails immediately and hands you back that error. no cap, that's the whole contract π
π₯ SEE ALSO π₯
the source file is Kernel file ./net/sunrpc/clnt.c and like⦠there's a whole friend group here, so let me introduce everybody:
rpc_create(9)rpc_clone_client(9)rpc_clone_client_set_auth(9)rpc_switch_client_transport(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_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)
that's the whole squad. go read them. they ate π β¨
and that's the page, bestie!! π it comes to you from ./net/sunrpc, dated October 2026, and the footer insists on calling itself rpc_clnt_ite...or_each_xprt(9) again β iconic of it honestly. go iterate, queen πππ¦
π¦ 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