rpc_clnt_ite...or_each_xprt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” void pointer to function data. it's void * 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:

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