rxrpc_kernel_lookup_peer(9)
π rxrpc_kernel_lookup_peer β bestie's guide to finding your peer
Okay so this one is from the Kernel API Manual (yes, the kernel has lore) and it's literally called rxrpc_kernel_lookup_peer(9). Girl, the name is a mouthful but the vibe is simple: you got an address, you want the remote transport endpoint that goes with it. Let's go π
β¨ SYNOPSIS β¨
struct rxrpc_peer * rxrpc_kernel_lookup_peer (struct socket *sock ,
struct sockaddr_rxrpc *srx , gfp_t gfp );
That's the whole sentence, no cap β three args, returns a struct rxrpc_peer *. πΈ
π«Ά ARGUMENTS π«Ά
sockβ the socket you're gonna access it through. Like, that's the doorway, okay? πͺsrxβ the network address. The actual address-address. This is what we're looking up, bestie. πgfpβ the allocation flags. The whole "how am I allowed to grab memory for this" situation. π§
π DESCRIPTION π
So what it does: it looks up or creates a remote transport endpoint record for the address you specified. That's it. That's the whole function. Lookup, or create if it's not already there β main character behaviour honestly. π
β RETURN β
You get back the peer record you found, holding a reference β π₯ β or a negative error code if the address is invalid or unsupported. So do the vibe check on your return value, please, don't just assume it worked π
π¦ SEE ALSO π¦
Kernel file ./net/rxrpc/af_rxrpc.c and the whole friend group:
rxrpc_kernel_get_peer(9)rxrpc_kernel_put_peer(9)rxrpc_kernel_begin_call(9)rxrpc_kernel_shutdown_call(9)rxrpc_kernel_put_call(9)rxrpc_kernel_check_life(9)rxrpc_kernel_set_notifications(9)
iykyk π
Okay that's the page!! This one lives in ./net/rxrpc, dated October 2026 β so yes, technically the future, slay. Go look up those peers, bestie, and remember: reference counted means you gotta put it back π«Άβ¨π
π¦ 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