rxrpc_kernel_lookup_peer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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